[PATCH] D44669: Use local symbols for creating .stack-size
Rafael Avila de Espindola via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 27 07:59:49 PDT 2018
espindola added a comment.
In https://reviews.llvm.org/D44669#1049038, @bd1976llvm wrote:
> Hi Rafael. The SN-Linker has the following rule for metadata sections:
>
> Relocations from "metadata sections" to global symbols are
> treated as discarded if the chosen global was not from the
> same object file. This makes sense as the metadata entry
> for a function is only applicable to that one particular version.
I agree with Cary that it is a bad idea to break sections. What is needed is a liker like lld that is efficient at handling sections.
> It would be an obvious extension to your SHF_LINK_ORDER concept.
> If we had this extension in ELF then we could remove this special case
> in MC and remove all of these local symbols that are bloating the
> assembler output.
It is not an obvious extension. The obvious solution is to just use multiple sections. I am sorry I missed this when it went in, but we should never add an extension that requires a section that refers to multiple ones. I will fix llvm to use multiple sections for -ffunction-sections/comdat next.
And there is no local symbol pouting the output. The assembler will convert the reference to use section symbols.
https://reviews.llvm.org/D44669
More information about the llvm-commits
mailing list