[llvm] r289961 - Revert "dwarfdump: Support/process relocations on a CU's abbrev_off"

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 22 00:12:59 PST 2016


>Seems we have a few choices:

>
>Say that getSectionLoadAddress should return 0 for all debug info sections
>Change libDebugInfo/DWARF to not query getSectionLoadAddress for debug info sections (so they're effectively zero)
>Change DWARFDebugAbbrev::extract to take into account the base address of the section when parsing/building the table.
>
>I suspect 1 or 2 is better, and probably 2. But that's also a bit inconvenient having to do more special case logic about how we >apply/create relocations - an already pretty complicated part of the DWARF parsing code, I think.
>
>(+ Lang, Keno, and Eric - involved in adding this getSectionLoadAddress support in the first place. I'm guessing for the JIT use >case it wouldn't have ever had a load address for a debug info section - just for the code sections?)

And we also have one more choice - extend collectAddressRange API to return section id. That was initial reason why I had to use
current way in LLD.

But actually that probably be overcomplication and I believe we can fix it in something like (1) you mentioned on LLD side.
The difference - I think since interface method is called getSectionLoadAddress, it is just reasonable to make
it return offset only for allocatable sections.

I prepared a patch: https://reviews.llvm.org/D28045, that solves the problem we have here, what do you think ?

George.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161222/226e2d08/attachment.html>


More information about the llvm-commits mailing list