“not stripped” but “no debug symbols”

与世无争的帅哥 提交于 2020-05-11 07:46:46

问题


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)"


回答1:


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.



来源:https://stackoverflow.com/questions/21379424/not-stripped-but-no-debug-symbols

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!