[uCsimm] Every program its own copy of libc ?

From: Alex Perry (alex.perry@qm.com)
Date: Wed Jan 05 2000 - 18:24:28 EST


Currently, the libc (for example) is compiled as a .o
and hardlinked to every executable. This wastes memory,
especially if I want to run collections of little C programs
that may each rely on a lot of interesting library calls.

Is there some semi-automatic way to ...

... compile a library two ways, generating the usual PIC version
and a non-PIC version as separate files in two directories.

... having the standard user linker look in a third directory
before looking in the directory containing the relocatable version.

... having a script that links a specified library onto the end
of the kernel image, then recovers the symbol table for where the
symbols inside that library have ended up.

... writes a new stub library file that contains those symbol
definitions as static values pointing into the correct locations.

... stores this new library file in that third directory so
that subsequent compilations of user programs will use the
statically linked 'shared' library thereafter.

... some ploy taking the process list of a running uclinux,
finding the relevant binaries, looking up which libraries each
uses and determines which libraries are used three times to
force them into the kernel and which libraries are used one
time (or less) to kick them out of the kernel.

Alex.

This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/



This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:33 EST