Re: [RFA] Check solib bfd arch

Daniel Jacobowitz
2009-09-18T13:10:28Z

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