[Bug ld/24905] X86 PCREL relocation against hidden symbol defined in linker scripts fails
https://sourceware.org/bugzilla/show_bug.cgi?id=24905 Stephen Crane changed: What|Removed |Added CC||sjc+binutils_bugzilla@immun ||ant.com -- 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/24905] X86 PCREL relocation against hidden symbol defined in linker scripts fails
https://sourceware.org/bugzilla/show_bug.cgi?id=24905 --- Comment #1 from Stephen Crane --- Created attachment 11948 --> https://sourceware.org/bugzilla/attachment.cgi?id=11948=edit test.ldscript -- 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/24905] New: X86 PCREL relocation against hidden symbol defined in linker scripts fails
https://sourceware.org/bugzilla/show_bug.cgi?id=24905 Bug ID: 24905 Summary: X86 PCREL relocation against hidden symbol defined in linker scripts fails Product: binutils Version: 2.33 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: sjc+binutils_bugzilla at immunant dot com CC: hjl.tools at gmail dot com Target Milestone: --- Created attachment 11947 --> https://sourceware.org/bugzilla/attachment.cgi?id=11947=edit test.c Commit 83924b3846361f2f76f9a6e7b5afa01c0eebbd4f (https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=83924b3846361f2f76f9a6e7b5afa01c0eebbd4f) moved the PIC check earlier in the link process. It seems this breaks linker script defined symbols that use ADDR(), which previously worked fine in ld 2.32. Can this check be moved back into relocate_section instead of check_relocs? Test case attached, build with: gcc test.c test.ldscript -fPIC -shared -- 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/22448] Undefined symbol in both shared library and plugin-added object does not trigger archive rescan
https://sourceware.org/bugzilla/show_bug.cgi?id=22448 Stephen Crane <sjc+binutils_bugzilla at immunant dot com> changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #4 from Stephen Crane <sjc+binutils_bugzilla at immunant dot com> --- Fixed in 71739b698d47945463f183619078ff680c277f0f -- 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/22448] Undefined symbol in both shared library and plugin-added object does not trigger archive rescan
https://sourceware.org/bugzilla/show_bug.cgi?id=22448 Stephen Crane <sjc+binutils_bugzilla at immunant dot com> changed: What|Removed |Added Attachment #10605|0 |1 is obsolete|| --- Comment #2 from Stephen Crane <sjc+binutils_bugzilla at immunant dot com> --- Created attachment 10606 --> https://sourceware.org/bugzilla/attachment.cgi?id=10606=edit New patch to not fill plugin undefined symbols This is a better patch that fixes the basic problem while keeping functionality the same. We should never have been paying attention to newly seen undefined symbols from dynamic objects, only regular objects matter here. I don't think this should break anything else, and all tests pass with this fix. -- 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/22448] Undefined symbol in both shared library and plugin-added object does not trigger archive rescan
https://sourceware.org/bugzilla/show_bug.cgi?id=22448 --- Comment #1 from Stephen Crane <sjc+binutils_bugzilla at immunant dot com> --- Created attachment 10605 --> https://sourceware.org/bugzilla/attachment.cgi?id=10605=edit Proposed fix for gold I've attached a patch to fix this bug for gold. My fix is to pass every new undefined symbol to the plugin manager rather than just the first, since we may not be in replacement phase when first seeing the undefined symbol. I want to double check that this won't cause performance problems for the plugin manager if there are many of undefined symbols, but after looking into this I'll post the patch onto the listserve for review. -- 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/22448] New: Undefined symbol in both shared library and plugin-added object does not trigger archive rescan
https://sourceware.org/bugzilla/show_bug.cgi?id=22448 Bug ID: 22448 Summary: Undefined symbol in both shared library and plugin-added object does not trigger archive rescan Product: binutils Version: 2.30 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: sjc+binutils_bugzilla at immunant dot com CC: ian at airs dot com Target Milestone: --- Created attachment 10604 --> https://sourceware.org/bugzilla/attachment.cgi?id=10604=edit archive containing dso1.c, dso2.c, and lto.c Background: Clang adds calls to __mulodi4 for trapping long long multiplies when building with -ftrapv on 32-bit platforms. This call is added during LTO compilation, so the symbol is undefined only when the LTO plugin adds the newly compiled object. If a shared library contains an undefined symbol and the LTO plugin adds a reference to that undefined symbol in a new object, the newly undefined symbol does not properly trigger a rescan of the archives to attempt to resolve the symbol. There are probably easier ways to reproduce, but the basic requirement is that LTO adds a call to a previously unseen symbol. To reproduce this bug the way I did using a stock clang and LLVM LTO plugin, you will need an archive containing the implementation of __mulodi4 (found in clang's compiler-rt builtins). In the following instructions I call this archive libcompiler_rt-extras.a since that's what is available in AOSP. Build the attached source file archive as follows for 32-bit x86 (can also reproduce on 32-bit ARM): Build libdso1.so, which will contain an implementation of __mulodi4: clang dso1.c -c -ftrapv -m32 clang dso1.o libcompiler_rt-extras.a -o libdso1.so -shared -ftrapv -Wl,-no-undefined -fuse-ld=gold -m32 readelf -s libdso1.so | grep mulodi4 6: 0570 265 FUNCGLOBAL DEFAULT 11 __mulodi4 43: 0570 265 FUNCGLOBAL DEFAULT 11 __mulodi4 Build libdso2.so, which does _not_ contain an implementation of __mulodi4 and links against the implementation in libdso1.so: clang dso2.c -c -ftrapv -m32 clang dso2.o libdso1.so -o libdso2.so -shared -ftrapv -Wl,-no-undefined -fuse-ld=gold -m32 readelf -s libdso2.so | grep mulodi4 2: 0 FUNCGLOBAL DEFAULT UND __mulodi4 20: 0 FUNCGLOBAL DEFAULT UND __mulodi4 Build liblto.so, which will fail to link: clang lto.c -c -flto -ftrapv -m32 clang lto.o libcompiler_rt-extras.a libdso2.so -o liblto.so -shared -ftrapv -flto -Wl,-no-undefined -fuse-ld=gold -m32 /tmp/lto-llvm-3b7070.o:ld-temp.o:function lto: error: undefined reference to '__mulodi4' -- 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/21090] gcc compiled with --enable-default-pie show errors in binutils testsuite
https://sourceware.org/bugzilla/show_bug.cgi?id=21090 Stephen Crane <sjc+binutils_bugzilla at immunant dot com> changed: What|Removed |Added CC||sjc+binutils_bugzilla@immun ||ant.com -- 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/19976] Can't resolve symbol from an ar archive needed plugin processing when in replacement phrase
https://sourceware.org/bugzilla/show_bug.cgi?id=19976 Stephen Crane <sjc+binutils_bugzilla at immunant dot com> changed: What|Removed |Added CC||sjc+binutils_bugzilla@immun ||ant.com -- 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