[PATCH] D22683: [ELF] Symbol assignment within input section list
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 13:38:02 PDT 2016
evgeny777 added inline comments.
================
Comment at: ELF/LinkerScript.cpp:120-121
@@ -122,1 +119,4 @@
+ // .foo : { *(.foo.*) end_foo = .; }
+ SectionOffset = alignTo(SectionOffset, C->Alignment);
+ SectionOffset += C->getSize();
};
----------------
ruiu wrote:
> This offset computation is not accurate. On MIPS or ARM, input sections may have additional pieces of data, or thunks, at their ends. Thunks are added to input sections in Writetr::finalizeSections, so in this function we don't know the exact size of input sections. So this is computing offsets too early.
Thanks for pointing this out. I suggest calculating offsets in addScriptedSymbols than. What's your opinion?
https://reviews.llvm.org/D22683
More information about the llvm-commits
mailing list