-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
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
llvm-project/llvm/tools/llvm-objdump/llvm-objdump.cpp
Lines 2135 to 2136 in 0cdebda
| // The end is the section end, the beginning of the next symbol, or | |
| // --stop-address. |