你能解释一下不同的结果吗:
$ 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
注意最后的“not stripped”。
和
(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.
注意“(未找到调试符号)”
最佳答案
您通常必须在 Debug模式 (-g
is the GCC command-line option) 下编译以包含调试符号,它们并不是一直存在直到被删除。默认是在非 Debug模式下构建,没有符号。
关于c - "not stripped"但 "no debug symbols",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21379424/