[PATCH] D25822: [DWARF parsers] - Add a way to get section indexes when call DWARFUnit::collectAddressRanges()
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 05:03:21 PDT 2016
grimar created this revision.
grimar added reviewers: rafael, aprantl, dblaikie, echristo.
grimar added subscribers: llvm-commits, grimar, evgeny777, davide, ruiu.
Herald added a subscriber: mehdi_amini.
For LLD --gdb-index patch (https://reviews.llvm.org/D25821) I need to write the address area. The address area is a sequence of address
entries, where each entrie contains low address, high address and CU index.
I can get this info (using DWARFUnit::collectAddressRanges())
from DW_AT_low_pc/DW_AT_high_pc attribute which are relocated addresses.
Problem is that there is no way to get section index these addresses refer to. At the moment of building
index I do not yet know the final input sections offsets and output section VA's, so I think
I need to store section index to use it later (that is how above patch do).
Patch do next things:
- We have RelocAddrMap, which is map of pairs [relocation width, relocation value]
and was declared both in DWARFContext.h and DWARFRelocMap.h. I leaved declaration only in DWARFRelocMap.h.
At fact first element of pair was never used in code. So I replaced it with section index.
- I modified content of DWARFAddressRangesVector to keep section index as well, so now it is possible to get
it via DWARFUnit::collectAddressRanges() call.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18005 bytes
Desc: not available
More information about the llvm-commits