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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 11:00:20 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)
?
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.


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


More information about the llvm-commits mailing list