compiled vmlinux symbols doesn't match the /proc/kallsyms

Juerg Haefliger juerg.haefliger at canonical.com
Fri Apr 13 11:28:52 UTC 2018


On 04/13/2018 10:36 AM, zerons wrote:
>>
>> This is not how you build an Ubuntu kernel. See
>> https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
>>
> 
> It works. Thank you so much. I edit the file 'debian/rules.d/2-binary-arch.mk', change this line
> `$(build_cd) $(kmake) $(build_O) $(conc_level) $(bldimg) modules $(if $(filter true,$(do_dtbs)),dtbs)`
> to
> `$(build_cd) $(kmake) $(build_O) $(conc_level) vmlinux`
> to get the vmlinux.
> I wonder if we can add a new rule to get the vmlinux or a specific module(.ko) only?

They're all in the debug package.


>>
>> Why not install the debug package linux-image-4.4.0-119-generic-dbgsym?
>>
> 
> Yes, I tried this years ago. Perhaps I took wrong steps, the vmlinux symbols didn't match /proc/kallsyms.
> Then I copied the configuration file and did `make vmlinux`. For a long time, it works fine.
> 

Follow these steps to add the debug repos:
https://wiki.ubuntu.com/DebuggingProgramCrash#Non-built-in_debug_symbol_packages_.28.2A-dbgsym.29

Then:
$ apt update
$ apt install linux-image-$(uname -r)-dbgysm
$ grep ' tty_open' /proc/kallsyms
ffffffff81502c30 t tty_open
$ nm /usr/lib/debug/boot/vmlinux-$(uname -r) | grep -m1 ' tty_open'
ffffffff81502c30 t tty_open

...Juerg




More information about the kernel-team mailing list