Install ftp://ftp.ocs.com.au/pub/ksymoops/ksymoops-0.7c.tar.gz. Then
ksymoops -v /usr/src/linux/vmlinux -s /var/tmp/map < /dev/null
will build a complete system map containing every useful symbol from
vmlinux, from System.map and from loaded modules. No need to reinvent
the wheel.
> nm reports some symbols that do not appear to be loaded. They are
>generally at higher addresses and from the section labelled
>".text.init", although I have not checked them all individually. My
>guess is that these symbols were declared __initfunc, and as such
>their text was unloaded after they were executed. Is this right?
>
> If so, can I tell whether one of these symbols is loaded or not?
All symbols are loaded when the kernel is loaded. objdump --headers
/usr/src/vmlinux gives you the size and location of each section of
data or code.
> When/how are these symbols unloaded?
See arch/<architecture>/mm/init.c, function free_initmem. It frees all
pages from __init_begin to __init_end.
> Are only symbols in the .text.init section subject to being
> unloaded?
Read arch/<architecture>/vmlinux.lds and see what sections are included
between __init_begin and __init_end.
> Are there any documents on the net related to this?
Read the source, Luke :)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/