From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14479 invoked by alias); 27 Dec 2007 18:18:44 -0000 Received: (qmail 14470 invoked by uid 22791); 27 Dec 2007 18:18:43 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 27 Dec 2007 18:18:38 +0000 Received: (qmail 19443 invoked from network); 27 Dec 2007 18:18:36 -0000 Received: from unknown (HELO 172.16.unknown.plus.ru) (vladimir@127.0.0.2) by mail.codesourcery.com with ESMTPA; 27 Dec 2007 18:18:36 -0000 From: Vladimir Prus To: "Doug Evans" Subject: Re: [RFA] Handle solaris dynamic linker name change. Date: Thu, 27 Dec 2007 18:37:00 -0000 User-Agent: KMail/1.9.6 Cc: gdb-patches@sources.redhat.com References: <200712242048.33983.vladimir@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200712272118.29967.vladimir@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00422.txt.bz2 On Thursday 27 December 2007 21:10:31 Doug Evans wrote: > On Dec 24, 2007 9:48 AM, Vladimir Prus 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") =3D=3D 0 > > + && strcmp (inferior->so_original_name, "/lib/ld.so.1") =3D=3D 0) > > + return 1; >=20 > 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. =46rom 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 =20