This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Handle solaris dynamic linker name change.


On Thursday 27 December 2007 21:10:31 Doug Evans wrote:
> On Dec 24, 2007 9:48 AM, Vladimir Prus <vladimir@codesourcery.com> wrote:
> > +  /* On Solaris, when starting inferior we think that
> > +     dynamic linker is /usr/lib/ld.so.1, but later on,
> > +     the table of loaded shared libraries contains
> > +     /lib/ld.so.1.
> > +     Sometimes one file is a link to another, but sometimes
> > +     they have identical content, but are not linked to each
> > +     other.  */
> > +  if (strcmp (gdb->so_original_name, "/usr/lib/ld.so.1") == 0
> > +      && strcmp (inferior->so_original_name, "/lib/ld.so.1") == 0)
> > +    return 1;
> 
> Do we want to support "ld --dynamic-linker /my/ld.so.1" here (i.e.
> user has specified a different ld.so), or if this happens is the bug
> avoided?

I would have expected the above to work -- as then gdb will think
dynamic linker is /my/ld.so.1 from the start, and it's not going
to change to anything else.

From previous discussion it's not clear why the name changes on
Solaris, but it appears the initial name is grabbed from ELF directly,
and will be /my/ld.so.1 in your case.

- Volodya

 



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]