xcoff slurp_armap bounds checking
[deliverable/binutils-gdb.git] / include / aout / aout64.h
index 4843410d276bd578f050004ac8b0658fc3b8006f..86b0cdf46a4b895c6dff72d39091a47b944f2c5f 100644 (file)
@@ -1,10 +1,10 @@
 /* `a.out' object-file definitions, including extensions to 64-bit fields
 
-   Copyright 2001, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1999-2019 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -14,7 +14,8 @@
    
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #ifndef __A_OUT_64_H__
 #define __A_OUT_64_H__
@@ -135,17 +136,13 @@ struct external_exec
    in the text.  */
 #ifndef N_HEADER_IN_TEXT
 #define N_HEADER_IN_TEXT(x) \
-  (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+  (((x)->a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
 #endif
 
 /* Sun shared libraries, not linux.  This macro is only relevant for ZMAGIC
    files.  */
 #ifndef N_SHARED_LIB
-#if defined (TEXT_START_ADDR) && TEXT_START_ADDR == 0
 #define N_SHARED_LIB(x) (0)
-#else
-#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR)
-#endif
 #endif
 
 /* Returning 0 not TEXT_START_ADDR for OMAGIC and NMAGIC is based on
@@ -202,12 +199,12 @@ struct external_exec
 #define        N_TXTSIZE(x) \
   (/* For QMAGIC, we don't consider the header part of the text section.  */\
    N_IS_QMAGIC (x)                                                     \
-   ? (x).a_text - EXEC_BYTES_SIZE                                      \
+   ? (x)->a_text - EXEC_BYTES_SIZE                                     \
    : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x))                      \
-      ? (x).a_text                                                     \
+      ? (x)->a_text                                                    \
       : (N_HEADER_IN_TEXT (x)                                          \
-        ? (x).a_text - EXEC_BYTES_SIZE /* No padding.  */              \
-        : (x).a_text                   /* A page of padding.  */ )))
+        ? (x)->a_text - EXEC_BYTES_SIZE        /* No padding.  */      \
+        : (x)->a_text                          /* A page of padding.  */ )))
 #endif
 /* The address of the data segment in virtual memory.
    It is the text segment address, plus text segment size, rounded
@@ -221,7 +218,7 @@ struct external_exec
 #endif
 /* The address of the BSS segment -- immediately after the data segment.  */
 
-#define N_BSSADDR(x)   (N_DATADDR (x) + (x).a_data)
+#define N_BSSADDR(x)   (N_DATADDR (x) + (x)->a_data)
 
 /* Offsets of the various portions of the file after the text segment.  */
 
@@ -241,16 +238,16 @@ struct external_exec
 #define N_DATOFF(x)    (N_TXTOFF (x) + N_TXTSIZE (x))
 #endif
 #ifndef N_TRELOFF
-#define N_TRELOFF(x)   (N_DATOFF (x) + (x).a_data)
+#define N_TRELOFF(x)   (N_DATOFF (x) + (x)->a_data)
 #endif
 #ifndef N_DRELOFF
-#define N_DRELOFF(x)   (N_TRELOFF (x) + (x).a_trsize)
+#define N_DRELOFF(x)   (N_TRELOFF (x) + (x)->a_trsize)
 #endif
 #ifndef N_SYMOFF
-#define N_SYMOFF(x)    (N_DRELOFF (x) + (x).a_drsize)
+#define N_SYMOFF(x)    (N_DRELOFF (x) + (x)->a_drsize)
 #endif
 #ifndef N_STROFF
-#define N_STROFF(x)    (N_SYMOFF (x) + (x).a_syms)
+#define N_STROFF(x)    (N_SYMOFF (x) + (x)->a_syms)
 #endif
 \f
 /* Symbols */
@@ -349,7 +346,7 @@ struct internal_nlist
 
 struct reloc_std_external
 {
-  bfd_byte r_address[BYTES_IN_WORD];   /* Offset of of data to relocate.  */
+  bfd_byte r_address[BYTES_IN_WORD];   /* Offset of data to relocate.  */
   bfd_byte r_index[3];                 /* Symbol table index of symbol.  */
   bfd_byte r_type[1];                  /* Relocation type.  */
 };
@@ -409,7 +406,7 @@ struct reloc_std_internal
 
 struct reloc_ext_external
 {
-  bfd_byte r_address[BYTES_IN_WORD];   /* Offset of of data to relocate.  */
+  bfd_byte r_address[BYTES_IN_WORD];   /* Offset of data to relocate.  */
   bfd_byte r_index[3];                 /* Symbol table index of symbol.  */
   bfd_byte r_type[1];                  /* Relocation type.  */
   bfd_byte r_addend[BYTES_IN_WORD];    /* Datum addend.  */
@@ -479,32 +476,14 @@ enum reloc_type
   RELOC_11,    
   RELOC_WDISP2_14,
   RELOC_WDISP19,
-  RELOC_HHI22,                 /* data[0:21] = (addend + sv) >> 42     */
-  RELOC_HLO10,                 /* data[0:9] = (addend + sv) >> 32      */
-  
-  /* 29K relocation types.  */
-  RELOC_JUMPTARG,
-  RELOC_CONST,
-  RELOC_CONSTH,
-  
-  /* All the new ones I can think of, for sparc v9.  */
-  RELOC_64,                    /* data[0:63] = addend + sv             */
-  RELOC_DISP64,                        /* data[0:63] = addend - pc + sv        */
-  RELOC_WDISP21,               /* data[0:20] = (addend + sv - pc)>>2   */
-  RELOC_DISP21,                        /* data[0:20] = addend - pc + sv        */
-  RELOC_DISP14,                        /* data[0:13] = addend - pc + sv        */
-  /* Q .
-     What are the other ones,
-     Since this is a clean slate, can we throw away the ones we dont
-     understand ? Should we sort the values ? What about using a
-     microcode format like the 68k ?  */
+
   NO_RELOC
   };
 
 
 struct reloc_internal
 {
-  bfd_vma r_address;           /* Offset of of data to relocate.  */
+  bfd_vma r_address;           /* Offset of data to relocate.  */
   long r_index;                /* Symbol table index of symbol.  */
   enum reloc_type r_type;      /* Relocation type.  */
   bfd_vma r_addend;            /* Datum addend.  */
This page took 0.0311 seconds and 4 git commands to generate.