Discussion:
Script wanted to recursively strip symbols
(too old to reply)
Barry Kauler
2004-01-09 00:59:14 UTC
Permalink
Hi guys, Murphies' Law has just struck!
A few weeks ago I came across a link to a script that will go
through a directory structure recursively and strip sysmbols
out of executables and libraries.
I thought that I might need it, but didn't follow the link,
but then yesterday I wanted to locate it, but now I can't
find it ...wasted an hour with Google.
Does anyone know of the existence of such a script?

Regards,
Barry Kauler
s
2004-01-09 07:43:24 UTC
Permalink
Post by Barry Kauler
Hi guys, Murphies' Law has just struck!
A few weeks ago I came across a link to a script that will go
through a directory structure recursively and strip sysmbols
out of executables and libraries.
I thought that I might need it, but didn't follow the link,
but then yesterday I wanted to locate it, but now I can't
find it ...wasted an hour with Google.
Does anyone know of the existence of such a script?
would this do the job :

find /directory/ | xargs strip

That would recurse thru /directory/, stripping symbols from every file it
found that had them. You could do smart things with find like :

find . -name '*.so'
or
find . -type x

.. which would speed things up as strip wouldn't have to deal with so many
files.
Post by Barry Kauler
Regards,
Barry Kauler
Barry Kauler
2004-01-09 14:21:40 UTC
Permalink
Post by s
find /directory/ | xargs strip
That would recurse thru /directory/, stripping symbols from every file it
find . -name '*.so'
or
find . -type x
Yes, I worry about strip being applied to all files in a directory,
and relying upon the strip program to decided if a file is a valid
executable.
A script that determines that a file is an executable
or a shared library, is what I want, then apply "--strip-debug"
for the shared library files and "--strip-unneeded" for the
executable files -- those are options for strip.

Regards,
Barry Kauler

Loading...