diff options
author | Per Bothner <per@bothner.com> | 1991-11-20 06:01:41 +0000 |
---|---|---|
committer | Per Bothner <per@bothner.com> | 1991-11-20 06:01:41 +0000 |
commit | 22ef104a6dd93b347aa75d9fbc0af516ff39682f (patch) | |
tree | 6d914a3796bf457286d38edc1de1975e5f93e5bb /include/aout64.h | |
parent | 332523bfd3f23531a68126633794c23fd4d1eab1 (diff) | |
download | gdb-22ef104a6dd93b347aa75d9fbc0af516ff39682f.zip gdb-22ef104a6dd93b347aa75d9fbc0af516ff39682f.tar.gz gdb-22ef104a6dd93b347aa75d9fbc0af516ff39682f.tar.bz2 |
Re-work previous change.
Diffstat (limited to 'include/aout64.h')
-rwxr-xr-x | include/aout64.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/aout64.h b/include/aout64.h index 96a29b5..750cde5 100755 --- a/include/aout64.h +++ b/include/aout64.h @@ -46,15 +46,27 @@ struct external_exec #ifndef N_TXTADDR #define N_TXTADDR(x) \ - (N_MAGIC(x)!=ZMAGIC? 0 \ - : N_HEADER_IN_TEXT(x) ? TEXT_START_ADDR+EXEC_BYTES_SIZE \ - : TEXT_START_ADDR) + (N_MAGIC(x)!=ZMAGIC? 0 : TEXT_START_ADDR) #endif /* Offset in an a.out of the start of the text section. */ #define N_TXTOFF(x) ( N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE \ + : N_HEADER_IN_TEXT(x) ? 0 : PAGE_SIZE) + +/* These are the same as N_TXTADDR and N_TXTOFF, + but never consider the exec header to be includes in the text. */ + +#define LOGICAL_TXTADDR(x) \ + (N_MAGIC(x)!=ZMAGIC? 0 \ + : N_HEADER_IN_TEXT(x) ? TEXT_START_ADDR+EXEC_BYTES_SIZE \ + : TEXT_START_ADDR) +#define LOGICAL_TXTOFF(x) ( N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE \ : N_HEADER_IN_TEXT(x) ? EXEC_BYTES_SIZE : PAGE_SIZE) +#define LOGICAL_TXTSIZE(x) \ + ((x).a_text \ + - (N_HEADER_IN_TEXT(x) && N_MAGIC(x)==ZMAGIC ? EXEC_BYTES_SIZE : 0)) + #if ARCH_SIZE==64 #define OMAGIC 0x1001 /* Code indicating object file */ #define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */ |