https://sourceware.org/bugzilla/show_bug.cgi?id=19019
Michael Karcher <sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ian at airs dot com, | |sourceware-bugzilla@mkarche | |r.dialup.fu-berlin.de Component|binutils |gold Assignee|unassigned at sourceware dot org |ccoutant at gmail dot com --- Comment #9 from Michael Karcher <sourceware-bugzilla at mkarcher dot dialup.fu-berlin.de> --- With access to a Debian build box, I found out that the broken shared library is created by LTO-linking with gold. The invocation is basically the following gcc command. gcc -shared -fPIC $(OBJECTS) -flto -O2 -Wl,--gc-sections -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,-fuse-ld=gold -Wl,--version-script=../src/libsystemd/libsystemd.sym -Wl,-z -Wl,relro -pthread -Wl,-soname -Wl,libsystemd.so.0 -o .libs/libsystemd.so.0.11.0 If I omit "-Wl,-fuse-ld=gold", I obtain a correct libsystemd.so.0.11.0: $ readelf -s .libs/libsystemd.so.0.11.0 | grep REGISTER 4: 0000000000000002 0 REGISTER GLOBAL DEFAULT UND 5: 0000000000000003 0 REGISTER GLOBAL DEFAULT UND 2007: 0000000000000002 0 REGISTER GLOBAL DEFAULT UND 2008: 0000000000000003 0 REGISTER GLOBAL DEFAULT UND Using gcc --save-temps, I obtained the LTO-generated assembler files, assembled them using as -s -K PIC -Av9 -64 -no-undeclared-regs -relax -o $x.o $x objdumping those files shows only REGISTER declarations for %g2 and %g3, which seem fine, linking them with gold results in a broken output file. I will attach the object files. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils