/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
<mark@codesourcery.com>
#include "coff/ecoff.h"
/* The 64 bit versions of the mdebug data structures are in alpha.h. */
#include "coff/alpha.h"
-#define ECOFF_64
+#define ECOFF_SIGNED_64
#include "ecoffswap.h"
static void mips_elf64_swap_reloc_in
complain_overflow_dont, /* complain_on_overflow */
/* This needs complex overflow
detection, because the upper four
- bits must match the PC. */
+ bits must match the PC + 4. */
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
true, /* partial_inplace */
0, /* dst_mask */
false), /* pcrel_offset */
- /* Protected jump conversion. This is an optimization hint. No
+ /* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
complain_overflow_dont, /* complain_on_overflow */
/* This needs complex overflow
detection, because the upper four
- bits must match the PC. */
+ bits must match the PC + 4. */
bfd_elf_generic_reloc, /* special_function */
"R_MIPS_26", /* name */
true, /* partial_inplace */
0, /* dst_mask */
false), /* pcrel_offset */
- /* Protected jump conversion. This is an optimization hint. No
+ /* Protected jump conversion. This is an optimization hint. No
relocation is required for correctness. */
HOWTO (R_MIPS_JALR, /* type */
0, /* rightshift */
{
Elf64_Mips_Internal_Rel mirel;
- mips_elf64_swap_reloc_in (abfd,
+ mips_elf64_swap_reloc_in (abfd,
(const Elf64_Mips_External_Rel *) src,
&mirel);
{
Elf64_Mips_Internal_Rela mirela;
- mips_elf64_swap_reloca_in (abfd,
+ mips_elf64_swap_reloca_in (abfd,
(const Elf64_Mips_External_Rela *) src,
&mirela);
mirel.r_ssym = STN_UNDEF;
mirel.r_type3 = R_MIPS_NONE;
- mips_elf64_swap_reloc_out (abfd, &mirel,
+ mips_elf64_swap_reloc_out (abfd, &mirel,
(Elf64_Mips_External_Rel *) dst);
}
mirela.r_ssym = STN_UNDEF;
mirela.r_type3 = R_MIPS_NONE;
- mips_elf64_swap_reloca_out (abfd, &mirela,
+ mips_elf64_swap_reloca_out (abfd, &mirela,
(Elf64_Mips_External_Rela *) dst);
}
#define elf_backend_plt_header_size 0
#define elf_backend_may_use_rel_p 1
-/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
+/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
MIPS-specific function only applies to IRIX5, which had no 64-bit
ABI. */
#define bfd_elf64_find_nearest_line _bfd_mips_elf_find_nearest_line
_bfd_archive_coff_update_armap_timestamp
#include "elf64-target.h"
+
+/* Support for traditional mips targets */
+
+#define INCLUDED_TARGET_FILE /* More a type of flag */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#undef TARGET_BIG_NAME
+
+#define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_vec
+#define TARGET_LITTLE_NAME "elf64-tradlittlemips"
+#define TARGET_BIG_SYM bfd_elf64_tradbigmips_vec
+#define TARGET_BIG_NAME "elf64-tradbigmips"
+
+/* Include the target file again for this target */
+#include "elf64-target.h"