I use DS-5 to debugging linux kernel and device driver, shows "Failed to load symbols for "test.ko"", execute the following command:
add-symbol-file Z:/vmlinux
add-symbol-file Z:/test.ko
test.ko with debug_info and not stripped.
error message is:
ERROR(CMD685-COR11-IMG75): ! Failed to load symbols for "test.ko"! Failed to read the symbols from Z:\test.ko! No section relocation information provided for the relocatable ELF file "Z:\test.ko"
thanks
Hello, I have not seen this error before.
When connecting to the target, did you select "Linux Kernel Debug" in the Debug Configuration pane?
Is it possible to share the test.ko file?
Hello, I select "Bare Metal Debug" in the Debug Configuration.
When select "Linux Kernel Debug" in the Debug Configuration, execute add-symbol-file Z:/vmlinux, Debug Control shows "Status: connected OS Support: Waiting for the OS to be initialised".
add-symbol-file Z:/vmlinuxWARNING(ROS60): Could not enable OS support as the OS does not appear to be initialized. This might be caused by a mismatch between the loaded symbols and the code on the target or because the OS is not up and running. Enabling OS support will be re-attempted when the target next stops.
Hi ChenMy name is Stephen and I work at Arm.Selecting "Linux Kernel Debug" in the Debug Configuration is correct in this case.After loading the vmlinux symbols, the Debugger's OS awareness will automatically enable once it detects the Linux kernel has initialized itself.The error message "No section relocation information provided for the relocatable ELF file" is being given by the Debugger's ELF reader. It can't find the section names. Suggest you check with e.g. "objdump -h" that the named sections are present.Please also refer to the "kernel_module" example & tutorial that is supplied in examples/Linux_examples.zip. This includes a ready-made modex.ko that you can use as a reference.Hope this helpsStephen