diff options
-rw-r--r-- | bfd/ChangeLog | 32 | ||||
-rw-r--r-- | bfd/archures.c | 33 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 33 | ||||
-rw-r--r-- | bfd/cpu-m68k.c | 64 | ||||
-rw-r--r-- | bfd/elf32-m68k.c | 17 | ||||
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 6 | ||||
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-m68k.c | 11 | ||||
-rw-r--r-- | include/elf/ChangeLog | 4 | ||||
-rw-r--r-- | include/elf/m68k.h | 6 | ||||
-rw-r--r-- | include/opcode/ChangeLog | 4 | ||||
-rw-r--r-- | include/opcode/m68k.h | 1 |
13 files changed, 147 insertions, 74 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0b86d0d7b6..e0b3a63060 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 5029cb03f8..89a3805f43 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 32eb6c9335..d82d468978 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 5be4aa047c..ee45ffe6af 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 81a9225695..1c04a6986b 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) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2d62f60c5f..9961063afd 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2006-12-25 Kazu Hirata <kazu@codesourcery.com> + + * readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A. + 2006-12-11 J"orn Rennecke <joern.rennecke@arc.com> MAINTAINERS (SH): Remove my entry. diff --git a/binutils/readelf.c b/binutils/readelf.c index fd0069e251..592d8935dc 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2015,7 +2015,11 @@ get_machine_flags (unsigned e_flags, unsigned e_machine) if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_M68000) strcat (buf, ", m68000"); else if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32) - strcat (buf, ", cpu32"); + { + strcat (buf, ", cpu32"); + if (e_flags & EF_M68K_CPU32_FIDO_A) + strcat (buf, ", fido_a"); + } else { char const *isa = _("unknown"); diff --git a/gas/ChangeLog b/gas/ChangeLog index a153103b38..99dc1e66a5 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2006-12-25 Kazu Hirata <kazu@codesourcery.com> + + * 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. + 2006-12-25 Mei Ligang <ligang@sunnorth.com.cn> * config/tc-score.c (build_lw_pic): Rename as build_lwst_pic. diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index 06d6b42518..df44fbe8ab 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -284,7 +284,7 @@ struct m68k_it reloc[5]; /* Five is enough??? */ }; -#define cpu_of_arch(x) ((x) & (m68000up | mcfisa_a)) +#define cpu_of_arch(x) ((x) & (m68000up | mcfisa_a | fido_a)) #define float_of_arch(x) ((x) & mfloat) #define mmu_of_arch(x) ((x) & mmmu) #define arch_coldfire_p(x) ((x) & mcfisa_a) @@ -421,6 +421,7 @@ static const struct m68k_cpu m68k_archs[] = {m68040, m68040_ctrl, "68040", 0}, {m68060, m68060_ctrl, "68060", 0}, {cpu32|m68881, cpu32_ctrl, "cpu32", 0}, + {cpu32|fido_a, cpu32_ctrl, "fidoa", 0}, {mcfisa_a|mcfhwdiv, NULL, "isaa", 0}, {mcfisa_a|mcfhwdiv|mcfisa_aa|mcfusp, NULL, "isaaplus", 0}, {mcfisa_a|mcfhwdiv|mcfisa_b|mcfusp, NULL, "isab", 0}, @@ -552,6 +553,8 @@ static const struct m68k_cpu m68k_cpus[] = {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcfv4e_ctrl, "5485", -1}, {mcfisa_a|mcfisa_b|mcfhwdiv|mcfemac|mcfusp|cfloat, mcfv4e_ctrl, "548x", 0}, + {cpu32|fido_a, cpu32_ctrl, "fido", 1}, + {0,NULL,NULL, 0} }; @@ -7498,7 +7501,11 @@ m68k_elf_final_processing (void) flags |= EF_M68K_CFV4E; /* Set file-specific flags if this is a cpu32 processor. */ if (cpu_of_arch (current_architecture) & cpu32) - flags |= EF_M68K_CPU32; + { + flags |= EF_M68K_CPU32; + if (cpu_of_arch (current_architecture) & fido_a) + flags |= EF_M68K_CPU32_FIDO_A; + } else if ((cpu_of_arch (current_architecture) & m68000up) && !(cpu_of_arch (current_architecture) & m68020up)) flags |= EF_M68K_M68000; diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index d0b1ec74c7..c3dd1168db 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2006-12-25 Kazu Hirata <kazu@codesourcery.com> + + * m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New. + 2006-12-19 Kazu Hirata <kazu@codesourcery.com> * m68k.h (EF_M68K_ARCH_MASK): New. diff --git a/include/elf/m68k.h b/include/elf/m68k.h index 3665d72453..8751729672 100644 --- a/include/elf/m68k.h +++ b/include/elf/m68k.h @@ -76,4 +76,10 @@ END_RELOC_NUMBERS (R_68K_max) #define EF_M68K_CF_FLOAT 0x40 /* Has float insns */ #define EF_M68K_CF_MASK 0xFF +/* We use the bottom 8 bits to encode information about the + CPU32 variant. If we use any of these bits, the top 24 bits must + be EF_M68K_CPU32. */ +#define EF_M68K_CPU32_FIDO_A 0x01 +#define EF_M68K_CPU32_MASK 0xFF + #endif diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog index 8c67c33c7e..526593b0a6 100644 --- a/include/opcode/ChangeLog +++ b/include/opcode/ChangeLog @@ -1,3 +1,7 @@ +2006-12-25 Kazu Hirata <kazu@codesourcery.com> + + * m68k.h (fido_a): New. + 2006-12-24 Kazu Hirata <kazu@codesourcery.com> * m68k.h (mcfmac, mcfemac, cfloat, mcfhwdiv, mcfisa_a, diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h index 51b5e0bda5..ca0b4d98d4 100644 --- a/include/opcode/m68k.h +++ b/include/opcode/m68k.h @@ -31,6 +31,7 @@ #define m68881 0x040 #define m68851 0x080 #define cpu32 0x100 /* e.g., 68332 */ +#define fido_a 0x200 #define m68k_mask 0x3ff #define mcfmac 0x400 /* ColdFire MAC. */ |