https://sourceware.org/bugzilla/show_bug.cgi?id=33765

--- Comment #10 from Sam James <sam at gentoo dot org> ---
When building xdp-tools (with some patches), I get this:
```
gcc -r -nostdlib -Wl,-z,noexecstack,--format=binary  -o
xsk_def_xdp_prog.embed.o xsk_def_xdp_prog.o
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
```

```
$ gdb --args ld  --eh-frame-hdr -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2 -z now -o xsk_def_xdp_prog.embed.o -r
-L/usr/lib/gcc/x86_64-pc-linux-gnu/16
-L/usr/lib/gcc/x86_64-pc-linux-gnu/16/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64
-L/usr/lib/gcc/x86_64-pc-linux-gnu/16/../../../../x86_64-pc-linux-gnu/lib
-L/usr/lib/gcc/x86_64-pc-linux-gnu/16/../../.. -L/lib -L/usr/lib -z noexecstack
"--format=binary" xsk_def_xdp_prog.o -v
Program received signal SIGSEGV, Segmentation fault.
Downloading 68.25 K source file
/usr/src/debug/sys-devel/binutils-9999/binutils/ld/ldelf.c
0x0000555555568433 in ldelf_after_open.constprop.0 (use_libpath=1, native=1,
elfsize=64, prefix=0x5555556ad9e6 "/usr", is_freebsd=0, is_linux=1)
    at /usr/src/debug/sys-devel/binutils-9999/binutils/ld/ldelf.c:1333
1333                elf_section_type (s) = SHT_NOTE;
(gdb) bt
#0  0x0000555555568433 in ldelf_after_open.constprop.0 (use_libpath=1,
native=1, elfsize=64, prefix=0x5555556ad9e6 "/usr", is_freebsd=0, is_linux=1)
    at /usr/src/debug/sys-devel/binutils-9999/binutils/ld/ldelf.c:1333
#1  0x000055555567ed2e in ldemul_after_open () at
/usr/src/debug/sys-devel/binutils-9999/binutils/ld/ldemul.c:80
#2  lang_process () at
/usr/src/debug/sys-devel/binutils-9999/binutils/ld/ldlang.c:8581
```

```
GNU ld (Gentoo 9999 p1) 2.45.50.20260110
==1544443== Invalid write of size 4
==1544443==    at 0x4014433: ldelf_after_open.constprop.0.cold (ldelf.c:1333)
==1544443==    by 0x412AD2D: ldemul_after_open (ldemul.c:80)
==1544443==    by 0x412AD2D: lang_process (ldlang.c:8581)
==1544443==    by 0x413AF1D: main (ldmain.c:958)
==1544443==  Address 0x4 is not stack'd, malloc'd or (recently) free'd
==1544443==
==1544443==
==1544443== Process terminating with default action of signal 11 (SIGSEGV):
dumping core
==1544443==  Access not within mapped region at address 0x4
==1544443==    at 0x4014433: ldelf_after_open.constprop.0.cold (ldelf.c:1333)
==1544443==    by 0x412AD2D: ldemul_after_open (ldemul.c:80)
==1544443==    by 0x412AD2D: lang_process (ldlang.c:8581)
==1544443==    by 0x413AF1D: main (ldmain.c:958)
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to