Domanda

If I try objdump -t /usr/bin/sort command it says no symbols. But it seems to work on my programs. What is the reason for this?

È stato utile?

Soluzione

The symbols of /usr/bin/sort has been removed, e.g. with the strip program - for most executables the symbol table is not needed (or only needed for debugging). Here is a bit more info.

Altri suggerimenti

As the other answer mentions, your sort binary most likely has its symbols stripped out. However there should still be some dynamic symbol information, which may still be useful for debugging. These are generally the names of functions called by the binary which were dynamically linked. This usually includes libc functions, along with any other lib*.so shared libraries that your binary may have been linked with.

To see these, just add the -T argument:

$ objdump -tT /bin/sort

/bin/sort:     file format elf64-x86-64

SYMBOL TABLE:
no symbols


DYNAMIC SYMBOL TABLE:
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 fileno
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 dup2
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.2.5 strcoll
...
$
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top