Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module: support kallsyms with modules.builtin.ranges
Extend the support for different forms of symbol-to-address information with nodule association. We now support three different variaties: - kallmodsyms - kallsyms with modules.builtin.ranges - kallsyms w/o modules.builtin.ranges The modules.builtin.ranges file contains data about address ranges that contain symbols for one or more built-in modules. Since the load address of each kernel section is not known at kernel buildtime, this file stores offset ranges relative to the load address of the section. The file will look like this: .text 00000000-00000000 = _text .text 0000baf0-0000cb10 amd_uncore .text 0009bd10-0009c8e0 iosf_mbi ... .text 008e6660-008e9630 snd_soc_wcd_mbhc .text 008e9630-008ea610 snd_soc_wcd9335 snd_soc_wcd934x snd_soc_wcd938x .text 008ea610-008ea780 snd_soc_wcd9335 ... .data 00000000-00000000 = _sdata .data 0000f020-0000f680 amd_uncore For each ELF section, it lists the offset of the first symbol. This can be used to deteermine the base address of the section at runtime. Next, it lists (in strict ascending order) offset ranges in that section that cover the symbols of one or more builtin modules. Multiple ranges can apply to a single module, and ranges can be shared between modules. When processing /proc/kallsyms with modules.builtin.ranges data, symbols are annotated (as applicable) with a built-in module name. If a symbol belongs to multiple modules, multiple copies of the symbol will be added with the same address but distinct module names. This means that the symbol will be found with modname`symname lookups, but reverse lookup on the address will always give the first one found. This is consistent with existing behaviour in DTrace when two symbols refer to the same address. Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Nick Alcock <nick.alcock@oracle.com>
- Loading branch information