aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-07-08 21:50:23 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-07-08 21:50:23 +0000
commit3b7f6de0e69324fc128f3d01984c858c9313075c (patch)
tree14bbb25e29c9d6e8a2710ce347ad748a08636278 /include
parent3cb614173136cbde8f62e8f6e5511961e90fadfe (diff)
downloadfsf-binutils-gdb-3b7f6de0e69324fc128f3d01984c858c9313075c.zip
fsf-binutils-gdb-3b7f6de0e69324fc128f3d01984c858c9313075c.tar.gz
fsf-binutils-gdb-3b7f6de0e69324fc128f3d01984c858c9313075c.tar.bz2
Make it so it compiles if QMAGIC is not defined (e.g. hp300hpux).
* aout64.h (N_BADMAG): Recognize QMAGIC. N_TXTOFF, N_TXTADDR, N_TXTSIZE: Special code for QMAGIC. N_DATOFF: Pad text size if we need to.
Diffstat (limited to 'include')
-rw-r--r--include/aout/aout64.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/aout/aout64.h b/include/aout/aout64.h
index 04c28cc..1e6ef0e 100644
--- a/include/aout/aout64.h
+++ b/include/aout/aout64.h
@@ -48,6 +48,12 @@ struct external_exec
#endif
+#ifdef QMAGIC
+#define N_IS_QMAGIC(x) (N_MAGIC (x) == QMAGIC)
+#else
+#define N_IS_QMAGIC(x) (0)
+#endif
+
/* The difference between PAGE_SIZE and N_SEGSIZE is that PAGE_SIZE is
the the finest granularity at which you can page something, thus it
controls the padding (if any) before the text segment of a ZMAGIC
@@ -114,9 +120,9 @@ struct external_exec
#ifndef N_TXTADDR
#define N_TXTADDR(x) \
- (/* The address of a QMAGIC file is always one page in */ \
+ (/* The address of a QMAGIC file is always one page in, */ \
/* with the header in the text. */ \
- N_MAGIC(x) == QMAGIC ? PAGE_SIZE + EXEC_BYTES_SIZE : \
+ N_IS_QMAGIC (x) ? PAGE_SIZE + EXEC_BYTES_SIZE : \
N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
N_SHARED_LIB(x) ? 0 : \
N_HEADER_IN_TEXT(x) ? \
@@ -144,7 +150,7 @@ struct external_exec
#ifndef N_TXTSIZE
#define N_TXTSIZE(x) \
(/* For QMAGIC, we don't consider the header part of the text section. */\
- N_MAGIC(x) == QMAGIC ? (x).a_text - EXEC_BYTES_SIZE : \
+ N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
(N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
N_HEADER_IN_TEXT(x) ? \
(x).a_text - EXEC_BYTES_SIZE: /* no padding */\