James G. Sack (jim) wrote:
>..
> 2. What are the numbers in parentheses eg, "(0x00970000)"
> ---------------------------------------------------------
>..
> Evidently the numbers are load addresses for these libraries.

More on this:

It suddenly dawned on me that the load addresses seem to be embedded in
the libraries! Run
  readelf -l /lib/libc.so.6
and check the first LOAD entry against the ldd output fot several progs.
Seems strange to me, but I've found other words, such as those of John
R. Levine from his book manuscript for "Linkers and Loaders". In
  http://www.iecc.com/linker/linker09.html
he says
------------------
The most difficult aspect of shared libraries is address space
management. Each shared library occupies a fixed piece of address space
in each program in which it is used. Different libraries have to use
non-overlapping addresses if they can be used in the same program.
Although it's possible to check mechanically that libraries don't
overlap, assigning address space to libraries is a black art.
------------------

Wonderful, but it still seems hard to believe, but maybe there's some
kind of collision resolution process, when constructing each program
image, or during actual loading.

Hmmm, the predefined load address seems even to work in dynamically
loaded libs (using dlopen) -- where there's no such address-knowledge
embedded in the program. I've got a little 40-line test program
patterned after an example from wheeler's "Program-Library-HOWTO", in
case anyone wants to see.

..jim

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to