[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: making a static binary out a dynamic
- To: erez(at-nospam)savan.com
- Subject: Re: making a static binary out a dynamic
- From: "Nadav Har'El" <nyh(at-nospam)math.technion.ac.il>
- Date: Wed, 3 Jan 2001 14:54:21 +0200
- Cc: ILUG <linux-il(at-nospam)cs.huji.ac.il>
- Hebrew-Date: 8 Tevet 5761
- In-Reply-To: <3A52DD6F.D0C525A9@savan.com>; from erez@savan.com on Wed, Jan 03, 2001 at 10:06:07AM +0200
- References: <3A52DD6F.D0C525A9@savan.com>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mutt/1.2i
On Wed, Jan 03, 2001, erez@savan.com wrote about "making a static binary out a dynamic":
> hi
> I'm trying to create a boot disk, and i have to use a ramdisk,
> the makimum ramdisk size is 1440k (compressed )
> the problem is that i have to put in the ramdisk, a binary which uses libc.so
> but libc.so compressed is bigger then 1440k.
> can i link the binary with libc.so and make it static ?
Though you can go that way (it can help if the program is using only a small
subset of libc.so), another way to go is to strip libc.so (you're actually
allowed to do that!). In a test I conducted, this lowered the size of libc.so
from 4.6M to only 1.2M (compressing it, it fits easily in a diskette).
To gain the most from the stripping, do the following:
strip -s -R .note -R .comment libc.so
--
Nadav Har'El | Wednesday, Jan 3 2001, 8 Tevet 5761
nyh@math.technion.ac.il |-----------------------------------------
Phone: +972-53-245868, ICQ 13349191 |Always keep your words soft and sweet,
http://nadav.harel.org.il |just in case you have to eat them.
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il