[PATCH] D31464: [ELF] - Stop producing broken entries in .debug_ranges section

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 10:40:49 PDT 2017


Ah, going back over this - so gold and lld's behavior doesn't break
consumers by creating a prematurely terminated range list, because the end
of the segment is still non-zero (as you say, using the addend, so I have
range lists like "0 to 6" for a comdat function that wasn't selected).

Why is that a problem/how does the 1:1 address that problem? (seems like it
doesn't break consumers, doesn't need a special case in the linker,
provides a pretty good hint to consumers, etc)

On Wed, Mar 29, 2017 at 8:55 AM George Rimar <grimar at accesssoftek.com>
wrote:

> >I'm more interested in the observed behavior than looking at the code.
> >
>
> Just checked that again, for ".debug_foo_ranges" it places zeroes, for
> ".debug_ranges" places "1".
> Like code says.
>
> >But it's a good catch!
> >
> >(Eric: this is vaguely amusing... (that the linker needs a special case
> for DWARF debug_ranges section or it may prematurely >terminate a range
> list - hopefully debug_rng_lists addresses this too))
>
> George.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/22564991/attachment.html>


More information about the llvm-commits mailing list