List Info

Thread: Re: unexpected warning when starting program




Re: unexpected warning when starting program
country flaguser name
United States
2007-04-10 16:35:15
Looking at this again...

On Sun, Mar 11, 2007 at 10:16:46PM -0700, Joel Brobecker
wrote:
> Slightly later, GDB tries to update its list of shared
libraries again,
> and this time finds that base address. So it now scans
a different
> memory region for that list of shared libraries. And in
addition to
> that, there is the following code that was recently
added:
> 
>       /* On Solaris, the dynamic linker is not in the
normal list of
>          shared objects, so make sure we pick it up
too.  Having
>          symbol information for the dynamic linker is
quite crucial
>          for skipping dynamic linker resolver code. 
*/
>       if (lm == 0 && ldsomap == 0)
>         lm = ldsomap = solib_svr4_r_ldsomap ();
> 
> The information extracted from this entry gives us the
following path
> to the loader: /lib/ld.so.1.  The paths are
different!!!

...

> I am not sure how to fix it either. On solaris 2.8 and
2.9, the two
> files are identical but distinct - one is not a link to
the other.
> On solaris 2.10, however, one is a link of the other,
so we could
> presumably check the fullpath instead of doing a direct
name comparison.
> But that would be pretty expensive for just one type of
host, no?

xfullpath isn't really that expensive.  We could even do it
only for
ld.so.1; I think that's not totally unreasonable.

Are you sure the files are distinct on your Solaris 2.8 /
2.9?  I have
a symlink /lib -> ./usr/lib on 2.8, and a symlink
/usr/lib/ld.so.1 ->
../../lib/ld.so.1 on 2.10.

-- 
Daniel Jacobowitz
CodeSourcery

Re: unexpected warning when starting program
country flaguser name
United States
2007-04-10 16:48:51
> xfullpath isn't really that expensive.  We could even
do it only for
> ld.so.1; I think that's not totally unreasonable.
> 
> Are you sure the files are distinct on your Solaris 2.8
/ 2.9?  I have
> a symlink /lib -> ./usr/lib on 2.8, and a symlink
/usr/lib/ld.so.1 ->
> ../../lib/ld.so.1 on 2.10.

Yes, on one of our Solaris 2.8 machines, they are distinct
(although
identical):

bbknile ~>uname -a
SunOS nile 5.8 Generic_117350-24 sun4u sparc
SUNW,Sun-Fire-V440 Solaris
bbknile ~>ls -l /lib/ld.so.1 /usr/lib/ld.so.1
-rwxr-xr-x    1 root     bin        267824 Feb 25  2005
/lib/ld.so.1*
-rwxr-xr-x    1 root     bin        267824 Feb 25  2005
/usr/lib/ld.so.1*
bbknile ~>md5sum /lib/ld.so.1 /usr/lib/ld.so.1
0e2c1ce2e68149904a5df691b32d5115  /lib/ld.so.1
0e2c1ce2e68149904a5df691b32d5115  /usr/lib/ld.so.1

I checked one of our Solaris 2.9 machines, and it's the
same.

Thought it wouldn't help in these particular cases, it
would
still help in the solaris 2.10 one...

-- 
Joel

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )