undefined reference to function at run time after strip-ing the binary/so

443 views Asked by At

Problem : After compiling and strip-ing the binary, at runtime i get "undefined reference".

So while packaging, in the make-file i have tried adding "nostrip" at the end corresponding to that binary and it works fine. i. e. if i don't strip, it works. I'm using wind-river tool chain. I think it has something to do with the way I'm compiling or linking.

The tools gcc, ld, strip etc are all from the same tool chain.

Any help would be really appreciated. Thank you.

1

There are 1 answers

0
ahamed101 On

Update

Solution : The issue was, there were some environment variables in the Makefile which was making it to use the incorrect strip utility i.e. it was using the monta-vista strip utility instead of wind-river.