Re: What exactly does "info sharedlibrary" command show?

Daniel Jacobowitz
2006-08-29T20:12:19Z

On Tue, Aug 29, 2006 at 10:05:22PM +0200, Mark Kettenis wrote:
> > It seems to me that "info shared" ought to say this library is mapped
> > at 0x2aaaaabc3000 - 0x2aaaaaddfb000, or at least 0x2aaaaabc3000
> > to 0x2aaaaace4000. The latter is more portably reliable, some
> > platforms separate the segments at relocation time, but SysV ones
> > of course do not.
>
> The first approach would lead to much confusion since it would lead to
> seemingly overlapping shared libraries on OpenBSD/i386. The latter
> approach is better in that sense.

Right. As I said, I knew that there were systems where you were
limited to the first segment for this purpose, though I didn't know W^X
used this.

> > Right now we say it occupies 0x00002aaaaabdf2d0 to 0x00002aaaaacc1a10.
>
> I like this though, since I mostly search the list for code addresses.

Really? Even if I'm searching for code addresses, I dislike this,
because it has more noise and fewer significant bits.

Given this I have a hard time finding anything visually:

0x00002aaaaabd6910 0x00002aaaaabf1e58 Yes /lib/libreadline.so.5
0x00002aaaaad20ef0 0x00002aaaaad43cc8 Yes /usr/lib/libncurses.so.5
0x00002aaaaae61dd0 0x00002aaaaaea22b8 Yes /lib/libm.so.6
0x00002aaaaafe2000 0x00002aaaaafe2978 Yes /lib/libdl.so.2
0x00002aaaab1002d0 0x00002aaaab1e2a10 Yes /lib/libc.so.6
0x00002aaaaaaaba80 0x00002aaaaaabc857 Yes /lib64/ld-linux-x86-64.so.2
0x00002aaaab50a8e0 0x00002aaaab50dce8 Yes /lib/libthread_db.so.1

I find this much easier:

0x00002aaaaabd6000 0x00002aaaaabf2000 Yes /lib/libreadline.so.5
0x00002aaaaad20000 0x00002aaaaad44000 Yes /usr/lib/libncurses.so.5
0x00002aaaaae61000 0x00002aaaaaea3000 Yes /lib/libm.so.6
0x00002aaaaafe2000 0x00002aaaaafe3000 Yes /lib/libdl.so.2
0x00002aaaab100000 0x00002aaaab1e3000 Yes /lib/libc.so.6
0x00002aaaaaaab000 0x00002aaaaaabd000 Yes /lib64/ld-linux-x86-64.so.2
0x00002aaaab50a000 0x00002aaaab50e000 Yes /lib/libthread_db.so.1

But, it's not a big deal. If you actually prefer the way it is now,
I guess I'll leave it alone after all.

> True. Somehow we should make the load address of a shared library
> available.

Should we use segments in "info files" when available?

--
Daniel Jacobowitz
CodeSourcery