stab.def: Remove the GNU extended type codes (e.g. N_SETT).
authorPer Bothner <per@bothner.com>
Fri, 22 Nov 1991 05:22:06 +0000 (05:22 +0000)
committerPer Bothner <per@bothner.com>
Fri, 22 Nov 1991 05:22:06 +0000 (05:22 +0000)
aoutx.h:  Put back the N_HEADER_IN_TEXT(x) that John removed,
but use his heuristic as its default definition.
bfd.H;  Re-generated.

include/ChangeLog
include/aout64.h
include/bfd.h
include/stab.def

index 9df89e6..97ee403 100644 (file)
@@ -1,3 +1,13 @@
+Thu Nov 21 21:01:05 1991  Per Bothner  (bothner at cygnus.com)
+
+       * stab.def: Remove the GNU extended type codes (e.g. N_SETT).
+       * aout64.h:  The heuristic for distinguishing between
+       sunos-style and bsd-style ZMAGIC files (wrt. where the
+       text segment starts) is moved into (the default definition of)
+       the macro N_HEADER_IN_TEXT.  This definition is only used
+       if no other definition is used - e.g. bfd/newsos3.c defines
+       N_HEADER_IN_TEXT(x) to be always 0 (as before).
+
 Thu Nov 21 11:53:03 1991  John Gilmore  (gnu at cygnus.com)
 
        * aout64.h (N_TXTADDR, N_TXTOFF, N_TXTSIZE):  New definitions
index f4eac3c..3a915a2 100755 (executable)
@@ -53,15 +53,30 @@ struct external_exec
      * entry point below TEXT_START_ADDR:
        (hack for SunOS shared libraries)
        start at 0, offset is 0, size as stated.
-     * entry point is EXEC_BYTES_SIZE or further into a page:
-       (no padding is needed; text can start after exec header.  Sun
+     * If N_HEADER_IN_TEXT(x) is true (which defaults to being the
+       case when the entry point is EXEC_BYTES_SIZE or further into a page):
+       no padding is needed; text can start after exec header.  Sun
        considers the text segment of such files to include the exec header;
-       for BFD's purposes, we don't, which makes more work for us.)
+       for BFD's purposes, we don't, which makes more work for us.
        start at TEXT_START_ADDR + EXEC_BYTES_SIZE, offset is EXEC_BYTES_SIZE,
        size as stated minus EXEC_BYTES_SIZE.
-     * 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.  */
+     * 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.
+
+    Specific configurations may want to hardwire N_HEADER_IN_TEXT,
+    for efficiency or to allow people to play games with the entry point.
+    In that case, you would #define N_HEADER_IN_TEXT(x) as 1 for sunos,
+    and as 0 for most other hosts (Sony News, Vax Ultrix, etc).
+    (Do this in the appropriate bfd target file.)
+    (The default is a heuristic that will break if people try changing
+    the entry point, perhaps with the ld -e flag.)
+    */
+
+#ifndef N_HEADER_IN_TEXT
+#define N_HEADER_IN_TEXT(x) (((x).a_entry & (PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+#endif
 
 #ifndef N_TXTADDR
 #define N_TXTADDR(x) \
@@ -69,7 +84,7 @@ struct external_exec
         0:                                     /* object file or NMAGIC */\
         ((x).a_entry < TEXT_START_ADDR)? \
            0:                                  /* shared lib */\
-       ( (((x).a_entry & (PAGE_SIZE-1)) >= EXEC_BYTES_SIZE) ?  \
+       (N_HEADER_IN_TEXT(x)  ? \
            TEXT_START_ADDR + EXEC_BYTES_SIZE:  /* no padding */\
            TEXT_START_ADDR                     /* a page of padding */\
         )      \
@@ -83,7 +98,7 @@ struct external_exec
             EXEC_BYTES_SIZE:                   /* object file or NMAGIC */\
         ((x).a_entry < TEXT_START_ADDR)? \
            0:                                  /* shared lib */\
-       ( (((x).a_entry & (PAGE_SIZE-1)) >= EXEC_BYTES_SIZE) ?  \
+       (N_HEADER_IN_TEXT(x)  ? \
            EXEC_BYTES_SIZE:                    /* no padding */\
            PAGE_SIZE                           /* a page of padding */\
         )      \
@@ -100,7 +115,7 @@ struct external_exec
             (x).a_text:                                /* object file or NMAGIC */\
         ((x).a_entry < TEXT_START_ADDR)? \
            (x).a_text:                         /* shared lib */\
-       ( (((x).a_entry & (PAGE_SIZE-1)) >= EXEC_BYTES_SIZE) ?  \
+       (N_HEADER_IN_TEXT(x)  ? \
            (x).a_text - EXEC_BYTES_SIZE:       /* no padding */\
            (x).a_text                          /* a page of padding */\
         )      \
index d85694a..d07ca94 100644 (file)
@@ -1648,14 +1648,6 @@ Return a lower-case character corresponding to the symbol class of symbol.
  PROTO(int, bfd_decode_symclass, (asymbol *symbol));
 
 /*
-
- bfd_stab_name
-Returns a string for the stab with the given code, or NULL if not found.
-*/
-
- PROTO(char *, bfd_stab_name, (int code));
-
-/*
 */
 
 /*:bfd.c*/
index c9d434c..db40079 100755 (executable)
@@ -166,46 +166,6 @@ __define_stab (N_NBLCS,  0xF8, "NBLCS")
    The value is the length.  */
 __define_stab (N_LENG, 0xfe, "LENG")
 
-#ifdef GNU_EXTRA_STABS
-/* These are defined in a.out.gnu.h, so they are usually left out here. */
-
-/* The following symbols refer to set elements.
-   All the N_SET[ATDB] symbols with the same name form one set.
-   Space is allocated for the set in the text section, and each set
-   element's value is stored into one word of the space.
-   The first word of the space is the length of the set (number of elements).
-
-   The address of the set is made into an N_SETV symbol
-   whose name is the same as the name of the set.
-   This symbol acts like a N_DATA global symbol
-   in that it can satisfy undefined external references.  */
-
-/* These appear as input to LD, in a .o file.  */
-__define_stab (N_SETA, 0x14, "SETA")   /* Absolute set element symbol */
-__define_stab (N_SETT, 0x16, "SETT")   /* Text set element symbol */
-__define_stab (N_SETD, 0x18, "SETD")   /* Data set element symbol */
-__define_stab (N_SETB, 0x1A, "SETB")   /* Bss set element symbol */
-
-/* This is output from LD.  */
-__define_stab (N_SETV, 0x1C, "SETV") /* Pointer to set vector in data area. */
-
-/* The following type indicates the definition of a symbol as being
-   an indirect reference to another symbol.  The other symbol
-   appears as an undefined reference, immediately following this symbol.
-
-   Indirection is asymmetrical.  The other symbol's value will be used
-   to satisfy requests for the indirect symbol, but not vice versa.
-   If the other symbol does not have a definition, libraries will
-   be searched to find a definition.  */
-
-__define_stab (N_INDR, 0xa, "INDR")
-
-/* Warning symbol. The text gives a warning message, the next symbol
-   in the table will be undefined. When the symbol is referenced, the
-   message is printed.  */
-
-__define_stab (N_WARNING, 0x1e, "WARNING")
-#endif
 \f
 /* The above information, in matrix format.