为什么ValGrind找不到我的符号?

时间:2021-09-21 20:43:56

I don't know what I've done wrong, but I can't seem to fix this.

我不知道我做错了什么,但我似乎无法解决这个问题。

According to file,

根据文件,

test: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.16, BuildID[sha1]=0x436d17ab04dc54f35f1a8e6a16d4f87aaf79a0e9, not stripped

It clearly says "not stripped". And yet, when I run ValGrind,

它清楚地说“没有剥离”。然而,当我运行ValGrind时,

--27709-- Reading syms from /root/ValGrind/test (0x8048000)
--27709--    object doesn't have a dynamic symbol table

I can't figure out why the object doesn't have a symbol table... What am I doing wrong?

我无法弄清楚为什么对象没有符号表......我做错了什么?

Edit: Is it because the binary is 32-bit, and I'm running a 64-bit OS? Or should that not matter?

编辑:是因为二进制文件是32位,我正在运行64位操作系统?或者这应该不重要?

3 个解决方案

#1


4  

The executable is statically linked; maybe that causes the problem?

可执行文件是静态链接的;也许这会导致问题?

Actually, what is the problem you're after? Because the "object doesn't have a dynamic symbol table" message is just debug output from Valgrind, so it shouldn't matter much.

实际上,你遇到的问题是什么?因为“对象没有动态符号表”消息只是Valgrind的调试输出,所以它应该没什么关系。

Btw. according to http://valgrind.org/docs/manual/faq.html#faq.hiddenbug Valgrind doesn't work well with statically-linked applications anyway.

顺便说一句。根据http://valgrind.org/docs/manual/faq.html#faq.hiddenbug,Valgrind无论如何都不适用于静态链接的应用程序。

#2


0  

Did you forget to add the -g or -ggdb flag when compiling/linking?

您是否忘记在编译/链接时添加-g或-ggdb标志?

#3


0  

Changed the binary from static linking to dynamic. Installed 32-bit libraries. Works now.

将二进制文件从静态链接更改为动态链接。安装了32位库。现在工作。

(PS. To anybody else desperately struggling with OpenSUSE's awful package search, the correct package name is libstdc++6-32bit.)

(PS。对于任何其他拼命挣扎于OpenSUSE糟糕的软件包搜索的人来说,正确的软件包名称是libstdc ++ 6-32bit。)

#1


4  

The executable is statically linked; maybe that causes the problem?

可执行文件是静态链接的;也许这会导致问题?

Actually, what is the problem you're after? Because the "object doesn't have a dynamic symbol table" message is just debug output from Valgrind, so it shouldn't matter much.

实际上,你遇到的问题是什么?因为“对象没有动态符号表”消息只是Valgrind的调试输出,所以它应该没什么关系。

Btw. according to http://valgrind.org/docs/manual/faq.html#faq.hiddenbug Valgrind doesn't work well with statically-linked applications anyway.

顺便说一句。根据http://valgrind.org/docs/manual/faq.html#faq.hiddenbug,Valgrind无论如何都不适用于静态链接的应用程序。

#2


0  

Did you forget to add the -g or -ggdb flag when compiling/linking?

您是否忘记在编译/链接时添加-g或-ggdb标志?

#3


0  

Changed the binary from static linking to dynamic. Installed 32-bit libraries. Works now.

将二进制文件从静态链接更改为动态链接。安装了32位库。现在工作。

(PS. To anybody else desperately struggling with OpenSUSE's awful package search, the correct package name is libstdc++6-32bit.)

(PS。对于任何其他拼命挣扎于OpenSUSE糟糕的软件包搜索的人来说,正确的软件包名称是libstdc ++ 6-32bit。)