Re: [RFA] Check solib bfd arch

Joel Brobecker
2009-09-18T14:24:14Z

> 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.

That's exactly what I thought was happening. I remembered that the
architecture is determined from the binary, so I assumed that my
executable was built as a sparcv9 but it was linking in a sparcv9a
shared library.

Marc's suggestion of enhancing the nat module for Sparc to detect
if the machine can run Sparcv9 is interesting, but we would still
have the same issue if we were cross debugging, no?

--
Joel