Re: mmap() versus read() and embedded systems.

ralf@uni-koblenz.de
Fri, 13 Mar 1998 14:30:21 +0100


On Thu, Mar 12, 1998 at 11:27:08AM +0001, Etienne Lorrain wrote:

> Even if you have memory mapped flash as a file system in an
> embedded environment, with romfs, the main problem is the
> executable loader: it has to modify (resolve address) of the code
> you are executing, so this code has to be copyed first in RAM.
> I am not sure that using static library (instead of ELF) solves
> completely this problem...

That's what PIC code is required for ELF DSOs on most architectures. The
Intel code would use large amounts of memory for trying to build DSOs
without using PIC for them. Other architectures are even less forgiving.

A small amount of RAM is used for PLT and GOT when using PIC code but the
win in memory by sharing code exceeds it. Aside of that many glibc programs
will pull a second, shared copy of libc into memory via the NSS stuff,
anyway, so the DSOs are out there to assimilate you anyway ;-)

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu