| Issue |
163496
|
| Summary |
[LLD] Empty .interp section in vmlinux breaks GDB debugging on PowerPC
|
| Labels |
lld
|
| Assignees |
|
| Reporter |
vishalc-ibm
|
## Environment
- **Target**: PowerPC
- **Host**: X86
- **Build command**: `make LLVM=1 ARCH=powerpc -j $(nproc) vmlinux`
## Issue
LLD generates vmlinux with an empty `.interp` section, causing GDB to crash when connecting to QEMU:
```bash
gdb vmlinux
(gdb) target remote :1234 # crashes here
```
```bash
$ make LLVM=1 ARCH=powerpc -j`nproc` vmlinux # works fine
$ llvm-readelf -p .interp vmlinux
String dump of section '.interp':
```
## Expected Behavior
The kernel should not have a `.interp` section. GNU ld does not emit this section:
```bash
$ make LLVM=1 ARCH=powerpc LD=powerpc64le-linux-gnu-ld -j 8 vmlinux # works fine
$ llvm-readelf -p .interp vmlinux
llvm-readelf: warning: 'vmlinux': could not find section '.interp'
```
## Impact
Breaks kernel debugging with QEMU+GDB for PowerPC builds using LLVM.
📌 [GDB Bugzilla](https://sourceware.org/bugzilla/show_bug.cgi?id=33481)
📌 [LKML Thread](https://lore.kernel.org/all/[email protected]/)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs