summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-07-30 10:08:00 +0000
committerJakub Jelinek <jakub@redhat.com>2004-07-30 10:08:00 +0000
commite5accae62b61a5b9cd902746e1070ceb8d8b17b6 (patch)
tree3b5b5e9270af329ac27a01e9f4a4386a4f06bd57 /bfd
parente277441f12fe41d6b0d47f0b3ef8a92b4ddaeb19 (diff)
downloadbinutils-redhat-e5accae62b61a5b9cd902746e1070ceb8d8b17b6.tar.gz
* archures.c (bfd_mach_sparc_64bit_p): Define.
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it. * bfd-in2.h: Rebuilt.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/archures.c3
-rw-r--r--bfd/bfd-in2.h3
-rw-r--r--bfd/elf32-sparc.c8
4 files changed, 17 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index fc1aaff9e3..2a71738697 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-30 Jakub Jelinek <jakub@redhat.com>
+
+ * archures.c (bfd_mach_sparc_64bit_p): Define.
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
+ * bfd-in2.h: Rebuilt.
+
2004-07-29 Alexandre Oliva <aoliva@redhat.com>
Introduce SH2a support.
diff --git a/bfd/archures.c b/bfd/archures.c
index fd34ab61c9..4904b62483 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -128,6 +128,9 @@ DESCRIPTION
.#define bfd_mach_sparc_v9_p(mach) \
. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
. && (mach) != bfd_mach_sparc_sparclite_le)
+.{* Nonzero if MACH is a 64 bit sparc architecture. *}
+.#define bfd_mach_sparc_64bit_p(mach) \
+. ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index e693f237c4..8f5d59bdae 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1576,6 +1576,9 @@ enum bfd_architecture
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
&& (mach) != bfd_mach_sparc_sparclite_le)
+/* Nonzero if MACH is a 64 bit sparc architecture. */
+#define bfd_mach_sparc_64bit_p(mach) \
+ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 15868eb54d..d87ff7a46a 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -3303,6 +3303,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
bfd *obfd;
{
bfd_boolean error;
+ unsigned long ibfd_mach;
/* FIXME: This should not be static. */
static unsigned long previous_ibfd_e_flags = (unsigned long) -1;
@@ -3312,7 +3313,8 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
error = FALSE;
- if (bfd_get_mach (ibfd) >= bfd_mach_sparc_v9)
+ ibfd_mach = bfd_get_mach (ibfd);
+ if (bfd_mach_sparc_64bit_p (ibfd_mach))
{
error = TRUE;
(*_bfd_error_handler)
@@ -3321,8 +3323,8 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
}
else if ((ibfd->flags & DYNAMIC) == 0)
{
- if (bfd_get_mach (obfd) < bfd_get_mach (ibfd))
- bfd_set_arch_mach (obfd, bfd_arch_sparc, bfd_get_mach (ibfd));
+ if (bfd_get_mach (obfd) < ibfd_mach)
+ bfd_set_arch_mach (obfd, bfd_arch_sparc, ibfd_mach);
}
if (((elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA)