[PATCH] D19490: ELF: Teach section GC to also GC shared symbols.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 14:56:05 PDT 2016


On Mon, Apr 25, 2016 at 2:24 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 25 April 2016 at 17:18, Peter Collingbourne <peter at pcc.me.uk> wrote:
> > pcc added a comment.
> >
> >> This matches the gold and bfd behaviour?
> >
> >
> > bfd exports foo and bar. gold exports foo, bar and bar2.
>
> Would you be OK with agreeing with gold on this? The logic as I see is
>
> * The only reason we would export bar2 without --gc-sections is that
> we noticed a .so using it.

* Anything that can put a symbol in the dynamic symbol table can keep
> the section that defines it alive.
>

That all makes sense when we see a definition both in the object files and
the DSO, but I don't see why it should apply in the case where we only see
a definition in the DSO.

Thanks,
-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160425/9070b9cd/attachment.html>


More information about the llvm-commits mailing list