[binutils-gdb] Re: Add support for a .base64 pseudo-op to gas

Alan Modra amodra@sourceware.org
Thu Jul 11 02:07:05 GMT 2024


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4cf957e7ac44097baa06e6caca5ad444cff78155

commit 4cf957e7ac44097baa06e6caca5ad444cff78155
Author: Alan Modra <amodra@gmail.com>
Date:   Thu Jul 11 11:08:50 2024 +0930

    Re: Add support for a .base64 pseudo-op to gas
    
    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.

Diff:
---
 gas/testsuite/gas/all/base64.d | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/gas/testsuite/gas/all/base64.d b/gas/testsuite/gas/all/base64.d
index 11410a72191..ad3cd9c6fca 100644
--- a/gas/testsuite/gas/all/base64.d
+++ b/gas/testsuite/gas/all/base64.d
@@ -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) .*


More information about the Binutils-cvs mailing list