]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Re: Add support for a .base64 pseudo-op to gas
authorAlan Modra <amodra@gmail.com>
Thu, 11 Jul 2024 01:38:50 +0000 (11:08 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 11 Jul 2024 01:43:15 +0000 (11:13 +0930)
Fixes a failure on rx-elf where the standard data section isn't .data.
run_dump_test has machinery to translate .data in both options and
expected results for objdump, but not for readelf -x.

PR 31964
* testsuite/gas/all/base64.d: Dump .data with objdump.  Run on
all targets.

gas/testsuite/gas/all/base64.d

index 11410a72191d261466867e71c919fef04929c6d2..ad3cd9c6fca47de2c5b42aa02da6060092925200 100644 (file)
@@ -1,20 +1,16 @@
-#readelf: -x .data
+#objdump: -s -j .data
 #name : .base64 test
-# Weirdly the binutils/gas test harness does not support a binary
-#  dumping program like od.  The closes we can get is readelf,
-#  but of course this only works for ELF binaries.  Hence the
-#  restrictiopn below.  In theory though the .base64 directive
-#  will work for all output formats, even if we cannot test it.
-#target: [is_elf_format]
 
-Hex dump of section '.data':
-  0x00000000 68656c6c 6f20776f 726c640a 70616464 hello world.padd
-  0x00000010 696e6720 68657265 0a454c46 02010103 ing here.ELF....
-  0x00000020 00000000 00000000 02003e00 01000000 ..........>.....
-  0x00000030 50d34000 00000000 40000000 00000000 P.@.....@.......
-  0x00000040 d8204b10 00000000 00000000 40003800 . K.........@.8.
-  0x00000050 0e004000 2c002b00 06000000 04000000 ..@.,.+.........
-  0x00000060 40000000 00000000 40004000 00000000 @.......@.@.....
-  0x00000070 40004000 00000000 10030000 00000000 @.@.............
-  0x00000080 10030000 00000000 08000000 00000000 ................
-#pass
+.*:     .*
+
+Contents of section \.data:
+.* 68656c6c 6f20776f 726c640a 70616464 .*
+.* 696e6720 68657265 0a454c46 02010103 .*
+.* 00000000 00000000 02003e00 01000000 .*
+.* 50d34000 00000000 40000000 00000000 .*
+.* d8204b10 00000000 00000000 40003800 .*
+.* 0e004000 2c002b00 06000000 04000000 .*
+.* 40000000 00000000 40004000 00000000 .*
+.* 40004000 00000000 10030000 00000000 .*
+.* 10030000 00000000 08000000 00000000 .*
+.* 00000000 00000000 00(      |00    |000000) (        |00000000) .*