This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[h8300] enable linking of h8300s with h8300sx
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 21 Jun 2004 08:11:23 -0300
- Subject: [h8300] enable linking of h8300s with h8300sx
- Organization: Red Hat Global Engineering Services Compiler Team
This patch has been in our internal tree for quite some time.
Apparently it missed the previous round of h8sx contribution. Ok to
install?
Index: bfd/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
2003-05-15 Richard Sandiford <rsandifo@redhat.com>
* cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
linked together. Mark the result as h8300sx code.
Index: bfd/cpu-h8300.c
===================================================================
RCS file: /cvs/uberbaum/./bfd/cpu-h8300.c,v
retrieving revision 1.17
diff -u -p -r1.17 cpu-h8300.c
--- bfd/cpu-h8300.c 17 Oct 2003 10:23:33 -0000 1.17
+++ bfd/cpu-h8300.c 21 Jun 2004 10:41:52 -0000
@@ -96,8 +96,18 @@ h8300_scan (const struct bfd_arch_info *
static const bfd_arch_info_type *
compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out)
{
+ if (in->arch != out->arch)
+ return 0;
+ if (in->mach == bfd_mach_h8300sx && out->mach == bfd_mach_h8300s)
+ return in;
+ if (in->mach == bfd_mach_h8300s && out->mach == bfd_mach_h8300sx)
+ return out;
+ if (in->mach == bfd_mach_h8300sxn && out->mach == bfd_mach_h8300sn)
+ return in;
+ if (in->mach == bfd_mach_h8300sn && out->mach == bfd_mach_h8300sxn)
+ return out;
/* It's really not a good idea to mix and match modes. */
- if (in->arch != out->arch || in->mach != out->mach)
+ if (in->mach != out->mach)
return 0;
else
return in;
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}