1

I want to get kernel source code file name and line number of a kernel function from the function address that ftrace outputted on Raspberry Pi 3.

I tried addr2line -e /boot/kernel8.img [function address] on Raspberry Pi 3. But it returned addr2line: /boot/kernel8.img: File format not recognized.

Note:

kernel8.img is customed kernel that I compiled. I cloned kernel source from https://github.com/raspberrypi/linux.git, checkouted to rpi-4.18.y, turned on CONFIG_DEBUG_INFO, and run make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4. This compile work performed on Ubuntu x86_64 linux kernel 4.15.0-23-generic. The type of kernel8.img is as follows.

$ file kernel8.img
kernel8.img: MS-DOS executable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.