This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Test also relocations for ARM unwinding section
- From: Akihiko Odaki <akihiko dot odaki dot 4i at stu dot hosei dot ac dot jp>
- To: binutils at sourceware dot org
- Cc: Paul Brook <paul at codesourcery dot com>, Akihiko Odaki <akihiko dot odaki dot 4i at stu dot hosei dot ac dot jp>
- Date: Sun, 11 Sep 2016 18:30:23 +0900
- Subject: [PATCH] Test also relocations for ARM unwinding section
- Authentication-results: sourceware.org; auth=none
- Authentication-results: mailgw03.hosei.ac.jp; sender-id=none header.from=akihiko dot odaki dot 4i at stu dot hosei dot ac dot jp; spf=none smtp.mfrom=akihiko dot odaki dot 4i at stu dot hosei dot ac dot jp
As reported in PR binutils/20595, BFD has a bug that it doesn't delete
relocations for deleted exidx. This change allows the testsuite to find the
flaw.
---
ld/testsuite/ld-arm/unwind-4.d | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
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) .*
--
2.9.3