aboutsummaryrefslogtreecommitdiff
path: root/gas/a.out.gnu.h
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-08-23 08:56:39 +0000
committerJohn Gilmore <gnu@cygnus>1991-08-23 08:56:39 +0000
commitd7f8f106b9efaaa99a279070fcdfbac95bad483e (patch)
tree3e25ae256a4ac818494dfc4f8b9cb7ed9ad225b7 /gas/a.out.gnu.h
parent299eb5f15fdf2488fe7f0268bf4f545baeae1d20 (diff)
downloadgdb-d7f8f106b9efaaa99a279070fcdfbac95bad483e.zip
gdb-d7f8f106b9efaaa99a279070fcdfbac95bad483e.tar.gz
gdb-d7f8f106b9efaaa99a279070fcdfbac95bad483e.tar.bz2
* a.out.gnu.h, a.out.sun4.h: Make SEGMENT_SIZE able to depend
on the particular a.out being examined. * a.out.sun4.h: Define segment sizes for Sun-3's and Sun-4's. * FIXME: a.out.gnu.h is almost obsolete. * FIXME: a.out.sun4.h should be renamed a.out.sun.h now.
Diffstat (limited to 'gas/a.out.gnu.h')
-rwxr-xr-xgas/a.out.gnu.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gas/a.out.gnu.h b/gas/a.out.gnu.h
index 42941e6..24794dc 100755
--- a/gas/a.out.gnu.h
+++ b/gas/a.out.gnu.h
@@ -100,9 +100,15 @@ enum machine_type {
&& N_MAGIC(x) != ZMAGIC)
#endif
+/* By default, segment size is constant. But on some machines, it can
+ be a function of the a.out header (e.g. machine type). */
+#ifndef N_SEGSIZE
+#define N_SEGSIZE(x) SEGMENT_SIZE
+#endif
+
/* This complexity is for encapsulated COFF support */
#ifndef _N_HDROFF
-#define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec))
+#define _N_HDROFF(x) (N_SEGSIZE(x) - sizeof (struct exec))
#endif
#ifndef N_TXTOFF
@@ -140,7 +146,7 @@ enum machine_type {
#ifndef N_DATADDR
#define N_DATADDR(x) \
(N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) \
- : (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))))
+ : (N_SEGSIZE(x) + ((N_TXTADDR(x)+(x).a_text-1) & ~(N_SEGSIZE(x)-1))))
#endif
/* Address of bss segment in memory after it is loaded. */