aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-05-10 23:41:14 +0000
committerJohn Gilmore <gnu@cygnus>1991-05-10 23:41:14 +0000
commit66d4e1bb88997032a543574f69f57c284181b39d (patch)
treea003a120dbdc5dcc6e264baadb918f829381105f /gas
parentdf77307a2acd29c32e82587211a9742db40b35c9 (diff)
downloadgdb-66d4e1bb88997032a543574f69f57c284181b39d.zip
gdb-66d4e1bb88997032a543574f69f57c284181b39d.tar.gz
gdb-66d4e1bb88997032a543574f69f57c284181b39d.tar.bz2
Update for Sony News port and split of a.out into several variants.
Add write_contents to format-dependent vector.
Diffstat (limited to 'gas')
-rwxr-xr-xgas/a.out.gnu.h66
1 files changed, 40 insertions, 26 deletions
diff --git a/gas/a.out.gnu.h b/gas/a.out.gnu.h
index 74504b2..4ae86af 100755
--- a/gas/a.out.gnu.h
+++ b/gas/a.out.gnu.h
@@ -82,41 +82,55 @@ enum machine_type {
/* Code indicating demand-paged executable. */
#define ZMAGIC 0413
-/* Address of text segment in memory after it is loaded. */
-/* Don't load things at zero, it encourages zero-pointer bugs */
-#ifndef TEXT_START_ADDR
-#define TEXT_START_ADDR 0x10000
-#endif
-
/* Virtual Address of text segment from the a.out file. For OMAGIC,
(almost always "unlinked .o's" these days), should be zero.
- Sun added a kludge so that shared libraries linked ZMAGIC get
- an address of zero if a_entry (!!!) is lower than the otherwise
- expected text address. These kludges have gotta go!
For linked files, should reflect reality if we know it. */
#ifndef N_TXTADDR
-#define N_TXTADDR(x) \
- (N_MAGIC(x)==OMAGIC? 0 \
- : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
- : TEXT_START_ADDR)
+#define N_TXTADDR(x) (N_MAGIC(x)==OMAGIC? 0 : TEXT_START_ADDR)
+#endif
+
+#ifndef N_BADMAG
+#define N_BADMAG(x) (N_MAGIC(x) != OMAGIC \
+ && N_MAGIC(x) != NMAGIC \
+ && N_MAGIC(x) != ZMAGIC)
+#endif
+
+/* This complexity is for encapsulated COFF support */
+#ifndef _N_HDROFF
+#define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec))
+#endif
+
+#ifndef N_TXTOFF
+#define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? \
+ _N_HDROFF((x)) + sizeof (struct exec) : \
+ sizeof (struct exec))
+#endif
+
+
+#ifndef N_DATOFF
+#define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text )
+#endif
+
+#ifndef N_TRELOFF
+#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
+#endif
+
+#ifndef N_DRELOFF
+#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
#endif
-/* Address of data segment in memory after it is loaded.
- Note that it is up to you to define SEGMENT_SIZE
- on machines not listed here. */
-#if defined(hp300) || defined(pyr)
-#define SEGMENT_SIZE page_size
+#ifndef N_SYMOFF
+#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
#endif
-#ifdef sony
-#define SEGMENT_SIZE 0x2000
-#endif /* Sony. */
-#ifdef is68k
-#define SEGMENT_SIZE 0x20000
+
+#ifndef N_STROFF
+#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
#endif
-#if defined(m68k) && defined(PORTAR)
-#define PAGE_SIZE 0x400
-#define SEGMENT_SIZE PAGE_SIZE
+
+/* Address of text segment in memory after it is loaded. */
+#ifndef N_TXTADDR
+#define N_TXTADDR(x) 0
#endif
#ifndef N_DATADDR