aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2016-09-23 16:32:04 +0100
committerNick Clifton <nickc@redhat.com>2016-09-23 16:32:04 +0100
commit5025eb7c0d87b01507116353b5d63b163d7add3d (patch)
tree5ee96f3e2ad11fe3c7c2fd3959bd2cd6f2c7c1c9 /ld
parent7c4236c3505d8dca3c6d9c2bc61145fa759bf4ce (diff)
downloadgdb-5025eb7c0d87b01507116353b5d63b163d7add3d.zip
gdb-5025eb7c0d87b01507116353b5d63b163d7add3d.tar.gz
gdb-5025eb7c0d87b01507116353b5d63b163d7add3d.tar.bz2
Delete relocations associatesd with deleted exidx entries.
PR ld/20595 ld * testsuite/ld-arm/unwind-4.d: Add -q option to linker command line and -r option to objdump command line. Match emitted relocs to make sure that superflous relocs are not generated. bfd * elf-bfd.h (struct elf_backend_data): Add elf_backend_count_output_relocs callback to count relocations in the final output. * elf-arm.c (elf32_arm_add_relocation): Deleted. (elf32_arm_write_section): Move additional relocation to emit_relocs. (elf32_arm_count_output_relocs): New function. (emit_relocs): New function. (elf32_arm_emit_relocs): New function. (elf32_arm_vxworks_emit_relocs): New function. (elf_backend_emit_relocs): Updated to use the new functions. (elf_backend_count_output_relocs): New define. * bfd/elflink.c (bfd_elf_final_link): Do not add additional_reloc_count to the relocation count. (_bfd_elf_link_size_reloc_section): Use callback to count the relocations which will be in output. (_bfd_elf_default_count_output_relocs): New function. * bfd/elfxx-target.h (elf_backend_count_output_relocs): New define.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/testsuite/ld-arm/unwind-4.d18
2 files changed, 23 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index ee43d40..56e6133 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2016-09-23 Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
+
+ PR ld/20595
+ * testsuite/ld-arm/unwind-4.d: Add -q option to linker command
+ line and -r option to objdump command line. Match emitted relocs
+ to make sure that superflous relocs are not generated.
+
2016-09-23 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* emulparams/elf64_s390.sh: Change TEXT_START_ADDR to 256MB.
diff --git a/ld/testsuite/ld-arm/unwind-4.d b/ld/testsuite/ld-arm/unwind-4.d
index 0a4427a..0bed0dc 100644
--- a/ld/testsuite/ld-arm/unwind-4.d
+++ b/ld/testsuite/ld-arm/unwind-4.d
@@ -1,9 +1,23 @@
-#ld: -T arm.ld
-#objdump: -s
+#ld: -q -T arm.ld
+#objdump: -sr
.*: file format.*
#...
+RELOCATION RECORDS FOR \[\.ARM\.exidx\]:
+OFFSET TYPE VALUE
+00000000 R_ARM_PREL31 \.text
+00000000 R_ARM_NONE __aeabi_unwind_cpp_pr0
+00000008 R_ARM_PREL31 \.text
+00000008 R_ARM_NONE __aeabi_unwind_cpp_pr1
+0000000c R_ARM_PREL31 \.text
+00000010 R_ARM_PREL31 \.text
+00000010 R_ARM_NONE __aeabi_unwind_cpp_pr0
+00000018 R_ARM_PREL31 \.text
+
+
+Contents of section .text:
+#...
Contents of section .ARM.exidx:
8020 (e0ffff7f b0b0a880 dcffff7f e8ffff7f|7fffffe0 80a8b0b0 7fffffdc 7fffffe8) .*
8030 (d8ffff7f b0b0a880 d8ffff7f 01000000|7fffffd8 80a8b0b0 7fffffd8 00000001) .*