process to inspect generated assembly of a function

Andev debiandev at gmail.com
Fri Jun 6 13:26:13 EDT 2014


On Fri, Jun 6, 2014 at 12:29 PM,  <Valdis.Kletnieks at vt.edu> wrote:
> On Fri, 06 Jun 2014 12:23:35 -0400, Andev said:
>
>> I am trying to inspect the generated assembly for a function in the
>> kernel. Are there any documents explaining how to do this? I want to
>> see how it changes when I change the function body.
>
> The same exact way you'd do it for any .o file for userspace.
>
> objdump and gdb are your friends.

OK :)

I did the following:

Add -fverbose-asm to CFLAGS and then use objdump -d file.o > d.txt

I hope this is right. Suggestions for other better methods welcome :)
-- 
Andev



More information about the Kernelnewbies mailing list