[Bug ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5
https://sourceware.org/bugzilla/show_bug.cgi?id=17739 Michael Karcher changed: What|Removed |Added CC||sourceware-bugzilla@mkarche ||r.dialup.fu-berlin.de --- Comment #2 from Michael Karcher --- Created attachment 8100 --> https://sourceware.org/bugzilla/attachment.cgi?id=8100&action=edit Example object files The tar file contains three object files, that provoke the assertion when linked together using "ld --gc-sections -shared JSNodeCustom.o JSNode.o JSNotation.o" -- 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
[Bug ld/17739] Assertion fail ../../bfd/elf32-sh.c:4504 on sh4 when compiling Qt5
https://sourceware.org/bugzilla/show_bug.cgi?id=17739 --- Comment #4 from Michael Karcher --- Thanks for your comment, which seems to be spot-on. It allowed me to create a minimal example that exhibits the same assertation failure if linked with --gc-sections: .section data.kept .globl foo foo: .long foo@GOT .section data.omitted .long foo@GOTOFF It seems like sh_elf_gc_sweep_hook should not decrement the refcount for GOTOFF and GOTPC relocation types. Patch with testcase incoming later -- 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
[Bug gold/18855] String constants mixed up when linked with gold on Linux/sparc64
https://sourceware.org/bugzilla/show_bug.cgi?id=18855 Michael Karcher changed: What|Removed |Added CC||sourceware-bugzilla@mkarche ||r.dialup.fu-berlin.de --- Comment #5 from Michael Karcher --- Created attachment 8675 --> https://sourceware.org/bugzilla/attachment.cgi?id=8675&action=edit Automated testcase I made a automatic test case for it (see attachment). I think the ltrans.*.s file in my archive are my own gcc invocation on sparc64, but the files from attachment 8619 should do as well. Just run make from the attached archive, after extracting it into a binutils build tree: mkarcher@aquila:~/src/Development/binutils-gdb/testdata$ make -s clean check First output line: address that gets passed to puts Second output line: address that contains the string to be printed 142c00 2025730a 252d3673 5b256c69 %s.%-6s[%li 1428d0 32323600 3d3d3d20 74726965 226.=== trie mkarcher@aquila:~/src/Development/binutils-gdb/testdata$ make -s clean check LD=../ld/ld-new ../ld/ld-new: warning: cannot find entry symbol _start; defaulting to 00100120 First output line: address that gets passed to puts Second output line: address that contains the string to be printed 1428b0 6e00 32323600 n...226. 1428b0 6e00 32323600 n...226. Using ld, the output is OK (the same line is outputted twice), using gold (the default), the output shows that the string reference is off. The testcase is host platform independent, it just requires binutils to be compiled for target architecture sparc64-unknown-linux-gnu. Interestingly, the output from gold has been observed to be correct for some orders of the object files, but incorrect for other orders (happened to me until I had sorting in, as the file names got mixed up as the kernel liked depending on what files were present in the same directory). -- 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
[Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using STT_REGISTER when linking against libsystemd
https://sourceware.org/bugzilla/show_bug.cgi?id=19019 Michael Karcher 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 --- 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: 0002 0 REGISTER GLOBAL DEFAULT UND 5: 0003 0 REGISTER GLOBAL DEFAULT UND 2007: 0002 0 REGISTER GLOBAL DEFAULT UND 2008: 0003 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
[Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using STT_REGISTER when linking against libsystemd
https://sourceware.org/bugzilla/show_bug.cgi?id=19019 --- Comment #10 from Michael Karcher --- Created attachment 8676 --> https://sourceware.org/bugzilla/attachment.cgi?id=8676&action=edit machine object files created during LTO link Attached: seemingly correct object files resulting in the broken shared object. (sid-sparc64-sbuild)mkarcher@ravirin:~/systemd-226/build-deb$ for x in libsystemd.so.0.11.0.ltrans*.s.o; do readelf -s $x | grep REGISTER ; done 65: 0002 0 REGISTER GLOBAL DEFAULT UND 66: 0003 0 REGISTER GLOBAL DEFAULT UND [...] 27: 0002 0 REGISTER GLOBAL DEFAULT UND 28: 0003 0 REGISTER GLOBAL DEFAULT UND (sid-sparc64-sbuild)mkarcher@ravirin:~/systemd-226/build-deb$ gold -shared lib*ltrans*s.o -o temp.so (sid-sparc64-sbuild)mkarcher@ravirin:~/systemd-226/build-deb$ readelf -s temp.so | grep REGISTER 1379: 0 REGISTER GLOBAL DEFAULT UND (sid-sparc64-sbuild)mkarcher@ravirin:~/systemd-226/build-deb$ tar -cvjf intermediates.tar.bz2 lib*ltrans*.s.o -- 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
[Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using STT_REGISTER when linking against libsystemd
https://sourceware.org/bugzilla/show_bug.cgi?id=19019 Michael Karcher changed: What|Removed |Added Attachment #8676|0 |1 is obsolete|| --- Comment #11 from Michael Karcher --- Created attachment 8679 --> https://sourceware.org/bugzilla/attachment.cgi?id=8679&action=edit Minimal gold testcase for STT_REGISTER relocations No need to use any files from libsystemd. This is a generic gold issue, minimal testcase attached. -- 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
[Bug gold/19019] [SPARC64] Only registers %g[2367] can be declared using STT_REGISTER when linking against libsystemd
https://sourceware.org/bugzilla/show_bug.cgi?id=19019 Michael Karcher changed: What|Removed |Added Attachment #8679|0 |1 is obsolete|| --- Comment #12 from Michael Karcher --- Created attachment 8680 --> https://sourceware.org/bugzilla/attachment.cgi?id=8680&action=edit Minimal gold testcase for STT_REGISTER relocations (fixed "written by" line) The first version contained incorrect copy-pasta in the "written by" line in the (trivial) test shell script. Sorry for that. -- 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