#ifndef _ELF_MIPS_H
#define _ELF_MIPS_H
-/* Unless otherwise told we define an enum with the relocation entries. */
-#ifndef START_RELOC_NUMBERS
-# define START_RELOC_NUMBERS(name) enum name {
-# define RELOC_NUMBER(name, number) name = number ,
-# define END_RELOC_NUMBERS };
-#endif
+#include "elf/reloc-macros.h"
/* Relocation types. */
START_RELOC_NUMBERS (elf_mips_reloc_type)
RELOC_NUMBER (R_MIPS_HIGHEST, 29)
RELOC_NUMBER (R_MIPS_CALL_HI16, 30)
RELOC_NUMBER (R_MIPS_CALL_LO16, 31)
-/* start-sanitize-r5900 */
- /* This is used by a mips co-processor instruction. */
- RELOC_NUMBER (R_MIPS15_S3, 32)
-/* end-sanitize-r5900 */
- RELOC_NUMBER (R_MIPS_max, 33)
+ RELOC_NUMBER (R_MIPS_SCN_DISP, 32)
+ RELOC_NUMBER (R_MIPS_REL16, 33)
+ RELOC_NUMBER (R_MIPS_ADD_IMMEDIATE, 34)
+ RELOC_NUMBER (R_MIPS_PJUMP, 35)
+ RELOC_NUMBER (R_MIPS_RELGOT, 36)
+ RELOC_NUMBER (R_MIPS_JALR, 37)
+ RELOC_NUMBER (R_MIPS_max, 38)
/* These relocs are used for the mips16. */
RELOC_NUMBER (R_MIPS16_26, 100)
RELOC_NUMBER (R_MIPS16_GPREL, 101)
-/* start-sanitize-sky */
- /* These relocs are for the dvp. */
- RELOC_NUMBER (R_MIPS_DVP_11_PCREL, 120)
- RELOC_NUMBER (R_MIPS_DVP_27_S4, 121)
- RELOC_NUMBER (R_MIPS_DVP_11_S4, 122)
- RELOC_NUMBER (R_MIPS_DVP_U15_S3, 123)
-/* end-sanitize-sky */
/* These are GNU extensions to enable C++ vtable garbage collection. */
RELOC_NUMBER (R_MIPS_GNU_VTINHERIT, 253)
RELOC_NUMBER (R_MIPS_GNU_VTENTRY, 254)
/* Code in file uses new ABI (-n32 on Irix 6). */
#define EF_MIPS_ABI2 0x00000020
+/* Indicates code compiled for a 64-bit machine in 32-bit mode.
+ (regs are 32-bits wide.) */
+#define EF_MIPS_32BITMODE 0x00000100
+
/* Four bit MIPS architecture field. */
#define EF_MIPS_ARCH 0xf0000000
/* -mips4 code. */
#define E_MIPS_ARCH_4 0x30000000
+/* The ABI of the file. Also see EF_MIPS_ABI2 above. */
+#define EF_MIPS_ABI 0x0000F000
+
+/* The original o32 abi. */
+#define E_MIPS_ABI_O32 0x00001000
+
+/* O32 extended to work on 64 bit architectures */
+#define E_MIPS_ABI_O64 0x00002000
+
+/* EABI in 32 bit mode */
+#define E_MIPS_ABI_EABI32 0x00003000
+
+/* EABI in 64 bit mode */
+#define E_MIPS_ABI_EABI64 0x00004000
+
+
/* Machine variant if we know it. This field was invented at Cygnus,
but it is hoped that other vendors will adopt it. If some standard
is developed, this code should be changed to follow it. */
#define E_MIPS_MACH_4010 0x00820000
#define E_MIPS_MACH_4100 0x00830000
-/* start-sanitize-vr4320 */
-#define E_MIPS_MACH_4320 0x00840000
-/* end-sanitize-vr4320 */
#define E_MIPS_MACH_4650 0x00850000
-/* start-sanitize-tx49 */
-#define E_MIPS_MACH_4900 0x00860000
-/* end-sanitize-tx49 */
-
-/* start-sanitize-vr5400 */
-#define E_MIPS_MACH_5400 0x00910000
-/* end-sanitize-vr5400 */
-/* start-sanitize-r5900 */
-#define E_MIPS_MACH_5900 0x00920000
-/* end-sanitize-r5900 */
+#define E_MIPS_MACH_4111 0x00880000
+
\f
/* Processor specific section indices. These sections do not actually
exist. Symbols with a st_shndx field corresponding to one of these
/* ??? */
#define SHT_MIPS_PDR_EXCEPTION 0x70000029
-/* start-sanitize-sky */
-/* The VU overlay table. */
-#define SHT_DVP_OVERLAY_TABLE 0x7ffff420
-#define SHNAME_DVP_OVERLAY_TABLE ".DVP.ovlytab"
-#define SHNAME_DVP_OVERLAY_STRTAB ".DVP.ovlystrtab"
-/* A VU overlay. */
-#define SHT_DVP_OVERLAY 0x7ffff421
-/* Prefix of VU overlay sections. */
-#define SHNAME_DVP_OVERLAY_PREFIX ".DVP.overlay."
-/* end-sanitize-sky */
/* A section of type SHT_MIPS_LIBLIST contains an array of the
following structure. The sh_link field is the section index of the
/* Ignore version incompatibilities at runtime. */
#define LL_IGNORE_INT_VER 0x00000002
+/* Require matching minor version number. */
+#define LL_REQUIRE_MINOR 0x00000004
+
+/* ??? */
+#define LL_EXPORTS 0x00000008
+
+/* Delay loading of this library until really needed. */
+#define LL_DELAY_LOAD 0x00000010
+
+/* ??? Delta C++ stuff ??? */
+#define LL_DELTA 0x00000020
+
+
/* A section of type SHT_MIPS_CONFLICT is an array of indices into the
.dynsym section. Each element has the following type. */
typedef unsigned long Elf32_Conflict;
+typedef unsigned char Elf32_External_Conflict[4];
+
+typedef unsigned long Elf64_Conflict;
+typedef unsigned char Elf64_External_Conflict[8];
/* A section of type SHT_MIPS_GPTAB contains information about how
much GP space would be required for different -G arguments. This
/* Ignore LD_LIBRARY_PATH. */
#define RHS_NO_LIBRARY_REPLACEMENT \
0x00000004
+
+#define RHF_NO_MOVE 0x00000008
+#define RHF_SGI_ONLY 0x00000010
+#define RHF_GUARANTEE_INIT 0x00000020
+#define RHF_DELTA_C_PLUS_PLUS 0x00000040
+#define RHF_GUARANTEE_START_INIT 0x00000080
+#define RHF_PIXIE 0x00000100
+#define RHF_DEFAULT_DELAY_LOAD 0x00000200
+#define RHF_REQUICKSTART 0x00000400
+#define RHF_REQUICKSTARTED 0x00000800
+#define RHF_CORD 0x00001000
+#define RHF_NO_UNRES_UNDEF 0x00002000
+#define RHF_RLD_ORDER_SAFE 0x00004000
\f
/* Special values for the st_other field in the symbol table. These
are used in an Irix 5 dynamic symbol table. */
#define STO_HIDDEN 0x02
#define STO_PROTECTED 0x03
-/* start-sanitize-sky */
-/* These values are used for the dvp. */
-#define STO_DVP_DMA 0xe8
-#define STO_DVP_VIF 0xe9
-#define STO_DVP_GIF 0xea
-#define STO_DVP_VU 0xeb
-/* Reserve a couple in case we need them. */
-#define STO_DVP_RES1 0xec
-#define STO_DVP_RES2 0xed
-#define STO_DVP_P(sto) ((sto) >= STO_DVP_DMA && (sto) <= STO_DVP_RES2)
-
-/* end-sanitize-sky */
/* This value is used for a mips16 .text symbol. */
#define STO_MIPS16 0xf0
\f
#define OHWA0_R4KEOP_CHECKED 0x00000001
#define OHWA0_R4KEOP_CLEAN 0x00000002
\f
-/* start-sanitize-sky */
-/* The vu overlay table is an array of this. */
-
-typedef struct
-{
- /* `name' is offset into overlay string table section. */
- char name[4];
- char lma[4];
- char vma[4];
-} Elf32_Dvp_External_Overlay;
-
-typedef struct
-{
- bfd_vma name;
- bfd_vma lma;
- bfd_vma vma;
-} Elf32_Dvp_Internal_Overlay;
-
-/* overlay swapping routines. */
-extern void bfd_dvp_elf32_swap_overlay_in
- PARAMS ((bfd *, const Elf32_Dvp_External_Overlay *,
- Elf32_Dvp_Internal_Overlay *));
-extern void bfd_dvp_elf32_swap_overlay_out
- PARAMS ((bfd *, const Elf32_Dvp_Internal_Overlay *,
- Elf32_Dvp_External_Overlay *));
-
-/* end-sanitize-sky */
#endif /* _ELF_MIPS_H */