Re: [RFA] Check solib bfd arch

Ulrich Weigand
2009-07-05T21:36:09Z

Hui Zhu wrote:

> + /* Check bfd arch. */
> + if (bfd_get_arch (abfd) != gdbarch_bfd_arch_info (target_gdbarch)->arch)

This test seems to strict; there are cases where code of a different
architecture *can* actually run on the current architecture (e.g.
bfd_arch_rs6000 vs. bfd_arch_powerpc).

The correct check would be something alone the lines of
osabi.c:can_run_code_for.

Bye,
Ulrich

--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com