This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
GAS for arm-coff does not set the correct machine number
- To: binutils at sources dot redhat dot com
- Subject: GAS for arm-coff does not set the correct machine number
- From: Nick Clifton <nickc at redhat dot com>
- Date: 09 Mar 2001 17:04:32 -0800
Hi Guys,
I noticed that GAS for the arm-coff port does not set the correct
machine number in the object files that it creates. It was ignoring
the fact that the default value cpu_variant might include some of
the new architecture variants.
The patch below fixes it, but I am posting it here first, before
applying it, in case anyone has any questions or concerns about it.
I have run the usual tests and nothing untoward has turned up, but I
wanted to give people a heads up before changing something that
might possibly have unforeseen consequences.
It is also slightly worrying that the arm-elf port never seems to
set the machine number at all, leaving it at zero. I have not yet
investigated why this should be so.
Cheers
Nick
2001-03-09 Nick Clifton <nickc@redhat.com>
* config/tc-arm.c (md_begin): Always set machine type based on
cpu_variant.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src//src/gas/config/tc-arm.c,v
retrieving revision 1.75
diff -p -w -r1.75 tc-arm.c
*** tc-arm.c 2001/03/08 23:24:23 1.75
--- tc-arm.c 2001/03/10 01:04:02
*************** md_begin ()
*** 6513,6520 ****
}
/* Catch special cases. */
- if (cpu_variant != (FPU_DEFAULT | CPU_DEFAULT))
- {
if (cpu_variant & ARM_EXT_XSCALE)
mach = bfd_mach_arm_XScale;
else if (cpu_variant & ARM_EXT_V5E)
--- 6513,6518 ----
*************** md_begin ()
*** 6535,6541 ****
}
else if (cpu_variant & ARM_EXT_LONGMUL)
mach = bfd_mach_arm_3M;
- }
bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
}
--- 6533,6538 ----