https://sourceware.org/bugzilla/show_bug.cgi?id=32297
--- Comment #1 from Indu Bhagat <indu.bhagat at oracle dot com> --- A hand-crafted reproducer: $ cat bar.c void foo(); unsigned long var; void test () { var = (unsigned long)foo; foo (); } $ cat foo.s .globl foo foo: .section .note.GNU-stack,"",@progbits $ gcc -O2 -Wa,--gsframe -fPIC -c -o bar.o bar.c $ gcc -O2 -Wa,--gsframe -fPIC -S bar.c $ ld -shared -z ibtplt -o pltsec.so foo.o bar.o ld: BFD (GNU Binutils) 2.43.50.20241016 assertion fail /scratch/ibhagat/BINUTILS-GDB/binutils-gdb/binutils-gdb/bfd/elfxx-x86.c:1990 make: *** [Makefile:23: pltsec.so] Error 1 The above is on trunk, hence a different line number. The issue seems to be that the implementation in ld has incorrect conditionals for checking the presence of a .plt.sec, when writing out SFrame for it. As in the reproducer above, in absence of a .plt.sec, bfd triggers an assertion. -- You are receiving this mail because: You are on the CC list for the bug.