Arm tests: reduce objdump's output and improve some matching patterns

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.
This commit is contained in:
Matthieu Longo
2025-05-21 11:08:31 +01:00
parent eb6c9310ee
commit 1240a24b97
4 changed files with 14 additions and 29 deletions

View 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) \.+

View 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) \.+

View 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) \.+

View 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) \.+