[PATCH v2] gas: Fix a testcase broken by new ZSTD support
Tsukasa OI
research_trasio@irq.a4lg.com
Fri Aug 5 08:54:37 GMT 2022
On 2022/08/05 17:24, Jan Beulich wrote:
> On 05.08.2022 09:45, Tsukasa OI wrote:
>> 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.
>
> Hmm, but SHF_STRINGS requires sh_entsize to be set, so the resulting
> object file is, strictly speaking, not valid. Perhaps use
> SHF_LINK_ORDER then (where the spec leaves room for sh_link being zero),
> or SHF_OS_NONCONFORMING (since we don't mean to actually link this
> object file into anywhere), or SHF_TLS?
>
> Jan
>
Ah, that's a lot harder than I expected. Okay... SHF_LINK_ORDER should
be fine, I looked into the BFD library and it seems SHF_LINK_ORDER
should not result in a harmful result.
Tsukasa
More information about the Binutils
mailing list