statifier — Dynamic to Static

2010-01-24 2 min read Linux

<a href="http://statifier.sourceforge.net/">Homepage of statifier.

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Statifier create from dynamically linked executables and all it&#8217;s libraries one file.
This file can be copied and run on another machine without need to drag all it&#8217;s libraries.

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Dynamically linked executables are smaller then statically linked.
From the other side dynamically linked executables use shared libraries compiled in PIC (position independend code) which is slower than &#8221;normal&#8221; one.

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Files, created by statifier (&#8221;pseudo-static&#8221;) combine disadvantages of both of them:

<span style="font-size: xx-small;"><span style="font-size: xx-small;">

  • Huge – much bigger than statically linked
  • Still use PIC code

<span style="font-size: xx-small;"><span style="font-size: xx-small;">So, why one will use it ?
Ok, &#8221;pseudo-static&#8221; files have some advantages too:

<span style="font-size: xx-small;"><span style="font-size: xx-small;">

  • Everything in one file – so distributing is simple
  • Same file can be used for computers with different libraries&#8217; versions
  • Faster startup

<span style="font-size: xx-small;"><span style="font-size: xx-small;"> But all these one can got with usual static files.
So, why use statifier and huge &#8221;pseudo-static&#8221; executables instead of static ?

<span style="font-size: xx-small;"><span style="font-size: xx-small;">

  • there is no source code available
  • there is no compiler (or build-chain) available
  • static link does not work or it&#8217;s not obvious how do it
  • to preserve memory layout – static link will change it and may &#8221;wake-up&#8221; hidden bugs
  • for &#8221;permanent link&#8221; LD_PRELOAD library into executable

<span style="font-size: xx-small;"><span style="font-size: xx-small;">Supported platforms

<span style="font-size: xx-small;"><span style="font-size: xx-small;">

  • linux x86
  • linux x86_64
  • linux alpha
comments powered by Disqus