[PATCH] D17252: [ELF, Bug 26360] - allows undefines that are referenced from garbage collected sections.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 01:27:33 PST 2016


grimar added a comment.

In http://reviews.llvm.org/D17252#353691, @ruiu wrote:

> I think that we don't want it until it is proved that this "feature" is really needed.
>
> It is not hard to imagine that this is _not_ a feature of gold's or GNU ld's. Depending on your internal data structure, this behavior could naturally arise. If the same behavior naturally occurred in our linker, it'd be okay, but this patch intentionally mimic the obscure behavior of the other linkers. I think it needs more justification than "because GNU gold/ld do that" to add this code.


It was hard to imagine for me though, I was and still thinking about it as about feature. It is not logical for me to keep dependency on code that is dead itself. Keep errors because of undefines that are actually no longer exist because whole section is GCollected.
Also I found that "It is ok for dead code to reference undefined symbols..." (http://lists.llvm.org/pipermail/llvm-dev/2015-June/086571.html). From my POV it was mentionaed as a expected and desired feature.


http://reviews.llvm.org/D17252





More information about the llvm-commits mailing list