.so files having no symbols

This is a discussion on .so files having no symbols within the Linux Programming forums, part of the Platform Specific Boards category; I have an .so file created, nm command shows "no symbols found" for this .so file, and I am linking ...

  1. #1
    Banned
    Join Date
    Nov 2007
    Posts
    678

    FIXED! .so files having no symbols

    I have an .so file created, nm command shows "no symbols found" for this .so file, and I am linking against this .so file, my program uses some functions from this .so file, linking is successfully done, but, on runtime, my program crashes, because of "symbols not found" error.

    Can someone hint me at, what could be the problem here?
    Last edited by manav; 05-03-2008 at 01:10 AM.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    That does sound pretty broken - have you checked some of the /lib or /usr/lib .so files to see if they are the same?

    What does "file mine.so" say about the files?

    --
    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
    Banned
    Join Date
    Nov 2007
    Posts
    678
    Mats, other libs may or may not have symbols, eg:
    Code:
    nm: /lib/libc-2.5.so: no symbols
    and output of file command is:
    Code:
    file libphapi.so
    libphapi.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped
    Edit: my .so file is libphapi.so

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,230
    Quote Originally Posted by manav View Post
    I have an .so file created, nm command shows "no symbols found" for this .so file, and I am linking against this .so file, my program uses some functions from this .so file, linking is successfully done, but, on runtime, my program crashes, because of "symbols not found" error.

    Can someone hint me at, what could be the problem here?
    Try dumping the file with "objdump -tT" instead. If still no symbols appear, then your .so is borked somehow.

    Also, what does "objdump -x" display?

  5. #5
    Banned
    Join Date
    Nov 2007
    Posts
    678

    Fixed.

    Thanks Mats, brewbuck!

    It was not obvious, but, after sometime I found, that for my program runtime, wrong version of .so file was being exported.

    FIXED.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 10:46 AM
  2. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM
  3. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  4. header and source files
    By gtriarhos in forum C Programming
    Replies: 3
    Last Post: 10-02-2005, 03:16 AM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21