[PATCH] D41640: [ELF] - Do not ignore discarding of .rela.plt/.rela.dyn, allow doing custom layout for them.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 23:24:44 PST 2018
ruiu added inline comments.
================
Comment at: ELF/LinkerScript.cpp:293-294
// which are common because they are in the default bfd script.
- if (Sec->Type == SHT_REL || Sec->Type == SHT_RELA)
+ // We do not ignore SHT_REL[A] linker-synthesized sections here because
+ // want to support scripts that do custom layout for them.
+ if (!isa<SyntheticSection>(Sec) &&
----------------
It is not still clear to me what this comment means. It's because you cannot discard linker-synthesized sections, right?
================
Comment at: ELF/LinkerScript.cpp:320-321
for (InputSection *S : V) {
if (S == InX::ShStrTab || S == InX::Dynamic || S == InX::DynSymTab ||
- S == InX::DynStrTab)
+ S == InX::DynStrTab || S == InX::RelaPlt || S == InX::RelaDyn)
error("discarding " + S->Name + " section is not allowed");
----------------
Can this just be isa<SyntheticSection>?
https://reviews.llvm.org/D41640
More information about the llvm-commits
mailing list