[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 11:04:59 PDT 2017


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

> >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)
>> gold does not use relocated output to build .gdb_index. It scans
> relocations manually for these sections.
> So it able to filter out such ranges and not include them into .gdb_index.
>
> I think we can leave them in output, but make size of ranges to be zero
> (1:1 address solves that). That looks correct from spec side.
> And that gives a chance to use relocated output here and not scan
> relocations once again.
> Or we probably can ignore them, since we will know that ranges of size
> zero are stubs.
>

I don't really follow - why is the gold/current lld behavior insufficient?
By writing the addend as the relocation ({0, 6}, for example) for the end
of the range, it doesn't prematurely terminate the range list.


>
>
> George
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/2683387d/attachment.html>


More information about the llvm-commits mailing list