David Mosberger <davidm@hpl.hp.com>
[deliverable/binutils-gdb.git] / bfd / bfd-in2.h
index 8270cb2472b314d0264ef5683d79e78af6da329c..055cee2b5df07939525f227e735e01e47f6d2754 100644 (file)
@@ -1,5 +1,5 @@
 /* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
@@ -121,20 +121,24 @@ typedef long int file_ptr;
    use gcc's "long long" type.  Otherwise, BFD_HOST_64_BIT must be
    defined above.  */
 
+#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__
+#   if __GNUC__ >= 2
+#    define BFD_HOST_64_BIT long long
+#    define BFD_HOST_U_64_BIT unsigned long long
+#   endif /* __GNUC__ >= 2 */
+#  endif /* ! defined (__GNUC__) */
+# endif /* ! BFD_HOST_64BIT_LONG */
+#endif /* ! defined (BFD_HOST_64_BIT) */
+
 #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 BFD_HOST_U_64_BIT bfd_vma;
@@ -175,7 +179,9 @@ typedef unsigned long bfd_size_type;
 /* Print a bfd_vma x on stream s.  */
 #define fprintf_vma(s,x) fprintf(s, "%08lx", x)
 #define sprintf_vma(s,x) sprintf(s, "%08lx", x)
+
 #endif /* not BFD64  */
+
 #define printf_vma(x) fprintf_vma(stdout,x)
 
 typedef unsigned int flagword; /* 32 bits of flags */
@@ -699,12 +705,21 @@ extern boolean bfd_coff_set_symbol_class
   PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
 
 /* ARM Interworking support.  Called from linker.  */
+#ifdef COFF_IMAGE_WITH_PE
+static
+#endif
 extern boolean bfd_arm_allocate_interworking_sections
   PARAMS ((struct bfd_link_info *));
 
+#ifdef COFF_IMAGE_WITH_PE
+static
+#endif
 extern boolean bfd_arm_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *, int));
 
+#ifdef COFF_IMAGE_WITH_PE
+static
+#endif
 extern boolean bfd_arm_get_bfd_for_interworking
   PARAMS ((bfd *, struct bfd_link_info *));
 
@@ -713,7 +728,7 @@ extern boolean bfd_arm_get_bfd_for_interworking
     PARAMS ((struct bfd_link_info *));
  
   extern boolean bfd_elf32_arm_process_before_allocation
-    PARAMS ((bfd *, struct bfd_link_info *));
+    PARAMS ((bfd *, struct bfd_link_info *, int));
  
   extern boolean bfd_elf32_arm_get_bfd_for_interworking
     PARAMS ((bfd *, struct bfd_link_info *));
@@ -743,6 +758,12 @@ bfd_close_all_done PARAMS ((bfd *));
 bfd *
 bfd_create PARAMS ((CONST char *filename, bfd *templ));
 
+boolean 
+bfd_make_writable PARAMS ((bfd *abfd));
+
+boolean 
+bfd_make_readable PARAMS ((bfd *abfd));
+
 
  /* Byte swapping macros for user section data.  */
 
@@ -978,6 +999,10 @@ typedef struct sec
         /* This section should not be subject to garbage collection.  */
 #define SEC_KEEP 0x1000000
 
+        /* This section contains "short" data, and should be placed
+          "near" the GP.  */
+#define SEC_SHORT 0x2000000
+
         /*  End of section flags.  */
 
         /* Some internal packed boolean fields.  */
@@ -1190,6 +1215,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, ase
 #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
      BFD_SEND (obfd, _bfd_copy_private_section_data, \
                (ibfd, isection, obfd, osection))
+void 
+_bfd_strip_section_from_output
+ PARAMS ((asection *section));
+
 enum bfd_architecture 
 {
   bfd_arch_unknown,    /* File arch not known */
@@ -1237,46 +1266,25 @@ enum bfd_architecture
 #define bfd_mach_sparc_v9_p(mach) \
   ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a)
   bfd_arch_mips,       /* MIPS Rxxxx */
-  /* start-sanitize-tx19 */
-#define bfd_mach_mips1900              1900
-  /* end-sanitize-tx19 */
 #define bfd_mach_mips3000              3000
 #define bfd_mach_mips3900              3900
 #define bfd_mach_mips4000              4000
 #define bfd_mach_mips4010              4010
 #define bfd_mach_mips4100              4100
