The only binary-format-related field in the BBAddrMap structure is the function address (Addr), which will use uint64_t in 64B format and uint32_t in 32B format. This patch changes it to use uint64_t in both formats.
This allows non-templated use of the struct, at the expense of a marginal additional size overhead for the 32-bit format. The size of the BB address map section does not change.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
One question, is "BBAddrMap" (or "ELF_BBAddrMap" in the origin code) only used to carry return values? You mentioned the section size won't change (for both ELF32 and ELF64), is it because you do not use this structure for writing out to ELF section?
Comment Actions
Correct. BBAddrMap is only used in the return type for decodeBBAddrMap. This is completely independent from how the entries are written out to the ELF section.
Comment Actions
I see. Thanks. This change seems reasonable to me, given that the object sizes do not increase, the consumer of bbaddrmap usually do not care the mere increase in size and ease of use of the library function (without templated data structures) is more important.
LGTM