aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-12-01 21:35:38 +0000
committerNick Clifton <nickc@redhat.com>2000-12-01 21:35:38 +0000
commite7af610e147b2f6f35e2f7dcec4c707027a53757 (patch)
tree981ed717ac072d086d1100528456686af62f1bf2 /bfd
parentb23da31b1cf7d0b7d2ae1d1c4378f8ff77feaf43 (diff)
downloadgdb-e7af610e147b2f6f35e2f7dcec4c707027a53757.zip
gdb-e7af610e147b2f6f35e2f7dcec4c707027a53757.tar.gz
gdb-e7af610e147b2f6f35e2f7dcec4c707027a53757.tar.bz2
Add MIPS32 as a seperate MIPS architecture
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog25
-rw-r--r--bfd/aoutx.h4
-rw-r--r--bfd/archures.c3
-rw-r--r--bfd/bfd-in2.h3
-rw-r--r--bfd/cpu-mips.c45
-rw-r--r--bfd/elf32-mips.c31
-rw-r--r--bfd/po/POTFILES.in1
-rw-r--r--bfd/po/bfd.pot139
8 files changed, 115 insertions, 136 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 059827a..4c5b4cf 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,28 @@
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
+ bfd_mach_mips32_4k. Update FIXME comment.
+ * archures.c (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * bfd-in2.h (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * cpu-mips.c (I_mips32): New constant.
+ (I_mips4K, I_mips32_4k): Rename the former to the latter.
+ (arch_info_struct): Add bfd_mach_mips32 entry, replace
+ bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
+ * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
+ (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
+ with E_MIPS_MACH_MIPS32_4K.
+ (_bfd_mips_elf_final_write_processing): Replace
+ bfd_mach_mips4K with bfd_mach_mips32_4k case, add
+ bfd_mach_mips32 case.
+ (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
+ comparison with support for MIPS32.
+ (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
+ MIPS32.
+
2000-12-01 Joel Sherrill <joel@OARcorp.com>
* config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index a050b8b..388e8d7 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -776,7 +776,9 @@ NAME(aout,machine_type) (arch, machine, unknown)
case bfd_mach_mips8000:
case bfd_mach_mips10000:
case bfd_mach_mips16:
- /* FIXME: These should be MIPS3 or MIPS4. */
+ case bfd_mach_mips32:
+ case bfd_mach_mips32_4k:
+ /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
arch_flags = M_MIPS2;
break;
default:
diff --git a/bfd/archures.c b/bfd/archures.c
index 27a41b3..5bb4ff7 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -130,8 +130,9 @@ DESCRIPTION
.#define bfd_mach_mips6000 6000
.#define bfd_mach_mips8000 8000
.#define bfd_mach_mips10000 10000
-.#define bfd_mach_mips4K 32
.#define bfd_mach_mips16 16
+.#define bfd_mach_mips32 32
+.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *}
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 0
.#define bfd_mach_i386_i8086 1
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 8120e24..0280f12 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1398,8 +1398,9 @@ enum bfd_architecture
#define bfd_mach_mips6000 6000
#define bfd_mach_mips8000 8000
#define bfd_mach_mips10000 10000
-#define bfd_mach_mips4K 32
#define bfd_mach_mips16 16
+#define bfd_mach_mips32 32
+#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c
index e15af2e..0ac23cb 100644
--- a/bfd/cpu-mips.c
+++ b/bfd/cpu-mips.c
@@ -38,26 +38,28 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
NEXT, \
}
-enum {
-I_mips3000,
-I_mips3900,
-I_mips4000,
-I_mips4010,
-I_mips4100,
-I_mips4111,
-I_mips4300,
-I_mips4400,
-I_mips4600,
-I_mips4650,
-I_mips5000,
-I_mips6000,
-I_mips8000,
-I_mips10000,
-I_mips4K,
-I_mips16
+enum
+{
+ I_mips3000,
+ I_mips3900,
+ I_mips4000,
+ I_mips4010,
+ I_mips4100,
+ I_mips4111,
+ I_mips4300,
+ I_mips4400,
+ I_mips4600,
+ I_mips4650,
+ I_mips5000,
+ I_mips6000,
+ I_mips8000,
+ I_mips10000,
+ I_mips16,
+ I_mips32,
+ I_mips32_4k,
};
-#define NN(index) (&arch_info_struct[(index)+1])
+#define NN(index) (&arch_info_struct[(index) + 1])
static const bfd_arch_info_type arch_info_struct[] =
{
@@ -74,9 +76,10 @@ static const bfd_arch_info_type arch_info_struct[] =
N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)),
N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)),
N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)),
- N (64, 64, bfd_mach_mips10000, "mips:10000", false, NN(I_mips10000)),
- N (32, 32, bfd_mach_mips4K, "mips:4K", false, NN(I_mips4K)),
- N (64, 64, bfd_mach_mips16, "mips:16", false, 0),
+ N (64, 64, bfd_mach_mips10000,"mips:10000",false, NN(I_mips10000)),
+ N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)),
+ N (32, 32, bfd_mach_mips32, "mips:mips32", false, NN(I_mips32)),
+ N (32, 32, bfd_mach_mips32_4k,"mips:mips32-4k", false, 0),
};
/* The default architecture is mips:3000, but with a machine number of
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index b9b99c7..b58eddf 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -1810,6 +1810,8 @@ elf_mips_isa (flags)
return 3;
case E_MIPS_ARCH_4:
return 4;
+ case E_MIPS_ARCH_32:
+ return 32;
}
return 4;
}
@@ -1837,8 +1839,8 @@ elf_mips_mach (flags)
case E_MIPS_MACH_4650:
return bfd_mach_mips4650;
- case E_MIPS_MACH_MIPS32:
- return bfd_mach_mips4K;
+ case E_MIPS_MACH_MIPS32_4K:
+ return bfd_mach_mips32_4k;
default:
switch (flags & EF_MIPS_ARCH)
@@ -1859,6 +1861,10 @@ elf_mips_mach (flags)
case E_MIPS_ARCH_4:
return bfd_mach_mips8000;
break;
+
+ case E_MIPS_ARCH_32:
+ return bfd_mach_mips32;
+ break;
}
}
@@ -2336,8 +2342,12 @@ _bfd_mips_elf_final_write_processing (abfd, linker)
val = E_MIPS_ARCH_4;
break;
- case bfd_mach_mips4K:
- val = E_MIPS_ARCH_2 | E_MIPS_MACH_MIPS32;
+ case bfd_mach_mips32:
+ val = E_MIPS_ARCH_32;
+ break;
+
+ case bfd_mach_mips32_4k:
+ val = E_MIPS_ARCH_32 | E_MIPS_MACH_MIPS32_4K;
break;
}
@@ -2537,13 +2547,12 @@ _bfd_mips_elf_merge_private_bfd_data (ibfd, obfd)
|| new_mach == old_mach
)
{
- /* Don't warn about mixing -mips1 and -mips2 code, or mixing -mips3
- and -mips4 code. They will normally use the same data sizes and
- calling conventions. */
+ /* Don't warn about mixing code using 32-bit ISAs, or mixing code
+ using 64-bit ISAs. They will normally use the same data sizes
+ and calling conventions. */
- if ((new_isa == 1 || new_isa == 2)
- ? (old_isa != 1 && old_isa != 2)
- : (old_isa == 1 || old_isa == 2))
+ if (( (new_isa == 1 || new_isa == 2 || new_isa == 32)
+ ^ (old_isa == 1 || old_isa == 2 || old_isa == 32)) != 0)
{
(*_bfd_error_handler)
(_("%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"),
@@ -2647,6 +2656,8 @@ _bfd_mips_elf_print_private_bfd_data (abfd, ptr)
fprintf (file, _(" [mips3]"));
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
fprintf (file, _(" [mips4]"));
+ else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32)
+ fprintf (file, _ (" [mips32]"));
else
fprintf (file, _(" [unknown ISA]"));
diff --git a/bfd/po/POTFILES.in b/bfd/po/POTFILES.in
index 3134225..f75b4ca 100644
--- a/bfd/po/POTFILES.in
+++ b/bfd/po/POTFILES.in
@@ -136,7 +136,6 @@ elf64.c
elf64-gen.c
elf64-hppa.c
elf64-hppa.h
-elf64-ia64.c
elf64-mips.c
elf64-sparc.c
elf64-x86-64.c
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 9f84596..2534d97 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-11-30 11:08-0800\n"
+"POT-Creation-Date: 2000-12-01 13:12-0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -34,22 +34,22 @@ msgstr ""
msgid "%s: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1254 aoutx.h:1668
+#: aoutx.h:1256 aoutx.h:1670
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1638
+#: aoutx.h:1640
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1640
+#: aoutx.h:1642
msgid "*unknown*"
msgstr ""
-#: aoutx.h:3679
+#: aoutx.h:3681
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr ""
@@ -660,7 +660,7 @@ msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2195 elf32-cris.c:615 elf32-m68k.c:430 elf32-mips.c:2623
+#: elf32-arm.h:2195 elf32-cris.c:615 elf32-m68k.c:430 elf32-mips.c:2632
#, c-format
msgid "private flags = %lx:"
msgstr ""
@@ -803,7 +803,7 @@ msgstr ""
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-m32r.c:1000 elf32-ppc.c:2973 elf64-ia64.c:3256
+#: elf32-m32r.c:1000 elf32-ppc.c:2973
#, c-format
msgid "%s: unknown relocation type %d"
msgstr ""
@@ -854,120 +854,124 @@ msgstr ""
msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
-#: elf32-mips.c:2509
+#: elf32-mips.c:2519
#, c-format
msgid "%s: linking PIC files with non-PIC files"
msgstr ""
-#: elf32-mips.c:2519
+#: elf32-mips.c:2529
#, c-format
msgid "%s: linking abicalls files with non-abicalls files"
msgstr ""
-#: elf32-mips.c:2549
+#: elf32-mips.c:2558
#, c-format
msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
msgstr ""
-#: elf32-mips.c:2558
+#: elf32-mips.c:2567
#, c-format
msgid "%s: ISA mismatch (%d) with previous modules (%d)"
msgstr ""
-#: elf32-mips.c:2581
+#: elf32-mips.c:2590
#, c-format
msgid "%s: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
-#: elf32-mips.c:2595 elf32-ppc.c:1481 elf64-sparc.c:2974
+#: elf32-mips.c:2604 elf32-ppc.c:1481 elf64-sparc.c:2974
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-mips.c:2626
+#: elf32-mips.c:2635
msgid " [abi=O32]"
msgstr ""
-#: elf32-mips.c:2628
+#: elf32-mips.c:2637
msgid " [abi=O64]"
msgstr ""
-#: elf32-mips.c:2630
+#: elf32-mips.c:2639
msgid " [abi=EABI32]"
msgstr ""
-#: elf32-mips.c:2632
+#: elf32-mips.c:2641
msgid " [abi=EABI64]"
msgstr ""
-#: elf32-mips.c:2634
+#: elf32-mips.c:2643
msgid " [abi unknown]"
msgstr ""
-#: elf32-mips.c:2636
+#: elf32-mips.c:2645
msgid " [abi=N32]"
msgstr ""
-#: elf32-mips.c:2638
+#: elf32-mips.c:2647
msgid " [abi=64]"
msgstr ""
-#: elf32-mips.c:2640
+#: elf32-mips.c:2649
msgid " [no abi set]"
msgstr ""
-#: elf32-mips.c:2643
+#: elf32-mips.c:2652
msgid " [mips1]"
msgstr ""
-#: elf32-mips.c:2645
+#: elf32-mips.c:2654
msgid " [mips2]"
msgstr ""
-#: elf32-mips.c:2647
+#: elf32-mips.c:2656
msgid " [mips3]"
msgstr ""
-#: elf32-mips.c:2649
+#: elf32-mips.c:2658
msgid " [mips4]"
msgstr ""
-#: elf32-mips.c:2651
+#: elf32-mips.c:2660
+msgid " [mips32]"
+msgstr ""
+
+#: elf32-mips.c:2662
msgid " [unknown ISA]"
msgstr ""
-#: elf32-mips.c:2654
+#: elf32-mips.c:2665
msgid " [32bitmode]"
msgstr ""
-#: elf32-mips.c:2656
+#: elf32-mips.c:2667
msgid " [not 32bitmode]"
msgstr ""
-#: elf32-mips.c:4305
+#: elf32-mips.c:4316
msgid "static procedure (no name)"
msgstr ""
-#: elf32-mips.c:4920 elf64-alpha.c:4378
+#: elf32-mips.c:4931 elf64-alpha.c:4378
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
-#: elf32-mips.c:5484
+#: elf32-mips.c:5495
msgid "not enough GOT space for local GOT entries"
msgstr ""
-#: elf32-mips.c:6601
+#: elf32-mips.c:6612
#, c-format
msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
msgstr ""
-#: elf32-mips.c:7588
+#: elf32-mips.c:7599
#, c-format
msgid "Malformed reloc detected for section %s"
msgstr ""
-#: elf32-mips.c:7665
+#: elf32-mips.c:7676
#, c-format
msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
msgstr ""
@@ -1141,73 +1145,6 @@ msgstr ""
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-ia64.c:1839
-msgid "@pltoff reloc against local symbol"
-msgstr ""
-
-#: elf64-ia64.c:1886
-msgid "non-zero addend in @fptr reloc"
-msgstr ""
-
-#: elf64-ia64.c:3103
-#, c-format
-msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
-msgstr ""
-
-#: elf64-ia64.c:3114
-#, c-format
-msgid "%s: __gp does not cover short data segment"
-msgstr ""
-
-#: elf64-ia64.c:3407
-#, c-format
-msgid "%s: linking non-pic code in a shared library"
-msgstr ""
-
-#: elf64-ia64.c:3437
-#, c-format
-msgid "%s: @gprel relocation against dynamic symbol %s"
-msgstr ""
-
-#: elf64-ia64.c:3573
-#, c-format
-msgid "%s: dynamic relocation against speculation fixup"
-msgstr ""
-
-#: elf64-ia64.c:3581
-#, c-format
-msgid "%s: speculation fixup against undefined weak symbol"
-msgstr ""
-
-#: elf64-ia64.c:3738
-msgid "unsupported reloc"
-msgstr ""
-
-#: elf64-ia64.c:4056
-#, c-format
-msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
-msgstr ""
-
-#: elf64-ia64.c:4065
-#, c-format
-msgid "%s: linking big-endian files with little-endian files"
-msgstr ""
-
-#: elf64-ia64.c:4074
-#, c-format
-msgid "%s: linking 64-bit files with 32-bit files"
-msgstr ""
-
-#: elf64-ia64.c:4083
-#, c-format
-msgid "%s: linking constant-gp files with non-constant-gp files"
-msgstr ""
-
-#: elf64-ia64.c:4093
-#, c-format
-msgid "%s: linking auto-pic files with non-auto-pic files"
-msgstr ""
-
#: elf64-sparc.c:1250
#, c-format
msgid "%s: check_relocs: unhandled reloc type %d"