Giter Site home page Giter Site logo

mackyle / striptease Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 11.0 398 KB

enhanced version of the Mac OS X strip tool (can remove signatures and uuids with no other changes)

Home Page: https://mackyle.github.io/striptease

C++ 1.18% C 98.13% Objective-C 0.69%

striptease's Introduction

striptease (or "tease" for short) is an enhanced version of strip.  It's
capable of stripping a binary's symbol table of non-text local symbols.
This mode, enabled with the -t switch, is similar to "strip -x", except
-x strips all local symbols including text symbols.  tease -t allows for
useful CrashReporter stacks to be generated on the deployment host.  This
is important in light of the hidden-visibility default (-fvisibility=hidden)
that results in many symbols not being marked as global and therefore being
stripped by an ordinary strip -x.

tease also includes a -no_code_signature option which strips any
LC_CODE_SIGNATURE load commands from the target file, in much the same way
as the ordinary strip's -no_uuid option.

tease also includes a -no_dylib filename option, which may be used more than
once, that strips any DYLIB load commands referencing the specified
filename.  The -no_dylib_unused option strips all unused dylib references.

Finally, tease includes an -a option, which instructs it to regenerate the
symbol table without stripping anything.  tease -a is intended to be used in
conjunction with -no_code_signature, -no_uuid, -no_dylib or -no_dylib_unused
to pass over the file and only strip the relevant Mach-O load commands
without removing anything from the symbol table.

striptease is based on strip.c and other supporting files in Apple's
cctools package.  This version of striptease is based on cctools-822,
corresponding to Xcode Tools 4.3 and Mac OS X 10.7.  It builds properly
under Xcode Tools 2.x on Mac OS X 10.4, as well.  The cctools package is
available from:

http://opensource.apple.com/tarballs/cctools/cctools-822.tar.gz

cctools, and therefore strip, are available under the APSL license:

http://www.opensource.apple.com/apsl/

All files from cctools necessary to build strip are included, unmodified.
This includes strip.c.  Changes to strip.c are made in tease.c.  Many other
files from the cctools package not relevant to strip (or tease) are omitted
from this distribution.  This README and an accompanying Makefile for
build system integration are also included.

Use "make" to build a build/Release/tease executable.

Use "make DEBUG=1" to build a build/Debug/tease debug executable.

Use "make clean" to remove the build directory and built executables.

Note that when building on 10.6 or 10.7, the MacOSX10.5.sdk must be present.

As a convenience, the install_name_tool.c source and nm.c source is also
included here along with an install_name_tool target and nm target in the
makefile.  The tools target will make all four tools (strip, tease,
install_name_tool, nm).  The resulting install_name_tool will run on 10.4+
but understand newer load commands so it can successfully adjust paths in
newer binaries on older systems.  The resulting nm will run on 10.4+ but
understand newer load commands so it can successfully examine symbols in
newer binaries on older systems.

striptease's People

Contributors

mackyle avatar markmentovai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.