Source/Assembly Listing for Kernel Loadable Modules

Norbert Koch NKoch at demig.de
Fri Mar 3 07:06:27 UTC 2006


> I'm sure this is an easy question but I haven't seen the answer during
> my Google search.  I just want to get a source listing from my module
> with the assembly code intermixed with the source code.  The objdump
> utility is supposed to be able to do this (objdump --source filename)
> but when I run it on my kernel module all I get is the assembly output.
> What step did I miss?  I assume there is a change to my Makefile but
> I don't know what it is.

Just compile with a debug switch (I am usually using -g3) and
objdump -S the .ko file you get after linking.

Norbert


More information about the freebsd-drivers mailing list