+#define bfd_mach_mips4111              4111
 #define bfd_mach_mips4300              4300
 #define bfd_mach_mips4400              4400
 #define bfd_mach_mips4600              4600
 #define bfd_mach_mips4650              4650
-  /* start-sanitize-vr4320 */
-#define bfd_mach_mips4320              4320
-  /* end-sanitize-vr4320 */
-  /* start-sanitize-tx49 */
-#define bfd_mach_mips4900              4900
-  /* end-sanitize-tx49 */
 #define bfd_mach_mips5000              5000
-  /* start-sanitize-cygnus */
-#define bfd_mach_mips5400              5400
-  /* end-sanitize-cygnus */
-  /* start-sanitize-r5900 */
-#define bfd_mach_mips5900              5900
-  /* end-sanitize-r5900 */
 #define bfd_mach_mips6000              6000
 #define bfd_mach_mips8000              8000
 #define bfd_mach_mips10000             10000
 #define bfd_mach_mips16                16
-  /* start-sanitize-sky */
-  /* The DVP is a machine within the mips architecture.  */
-#define bfd_mach_dvp_dma               42000
-#define bfd_mach_dvp_vif               42001
-#define bfd_mach_dvp_vu                42002
-#define bfd_mach_dvp_gif               42003
-#define bfd_mach_dvp_p(mach) ((mach) >= 42000 && (mach) <= 42003)
-  /* end-sanitize-sky */
   bfd_arch_i386,       /* Intel 386 */
 #define bfd_mach_i386_i386 0
 #define bfd_mach_i386_i8086 1
+#define bfd_mach_i386_i386_intel_syntax 2
   bfd_arch_we32k,      /* AT&T WE32xxx */
   bfd_arch_tahoe,      /* CCI/Harris Tahoe */
   bfd_arch_i860,       /* Intel 860 */
@@ -1302,7 +1310,6 @@ enum bfd_architecture
 #define bfd_mach_sh            0
 #define bfd_mach_sh3        0x30
 #define bfd_mach_sh3e       0x3e
-#define bfd_mach_sh4        0x40
   bfd_arch_alpha,      /* Dec Alpha */
 #define bfd_mach_alpha_ev4  0x10
 #define bfd_mach_alpha_ev5  0x20
@@ -1317,30 +1324,21 @@ enum bfd_architecture
   bfd_arch_ns32k,      /* National Semiconductors ns32000 */
   bfd_arch_w65,        /* WDC 65816 */
   bfd_arch_tic30,      /* Texas Instruments TMS320C30 */
-  /* start-sanitize-tic80 */
   bfd_arch_tic80,      /* TI TMS320c80 (MVP) */
-  /* end-sanitize-tic80 */
   bfd_arch_v850,       /* NEC V850 */
 #define bfd_mach_v850          0
-  /* start-sanitize-v850e */
 #define bfd_mach_v850e         'E'
 #define bfd_mach_v850ea        'A'
-  /* end-sanitize-v850e */
   bfd_arch_arc,        /* Argonaut RISC Core */
 #define bfd_mach_arc_base 0
   bfd_arch_m32r,       /* Mitsubishi M32R/D */
 #define bfd_mach_m32r          0  /* backwards compatibility */
-  /* start-sanitize-m32rx */
-#define bfd_mach_m32rx         'x'
-  /* end-sanitize-m32rx */
   bfd_arch_mn10200,    /* Matsushita MN10200 */
   bfd_arch_mn10300,    /* Matsushita MN10300 */
 #define bfd_mach_mn10300               300
-  /* start-sanitize-am33 */
-#define bfd_mach_am33          330
-  /* end-sanitize-am33 */
   bfd_arch_fr30,
 #define bfd_mach_fr30          0x46523330
+  bfd_arch_mcore,
   bfd_arch_last
   };
 
@@ -1580,6 +1578,7 @@ bfd_check_overflow
  PARAMS ((enum complain_overflow how,
     unsigned int bitsize,
     unsigned int rightshift,
+    unsigned int addrsize,
     bfd_vma relocation));
 
 bfd_reloc_status_type
@@ -1842,27 +1841,10 @@ to compensate for the borrow when the low bits are added. */
   BFD_RELOC_MIPS_GOT_LO16,
   BFD_RELOC_MIPS_CALL_HI16,
   BFD_RELOC_MIPS_CALL_LO16,
