I expected to see number of symbols in the libc.so.6 file including printf. I used the nm tool to find them, however it says there is no symbol in libc.so.6.


3 Answers 3


It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with nm -D.


@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF: .symtab and .dynsym (see the Linux Standard Base Core Specification, a.k.a. LSB_5.0.0, for details). .symtab is for the linking step of the shared lib itself. Once linking is finished, the .symtab section is not needed anymore. The .dynsym section contains important symbols that are supposed to be searched by the dynamic linker at run time. nm by default only dumps symbols in the .symtab section.

LSB_5.0.0 Section, “ELF Section Types”, says a conforming shared lib should have either .symtab or .dynsym but not both. As part of the ABI library, libc is stripped out of the .symtab to be spec conforming.


Find out if it is a shared object, or, a regular ASCII file. If it is a shared object you should see "ELF 32-bit LSB shared object,"

file /lib/i386-linux-gnu/libc.so.6
  • 1
    libc.so.6 is oviously a shared object. May 11, 2016 at 22:24
  • 1
    I never assume in a Linux environment. Considering someone could have touched the root directories. Yes, by name it is obviously a share object. And, it doesn't hurt to verify; when you are not getting the expected output.
    – jncc99
    May 11, 2016 at 23:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .