[RFA] Handle solaris dynamic linker name change.
Thu Dec 27 18:37:00 GMT 2007
On Thursday 27 December 2007 21:10:31 Doug Evans wrote:
> On Dec 24, 2007 9:48 AM, Vladimir Prus <email@example.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
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.
More information about the Gdb-patches