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.
It's probably got its regular symbols stripped and what's left is its dynamic symbols, which you can get with
@PSkocik answered this. I just want to add more detail. There are two kinds of symbol sections in ELF:
.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
LSB_5.0.0 Section 10.2.2.1, “ELF Section Types”, says a conforming shared lib should have either
.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,"