[all-commits] [llvm/llvm-project] 5f7ef6: [llvm-objdump] Let --symbolize-operands symbolize ...
Rahman Lavaee via All-commits
all-commits at lists.llvm.org
Mon May 16 10:11:53 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5f7ef65245372b9e5d2979a11b57ac8aab4306a6
https://github.com/llvm/llvm-project/commit/5f7ef65245372b9e5d2979a11b57ac8aab4306a6
Author: Rahman Lavaee <rahmanl at google.com>
Date: 2022-05-16 (Mon, 16 May 2022)
Changed paths:
M llvm/docs/CommandGuide/llvm-objdump.rst
M llvm/include/llvm/Object/ELFObjectFile.h
M llvm/include/llvm/Object/ELFTypes.h
M llvm/lib/Object/ELFObjectFile.cpp
A llvm/test/tools/llvm-objdump/X86/elf-bbaddrmap-disassemble-symbolize-operands.yaml
M llvm/tools/llvm-objdump/llvm-objdump.cpp
M llvm/unittests/Object/ELFObjectFileTest.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list