MathematicalOrchid
MathematicalOrchid

Reputation: 62868

Why can't ValGrind find my symbols?

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,

--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?

Upvotes: 2

Views: 6724

Answers (3)

MathematicalOrchid
MathematicalOrchid

Reputation: 62868

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

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

Upvotes: 0

oliver
oliver

Reputation: 6791

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.

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

Upvotes: 4

drahnr
drahnr

Reputation: 6886

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

Upvotes: 0

Related Questions