[PATCH] D118840: [ELF] Support (TYPE=<value>) to customize the output section type
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 23:00:34 PST 2022
MaskRay added inline comments.
================
Comment at: lld/ELF/ScriptParser.cpp:793
+constexpr std::pair<const char *, unsigned> typeMap[] = {
+ ECase(SHT_PROGBITS), ECase(SHT_STRTAB), ECase(SHT_NOTE),
+ ECase(SHT_NOBITS), ECase(SHT_INIT_ARRAY), ECase(SHT_FINI_ARRAY),
----------------
peter.smith wrote:
> I'm interested in why `SHT_STRTAB` that is usually only accessed from linker generated symbol tables. While in theory it could be constructed by a user created section, what symbol table would reference it with the sh_link field.
>
Nick suggested SHT_STRTAB in https://sourceware.org/pipermail/binutils/2022-February/119594.html
I agree that SHT_STRTAB is not easily usable, so I have dropped it in the diff. We can add it when the need comes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118840/new/
https://reviews.llvm.org/D118840
More information about the llvm-commits
mailing list