
Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html. The project seems a little old and when I tried it out on my 32bit RHEL5 box, the statically linked file did not run. So I thought it would be a good exercise to try and use Haskell's Elf module (Data.Elf) and attempt to build a statifier. Just wanted to understand if anyone's tried this before or have any advice for me. -- Regards, Kashyap

Interesting tool. For my recent work I too have found a use for the
elf package, but its lack of a full binary instance and no parsing of
.symtab or .dynstr sections limits its usefulness. This isn't a
debilitating limitation - you can use elf for basic inspection then
perform mutations via objcopy and ld, which are more likely to have
any oddities / corner cases accounted for anyway.
Thomas
On Wed, Jul 21, 2010 at 9:20 PM, C K Kashyap
Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html. The project seems a little old and when I tried it out on my 32bit RHEL5 box, the statically linked file did not run. So I thought it would be a good exercise to try and use Haskell's Elf module (Data.Elf) and attempt to build a statifier. Just wanted to understand if anyone's tried this before or have any advice for me. -- Regards, Kashyap
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thanks Thomas. On Thu, Jul 22, 2010 at 12:56 PM, Thomas DuBuisson < thomas.dubuisson@gmail.com> wrote:
Interesting tool. For my recent work I too have found a use for the elf package, but its lack of a full binary instance and no parsing of .symtab or .dynstr sections limits its usefulness. This isn't a debilitating limitation - you can use elf for basic inspection then perform mutations via objcopy and ld, which are more likely to have any oddities / corner cases accounted for anyway.
Thomas
On Wed, Jul 21, 2010 at 9:20 PM, C K Kashyap
wrote: Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html. The project seems a little old and when I tried it out on my 32bit RHEL5 box, the statically linked file did not run. So I thought it would be a good exercise to try and use Haskell's Elf module (Data.Elf) and attempt to build a statifier. Just wanted to understand if anyone's tried this before or have any advice for me. -- Regards, Kashyap
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Regards, Kashyap

C K Kashyap schrieb:
Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html.
I also tried to use statifier in order to run a Haskell program on a remote machine that I compiled locally. I had also no success. :-(

Looks like the crash is due to ASLR (Address Space Layout Randomization). You need to disable it for it to work. You can disable ASLR very easily - check out http://stackoverflow.com/questions/1455904/how-to-disable-address-space-rand... for instance Statifier worked for me once I disabled ASLR ... On Sun, Jul 25, 2010 at 12:32 AM, Henning Thielemann < schlepptop@henning-thielemann.de> wrote:
C K Kashyap schrieb:
Hi, At my work we ran into a situation where we started wishing there was a way to take a dynamically linked executable and create a statically linked bundle out of it. Little bit of googling got me to statifier - http://statifier.sourceforge.net/statifier/main.html.
I also tried to use statifier in order to run a Haskell program on a remote machine that I compiled locally. I had also no success. :-(
-- Regards, Kashyap
participants (3)
-
C K Kashyap
-
Henning Thielemann
-
Thomas DuBuisson