Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ General Discussion _ Symbols stripped from shared object

Posted by: ivspguy Dec 17 2012, 07:53 PM

I've run into an issue when building/installing our software. Somehow, the symbols for our shared object (lib<myLib>.so) are getting stripped which causes an undefined symbol exception during runtime.

I create the .so using "gcc -g -o2 -Wall -fPIC -fno-stack-protector -L /opt/<otherVendor>/lib -I/usr/java/jdk1.6.0_29 ..."

Using "nm lib<myLib>i.so" returns a set of symbols

I then use "install lib<myLib>.so /usr/src/redhat/SOURCES/ ... /lib" to start the RPM building process

Using "nm lib<myLib>.so" in the directory it was installed in again returns a set of symbols

To create the tarball for use by RPM, I use "tar -cvf <myApp>.tar.gz <myApp>"

If I extract the tarball and run the nm command, it still shows symbols.

I create the RPM with "rpmbuild -ba <myApp>.spec"

I then install the RPM with "rpm -ivh <myApp>.i386.rpm"

If I then run "nm lib<myLib>.so" on the newly RPM installed .so, it returns "nm: lib<myApp>.so: no symbols"

Running "file lib<myLib>.so" returns:

lib<myLib>.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), stripped

I have been using the same process to deliver our software for years and this is the first time I've seen this.

Can anyone point me in the right direction to stop the symbols being stripped from the .so?

Thanks

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)