Any option to objdump just one function ?
Nick Clifton
nickc@redhat.com
Wed Apr 28 11:02:00 GMT 2010
Hi Robert,
> I used objdump to dump the kernel image.
> And I want to locate to the position of __memzero.
> But I can't find any option that support to output the assembly code of
> one specified function but only in the section range.
> Is it correct ?
Essentially yes. You can restrict disassembly to a range of addresses
by using the --start-address= and --stop-address= options, but you would
need to work out the addresses before hand.
Alternatively if you have compiled your application with gcc's
-ffunction-section option then you can use objdump's --section= option
to restrict disassembly to just that section. But I doubt if you have
built your kernel image that way.
Of course you can always pipe the output from objdump into a file and
then use various tools (sed/perl/awk) to cut out the parts that you do
not need.
Cheers
Nick
More information about the Binutils
mailing list