diff options
author | Rahman Lavaee <rahmanl@google.com> | 2022-05-13 10:32:13 -0700 |
---|---|---|
committer | Rahman Lavaee <rahmanl@google.com> | 2022-05-16 10:11:11 -0700 |
commit | 5f7ef65245372b9e5d2979a11b57ac8aab4306a6 (patch) | |
tree | de9e3f529af416329a99cab29a4534beced8d3b0 /llvm/docs/CommandGuide/llvm-objdump.rst | |
parent | 9c7c8be4a316c9cfcfd064e5dada250a99c405c7 (diff) | |
download | llvm-5f7ef65245372b9e5d2979a11b57ac8aab4306a6.zip llvm-5f7ef65245372b9e5d2979a11b57ac8aab4306a6.tar.gz llvm-5f7ef65245372b9e5d2979a11b57ac8aab4306a6.tar.bz2 |
[llvm-objdump] Let --symbolize-operands symbolize basic block addresses based on the SHT_LLVM_BB_ADDR_MAP section.
`--symbolize-operands` already symbolizes branch targets based on the disassembly. When the object file is created with `-fbasic-block-sections=labels` (ELF-only) 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.
In contrast to the current labels, SHT_LLVM_BB_ADDR_MAP-based labels are created for every machine basic block including empty blocks and those which are not branched into (fallthrough blocks).
The old logic is still executed even when the SHT_LLVM_BB_ADDR_MAP section is present to handle functions which have not been received an entry in this section.
Reviewed By: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D124560
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-objdump.rst')
-rw-r--r-- | llvm/docs/CommandGuide/llvm-objdump.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/docs/CommandGuide/llvm-objdump.rst b/llvm/docs/CommandGuide/llvm-objdump.rst index 5ee4b83..bab83c09 100644 --- a/llvm/docs/CommandGuide/llvm-objdump.rst +++ b/llvm/docs/CommandGuide/llvm-objdump.rst @@ -226,6 +226,8 @@ OPTIONS When printing a PC-relative global symbol reference, print it as an offset from the leading symbol. + When a bb-address-map section is present (i.e., the object file is built with ``-fbasic-block-sections=labels``), labels are retrieved from that section instead. + Only works with PowerPC objects or X86 linked images. Example: |