aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-02-06 16:29:28 +0000
committerNick Clifton <nickc@redhat.com>2002-02-06 16:29:28 +0000
commitf13b834e1df61ca294988b9b0163d325d04e4ac6 (patch)
tree0b6939fc622e5d2645a851c7ff33a1295fa26507 /bfd/coffcode.h
parent082fc60dfca102f95d73f123f43060f3f34c0ff6 (diff)
downloadgdb-f13b834e1df61ca294988b9b0163d325d04e4ac6.zip
gdb-f13b834e1df61ca294988b9b0163d325d04e4ac6.tar.gz
gdb-f13b834e1df61ca294988b9b0163d325d04e4ac6.tar.bz2
Select the highest known ARM architecture when an F_ARM_5 flag is detected,
since we cannot be sure exactly which architecture this represents.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 976efe1..f0a2c5e 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1787,7 +1787,7 @@ coff_mkobject_hook (abfd, filehdr, aouthdr)
#endif
#ifdef ARM
- /* Set the flags field from the COFF header read in */
+ /* Set the flags field from the COFF header read in. */
if (! _bfd_coff_arm_set_private_flags (abfd, internal_f->f_flags))
coff->flags = 0;
#endif
@@ -1871,7 +1871,12 @@ coff_set_arch_mach_hook (abfd, filehdr)
case F_ARM_3M: machine = bfd_mach_arm_3M; break;
case F_ARM_4: machine = bfd_mach_arm_4; break;
case F_ARM_4T: machine = bfd_mach_arm_4T; break;
- case F_ARM_5: machine = bfd_mach_arm_5; break;
+ /* The COFF header does not have enough bits available
+ to cover all the different ARM architectures. So
+ we interpret F_ARM_5, the highest flag value to mean
+ "the highest ARM architecture known to BFD" which is
+ currently the XScale. */
+ case F_ARM_5: machine = bfd_mach_arm_XScale; break;
}
break;
#endif
@@ -2624,7 +2629,8 @@ coff_set_flags (abfd, magicp, flagsp)
case bfd_mach_arm_4: * flagsp |= F_ARM_4; break;
case bfd_mach_arm_4T: * flagsp |= F_ARM_4T; break;
case bfd_mach_arm_5: * flagsp |= F_ARM_5; break;
- /* FIXME: we do not have F_ARM vaues greater than F_ARM_5. */
+ /* FIXME: we do not have F_ARM vaues greater than F_ARM_5.
+ See also the comment in coff_set_arch_mach_hook(). */
case bfd_mach_arm_5T: * flagsp |= F_ARM_5; break;
case bfd_mach_arm_5TE: * flagsp |= F_ARM_5; break;
case bfd_mach_arm_XScale: * flagsp |= F_ARM_5; break;