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’s libraries one file.
This file can be copied and run on another machine without need to drag all it’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 ”normal” one.
<span style="font-size: xx-small;"><span style="font-size: xx-small;">Files, created by statifier (”pseudo-static”) 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, ”pseudo-static” 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’ 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 ”pseudo-static” 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’s not obvious how do it
- to preserve memory layout – static link will change it and may ”wake-up” hidden bugs
- for ”permanent link” 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
Related Articles:
- 2010/01/24 Short Information about loaded kernel modules
- 2010/01/21 Copy temporary evolution images downloaded for messages
- 2010/01/21 sed tutorial and help
- 2010/01/16 Useful link for grep
- 2010/01/16 Viewing log files without using vi or any other text editor
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.