通过vmlinuz定位到内核代码

2022-07-20 12:09:47 浏览数 (1)

转换成vmlinux

脚本extract-vmlinux:https://github.com/torvalds/linux/blob/master/scripts/extract-vmlinux sh extract-vmlinux vmlinuz > vmlinux

反汇编vmlinux

objdump -D vmlinux > vmlinux.out

查看内核符号表

VM-215-141-centos[qq]:~ # cat /proc/kallsyms | grep _raw_spin_unlock_irqrestore ffffffff81b6ee90 T _raw_spin_unlock_irqrestore ffffffff8241f490 r __ksymtab__raw_spin_unlock_irqrestore ffffffff8244d704 r __kstrtab__raw_spin_unlock_irqrestore

找代码

egrep -in ffffffff81b6ee90 vmlinux.out

0 人点赞