[Bug ld/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 Nick Clifton changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #10 from Nick Clifton --- I have applied Akihiko's patch, which is a much better way yo solve this problem. -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #9 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9eaff8613893f063400fdae95bc382ab33685e3b commit 9eaff8613893f063400fdae95bc382ab33685e3b Author: Akihiko Odaki Date: Wed Sep 28 11:50:41 2016 +0100 Fix seg-fault in the linker introduced by the previous delta. PR ld/20636 * elf-bfd.h (struct elf_backend_data): Delete elf_backend_count_output_relocs callback and add elf_backend_update_relocs. * elf32-arm.c (elf32_arm_count_output_relocs): Deleted. (emit_relocs): Deleted. (elf32_arm_emit_relocs): Deleted. (elf_backend_emit_relocs): Updated not to use the old functions. (elf32_arm_update_relocs): New function. (elf_backend_update_relocs): New define. * elflink.c (bfd_elf_final_link): Add additional_reloc_count to the relocation count. Call elf_backend_emit_relocs. (_bfd_elf_size_reloc_section): Do not call elf_backend_count_output_relocs. * elfxx-target.h (elf_backend_count_output_relocs): Deleted. (elf_backend_update_relocs): New define. -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #8 from Szabolcs Nagy --- (In reply to Szabolcs Nagy from comment #7) > (order of objects in the archive seems to matter for some reason). that's only because the out-of-bound reldata->hashes[2] entry happens to be 0 with some ordering which works out fine. -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #7 from Szabolcs Nagy --- attached the asm test cases, they are compiled from glibc sources sysdeps/gnu/unwind-resume.c sysdeps/arm/find_exidx.c sysdeps/arm/aeabi_unwind_cpp_pr1.c and an archive of the resulting objects triggers the crash with ld -r --whole-archive (order of objects in the archive seems to matter for some reason). -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #6 from Szabolcs Nagy --- Created attachment 9529 --> https://sourceware.org/bugzilla/attachment.cgi?id=9529=edit testcase asm 3 -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #5 from Szabolcs Nagy --- Created attachment 9528 --> https://sourceware.org/bugzilla/attachment.cgi?id=9528=edit testcase asm 2 -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #4 from Szabolcs Nagy --- Created attachment 9527 --> https://sourceware.org/bugzilla/attachment.cgi?id=9527=edit testcase asm 1 -- 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/20636] [arm] ld crash when linking glibc unwind code
https://sourceware.org/bugzilla/show_bug.cgi?id=20636 --- Comment #1 from Szabolcs Nagy --- during bfd_elf_final_link: bfd/elflink.c:11409 bfd_elf_final_link first sets reldata->count to 2 bfd/elf32-arm.c:19031 elf32_arm_count_output_relocs counts 3 output relocs bfd/elflink.c:2468 _bfd_elf_link_size_reloc_section allocates 3 entry for reldata->hdr.contents allocates 2 entry for reldata->hash bfd/elf32-arm.c:19336 emit_relocs sets reldata->count to 3 bfd/elflink.c:8406 elf_link_adjust_relocs assumes reldata->count (3) is the size of reldata->hashes so either the hash allocation is incorrect in _bfd_elf_link_size_reloc_section or the relocation counting is wrong. -- 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