| Issue |
166412
|
| Summary |
[llvm-objdump] --disassemble-symbols doesn't account for ELF symbol size
|
| Labels |
enhancement,
tools:llvm-objdump
|
| Assignees |
|
| Reporter |
lenary
|
Elf Symbols often have a specific size. This size (when nonzero) is not taken into account by `--disassemble-symbols=<sym>`
This makes it hard to disassemble a single function, if that function has e.g. local symbols. This can happen when disassembling a relocatable object. The disassembly will stop at the first local symbol, rather than disassembling the encoded size of the function.
Of course, if the size is zero, we have to treat the size as unknown, and stopping on the next symbol mostly makes sense - though I don't know whether we should take into account the symbol binding, and maybe skip local symbols.
This comment implies this is intended behaviour, but I think it would be better if it wasn't the behaviour
https://github.com/llvm/llvm-project/blob/0cdebdaf59d20f34158d97d193381e95a0ba90b0/llvm/tools/llvm-objdump/llvm-objdump.cpp#L2135-L2136
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs