Re: question regarding prelinking (was: (inc. note from dpkg developers) (was:Bug#XXXXXX: (far too many packages) needs rebuilt for prelinking))
Emile van Bergen <firstname.lastname@example.org> writes:
> But then, notice that L uses library M. And suppose that in process X, M
> got mapped at a different address than where M got mapped in process Y.
> I see no reason for that to be impossible or unlikely, if applications X
> and Y each map a different set of libraries before mapping L.
> That would mean that all instructions in L that refer to functions or
> data in library M, will have to be fixed up using different addresses,
> for the applications X and Y. That means that the pages of L containing
> those instructions, can suddenly no longer be shared among X and Y.
To solve this problem, the ELF format uses tables for all the
addresses needed from other libraries, which the dynamic linker fills
in as needed at runtime. (IIRC this is called the global offset
table, or GOT.) So there are pages which can't be shared for the
reasons you outlined, but they're all isolated and compressed into a
minimal number of pages.
Daniel Schepler "Please don't disillusion me. I
email@example.com haven't had breakfast yet."
-- Orson Scott Card