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.
I think we typically spell this ~0ULL.