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

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


On Fri, Sep 15, 2017 at 3:39 PM, Rui Ueyama <ruiu at google.com> wrote:

> 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.
>
>
sorry for the typo: we don't *worry* too much


> 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/c98777d1/attachment-0001.html>


More information about the llvm-commits mailing list