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

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 08:15:08 PDT 2017


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





More information about the llvm-commits mailing list