Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"not stripped" but "no debug symbols"

Tags:

c

debugging

gdb

Can you explain the different results:

$ file libc-2.8.so
libc-2.8.so: ELF 32-bit MSB shared object, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.10, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped

Notice the "not stripped" at the end.

and

(gdb) file libc-2.8.so
Reading symbols from /opt/Cross_Tools/powerpc-linux-gnu/powerpc-linux-gnu/libc/lib/libc-2.8.so...(no debugging symbols found)...done.

Notice the "(no debugging symbols found)"

like image 727
Ran Regev Avatar asked Jan 27 '14 11:01

Ran Regev


1 Answers

You typically have to compile in debug mode (-g is the GCC command-line option) to include the debug symbols, it's not as if they're always there until stripped out. The default is to build in non-debug mode, without the symbols.

like image 69
unwind Avatar answered Oct 04 '22 16:10

unwind