diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c4ee9c55ad..4b7640e060 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2002-02-17 Matt Fredette + + * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize + EF_M68000. + 2002-02-13 Nick Clifton * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index c3e4c93c56..ab7ab452c7 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -412,6 +412,9 @@ elf32_m68k_print_private_bfd_data (abfd, ptr) if (elf_elfheader (abfd)->e_flags & EF_CPU32) fprintf (file, _(" [cpu32]")); + if (elf_elfheader (abfd)->e_flags & EF_M68000) + fprintf (file, _ (" [m68000]")); + fputc ('\n', file); return true; diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 508f6328ce..a5789c4dc0 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2002-02-13 Matt Fredette + + * readelf.c (get_machine_flags): Recognize EF_M68000. + 2002-02-12 Alexandre Oliva * MAINTAINERS: Added self as MN10300 co-maintainer. diff --git a/binutils/readelf.c b/binutils/readelf.c index 0c95f05d88..3bd67ba9ba 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1641,6 +1641,8 @@ get_machine_flags (e_flags, e_machine) case EM_68K: if (e_flags & EF_CPU32) strcat (buf, ", cpu32"); + if (e_flags & EF_M68000) + strcat (buf, ", m68000"); break; case EM_PPC: diff --git a/gas/ChangeLog b/gas/ChangeLog index 80f907e17a..7c1608ae8e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2002-02-13 Matt Fredette + + * config/tc-m68k.c (md_show_usage): No longer display a + hard-coded "68020" for the default CPU, instead display the + canonical name of the true, configured default CPU. + (m68k_elf_final_processing): Mark objects for sub-68020 + CPUs with the new EF_M68000 flag. + 2002-02-13 Andreas Schwab * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c index ef5f8450cd..aeb72cefe8 100644 --- a/gas/config/tc-m68k.c +++ b/gas/config/tc-m68k.c @@ -6916,16 +6916,40 @@ void md_show_usage (stream) FILE *stream; { + const char *default_cpu = TARGET_CPU; + int default_arch, i; + + /* Get the canonical name for the default target CPU. */ + if (*default_cpu == 'm') + default_cpu++; + for (i = 0; i < n_archs; i++) + { + if (strcasecmp (default_cpu, archs[i].name) == 0) + { + default_arch = archs[i].arch; + for (i = 0; i < n_archs; i++) + { + if (archs[i].arch == default_arch + && !archs[i].alias) + { + default_cpu = archs[i].name; + break; + } + } + } + } + fprintf (stream, _("\ 680X0 options:\n\ -l use 1 word for refs to undefined symbols [default 2]\n\ -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060 |\n\ -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n\ -m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\n\ - specify variant of 680X0 architecture [default 68020]\n\ + specify variant of 680X0 architecture [default %s]\n\ -m68881 | -m68882 | -mno-68881 | -mno-68882\n\ target has/lacks floating-point coprocessor\n\ - [default yes for 68020, 68030, and cpu32]\n")); + [default yes for 68020, 68030, and cpu32]\n"), + default_cpu); fprintf (stream, _("\ -m68851 | -mno-68851\n\ target has/lacks memory-management unit coprocessor\n\ @@ -7118,5 +7142,8 @@ void m68k_elf_final_processing() /* Set file-specific flags if this is a cpu32 processor */ if (cpu_of_arch (current_architecture) & cpu32) elf_elfheader (stdoutput)->e_flags |= EF_CPU32; + else if ((cpu_of_arch (current_architecture) & m68000up) + && !(cpu_of_arch (current_architecture) & m68020up)) + elf_elfheader (stdoutput)->e_flags |= EF_M68000; } #endif diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index f0e04db5de..e70f7fdc46 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,7 @@ +2002-02-13 Matt Fredette + + * m68k.h (EF_M68000): Define. + 2002-02-12 Alan Modra * ppc.h (DT_PPC64_OPD, DT_PPC64_OPDSZ): Define. diff --git a/include/elf/m68k.h b/include/elf/m68k.h index 03bf465e2b..7769c59eb3 100644 --- a/include/elf/m68k.h +++ b/include/elf/m68k.h @@ -53,5 +53,6 @@ START_RELOC_NUMBERS (elf_m68k_reloc_type) END_RELOC_NUMBERS (R_68K_max) #define EF_CPU32 0x00810000 +#define EF_M68000 0x01000000 #endif