[PATCH] D124560: [llvm-objdump] Symbolize branch targets and basic block addresses based on the bb-address-map when present in the object file.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 15:08:45 PDT 2022


rahmanl created this revision.
Herald added subscribers: rupprecht, hiraditya.
Herald added a reviewer: jhenderson.
Herald added a reviewer: MaskRay.
Herald added a project: All.
rahmanl updated this revision to Diff 425621.
rahmanl added a comment.
Herald added a subscriber: StephenFan.
rahmanl edited the summary of this revision.
rahmanl edited the summary of this revision.
rahmanl added subscribers: snehasish, mtrofin, shenhan, tmsriram, vporpo.
rahmanl published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add a basic block to the test  which is not branched into.


`llvm-objdump` already symbolizes branch targets based on the disassembly. When the object file is created with `-basic-block-labels` it will include a SHT_LLVM_BB_ADDR_MAP section which maps basic blocks to their addresses. In such case `llvm-objdump` can annotate the disassembly based on labels inferred on this section.

The old logic is still executed even when the bb-address-map section is present to handle functions which have not received a bb-address-map.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124560

Files:
  llvm/include/llvm/Object/ELFObjectFile.h
  llvm/lib/Object/ELFObjectFile.cpp
  llvm/test/tools/llvm-objdump/X86/elf-bbaddrmap-disassemble-symbolize-operands.yaml
  llvm/tools/llvm-objdump/llvm-objdump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124560.425621.patch
Type: text/x-patch
Size: 9685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220427/605998db/attachment.bin>


More information about the llvm-commits mailing list