This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Contribution: Intel's iWMMXt processor
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Wed, 26 Mar 2003 19:26:12 +0000
- Subject: Re: Contribution: Intel's iWMMXt processor
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> > Hi Guys,
> >
> > I am applying patches to the binutils sources to add support for
> > Intel's iWMMXt processor - an ARM variant. The ChangeLogs are below
> > and a compressed patch is attached.
>
> This has completely broken linking for non-xscale systems. How can the
> following possibly work?
>
>
> if ( bfd_get_mach (obfd) == bfd_mach_arm_XScale
> && bfd_get_mach (ibfd) == bfd_mach_arm_iWMMXt)
> bfd_set_arch_mach (obfd, bfd_get_arch (obfd), bfd_mach_arm_iWMMXt);
> else if ( bfd_get_mach (ibfd) != bfd_mach_arm_XScale
> || bfd_get_mach (obfd) != bfd_mach_arm_iWMMXt)
> {
> bfd_set_error (bfd_error_wrong_format);
>
> R.
>
Actually, it's a combination of all the areas related to this.
1) The assembler sets the architecture to v5e if the user hasn't specified
any particular architecture. It should probably be set to unknown.
2) The bit of code above should be able to combine files with different
architecture specifications with the result being the most specific
architecture requested (provided they are compatible); except that
unknown+anything is always unknown, unless some command-line option forces
it otherwise.
3) I also don't like the fact that it is directly exporting the internal
bfd numbers, which haven't been logically selected. If we must do
something like this, it should be based on names and the tools should map
the names onto internal numbers as files are read and written.
Finally, the use of .note.arm.ident for a GNU extension is a really BAD
idea. This should have "gnu" somewhere in the note name.
All in all, I think trying to do this this way is dangerous and is going
to lead to massive problems in the near future. Can we please revert this
bit?
R.