Reflect new indirect info
[deliverable/binutils-gdb.git] / include / bfd.h
index 3f9947e2709da26ef290f454d8e62ffe496051f4..d41473a9732a8029a6c4083baf4c825cad9c00d2 100644 (file)
@@ -1,7 +1,7 @@
 /* Main header file for the bfd library -- portable access to object files.
    ==> The bfd.h file is generated from bfd-in.h and various .c files; if you
    ==> change it, your changes will probably be lost.
-   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -45,7 +45,7 @@ here.  */
 #include "ansidecl.h"
 #include "obstack.h"
 
-#define BFD_VERSION "2.0"
+#define BFD_VERSION "2.1"
 
 /* forward declaration */
 typedef struct _bfd bfd;
@@ -193,6 +193,8 @@ typedef struct sec *sec_ptr;
 #define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
 #define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
 
+#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
+
 #define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (val)), ((ptr)->user_set_vma = true), true)
 #define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
 #define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
@@ -288,7 +290,9 @@ CAT(NAME,_bfd_debug_info_end),\
 CAT(NAME,_bfd_debug_info_accumulate),\
 CAT(NAME,_bfd_get_relocated_section_contents),\
 CAT(NAME,_bfd_relax_section),\
-CAT(NAME,_bfd_seclet_link)
+CAT(NAME,_bfd_seclet_link),\
+CAT(NAME,_bfd_reloc_type_lookup),\
+CAT(NAME,_bfd_make_debug_symbol)
 
 #define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
 
@@ -462,15 +466,13 @@ typedef struct sec
          /* The section is a constuctor, and should be placed at the
           end of the . */
 
-
 #define SEC_CONSTRUCTOR_TEXT 0x1100
 
 #define SEC_CONSTRUCTOR_DATA 0x2100
 
 #define SEC_CONSTRUCTOR_BSS  0x3100
 
-
-         /* The section has contents - a bss section could be
+         /* The section has contents - a data section could be
            <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>, a debug section could be
            <<SEC_HAS_CONTENTS>> */
 
@@ -488,6 +490,13 @@ typedef struct sec
 
 #define SEC_SHARED_LIBRARY 0x800
 
+         /* The section is a common section (symbols may be defined
+           multiple times, the value of a symbol is the amount of
+           space it requires, and the largest symbol value is the one
+           used).  Most targets have exactly one of these (.bss), but
+           ECOFF has two. */
+
+#define SEC_IS_COMMON 0x8000
        
    bfd_vma vma;
    boolean user_set_vma;
@@ -595,6 +604,7 @@ typedef struct sec
 #define BFD_ABS_SECTION_NAME "*ABS*"
 #define BFD_UND_SECTION_NAME "*UND*"
 #define BFD_COM_SECTION_NAME "*COM*"
+#define BFD_IND_SECTION_NAME "*IND*"
 
      /* the absolute section */
  extern   asection bfd_abs_section;
@@ -602,10 +612,13 @@ typedef struct sec
  extern   asection bfd_und_section;
      /* Pointer to the common section */
  extern asection bfd_com_section;
+     /* Pointer to the indirect section */
+ extern asection bfd_ind_section;
 
  extern struct symbol_cache_entry *bfd_abs_symbol;
  extern struct symbol_cache_entry *bfd_com_symbol;
  extern struct symbol_cache_entry *bfd_und_symbol;
+ extern struct symbol_cache_entry *bfd_ind_symbol;
 #define bfd_get_section_size_before_reloc(section) \
      (section->reloc_done ? (abort(),1): (section)->_raw_size)
 #define bfd_get_section_size_after_reloc(section) \
@@ -685,6 +698,7 @@ enum bfd_architecture
   bfd_arch_z8k,        /* Zilog Z8000 */
 #define bfd_mach_z8001         1
 #define bfd_mach_z8002         2
+  bfd_arch_h8500,      /* Hitachi H8/500 */
   bfd_arch_last
   };
 
@@ -816,7 +830,7 @@ typedef CONST struct reloc_howto_struct
   unsigned int rightshift;
 
         /*  The size of the item to be relocated - 0, is one byte, 1 is 2
-           bytes, 3 is four bytes.  A negative value indicates that the
+           bytes, 2 is four bytes.  A negative value indicates that the
            result is to be subtracted from the data.  */
   int size;
 
@@ -888,7 +902,7 @@ typedef CONST struct reloc_howto_struct
 #define HOWTO_PREPARE(relocation, symbol)      \
   {                                            \
   if (symbol != (asymbol *)NULL) {             \
-    if (symbol->section == &bfd_com_section) { \
+    if (bfd_is_com_section (symbol->section)) { \
       relocation = 0;                          \
     }                                          \
     else {                                     \
@@ -972,6 +986,23 @@ typedef enum bfd_reloc_code_real
    /* this one is a.out specific? */
   BFD_RELOC_SPARC_BASE22,
 
+        /* Bits 27..2 of the relocation address shifted right 2 bits;
+         simple reloc otherwise.  */
+  BFD_RELOC_MIPS_JMP,
+
+        /* signed 16-bit pc-relative, shifted right 2 bits (e.g. for MIPS) */
+  BFD_RELOC_16_PCREL_S2,
+
+        /* High 16 bits of 32-bit value; simple reloc.  */
+  BFD_RELOC_HI16,
+        /* High 16 bits of 32-bit value but the low 16 bits will be sign
+          extended and added to form the final result.  If the low 16
+          bits form a negative number, we need to add one to the high value
+          to compensate for the borrow when the low bits are added.  */
+  BFD_RELOC_HI16_S,
+        /* Low 16 bits.  */
+  BFD_RELOC_LO16,
+
    /* this must be the highest numeric value */
   BFD_RELOC_UNUSED
  } bfd_reloc_code_real_type;
This page took 0.026029 seconds and 4 git commands to generate.