statifier — Dynamic to Static

2010-01-24 243 words 2 mins read

<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

author

Authored By Amit Agarwal

Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.

We notice you're using an adblocker. If you like our webite please keep us running by whitelisting this site in your ad blocker. We’re serving quality, related ads only. Thank you!

I've whitelisted your website.

Not now
This website uses cookies to ensure you get the best experience on our website. Learn more Got it