[Bug binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections
https://sourceware.org/bugzilla/show_bug.cgi?id=19938 cctsai57 changed: What|Removed |Added CC||cctsai57 at gmail dot com --- Comment #26 from cctsai57 --- Hi, This fix makes gcc's libstdc++ testsuite many fails for the ARM target. I try to simplify them by the following flow: # Two source files. The first is simplified from gcc source: # libstdc++-v3/src/shared/hashtable-aux.cc: $ cat -n hashtable-aux.cc 1 extern const unsigned long __prime_list[] = 2 { 3 2ul, 3ul, 5ul, 7ul, 11ul, 13ul, 17ul, 19ul, 23ul, 29ul, 31ul, 4 37ul, 41ul, 43ul, 47ul, 53ul, 59ul, 61ul, 67ul, 71ul, 73ul 5 }; $ cat -n b.cc 1 #include 2 3 extern const unsigned long __prime_list[]; 4 5 int main() 6 { 7std::cout << "__prime_list[]\n"; 8for (int i = 0; i < 20; ++i) 9 std::cout << __prime_list[i] << ", "; 10std::cout << "\n"; 11 12return 0; 13 } $ arm-linux-gnueabihf-g++ -shared -fpic hashtable-aux.cc -o hashtable-aux.so $ arm-linux-gnueabihf-g++ b.cc ./hashtable-aux.so # Run under the QEMU $ export QEMU_LD_PREFIX=$(arm-linux-gnueabihf-g++ -print-sysroot) $ qemu-arm ./a.out __prime_list[] 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, The items in the __prime_list[] are all wrong zero! I guess that the problem is the lost R_ARM_COPY for __prime_list. See a.out ELF: $ arm-linux-gnueabihf-readelf --relocs a.out Relocation section '.rel.dyn' at offset 0x668 contains 2 entries: Offset InfoTypeSym.Value Sym. Name 00020d0c 1615 R_ARM_GLOB_DAT __gmon_start__ 00020d70 0d14 R_ARM_COPY00020d70 _ZSt4cout@GLIBCXX_3.4 Befor this fix, the old a.out ELF is: $ arm-linux-gnueabihf-readelf --relocs a.out Relocation section '.rel.dyn' at offset 0x668 contains 3 entries: Offset InfoTypeSym.Value Sym. Name 00020d14 1615 R_ARM_GLOB_DAT __gmon_start__ 00020d20 0a14 R_ARM_COPY00020d20 __prime_list 00020d78 0d14 R_ARM_COPY00020d78 _ZSt4cout@GLIBCXX_3.4 The tool's version: gcc: 6.1.1 binutils: 2.26.51 (master branch) glibc: 2.23 -- 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 binutils/19938] objcopy breaks sh_link and sh_info of SHT_SUNW_LDYNSYM and SHT_SUNW_symsort sections
https://sourceware.org/bugzilla/show_bug.cgi?id=19938 --- Comment #27 from Nick Clifton --- Created attachment 9239 --> https://sourceware.org/bugzilla/attachment.cgi?id=9239&action=edit Proposed extra patch (In reply to cctsai57 from comment #26) > This fix makes gcc's libstdc++ testsuite many fails for the ARM target. > I try to simplify them by the following flow: I think that this is due to a snafu on my part, where I accidentally included an experimental patch for a different bug in the comment for this PR. Please could you try out this patch to revert that accidental commit and let me know if it works for you. Cheers Nick -- 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/17550] Section groups (comdat/linkonce) create undefined symbols unnecessarily
https://sourceware.org/bugzilla/show_bug.cgi?id=17550 --- Comment #2 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=97196564c7e981bab7b968e19b171c5dfcb28c3c commit 97196564c7e981bab7b968e19b171c5dfcb28c3c Author: H.J. Lu Date: Fri May 6 09:46:34 2016 -0700 Strip global symbol defined in discarded section When a global symbol is defined in COMDAT group, we shouldn't leave an undefined symbol in symbol table when the symbol section is discarded unless there is a reference to the symbol outside of COMDAT group. bfd/ PR ld/17550 * elf-bfd.h (elf_link_hash_entry): Update comments for indx, documenting that indx == -3 if symbol is defined in a discarded section. * elflink.c (elf_link_add_object_symbols): Set indx to -3 if symbol is defined in a discarded section. (elf_link_output_extsym): Strip a global symbol defined in a discarded section. ld/ PR ld/17550 * testsuite/ld-elf/pr17550-1.s: New file. * testsuite/ld-elf/pr17550-2.s: Likewise. * testsuite/ld-elf/pr17550-3.s: Likewise. * testsuite/ld-elf/pr17550-4.s: Likewise. * testsuite/ld-elf/pr17550a.d: Likewise. * testsuite/ld-elf/pr17550b.d: Likewise. * testsuite/ld-elf/pr17550c.d: Likewise. * testsuite/ld-elf/pr17550d.d: Likewise. -- 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/17550] Section groups (comdat/linkonce) create undefined symbols unnecessarily
https://sourceware.org/bugzilla/show_bug.cgi?id=17550 H.J. Lu changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|--- |2.27 --- Comment #3 from H.J. Lu --- Fixed for 2.27. -- 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/19960] Gold failed to build with GCC 4.4
https://sourceware.org/bugzilla/show_bug.cgi?id=19960 Marcin KoĆcielnicki changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|ccoutant at gmail dot com |koriakin at 0x04 dot net -- 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