summaryrefslogtreecommitdiff
path: root/polly
diff options
context:
space:
mode:
authorSimon Tatham <simon.tatham@arm.com>2022-08-24 13:13:38 +0100
committerSimon Tatham <simon.tatham@arm.com>2022-08-24 15:08:12 +0100
commit8e29f3f1c35a88f00a0290b0280468d04932eeb5 (patch)
tree7abe6fc038cd11b94c76244996821acced444a48 /polly
parent5259528fc898662ed4a81709241e9fb790c83e61 (diff)
downloadllvm-8e29f3f1c35a88f00a0290b0280468d04932eeb5.tar.gz
[llvm-objdump] Handle multiple syms at same addr in disassembly.
The main disassembly loop in llvm-objdump works by iterating through the symbols in a code section, and for each one, dumping the range of the section from that symbol to the next. If there's another symbol defined at the same location, then that range will have length 0, and llvm-objdump will skip over the symbol entirely. As a result, llvm-objdump will only show the last of the symbols defined at that address. Not only that, but the other symbols won't even be checked against the `--disassemble-symbol` list. So if you have two symbols `foo` and `bar` defined in the same place, then one of `--disassemble-symbol=foo` and `--disassemble-symbol=bar` will generate an error message and no disassembly. I think a better approach in that situation is to prioritise display of the symbol the user actually asked for. Also, if the user specifically asks for disassembly of //both// of two symbols defined at the same address, the best response I can think of is to disassemble the code once, preceded by both symbol names. This involves teaching llvm-objdump to be able to display more than one symbol name at the head of a disassembled section, which also makes it possible to implement a `--show-all-symbols` option to display //every// symbol defined in the code, not just the most preferred one at each address. This change also turns out to fix a bug in which `--disassemble-all` on a mixed Arm/Thumb ELF file would fail to switch disassembly states between Arm and Thumb functions, because the mapping symbols were accidentally ignored. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D131589
Diffstat (limited to 'polly')
0 files changed, 0 insertions, 0 deletions