This commit was generated by cvs2svn to track changes on a CVS vendor
[binutils-gdb.git] / include / aout / aout64.h
index 8cbf30b8934901a151e8698d2c792f10edc0ba26..76f1140b68269e20e969f18f87b4e95912f56fb0 100644 (file)
@@ -40,7 +40,9 @@ struct external_exec
 
 /* This indicates a demand-paged executable with the header in the text.
    It is used by 386BSD (and variants) and Linux, at least.  */
+#ifndef QMAGIC
 #define QMAGIC 0314
+#endif
 # ifndef N_BADMAG
 #  define N_BADMAG(x)    (N_MAGIC(x) != OMAGIC         \
                        && N_MAGIC(x) != NMAGIC         \
@@ -57,13 +59,13 @@ struct external_exec
 #define N_IS_QMAGIC(x) (0)
 #endif
 
-/* The difference between PAGE_SIZE and N_SEGSIZE is that PAGE_SIZE is
+/* The difference between TARGET_PAGE_SIZE and N_SEGSIZE is that TARGET_PAGE_SIZE is
    the finest granularity at which you can page something, thus it
    controls the padding (if any) before the text segment of a ZMAGIC
    file.  N_SEGSIZE is the resolution at which things can be marked as
    read-only versus read/write, so it controls the padding between the
    text segment and the data segment (in memory; on disk the padding
-   between them is PAGE_SIZE).  PAGE_SIZE and N_SEGSIZE are the same
+   between them is TARGET_PAGE_SIZE).  TARGET_PAGE_SIZE and N_SEGSIZE are the same
    for most machines, but different for sun3.  */
 
 /* By default, segment size is constant.  But some machines override this
@@ -95,7 +97,7 @@ struct external_exec
      * If N_HEADER_IN_TEXT(x) is false (which defaults to being the case when
        the entry point is less than EXEC_BYTES_SIZE into a page (e.g. page
        aligned)): (padding is needed so that text can start at a page boundary)
-       start at TEXT_START_ADDR, offset PAGE_SIZE, size as stated.
+       start at TEXT_START_ADDR, offset TARGET_PAGE_SIZE, size as stated.
 
     Specific configurations may want to hardwire N_HEADER_IN_TEXT,
     for efficiency or to allow people to play games with the entry point.
@@ -106,14 +108,14 @@ struct external_exec
     the entry point, perhaps with the ld -e flag.)
 
     * QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true,
-    and for which the starting address is PAGE_SIZE (or should this be
+    and for which the starting address is TARGET_PAGE_SIZE (or should this be
     SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC).
     */
 
 /* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
    in the text.  */
 #ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) (((x).a_entry & (PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
 #endif
 
 /* Sun shared libraries, not linux.  This macro is only relevant for ZMAGIC
@@ -131,7 +133,7 @@ struct external_exec
 #define N_TXTADDR(x) \
     (/* The address of a QMAGIC file is always one page in, */ \
      /* with the header in the text.  */ \
-     N_IS_QMAGIC (x) ? PAGE_SIZE + EXEC_BYTES_SIZE : \
+     N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
      N_MAGIC(x) != ZMAGIC ? 0 :        /* object file or NMAGIC */\
      N_SHARED_LIB(x) ? 0 :     \
      N_HEADER_IN_TEXT(x)  ?    \
@@ -142,16 +144,16 @@ struct external_exec
 
 /* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
    to make the text segment start at a certain boundary.  For most
-   systems, this boundary is PAGE_SIZE.  But for Linux, in the
+   systems, this boundary is TARGET_PAGE_SIZE.  But for Linux, in the
    time-honored tradition of crazy ZMAGIC hacks, it is 1024 which is
-   not what PAGE_SIZE needs to be for QMAGIC.  */
+   not what TARGET_PAGE_SIZE needs to be for QMAGIC.  */
 
 #ifndef ZMAGIC_DISK_BLOCK_SIZE
-#define ZMAGIC_DISK_BLOCK_SIZE PAGE_SIZE
+#define ZMAGIC_DISK_BLOCK_SIZE TARGET_PAGE_SIZE
 #endif
 
 #define N_DISK_BLOCK_SIZE(x) \
-  (N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : PAGE_SIZE)
+  (N_MAGIC(x) == ZMAGIC ? ZMAGIC_DISK_BLOCK_SIZE : TARGET_PAGE_SIZE)
 
 /* Offset in an a.out of the start of the text section. */
 #ifndef N_TXTOFF
@@ -438,13 +440,13 @@ enum reloc_type
   RELOC_CONST,
   RELOC_CONSTH,
   
-  /* All the new ones I can think of *//*v9*/
+  /* All the new ones I can think of, for sparc v9 */
 
-  RELOC_64,                    /* data[0:63] = addend + sv             *//*v9*/
-  RELOC_DISP64,                        /* data[0:63] = addend - pc + sv        *//*v9*/
-  RELOC_WDISP21,               /* data[0:20] = (addend + sv - pc)>>2   *//*v9*/
-  RELOC_DISP21,                        /* data[0:20] = addend - pc + sv        *//*v9*/
-  RELOC_DISP14,                        /* data[0:13] = addend - pc + sv        *//*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