[PATCH] D25822: [DWARF parsers] - Add a way to get section indices when call DWARFUnit::collectAddressRanges()

Greg Clayton via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 16:02:54 PDT 2016


clayborg added a comment.

In https://reviews.llvm.org/D25822#576624, @evgeny777 wrote:

> > You can see that .text has a size of 0xb and starts at 0x0. So the address would fall into the .text sectio
>
> Things can be slightly more complex, like here (this is result of compilation with -ffunction-sections):
>
>   [ 2] .text             PROGBITS        0000000000000000 000040 000000 00  AX  0   0  4
>   [ 3] .text.f           PROGBITS        0000000000000000 000040 00000b 00  AX  0   0 16
>   [ 4] .text.g           PROGBITS        0000000000000000 000050 00000b 00  AX  0   0 16
>   [ 5] .text.h           PROGBITS        0000000000000000 000060 00000b 00  AX  0   0 16
>   


Is this just a raw dumper that isn't applying relocations? Do ELF .o files have bogus values in the address field of all sections in the section headers? Seems like there should be relocations that would fix these up no?


https://reviews.llvm.org/D25822





More information about the llvm-commits mailing list