[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 08:28:56 PDT 2017


I'm more interested in the observed behavior than looking at the code.

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))

On Wed, Mar 29, 2017 at 8:15 AM George Rimar via Phabricator <
reviews at reviews.llvm.org> wrote:

> grimar added a comment.
>
> In https://reviews.llvm.org/D31464#713161, @dblaikie wrote:
>
> > Does GNU ld (binutils, or gold, or both?) actually special case this
> relocation in this section? (ie: a small hand-written assembly file with
> only debug_ranges ends up with different contents if you rename the section
> to debug_foo_ranges? (zeros in the latter case, 1s in the original case)
>
>
> In my tests only GNU ld handled that, gold generated broken entry. And
> yes, GNU ld handles this section separatelly by name, see:
>
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/reloc.c;h=4e95d85f0b94aacb5995c6f2307f94e6ede206fb;hb=e4067dbb2a3368dbf908b39c5435c84d51abc9f3#l1591
>
>
> https://reviews.llvm.org/D31464
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170329/a99d8687/attachment.html>


More information about the llvm-commits mailing list