Thread: Symbol file not found for *.ko

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    3

    Symbol file not found for *.ko

    When I debug vmlinux with gdb, after it connect to the target, I got below output:

    usbcore.ko: No such file or directory.
    Error while mapping shared library sections:
    ohci_hcd.ko: No such file or directory.
    Symbol file not found for usbcore.ko
    Symbol file not found for ohci_hcd.ko
    Symbol file not found for binfmt_misc.ko
    Symbol file not found for edac_core.ko
    Symbol file not found for k8_edac.ko
    Symbol file not found for usbhid.ko
    Symbol file not found for sg.ko
    Symbol file not found for usb_storage.ko
    Symbol file not found for ipmi_msghandler.ko
    Symbol file not found for ipmi_si.ko
    Symbol file not found for ipmi_devintf

    I konw we can set the path in the gdb to avoid this, but I wonder what cause above output message?
    any idears?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    It is caused by gdb not finding the (symbol) files for the files it thinks you may want to debug (in this case usbcore.ko, etc).

    The searching for these files is based on a list of paths of some sort, so that's why setting the path in GDB will help.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    3
    matsp ,thanks for your reply,here I want to know why gdb can't find the symbol file,It seems that some symbol is found by gdb,but other symbol file is not found by gdb.
    any ideas?

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by yanglei_fage View Post
    matsp ,thanks for your reply,here I want to know why gdb can't find the symbol file,It seems that some symbol is found by gdb,but other symbol file is not found by gdb.
    any ideas?
    Not sure, but I guess that the symbol files are in different places, and some of those places are in the list of that gdb normally searches, and others are not in that list.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. gcc link external library
    By spank in forum C Programming
    Replies: 6
    Last Post: 08-08-2007, 03:44 PM
  4. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  5. inet_aton()... Noob needs help with sockets :|
    By Maz in forum C++ Programming
    Replies: 3
    Last Post: 11-22-2005, 04:33 PM