RFC: Disassembling from a symbol
Michael Matz
matz@suse.de
Mon Jan 21 15:52:00 GMT 2019
Hi,
ah, sorry for repeating this, but I answered on the other thread before
I've gone through all mails. Anyway, I don't like the check of the symbol
being a function symbol. It can validly be a data array containing
instruction bytes or an unmarked symbol, and when someone says
--disassemble=foobar and then the tool merely doesn't do anything even
though 'foobar' is clearly a symbol per symtab, then that user will
rightfully roll his eyes on the unhelpfulness of objdump. "Sure I could
disassemble this, but I won't, hahaha!".
Ciao,
Michael.
On Wed, 16 Jan 2019, Nick Clifton wrote:
> Hi Florian, Hi Guys,
>
> OK, I think that I have got a solution to this problem now.
> The attached patch updates objdump's --disassemble=<symbol>
> option so that if <symbol> is not a function symbol then
> disassembly stops at the next symbol encountered. (Ie
> exactly as it did before). But if <symbol> is a function
> symbol then disassembly continues for the next N octets,
> where N is the size of <symbol>. If <symbol> is not an
> ELF symbol (or its size is zero) then disassembly
> continues up to the next function symbol.
>
> Does this sound right to you guys ?
More information about the Binutils
mailing list