[PATCH] D95511: [llvm-readelf] Support dumping the BB address map section with --bb-addr-map.
Rahman Lavaee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 19:01:36 PST 2021
rahmanl added inline comments.
================
Comment at: llvm/lib/Object/ELF.cpp:644
+ std::vector<typename Elf_BBAddrMap::BBEntry> BBEntries;
+ for (uint32_t BlockID = 0; !ULEBSizeErr && Cur && (BlockID < NumBlocks); ++BlockID) {
+ uint32_t Offset = ReadULEB128AsUInt32();
----------------
jhenderson wrote:
> clang-format is complaining.
>
> > Had to encode ULEB128 since our YAML format does not take in NumBlocks as input.
>
> Sounds like this should be added to the YAML input support, so that you can write a custom NumBlocks value that doesn't match the real number of blocks. We do similar things for ELF sections for example, where you can override the implicit value with a value of your own choice which gets written to the field.
Thanks for the suggestion. Please review D96831.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95511/new/
https://reviews.llvm.org/D95511
More information about the llvm-commits
mailing list