-/* start-sanitize-r5900 */
-  BFD_RELOC_MIPS15_S3,
-/* end-sanitize-r5900 */
-/* start-sanitize-sky */
-
-/* MIPS DVP Relocations.
-This is an 11-bit pc relative reloc.  The recorded address is for the
-lower instruction word, and the value is in 128 bit units. */
-  BFD_RELOC_MIPS_DVP_11_PCREL,
-
-/* This is a 27 bit address left shifted by 4. */
-  BFD_RELOC_MIPS_DVP_27_S4,
-
-/* This is the 11 bit offset operand of ilw/stw instructions
-left shifted by 4. */
-  BFD_RELOC_MIPS_DVP_11_S4,
-
-/* This is the 15 bit unsigned immediate operand of the iaddiu instruction
-left shifted by 3. */
-  BFD_RELOC_MIPS_DVP_U15_S3,
-/* end-sanitize-sky */
+  BFD_RELOC_MIPS_SUB,
+  BFD_RELOC_MIPS_GOT_PAGE,
+  BFD_RELOC_MIPS_GOT_OFST,
+  BFD_RELOC_MIPS_GOT_DISP,
 
 
 /* i386/elf relocations */
@@ -1948,6 +1930,15 @@ not stored in the instruction. */
   BFD_RELOC_ARM_THUMB_IMM,
   BFD_RELOC_ARM_THUMB_SHIFT,
   BFD_RELOC_ARM_THUMB_OFFSET,
+  BFD_RELOC_ARM_GOT12,
+  BFD_RELOC_ARM_GOT32,
+  BFD_RELOC_ARM_JUMP_SLOT,
+  BFD_RELOC_ARM_COPY,
+  BFD_RELOC_ARM_GLOB_DAT,
+  BFD_RELOC_ARM_PLT32,
+  BFD_RELOC_ARM_RELATIVE,
+  BFD_RELOC_ARM_GOTOFF,
+  BFD_RELOC_ARM_GOTPC,
 
 /* Hitachi SH relocs.  Not all of these appear in object files. */
   BFD_RELOC_SH_PCDISP8BY2,
@@ -2115,7 +2106,6 @@ data area pointer. */
 
 /* This is a 16 bit offset from the tiny data area pointer. */
   BFD_RELOC_V850_TDA_16_16_OFFSET,
-/* start-sanitize-v850e */
 
 /* This is a 5 bit offset (of which only 4 bits are used) from the tiny
 data area pointer. */
@@ -2137,7 +2127,6 @@ bits placed non-contigously in the instruction. */
 
 /* This is a 16 bit offset from the call table base pointer. */
   BFD_RELOC_V850_CALLT_16_16_OFFSET,
-/* end-sanitize-v850e */
 
 
 /* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
@@ -2153,6 +2142,9 @@ significant 8 bits of a 24 bit word are placed into the least
 significant 8 bits of the opcode. */
   BFD_RELOC_TIC30_LDP,
 
+/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
+  BFD_RELOC_FR30_48,
+
 /* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
 two sections. */
   BFD_RELOC_FR30_20,
@@ -2181,6 +2173,14 @@ short offset into 8 bits. */
 short offset into 11 bits. */
   BFD_RELOC_FR30_12_PCREL,
 
+/* Motorola Mcore relocations. */
+  BFD_RELOC_MCORE_PCREL_IMM8BY4,
+  BFD_RELOC_MCORE_PCREL_IMM11BY2,
+  BFD_RELOC_MCORE_PCREL_IMM4BY2,
+  BFD_RELOC_MCORE_PCREL_32,
+  BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
+  BFD_RELOC_MCORE_RVA,
+
 /* These two relocations are used by the linker to determine which of 
 the entries in a C++ virtual function table are actually used.  When
 the --gc-sections option is given, the linker will zero out the entries
@@ -2496,6 +2496,7 @@ struct _bfd
       struct nlm_obj_tdata *nlm_obj_data;
       struct bout_data_struct *bout_data;
       struct sun_core_struct *sun_core_data;
+      struct sco5_core_struct *sco5_core_data;
       struct trad_core_struct *trad_core_data;
       struct som_data_struct *som_data;
       struct hpux_core_struct *hpux_core_data;
This page took 0.027322 seconds and 4 git commands to generate.