Giter VIP home page Giter VIP logo

shrinkelf's Introduction

Shrinkelf

Strip elf binaries aggressively.

Might work only for statically linked binaries, but not severely tested.

I (misc) ported the code to work with 64bit binaries, and to compile with minilib (or the standard c lib) without external dependencies. The original source can be found at https://github.com/berney/superstrip.

Compile

Just type make.

To download and link with minilib, type make -f minilib.make.

Doc

Usage: shrinkelf [file]

(copied from the original source)

[file] must be a seekable ELF file, and this is only useful for an executable, possibly only for a statically linked executable. It will be copied to a temporary file, but only those parts which are mapped in memory upon loading will be kept: all other data, such as symbol names, section names, section tables, debugging information, etc, are discarded. Thus, this is like the "strip" operation, but even more radical. The primary author advises you to use this program only in situations where disk space is extremely scarce (e.g. on a floppy). Note that this will not gain you any space in memory, by definition.

Some important caveats: Do not use on object files, nor on dynamic libraries with which you intend to link (I mean ld-link, not run-time link), this would make them useless. Use on dynamic libraries only intended for run-time link, or on dynamically linked executable, appears to work in some situations, but this is by no means guaranteed (of course, nothing about this program is guaranteed anyway, see above) and strongly discouraged. Only 32-bit ELF is supported at the moment. Support for 64-bit ELF is intended in a future version. Only native endianness is supported. That is, the program will only treat ELF files made for a machine with the same endianness as that on which it runs. This has not been extensively tested yet and many bugs are probably still lurking.

shrinkelf's People

Contributors

michael105 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.