[PATCH v2] gas: Fix a testcase broken by new ZSTD support
Tsukasa OI
research_trasio@irq.a4lg.com
Fri Aug 5 07:45:30 GMT 2022
The commit 1369522f36eece1b37139a81f7f2139ba3915172 ("Recognize the new ELF
compression type for ZSTD.") added the new ELF compression type but it
accidentally broke a GAS testcase. Since testing for the section type
"2048" (SHF_COMPRESSED) is not going to be portable in the long term, it
now tests SHF_STRINGS ("32") instead. ".word 0" should be okay to
represent no null-terminated strings.
gas/ChangeLog:
* testsuite/gas/elf/section10.s: Use SHF_STRINGS to test. Put an
empty string in it.
* testsuite/gas/elf/section10.d: Reflect the changes above.
---
gas/testsuite/gas/elf/section10.d | 3 +--
gas/testsuite/gas/elf/section10.s | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/gas/testsuite/gas/elf/section10.d b/gas/testsuite/gas/elf/section10.d
index d51bd4e36e5..4ab3e8e56e9 100644
--- a/gas/testsuite/gas/elf/section10.d
+++ b/gas/testsuite/gas/elf/section10.d
@@ -13,8 +13,7 @@
[ ]*\[.*6000000\]: OS \(.*6000000\)
[ ]*\[.*\][ ]+sec2
[ ]*PROGBITS.*
-[ ]*\[0+00806\]: ALLOC, EXEC, COMPRESSED
-[ ]*\[<unknown>: 0x[0-9]+\], .*
+[ ]*\[0+00026\]: ALLOC, EXEC, STRINGS
#...
[ ]*\[.*\][ ]+sec3
[ ]*PROGBITS.*
diff --git a/gas/testsuite/gas/elf/section10.s b/gas/testsuite/gas/elf/section10.s
index d52b3458fb1..8b140715fb0 100644
--- a/gas/testsuite/gas/elf/section10.s
+++ b/gas/testsuite/gas/elf/section10.s
@@ -3,8 +3,8 @@
.word 1
# Make sure that a numeric value can be mixed with alpha values.
- .section sec2, "a2048x"
- .word 2
+ .section sec2, "a32x"
+ .word 0
# Make sure that specifying further arguments to .sections is still supported
.section sec3, "0xfedff000MS", %progbits, 32
base-commit: 731d2cc1d5106c077584bd83e96dbba4f7e11118
--
2.34.1
More information about the Binutils
mailing list