[PATCH] D30193: [ELF] - Scan lazy linkerscipt symbols early.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 10:15:20 PST 2017
On Tue, Feb 21, 2017 at 9:37 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:
> I think the real problem is at
>
> template <class ELFT> static SymbolBody *addRegular(SymbolAssignment *Cmd)
> {
> uint8_t Visibility = Cmd->Hidden ? STV_HIDDEN : STV_DEFAULT;
> Symbol *Sym = Symtab<ELFT>::X->addUndefined(
> Cmd->Name, /*IsLocal=*/false, STB_GLOBAL, Visibility,
> /*Type*/ 0,
> /*CanOmitFromDynSym*/ false, /*File*/ nullptr);
>
> replaceBody<DefinedRegular<ELFT>>(Sym, Cmd->Name, /*IsLocal=*/false,
> Visibility, STT_NOTYPE, 0, 0, nullptr,
> nullptr);
> return Sym->body();
> }
>
> We add an undefined just to replace it, which has the side effect of
> fetching the archive member. We should probably just have it as a single
> step in Symtab.
You can probably just use insert() instead of addUndefined().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170221/a2502690/attachment.html>
More information about the llvm-commits
mailing list