Re: Linux 2.4.x - reduce size of /lib libraries in ramdisk



dchou4u@xxxxxxxxxxx wrote:
> I am running Snapgear 2.4.x kernel on an embedded ARM board. We like to
> reduce the size of the ramdisk and discovered that the bulk of the
> ramdisk is used by libaries in /lib.
>
> I have removed the big stuff in /bin such as bash, fdisk and etc, but
> still it is not reducing the size of the libraries in /lib.
>
> I believe the binaries in /bin are using these libraries since they are
> dynamically linked. Has anyone successfully reduced the size taken by
> these /lib libraries?

There are several approaches to this problem:

1) Strip the shared libraries, if you have not already done that.

2) Statically link the executables you need and remove the shared libraries
altogether.
You might also investigate dietlibc, a C library you can link against
that is as slim as possible.

3) Use a kit like busybox that has alternative versions of many of the
commands you need and is optimized for small size.

Yours,
Laurenz Albe
.



Relevant Pages

  • Re: file system in embedded device
    ...    I used that ramdisk and added the required libraries to ramdisk. ...    When i boot the system i am not able to execute the application.It ... The "ldconfig" command tells the linker where to find shared libraries, ...
    (comp.os.linux.development.apps)
  • Re: file system in embedded device
    ... There is a sample ramdisk provided by TI. ... I used that ramdisk and added the required libraries to ramdisk. ...
    (comp.os.linux.development.apps)
  • Re: Using thread-specific data in shared libraries
    ... shared libraries since there might be a race condition between thread ... exit notification and pthread_key_delete called from library unload. ... might have TSD in threads that outlives the shared library. ...
    (comp.programming.threads)
  • Re: Cross platform - an interim proposal
    ... Compilers don't output shared libraries. ... mac calls them and copy them to the Mac, when your mac app runs the run ... But there is a market for consumer apps, and the rumor is that Mac users ...
    (borland.public.delphi.non-technical)
  • Re: Using thread-specific data in shared libraries
    ... operation of the per-thread destructor in any dependent on the location ... might have TSD in threads that outlives the shared library. ... shared libraries unless completely missed David Butenhof's point. ...
    (comp.programming.threads)