aboutsummaryrefslogtreecommitdiff
path: root/binutils/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/testsuite')
-rw-r--r--binutils/testsuite/binutils-all/objdump.Zs9
-rw-r--r--binutils/testsuite/binutils-all/objdump.exp16
-rw-r--r--binutils/testsuite/binutils-all/objdump.s1
3 files changed, 26 insertions, 0 deletions
diff --git a/binutils/testsuite/binutils-all/objdump.Zs b/binutils/testsuite/binutils-all/objdump.Zs
new file mode 100644
index 0000000..32905b5
--- /dev/null
+++ b/binutils/testsuite/binutils-all/objdump.Zs
@@ -0,0 +1,9 @@
+
+.*dw2-compressed.o: file format .*
+
+Contents of section .zdebug_abbrev:
+ 0000 01110110 06120111 01030825 08130b00 ...........%....
+ 0010 00022e00 3f0c3a0b 3b0b0308 49131101 ....\?.:.;...I...
+ 0020 1201400a 00000324 0003080b 0b3e0b00 ..@....\$.....>..
+ 0030 000000 ...
+#pass
diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index 4fe9e499..7071e96 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -466,6 +466,22 @@ if { ![is_elf_format] } then {
} else {
pass "objdump -W"
}
+
+ # Test objdump -Z -s on a file that contains some compressed .debug sections
+
+ set got [remote_exec host "$OBJDUMP $OBJDUMPFLAGS -Z -s -j .zdebug_abbrev $compressed_testfile" "" "/dev/null" "objdump.out"]
+
+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
+ fail "objdump -Z -s (reason: unexpected output)"
+ send_log $got
+ send_log "\n"
+ }
+
+ if { [regexp_diff objdump.out $srcdir/$subdir/objdump.Zs] } then {
+ fail "objdump -Z -s"
+ } else {
+ pass "objdump -Z -s"
+ }
}
# Test objdump -WL on a file that contains line information for multiple files and search directories.
diff --git a/binutils/testsuite/binutils-all/objdump.s b/binutils/testsuite/binutils-all/objdump.s
index aea35df..f80f8c5 100644
--- a/binutils/testsuite/binutils-all/objdump.s
+++ b/binutils/testsuite/binutils-all/objdump.s
@@ -2,6 +2,7 @@
.*dw2-compressed.o: file format .*
Contents of section .zdebug_abbrev:
+ NOTE: This section is compressed, but its contents have NOT been expanded for this dump.
0000 5a4c4942 00000000 00000033 785e6314 ZLIB.......3x\^c.
0010 64146013 62146464 e650e510 e6666060 d.`.b.dd.P...f``
0020 d263b0e7 b1e2b6e6 66e6f014 16641462 .c......f....d.b