aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorKazu Hirata <kazu@codesourcery.com>2006-12-25 22:39:21 +0000
committerKazu Hirata <kazu@codesourcery.com>2006-12-25 22:39:21 +0000
commit9840d27e8183796b97a7320fa51d52dc08577e69 (patch)
tree680186c4c2d1eaabd528db5554fd02a179a00cfa /bfd
parent8fce5f8c17863e0d03747400cd745a3cbd4451e3 (diff)
downloadgdb-9840d27e8183796b97a7320fa51d52dc08577e69.zip
gdb-9840d27e8183796b97a7320fa51d52dc08577e69.tar.gz
gdb-9840d27e8183796b97a7320fa51d52dc08577e69.tar.bz2
bfd/
* archures.c (bfd_mach_cpu32_fido): New. (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac, bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac, bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp, bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac, bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float, bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac): Increment the defined values. * bfd-in2.h: Regenerate. * cpu-m68k.c (arch_info_struct): Add en entry for bfd_mach_cpu32_fido. * elf32-m68k.c (elf32_m68k_object_p): Handle EF_M68K_CPU32_FIDO_A. (elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK. (elf32_m68k_print_private_bfd_data): Handle EF_M68K_CPU32_FIDO_A. binutils/ * readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A. gas/ * config/tc-m68k.c (cpu_of_arch): Add fido. (m68k_archs, m68k_cpu): Add entries for fido. (m68k_elf_final_processing): Handle EF_M68K_CPU32_FIDO_A. include/elf/ * m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New. include/opcode/ * m68k.h (fido_a): New.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog32
-rw-r--r--bfd/archures.c33
-rw-r--r--bfd/bfd-in2.h33
-rw-r--r--bfd/cpu-m68k.c64
-rw-r--r--bfd/elf32-m68k.c17
5 files changed, 108 insertions, 71 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0b86d0d..e0b3a63 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,10 +1,32 @@
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * archures.c (bfd_mach_cpu32_fido): New.
+ (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a,
+ bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac,
+ bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
+ bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp,
+ bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac,
+ bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac,
+ bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float,
+ bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac):
+ Increment the defined values.
+ * bfd-in2.h: Regenerate.
+ * cpu-m68k.c (arch_info_struct): Add en entry for
+ bfd_mach_cpu32_fido.
+ * elf32-m68k.c (elf32_m68k_object_p): Handle
+ EF_M68K_CPU32_FIDO_A.
+ (elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK.
+ (elf32_m68k_print_private_bfd_data): Handle
+ EF_M68K_CPU32_FIDO_A.
+
2006-12-25 Mei Ligang <ligang@sunnorth.com.cn>
- * elf32-score.c (score_elf_got_lo16_reloc): Change some variables type from
- unsigned to signed.
- (score_elf_final_link_relocate): Fix bugs of handling relocation type R_SCORE_GOT15,
- R_SCORE_GOT_LO16, and R_SCORE_REL32.
- (_bfd_score_elf_relocate_section): Handle R_SCORE_GOT_LO16 specially.
+ * elf32-score.c (score_elf_got_lo16_reloc): Change some variables
+ type from unsigned to signed.
+ (score_elf_final_link_relocate): Fix bugs of handling relocation
+ type R_SCORE_GOT15, R_SCORE_GOT_LO16, and R_SCORE_REL32.
+ (_bfd_score_elf_relocate_section): Handle R_SCORE_GOT_LO16
+ specially.
2006-12-23 Jakub Jelinek <jakub@redhat.com>
diff --git a/bfd/archures.c b/bfd/archures.c
index 5029cb0..89a3805 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -80,22 +80,23 @@ DESCRIPTION
.#define bfd_mach_m68040 6
.#define bfd_mach_m68060 7
.#define bfd_mach_cpu32 8
-.#define bfd_mach_mcf_isa_a_nodiv 9
-.#define bfd_mach_mcf_isa_a 10
-.#define bfd_mach_mcf_isa_a_mac 11
-.#define bfd_mach_mcf_isa_a_emac 12
-.#define bfd_mach_mcf_isa_aplus 13
-.#define bfd_mach_mcf_isa_aplus_mac 14
-.#define bfd_mach_mcf_isa_aplus_emac 15
-.#define bfd_mach_mcf_isa_b_nousp 16
-.#define bfd_mach_mcf_isa_b_nousp_mac 17
-.#define bfd_mach_mcf_isa_b_nousp_emac 18
-.#define bfd_mach_mcf_isa_b 19
-.#define bfd_mach_mcf_isa_b_mac 20
-.#define bfd_mach_mcf_isa_b_emac 21
-.#define bfd_mach_mcf_isa_b_float 22
-.#define bfd_mach_mcf_isa_b_float_mac 23
-.#define bfd_mach_mcf_isa_b_float_emac 24
+.#define bfd_mach_cpu32_fido 9
+.#define bfd_mach_mcf_isa_a_nodiv 10
+.#define bfd_mach_mcf_isa_a 11
+.#define bfd_mach_mcf_isa_a_mac 12
+.#define bfd_mach_mcf_isa_a_emac 13
+.#define bfd_mach_mcf_isa_aplus 14
+.#define bfd_mach_mcf_isa_aplus_mac 15
+.#define bfd_mach_mcf_isa_aplus_emac 16
+.#define bfd_mach_mcf_isa_b_nousp 17
+.#define bfd_mach_mcf_isa_b_nousp_mac 18
+.#define bfd_mach_mcf_isa_b_nousp_emac 19
+.#define bfd_mach_mcf_isa_b 20
+.#define bfd_mach_mcf_isa_b_mac 21
+.#define bfd_mach_mcf_isa_b_emac 22
+.#define bfd_mach_mcf_isa_b_float 23
+.#define bfd_mach_mcf_isa_b_float_mac 24
+.#define bfd_mach_mcf_isa_b_float_emac 25
. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 32eb6c9..d82d468 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1715,22 +1715,23 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
-#define bfd_mach_mcf_isa_a_nodiv 9
-#define bfd_mach_mcf_isa_a 10
-#define bfd_mach_mcf_isa_a_mac 11
-#define bfd_mach_mcf_isa_a_emac 12
-#define bfd_mach_mcf_isa_aplus 13
-#define bfd_mach_mcf_isa_aplus_mac 14
-#define bfd_mach_mcf_isa_aplus_emac 15
-#define bfd_mach_mcf_isa_b_nousp 16
-#define bfd_mach_mcf_isa_b_nousp_mac 17
-#define bfd_mach_mcf_isa_b_nousp_emac 18
-#define bfd_mach_mcf_isa_b 19
-#define bfd_mach_mcf_isa_b_mac 20
-#define bfd_mach_mcf_isa_b_emac 21
-#define bfd_mach_mcf_isa_b_float 22
-#define bfd_mach_mcf_isa_b_float_mac 23
-#define bfd_mach_mcf_isa_b_float_emac 24
+#define bfd_mach_cpu32_fido 9
+#define bfd_mach_mcf_isa_a_nodiv 10
+#define bfd_mach_mcf_isa_a 11
+#define bfd_mach_mcf_isa_a_mac 12
+#define bfd_mach_mcf_isa_a_emac 13
+#define bfd_mach_mcf_isa_aplus 14
+#define bfd_mach_mcf_isa_aplus_mac 15
+#define bfd_mach_mcf_isa_aplus_emac 16
+#define bfd_mach_mcf_isa_b_nousp 17
+#define bfd_mach_mcf_isa_b_nousp_mac 18
+#define bfd_mach_mcf_isa_b_nousp_emac 19
+#define bfd_mach_mcf_isa_b 20
+#define bfd_mach_mcf_isa_b_mac 21
+#define bfd_mach_mcf_isa_b_emac 22
+#define bfd_mach_mcf_isa_b_float 23
+#define bfd_mach_mcf_isa_b_float_mac 24
+#define bfd_mach_mcf_isa_b_float_emac 25
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c
index 5be4aa0..ee45ffe 100644
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -41,53 +41,54 @@ static const bfd_arch_info_type arch_info_struct[] =
N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
N(bfd_mach_m68060, "m68k:68060", FALSE, &arch_info_struct[7]),
N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[8]),
+ N(bfd_mach_cpu32_fido, "m68k:fido", FALSE, &arch_info_struct[9]),
/* Various combinations of CF architecture features */
N(bfd_mach_mcf_isa_a_nodiv, "m68k:isa-a:nodiv",
- FALSE, &arch_info_struct[9]),
- N(bfd_mach_mcf_isa_a, "m68k:isa-a",
FALSE, &arch_info_struct[10]),
- N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac",
+ N(bfd_mach_mcf_isa_a, "m68k:isa-a",
FALSE, &arch_info_struct[11]),
- N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac",
+ N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac",
FALSE, &arch_info_struct[12]),
- N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus",
+ N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac",
FALSE, &arch_info_struct[13]),
- N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac",
+ N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus",
FALSE, &arch_info_struct[14]),
- N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac",
+ N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac",
FALSE, &arch_info_struct[15]),
- N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp",
+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac",
FALSE, &arch_info_struct[16]),
- N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac",
+ N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp",
FALSE, &arch_info_struct[17]),
- N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac",
+ N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac",
FALSE, &arch_info_struct[18]),
- N(bfd_mach_mcf_isa_b, "m68k:isa-b",
+ N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac",
FALSE, &arch_info_struct[19]),
- N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac",
+ N(bfd_mach_mcf_isa_b, "m68k:isa-b",
FALSE, &arch_info_struct[20]),
- N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac",
+ N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac",
FALSE, &arch_info_struct[21]),
- N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float",
+ N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac",
FALSE, &arch_info_struct[22]),
- N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac",
+ N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float",
FALSE, &arch_info_struct[23]),
- N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac",
+ N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac",
FALSE, &arch_info_struct[24]),
+ N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac",
+ FALSE, &arch_info_struct[25]),
/* Legacy names for CF architectures */
- N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[25]),
- N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[26]),
- N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[27]),
- N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[28]),
- N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[29]),
- N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[30]),
- N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[31]),
+ N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[26]),
+ N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[27]),
+ N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[28]),
+ N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[29]),
+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[30]),
+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[31]),
+ N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[32]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:547x",
- FALSE, &arch_info_struct[32]),
- N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x",
FALSE, &arch_info_struct[33]),
+ N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x",
+ FALSE, &arch_info_struct[34]),
N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", FALSE, 0),
};
@@ -107,6 +108,7 @@ static const unsigned m68k_arch_features[] =
m68040|m68881|m68851,
m68060|m68881|m68851,
cpu32|m68881,
+ cpu32|m68881|fido_a,
mcfisa_a,
mcfisa_a|mcfhwdiv,
mcfisa_a|mcfhwdiv|mcfmac,
@@ -202,16 +204,16 @@ bfd_m68k_compatible (const bfd_arch_info_type *a,
if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060)
/* Merge m68k machine. */
return a->mach > b->mach ? a : b;
- else if (a->mach == bfd_mach_cpu32 && b->mach == bfd_mach_cpu32)
- /* CPU32 is compatible with itself. */
- return a;
- else if (a->mach >= bfd_mach_mcf_isa_a_nodiv
- && b->mach >= bfd_mach_mcf_isa_a_nodiv)
+ else if (a->mach >= bfd_mach_cpu32 && b->mach >= bfd_mach_cpu32)
{
- /* Merge cf machine. */
+ /* Merge the machine features. */
unsigned features = (bfd_m68k_mach_to_features (a->mach)
| bfd_m68k_mach_to_features (b->mach));
+ /* CPU32 and Coldfire are incompatible. */
+ if ((~features & (cpu32 | mcfisa_a)) == 0)
+ return NULL;
+
/* ISA A+ and ISA B are incompatible. */
if ((~features & (mcfisa_aa | mcfisa_b)) == 0)
return NULL;
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index 81a9225..1c04a69 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -432,7 +432,14 @@ elf32_m68k_object_p (bfd *abfd)
if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
features |= m68000;
else if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
- features |= cpu32;
+ {
+ features |= cpu32;
+ switch (eflags & EF_M68K_CPU32_MASK)
+ {
+ case EF_M68K_CPU32_FIDO_A:
+ features |= fido_a; break;
+ }
+ }
else
{
switch (eflags & EF_M68K_CF_ISA_MASK)
@@ -523,7 +530,7 @@ elf32_m68k_merge_private_bfd_data (ibfd, obfd)
if ((in_flags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
variant_mask = 0;
else if ((in_flags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
- variant_mask = 0;
+ variant_mask = EF_M68K_CPU32_MASK;
else
variant_mask = EF_M68K_CF_ISA_MASK;
@@ -560,7 +567,11 @@ elf32_m68k_print_private_bfd_data (abfd, ptr)
if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
fprintf (file, " [m68000]");
else if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
- fprintf (file, " [cpu32]");
+ {
+ fprintf (file, " [cpu32]");
+ if (eflags & EF_M68K_CPU32_FIDO_A)
+ fprintf (file, " [fido]");
+ }
else
{
if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CFV4E)