0

I don't see any command like strip in the solaris platform. I checked in google. In one of the link, objcopy command is mentioned but that also is not present in my solaris platform. Can anyone tell the command in solaris to strip the binary or shared objects. Below is ouput of uname -a.

SunOS 5.10 Generic_Virtual i86pc i386 i86pc

1 Answers1

2

The command is strip.

Per this Solaris 10 documentation, the SUNWbtool package needs to be installed.

Run either

/usr/sbin/pkgchk -l -p /usr/bin/strip

or

grep strip /var/sadm/install/contents

to see if strip was installed, but then deleted.

Also, run

grep SUNWbtool /var/sadm/install/contents

to see if the SUNWbtool package has been installed. If no lines appear, it hasn't been installed.

Andrew Henle
  • 32,625
  • 3
  • 24
  • 56
  • It seems like SUNWbtool is installed but strip is not.is there any other tool or command which can do strip behavior – facebook-100001358991487 Oct 13 '16 at 11:57
  • If you look at the man page linked above the path to it is `/usr/ccs/bin/strip` - did you check under that directory? (It didn't move to `/usr/bin` until Solaris 10.) – alanc Oct 14 '16 at 01:47
  • 1
    @facebook-100001358991487 What output did you get to determine that? Did the `pkgchk -l -p /usr/bin/strip` return anything? Wgat dud `grep strip /var/sadm/install/contents` return? The proper action would depend on what those returned. If someone just deleted `strip`, for example, the proper action would be to reinstall the package - and then figure out of any later patch had updated it. If `strip` is not part of the `SUNWbtool` package in your installation, it might be located somewhere else, because as alanc noted the `strip` utility location in Solaris has moved over time. – Andrew Henle Oct 14 '16 at 12:54