[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 19:06:01 PDT 2016


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

> > 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.
>
> Why only for definitions? This is not a very common case and I think
> it would make the code a lot simpler.
>

The whole point of this change is to make sure we don't have references in
the dynsym to symbols in unneeded DSOs. This is to avoid the scenario I
mentioned in D19464 where we were emitting version requirements for DSOs
that weren't in the needed list.

Filtering the dynsym seemed like the best solution to this problem, as it
means we don't end up with unnecessary DSO references in the executable
that were created by unneeded sections.

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


More information about the llvm-commits mailing list