Copyright (C) 2000-2012 |
Manpages KALLSYMSSection: Linux Module Support (8)Updated: January 31, 2002 Index Return to Main Contents NAMEkallsyms - Extract all kernel symbols for debuggingSYNOPSISkallsyms [-Vh] kernel_filenameDESCRIPTIONKallsyms extracts all the non-stack symbols from a kernel and builds a data blob that can be linked into that kernel for use by debuggers.A normal kernel only exports symbols that are used by modules. For debugging you may want a list of all the non-stack symbols, not just the exported ones. kallsyms extracts all sections and symbols from a kernel, constructs a list of the sections, symbols and their addresses and writes a relocatable object containing just the __kallsyms section. After the __kallsyms section is linked into the kernel and the kernel has been booted, any debugger can use the data in the __kallsyms section to get better symbol resolution. For example, a debugger can use the __kallsyms data to resolve a kernel address to:
OPTIONS
LINKER PASSESTo create a kernel containing an accurate __kallsyms section, you have to make four linker passes instead of the normal single link step. kallsyms and the linker are fast, the three extra steps take a few seconds on a P200.
DATA FORMATThe __kallsyms section is a bit unusual. It deliberately has no relocatable data, all "pointers" are represented as byte offsets into the section or as absolute numbers. This means it can be stored anywhere without relocation problems. In particular it can be stored within a kernel image, it can be stored separately from the kernel image, it can be appended to a module just before loading, it can be stored in a separate area, etc. /usr/include/sys/kallsyms.h contains the mappings for the __kallsyms data. Header
Section entryOne entry per loaded section. Since __kallsyms is a loaded section, if the input file contains a __kallsyms section then it is included in this list.
Symbol entryOne per symbol in the input file. Only symbols that fall within loaded sections are stored.
StringsA set of NUL terminated strings. Each name is referenced using an offset from the start of the __kallsyms string area. Note [1]These fields are exceptions to the "everything is an offset" rule. They contain absolute addresses within the kernel. SEE ALSOinsmod(8).HISTORYInitial version by Keith Owens <kaos@ocs.com.au>, April 2000
IndexThis document was created by man2html, using the manual pages. Time: 00:05:49 GMT, April 26, 2024 |