From: imp@boulder.parcplace.com (Warner Losh) Subject: Re: Unsharable Shared Libraries. Date: 28 Feb 1993 06:58:14 GMT
In article <C34Is7.Fz2@ra.nrl.navy.mil> eric@tantalus.nrl.navy.mil
(Eric Youngdale) writes:
>There is also a startup overhead as the
>libraries are searched for the required symbols, since you effectively have to
>do a linking of the program each time you run it.
only those routines that get used are linked in the manner. The code
for ld.so on Suns has a big jump table that gets back filled with the
correct address the first time that it is called. You have about the
same overhead after that as you do in the jump table libraries on
Linux. The additional flexibilty that it buys you is that it doesn't
matter if the library's jump table changes over time, it will still
dynamically link in old programs. It is a more robust way of doing
things, but you are quite correct that there is a price.
In some ways the Linux approach is better, since you don't have to
keep an extra copy of symbols around like you do on Suns. In other
ways it is worse because if your jump table fills up, you'll need to
make it bigger and move variables that come after it. Not knowing how
large the jump table is, I can't say if this will likely be a problem
soon or now.
Warner
-- Warner Losh imp@boulder.parcplace.COM ParcPlace Boulder I've almost finished my brute force solution to subtlety.