2

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?

ks1322
  • 33,961
  • 14
  • 109
  • 164
MathematicalOrchid
  • 61,854
  • 19
  • 123
  • 220

3 Answers3

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.

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

oliver
  • 6,204
  • 9
  • 46
  • 50
  • The binary _is_ statically-linked. I guess that's my problem? – MathematicalOrchid Jan 20 '14 at 13:49
  • Well static linking will at least give you incomplete results when running Valgrind, so yeah, that is _a_ problem. According to doc you can use the option "--soname-synonyms=somalloc=NONE" as workaround (I didn't try it that actually works, though). – oliver Jan 20 '14 at 14:06
0

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

drahnr
  • 6,782
  • 5
  • 48
  • 75
0

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

MathematicalOrchid
  • 61,854
  • 19
  • 123
  • 220