This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is there a way to make static executable out of ELF shared one?
- From: "Ricardo Derbes" <rmd at altec dot com dot ar>
- To: "vda" <vda at port dot imtp dot ilyichevsk dot odessa dot ua>,<gcc at gcc dot gnu dot org>,<gcc-help at gcc dot gnu dot org>
- Date: Tue, 11 Dec 2001 22:37:05 -0300
- Subject: Re: Is there a way to make static executable out of ELF shared one?
- References: <01121116220501.01501@manta>
Hi
It´s possible to recompile all the sources as static, but your ramdisk will
be a lot bigger than compiling as shared and adding libc to the ramdisk...
it´s easier, too.. you can simply copy all what is needed (and shared
libraries, which you can find running ldd on each executable you want on the
ramdisk) to a new rootfilesystem, and then gzipping it (better done on a
loop). In addition, you can compile packages as Busybox, which provide a lot
of basic functionality in a very small footprint. In as little as 2-3 Megs
you can build a very powerful system, without bells & whistles as X, but
with networking support and all the servers you may need (telnet, ftp,
http), and useful stuff. If you are really tight of space, you can build a
complete (well, almost) system in a 1.44M floppy, including a 2.4.x
kernel...
Regards
Ricardo Derbes
Altec SE
Albarracín 157 - San Carlos de Bariloche
+54-2944-426892
rmd@altec.com.ar
----- Original Message -----
From: "vda" <vda@port.imtp.ilyichevsk.odessa.ua>
To: <gcc@gcc.gnu.org>; <gcc-help@gcc.gnu.org>
Sent: Tuesday, December 11, 2001 3:22 PM
Subject: Is there a way to make static executable out of ELF shared one?
> Hi gcc folks,
>
> I need a bunch of static executables for linux initial ramdisk.
> I have all needed executables but some of them require .so libs.
> I know that static binaries can be made at compile time (ld -static)
> but do I really need to download source for all my binaries?
>
> There must be a way to make static binary from shared one
>
> Please CC me
> --
> Denis Vlasenko