(Lay some groundwork for TIc80 port that will be filled in incrementally.)
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 496fb617f8ea656b5dd7cd1798ff0ecb6ccfd8ce..d38f1de961ed767a1a576068fdc3d019d170f28d 100644 (file)
@@ -53,8 +53,12 @@ extern "C" {
 
 /* These two lines get substitutions done by commands in Makefile.in.  */
 #define BFD_VERSION  "@VERSION@"
-#define BFD_ARCH_SIZE @WORDSIZE@
+#define BFD_ARCH_SIZE @wordsize@
 #define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
+#if @BFD_HOST_64_BIT_DEFINED@
+#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
+#define BFD_HOST_U_64_BIT @BFD_HOST_U_64_BIT@
+#endif
 
 #if BFD_ARCH_SIZE >= 64
 #define BFD64
@@ -114,27 +118,29 @@ typedef long int file_ptr;
 /* Support for different sizes of target format ints and addresses.
    If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
    set to 1 above.  Otherwise, if gcc is being used, this code will
-   use gcc's "long long" type.  Otherwise, the compilation will fail
-   if 64-bit targets are requested.  */
+   use gcc's "long long" type.  Otherwise, BFD_HOST_64_BIT must be
+   defined above.  */
 
 #ifdef BFD64
 
 #ifndef BFD_HOST_64_BIT
 #if BFD_HOST_64BIT_LONG
 #define BFD_HOST_64_BIT long
+#define BFD_HOST_U_64_BIT unsigned long
 #else
 #ifdef __GNUC__
 #define BFD_HOST_64_BIT long long
+#define BFD_HOST_U_64_BIT unsigned long long
 #else /* ! defined (__GNUC__) */
  #error No 64 bit integer type available
 #endif /* ! defined (__GNUC__) */
 #endif /* ! BFD_HOST_64BIT_LONG */
 #endif /* ! defined (BFD_HOST_64_BIT) */
 
-typedef unsigned BFD_HOST_64_BIT bfd_vma;
+typedef BFD_HOST_U_64_BIT bfd_vma;
 typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef unsigned BFD_HOST_64_BIT bfd_size_type;
-typedef unsigned BFD_HOST_64_BIT symvalue;
+typedef BFD_HOST_U_64_BIT bfd_size_type;
+typedef BFD_HOST_U_64_BIT symvalue;
 
 #ifndef fprintf_vma
 #if BFD_HOST_64BIT_LONG
@@ -193,7 +199,7 @@ typedef enum bfd_format {
    to another, and are not necessarily correct).  */
 
 /* No flags.  */
-#define NO_FLAGS       0x00
+#define BFD_NO_FLAGS           0x00
 
 /* BFD contains relocation entries.  */
 #define HAS_RELOC      0x01
@@ -1140,7 +1146,7 @@ boolean
 bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
 
 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
-     BFD_SEND (ibfd, _bfd_copy_private_section_data, \
+     BFD_SEND (obfd, _bfd_copy_private_section_data, \
                (ibfd, isection, obfd, osection))
 enum bfd_architecture 
 {
@@ -1198,15 +1204,24 @@ enum bfd_architecture
   bfd_arch_powerpc,    /* PowerPC */
   bfd_arch_rs6000,     /* IBM RS/6000 */
   bfd_arch_hppa,       /* HP PA RISC */
+  /* start-sanitize-d10v */
+  bfd_arch_d10v,       /* Mitsubishi D10V */
+  /* end-sanitize-d10v */
   bfd_arch_z8k,        /* Zilog Z8000 */
 #define bfd_mach_z8001         1
 #define bfd_mach_z8002         2
   bfd_arch_h8500,      /* Hitachi H8/500 */
   bfd_arch_sh,         /* Hitachi SH */
+  /* start-sanitize-tic80 */
+  bfd_arch_tic80,      /* TI TMS320C80 (MVP) */
+  /* end-sanitize-tic80 */
   bfd_arch_alpha,      /* Dec Alpha */
   bfd_arch_arm,        /* Advanced Risc Machines ARM */
   bfd_arch_ns32k,      /* National Semiconductors ns32000 */
   bfd_arch_w65,        /* WDC 65816 */
+  /* start-sanitize-v850 */
+  bfd_arch_v850,       /* NEC V850 */
+  /* end-sanitize-v850 */
   /* start-sanitize-arc */
   bfd_arch_arc,        /* Argonaut RISC Core */
 #define bfd_mach_arc_base 0
@@ -1214,6 +1229,11 @@ enum bfd_architecture
 #define bfd_mach_arc_graphics 2
 #define bfd_mach_arc_audio 3
   /* end-sanitize-arc */
+  /* start-sanitize-m32r */
+  bfd_arch_m32r,       /* Mitsubishi M32R */
+  /* end-sanitize-m32r */
+  bfd_arch_mn10200,    /* Matsushita MN10200 */
+  bfd_arch_mn10300,    /* Matsushita MN10300 */
   bfd_arch_last
   };
 
@@ -1547,11 +1567,6 @@ decided relatively late. */
   BFD_RELOC_GPREL16,
   BFD_RELOC_GPREL32,
 
-/* For openVMS/Alpha systems, these are displacements for switch
-tables. */
-  BFD_RELOC_SWREL32,
-  BFD_RELOC_SWREL64,
-
 /* Reloc types used for i960/b.out. */
   BFD_RELOC_I960_CALLJ,
 
@@ -1623,6 +1638,12 @@ section symbol.  The addend is ignored when writing, but is filled
 in with the file's GP value on reading, for convenience, as with the
 GPDISP_LO16 reloc.
 
+The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
+It should refer to the symbol to be referenced, as with 16_GOTOFF,
+but it generates output not based on the position within the .got
+section, but relative to the GP value chosen for the file during the
+final link stage.
+
 The LITUSE reloc, on the instruction using the loaded address, gives
 information to the linker that it might be able to use to optimize
 away some literal section references.  The symbol is ignored (read
@@ -1634,6 +1655,7 @@ of instruction using the register:
 
 The GNU linker currently doesn't do any of this optimizing. */
   BFD_RELOC_ALPHA_LITERAL,
+  BFD_RELOC_ALPHA_ELF_LITERAL,
   BFD_RELOC_ALPHA_LITUSE,
 
 /* The HINT relocation indicates a value that should be filled into the
@@ -1641,17 +1663,17 @@ The GNU linker currently doesn't do any of this optimizing. */
 prediction logic which may be provided on some processors. */
   BFD_RELOC_ALPHA_HINT,
 
-/* The LINKAGE relocation outputs a special code in the object file,
-the rest is handled by the linker. */
+/* The LINKAGE relocation outputs a linkage pair in the object file,
+which is filled by the linker. */
   BFD_RELOC_ALPHA_LINKAGE,
 
-/* The BASEREG relocation calculates differences to basereg. */
-  BFD_RELOC_ALPHA_BASEREG,
-
 /* Bits 27..2 of the relocation address shifted right 2 bits;
 simple reloc otherwise. */
   BFD_RELOC_MIPS_JMP,
 
+/* The MIPS16 jump instruction. */
+  BFD_RELOC_MIPS16_JMP,
+
 /* High 16 bits of 32-bit value; simple reloc. */
   BFD_RELOC_HI16,
 
@@ -1762,6 +1784,32 @@ not stored in the instruction. */
   BFD_RELOC_ARM_LDR_IMM,
   BFD_RELOC_ARM_LITERAL,
   BFD_RELOC_ARM_IN_POOL,
+  BFD_RELOC_ARM_OFFSET_IMM8,
+  BFD_RELOC_ARM_HWLITERAL,
+  BFD_RELOC_ARM_THUMB_ADD,
+  BFD_RELOC_ARM_THUMB_IMM,
+  BFD_RELOC_ARM_THUMB_SHIFT,
+  BFD_RELOC_ARM_THUMB_OFFSET,
+
+/* Hitachi SH relocs.  Not all of these appear in object files. */
+  BFD_RELOC_SH_PCDISP8BY2,
+  BFD_RELOC_SH_PCDISP12BY2,
+  BFD_RELOC_SH_IMM4,
+  BFD_RELOC_SH_IMM4BY2,
+  BFD_RELOC_SH_IMM4BY4,
+  BFD_RELOC_SH_IMM8,
+  BFD_RELOC_SH_IMM8BY2,
+  BFD_RELOC_SH_IMM8BY4,
+  BFD_RELOC_SH_PCRELIMM8BY2,
+  BFD_RELOC_SH_PCRELIMM8BY4,
+  BFD_RELOC_SH_SWITCH16,
+  BFD_RELOC_SH_SWITCH32,
+  BFD_RELOC_SH_USES,
+  BFD_RELOC_SH_COUNT,
+  BFD_RELOC_SH_ALIGN,
+  BFD_RELOC_SH_CODE,
+  BFD_RELOC_SH_DATA,
+  BFD_RELOC_SH_LABEL,
 /* start-sanitize-arc */
 
 /* Argonaut RISC Core (ARC) relocs.
@@ -1775,6 +1823,72 @@ stored in the instruction.  The high 24 bits are installed in bits 23
 through 0. */
   BFD_RELOC_ARC_B26,
 /* end-sanitize-arc */
+
+/* start-sanitize-d10v */
+
+/* Mitsubishi D10V relocs.
+This is a 10-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_10_PCREL_R,
+
+/* Mitsubishi D10V relocs.
+This is a 10-bit reloc with the right 2 bits
+assumed to be 0.  This is the same as the previous reloc
+except it is in the left container, i.e.,
+shifted left 15 bits. */
+  BFD_RELOC_D10V_10_PCREL_L,
+
+/* This is an 18-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_18,
+
+/* This is an 18-bit reloc with the right 2 bits
+assumed to be 0. */
+  BFD_RELOC_D10V_18_PCREL,
+/* end-sanitize-d10v */
+
+/* start-sanitize-m32r */
+
+/* Mitsubishi M32R relocs.
+This is a 24 bit absolute address. */
+  BFD_RELOC_M32R_24,
+
+/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_10_PCREL,
+
+/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_18_PCREL,
+
+/* This is an 26-bit reloc with the right 2 bits assumed to be 0. */
+  BFD_RELOC_M32R_26_PCREL,
+/* end-sanitize-m32r */
+
+/* start-sanitize-v850 */
+
+/* This is a 9-bit reloc */
+  BFD_RELOC_V850_9_PCREL,
+
+/* This is a 22-bit reloc */
+  BFD_RELOC_V850_22_PCREL,
+
+/* This is an offset from the short data area pointer.. */
+  BFD_RELOC_V850_SDA_OFFSET,
+
+/* This is an offset from the zero data area pointer.. */
+  BFD_RELOC_V850_ZDA_OFFSET,
+
+/* This is an offset from the tiny data area pointer.. */
+  BFD_RELOC_V850_TDA_OFFSET,
+/* end-sanitize-v850 */
+
+
+/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+  BFD_RELOC_MN10300_32_PCREL,
+
+/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
+instruction. */
+  BFD_RELOC_MN10300_16_PCREL,
   BFD_RELOC_UNUSED };
 typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
 reloc_howto_type *
@@ -1932,7 +2046,7 @@ boolean
 bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
 
 #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
-     BFD_SEND (ibfd, _bfd_copy_private_symbol_data, \
+     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                (ibfd, isymbol, obfd, osymbol))
 struct _bfd 
 {
@@ -2172,13 +2286,13 @@ boolean
 bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_copy_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (ibfd, _bfd_copy_private_bfd_data, \
+     BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
                (ibfd, obfd))
 boolean 
 bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
 
 #define bfd_merge_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (ibfd, _bfd_merge_private_bfd_data, \
+     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
                (ibfd, obfd))
 boolean 
 bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
This page took 0.028082 seconds and 4 git commands to generate.