aboutsummaryrefslogtreecommitdiff
path: root/include/aout64.h
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-11-22 05:22:06 +0000
committerPer Bothner <per@bothner.com>1991-11-22 05:22:06 +0000
commit27612c29661b7055af2fd24ed7aec0be740bcd52 (patch)
tree38d22afab439630605c08913b74820fc39839c7b /include/aout64.h
parent7de245d36283de0344bf0798cb594f14ea6f2f3a (diff)
downloadgdb-27612c29661b7055af2fd24ed7aec0be740bcd52.zip
gdb-27612c29661b7055af2fd24ed7aec0be740bcd52.tar.gz
gdb-27612c29661b7055af2fd24ed7aec0be740bcd52.tar.bz2
stab.def: Remove the GNU extended type codes (e.g. N_SETT).
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.
Diffstat (limited to 'include/aout64.h')
-rwxr-xr-xinclude/aout64.h33
1 files changed, 24 insertions, 9 deletions
diff --git a/include/aout64.h b/include/aout64.h
index f4eac3c..3a915a2 100755
--- a/include/aout64.h
+++ b/include/aout64.h
@@ -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 */\
) \