https://sourceware.org/bugzilla/show_bug.cgi?id=26869
Martin Liska <mliska at suse dot cz> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ld: assertion fail |ld: assertion fail |../../bfd/elflink.c:14806 |../../bfd/elflink.c:14806 |on i686-linux-gnu |on i686-linux-gnu since | |382aae06322799a25ea52fe61b2 | |43cbca4db8d66 CC| |hjl.tools at gmail dot com --- Comment #3 from Martin Liska <mliska at suse dot cz> --- I have a nice reproducer: $ cat ~/Programming/testcases/metrics.ii void ReadElfBuildId(void *); extern char __ehdr_start; void ParseSmapsHeader() { ReadElfBuildId(&__ehdr_start); } $ g++ ~/Programming/testcases/metrics.ii -fPIC -shared -O -m32 -o /tmp/metrics.o -c $ ./ld/ld-new /tmp/metrics.o -shared -melf_i386 ./ld/ld-new: BFD (GNU Binutils) 2.34.50.20200401 assertion fail ../../bfd/elflink.c:14687 Segmentation fault (core dumped) For completeness there's .s file: $ cat metrics.s .file "metrics.ii" .text .globl _Z16ParseSmapsHeaderv .type _Z16ParseSmapsHeaderv, @function _Z16ParseSmapsHeaderv: .LFB0: .cfi_startproc pushl %ebx .cfi_def_cfa_offset 8 .cfi_offset 3, -8 subl $20, %esp .cfi_def_cfa_offset 28 call __x86.get_pc_thunk.bx addl $_GLOBAL_OFFSET_TABLE_, %ebx pushl __ehdr_start@GOT(%ebx) .cfi_def_cfa_offset 32 call _Z14ReadElfBuildIdPv@PLT addl $24, %esp .cfi_def_cfa_offset 8 popl %ebx .cfi_restore 3 .cfi_def_cfa_offset 4 ret .cfi_endproc .LFE0: .size _Z16ParseSmapsHeaderv, .-_Z16ParseSmapsHeaderv .section .text.__x86.get_pc_thunk.bx,"axG",@progbits,__x86.get_pc_thunk.bx,comdat .globl __x86.get_pc_thunk.bx .hidden __x86.get_pc_thunk.bx .type __x86.get_pc_thunk.bx, @function __x86.get_pc_thunk.bx: .LFB1: .cfi_startproc movl (%esp), %ebx ret .cfi_endproc .LFE1: .ident "GCC: (SUSE Linux) 10.2.1 20201028 [revision a78cd759754c92cecbf235ac9b447dcdff6c6e2f]" .section .note.GNU-stack,"",@progbits Started with H.J.'s revision 382aae06322799a25ea52fe61b243cbca4db8d66. -- You are receiving this mail because: You are on the CC list for the bug.