Re: [RFA] Check solib bfd arch

Daniel Jacobowitz
2009-09-18T14:39:17Z

On Fri, Sep 18, 2009 at 04:07:46PM +0200, Mark Kettenis wrote:
> I suppose we needsto add the necessary magic to sparc-sol-nat.c to set
> the proper architecture. I'll need to figure out how to extract that
> information from the system. Is it possible to create a target
> description that just contains the architecture and not all the
> register stuff?

Yes, this is easy. If there aren't any registers, the register bits
will be disabled. The XML version would be something like:


<target>
<architecture>sparc:sparcv9</architecture>
<osabi>Solaris</osabi>
</target>

The C version could be generated from that, or if you want to do it
dynamically:

struct target_desc *result = allocate_target_description ();
set_tdesc_architecture (result, my_bfd_arch_info_ptr);

After that, mips_linux_read_description is a simple example of how to
supply the description.

I suspect the check is going to be problematic whether we do this or
not, though.

--
Daniel Jacobowitz
CodeSourcery