[PATCH] D153335: [ELFAttributeParser] Skip unknown vendor subsections.
Simon Tatham via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 03:49:40 PDT 2023
simon_tatham added a comment.
In D153335#4446671 <https://reviews.llvm.org/D153335#4446671>, @MaskRay wrote:
> For the test, GNU readelf gives a warning.
That seems like a bug in GNU readelf to me! It looks as if GNU readelf is expecting every subsection of `.ARM.attributes` to have the same structure as the standardized "aeabi" section: it's complaining here that my custom subsection with vendor="ShouldBeIgnored" is not divided into internal sub-subsections indicating file, section or symbol scope, but instead is full of nothing but FFFFFFFF padding.
But ADDENDA32 <https://github.com/ARM-software/abi-aa/blob/main/addenda32/addenda32.rst#formal-syntax-of-an-elf-attributes-section> seems very clear on this: that internal structure is specific to "aeabi", and other vendors can define whatever format they like inside their own subsections. Of course some vendor subsections might //choose// to copy the "aeabi" internal structure, but they don't have to.
> Can we use `llvm-mc -filetype=obj` to construct the test? It will likely be more readable than the yaml file.
I'd guessed that MC might try to write its own attributes section and fight with a manually specified one, but in fact, yes, that works fine and I agree it's more readable.
> Then just implement it as an extra file with `split-file` as well.
I'm not sure about that. This particular test keeps its existing three sub-files in `lld/test/ELF/Inputs`. It would seem strange to use `split-file` for just this one extra one. Or do you mean you'd like me to reorganize the existing parts of the test while I'm here?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153335/new/
https://reviews.llvm.org/D153335
More information about the llvm-commits
mailing list