static linking

Arnauld Michelizza am@zehc.net
Fri Sep 20 05:59:00 GMT 2002


I wonder if there is a way to make a static binary from a dynamically
linked one.

For example, `dyn' is a dynamically linked binary :
$ ldd dyn
        libc.so.6 => /lib/libc.so.6 (0x40020000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I have tried the following to obtain a static binary :
$ gcc -static -z muldefs dyn

But with no succes.


--
Arnauld Michelizza




More information about the Gcc-help mailing list