[lld] r313372 - Keep some relocations with undefined weak symbols.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 15:39:56 PDT 2017


On Fri, Sep 15, 2017 at 3:26 PM, Davide Italiano via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Fri, Sep 15, 2017 at 2:58 PM, Rafael Avila de Espindola via
> llvm-commits <llvm-commits at lists.llvm.org> wrote:
> > BTW, I have tried to change this to always create a dynamic symbol table
> > first and remove it in removeUnusedSyntheticSections if empty.
> >
> > A change is that we would have a dynamic symbol table on otherwise
> > static programs if they had an undefined weak symbol. As far as I can
> > tell, that is harmless.
> >
> > An annoying case is what to do with _DYNAMIC. The current patch has two
> > passes over the symbols. First checking if we need anything in the
> > dynamic symbol table. After that pass removeUnusedSyntheticSections can
> > remove the dynamic sections (.dynsym, .dynamic, etc) and we can decide
> > if _DYNAMIC should be added to the staic symbol table.
> >
> > A wip patch is attached. Does anyone think this is a good idea?
> >
> > And yet another option is to always have a .dynsym table. The extra cost
> > on static binaries would be really small, so this is tempting.
> >
>
> This last option is my favourite one. The impact in size should be
> really negligible.
> If there are objections, we should try to go for your WIP patch, but
> I'm under the impression the benefits introduced are not worth the
> complexity added.
>

I'd like to see an actual patch, but I agree that we don't too much about
size if size difference is negligible.


>
> Thanks for digging into this,
>
> --
> Davide
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170915/a708fa3e/attachment.html>


More information about the llvm-commits mailing list