]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Arm tests: reduce objdump's output and improve some matching patterns
authorMatthieu Longo <matthieu.longo@arm.com>
Wed, 21 May 2025 10:08:31 +0000 (11:08 +0100)
committerMatthieu Longo <matthieu.longo@arm.com>
Wed, 11 Jun 2025 17:33:55 +0000 (18:33 +0100)
Linker scripts can change the sections order in the output. Some matching
patterns in tests try to detect the end of a section by detecting the
beginning of the next one. However, they mistakenly enforce the name of
the next section without any need. This caused the tests to break due to
minor changes to the linker scripts.

This patch adds '-j <interesting-section>' to the arguments of objdump
to dump only relevant information for the tests. This removed the issue
related to the ordering of the sections. The matching patterns were also
made stricter to match better the expected output.

ld/testsuite/ld-arm/unwind-1.d
ld/testsuite/ld-arm/unwind-2.d
ld/testsuite/ld-arm/unwind-3.d
ld/testsuite/ld-arm/unwind-4.d

index add5cb7cca0d8bcc4429b906cae3f508de667e58..073d6a5b56eac2ff1d6d55bd3a65da450a9d1039 100644 (file)
@@ -1,10 +1,7 @@
 #ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
 
 .*:     file format.*
 
-#...
-Contents of section .ARM.exidx:
- 8008 (f8ffff7f b0b0a880 f4ffff7f 01000000|7ffffff8 80a8b0b0 7ffffff4 00000001)  .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8008 (f8ffff7f b0b0a880 f4ffff7f 01000000|7ffffff8 80a8b0b0 7ffffff4 00000001)  \.+
index a096c9b6a9964ecf73a36d2dfdeb1d8ca3b4df21..c9cd433eca09aac7f4e73caa74ef3c3a19a247f8 100644 (file)
@@ -1,10 +1,7 @@
 #ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
 
 .*:     file format.*
 
-#...
-Contents of section .ARM.exidx:
- 8004 (fcffff7f b0b0a880 f8ffff7f 01000000|7ffffffc 80a8b0b0 7ffffff8 00000001)  .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8004 (fcffff7f b0b0a880 f8ffff7f 01000000|7ffffffc 80a8b0b0 7ffffff8 00000001)  \.+
index 0b8e85e11cb8d19beb68d03812897a3043de5cfe..9da1484b7278f4d1bddb13f6e5a7dabc5066221e 100644 (file)
@@ -1,11 +1,8 @@
 #ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
 
 .*:     file format.*
 
-#...
-Contents of section .ARM.exidx:
- 800c (f4ffff7f b0b0a880 f0ffff7f 01000000|7ffffff4 80a8b0b0 7ffffff0 00000001)  .*
- 801c (ecffff7f b0b0a880 e8ffff7f 01000000|7fffffec 80a8b0b0 7fffffe8 00000001)  .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 800c (f4ffff7f b0b0a880 f0ffff7f 01000000|7ffffff4 80a8b0b0 7ffffff0 00000001)  \.+
+ 801c (ecffff7f b0b0a880 e8ffff7f 01000000|7fffffec 80a8b0b0 7fffffe8 00000001)  \.+
index ffc87253ad4021d333ecbc85bf0bf853a543f485..7b71de884c399326a453dc83ac0cce60090019d9 100644 (file)
@@ -1,9 +1,8 @@
 #ld: -q -T arm.ld
-#objdump: -sr
+#objdump: -sr -j .ARM.exidx
 
 .*:     file format.*
 
-#...
 RELOCATION RECORDS FOR \[\.ARM\.exidx\]:
 OFFSET +TYPE +VALUE
 00000000 R_ARM_PREL31      \.text
@@ -17,11 +16,6 @@ OFFSET +TYPE +VALUE
 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)  .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8020 (e0ffff7f b0b0a880 dcffff7f e8ffff7f|7fffffe0 80a8b0b0 7fffffdc 7fffffe8)  \.+
+ 8030 (d8ffff7f b0b0a880 d8ffff7f 01000000|7fffffd8 80a8b0b0 7fffffd8 00000001)  \.+