This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Check solib bfd arch
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, Hui Zhu <teawater at gmail dot com>, gdb-patches ml <gdb-patches at sourceware dot org>, Michael Snyder <msnyder at vmware dot com>
- Date: Fri, 18 Sep 2009 09:10:22 -0400
- Subject: Re: [RFA] Check solib bfd arch
- References: <20090917225633.GA29769@adacore.com> <200909181250.n8ICoMmD010948@d12av02.megacenter.de.ibm.com>
On Fri, Sep 18, 2009 at 02:50:22PM +0200, Ulrich Weigand wrote:
> In your particular case, the result of compatible appears to indicate
> that the target architecture sparc:v9 *cannot* run code written for
> the architecture sparc:v9a; if this were true (I'm not sure about
> such sparc architecture details), then it would be correct to reject
> those shared libraries ...
Where are we getting the architecture settings from?
I'll pick an example I know better. Suppose a binary is built for
a PowerPC 603 but it loads a shared library built for a PowerPC 7400
with Altivec. The check would fail in the way Joel described if we're
getting the architecture from the input file, but this is a valid
operation. If we're getting it from the target, then we've got the
wrong architecture if PowerPC 7400 binaries were supported - clearly
it isn't a 603. But not all targets report the architecture.
--
Daniel Jacobowitz
CodeSourcery