From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11037 invoked by alias); 18 Sep 2009 05:05:12 -0000 Received: (qmail 10803 invoked by uid 22791); 18 Sep 2009 05:05:11 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f189.google.com (HELO mail-pz0-f189.google.com) (209.85.222.189) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Sep 2009 05:05:05 +0000 Received: by pzk27 with SMTP id 27so552127pzk.12 for ; Thu, 17 Sep 2009 22:05:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.5.28 with SMTP id 28mr55454wfe.82.1253250304133; Thu, 17 Sep 2009 22:05:04 -0700 (PDT) In-Reply-To: <20090917225633.GA29769@adacore.com> References: <200907071645.n67GjR0X001418@d12av02.megacenter.de.ibm.com> <20090917225633.GA29769@adacore.com> From: Hui Zhu Date: Fri, 18 Sep 2009 05:05:00 -0000 Message-ID: Subject: Re: [RFA] Check solib bfd arch To: Joel Brobecker , Ulrich Weigand Cc: gdb-patches ml , Michael Snyder Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2009-09/txt/msg00579.txt.bz2 Hi Joel, Thanks for you work. Could you please try it with "bfd_arch_rs6000 and bfd_arch_powerpc"? Or Ulrich, maybe you can help us with it. :) Thanks, Hui On Fri, Sep 18, 2009 at 06:56, Joel Brobecker wrote: > Hello, > > The following patch is causing trouble on sparc-solaris: > >> 2009-07-08 =A0Hui Zhu =A0 >> >> =A0 =A0 =A0 * solib.c (solib_bfd_open): Output a warning if solib's >> =A0 =A0 =A0 architecture is not compatible with inferior's architecture. > > I now see: > > =A0 =A0(gdb) run > =A0 =A0Starting program: /[...]/sparc64/ex/task_switch > =A0 =A0warning: `/usr/platform/SUNW,Sun-Fire-V440/lib/sparcv9/libc_psr.so= .1': Shared library architecture sparc:v9a is not compatible with target ar= chitecture sparc:v9. > >> + =A0if (b->compatible (b, bfd_get_arch_info (abfd)) !=3D b) > > In my case, b->compatible is bfd_default_compatible. the architecture > is set to sparc:v9, and the shared library's architecture is sparc:v9a. > The problem is that b->compatible is returning the architecture that > is "more featureful" of the two, which in this case is sparc:v9a. > As a result, we emit the warning. > > Looks to me like the check is too aggressive and should be changed > to =3D=3D 0. Would that be correct? > > 2009-09-16 =A0Joel Brobecker =A0 > > =A0 =A0 =A0 =A0* solib.c (solib_bfd_open): Relax a bit the compatibility = check. > > Tested on sparc64-solaris. > > -- > Joel >