From: Alan Modra Date: Thu, 11 Jul 2024 01:38:50 +0000 (+0930) Subject: Re: Add support for a .base64 pseudo-op to gas X-Git-Tag: binutils-2_43~158 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4cf957e7ac44097baa06e6caca5ad444cff78155;p=thirdparty%2Fbinutils-gdb.git 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 --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) .*