]>
Commit | Line | Data |
---|---|---|
a07cc613 JG |
1 | /* SPARC-specific values for a.out files */ |
2 | ||
66d4e1bb | 3 | #define PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */ |
a07cc613 | 4 | /* Note that some SPARCs have 4K pages, some 8K, some others. */ |
66d4e1bb JG |
5 | #define SEGMENT_SIZE PAGE_SIZE |
6 | #define TEXT_START_ADDR PAGE_SIZE /* Location 0 is not accessible */ | |
a07cc613 | 7 | |
66d4e1bb | 8 | /* Non-default definitions of the accessor macros... */ |
a07cc613 | 9 | |
66d4e1bb JG |
10 | /* Offset in a.out file of the text section. For ZMAGIC, the text section |
11 | actually includes the a.out header. */ | |
a07cc613 | 12 | |
19b03b7a | 13 | #define N_TXTOFF(x) ( (N_MAGIC((x)) == ZMAGIC) ? 0 : EXEC_BYTES_SIZE) |
a07cc613 | 14 | |
66d4e1bb JG |
15 | /* Virtual Address of text segment from the a.out file. For OMAGIC, |
16 | (almost always "unlinked .o's" these days), should be zero. | |
17 | Sun added a kludge so that shared libraries linked ZMAGIC get | |
18 | an address of zero if a_entry (!!!) is lower than the otherwise | |
19 | expected text address. These kludges have gotta go! | |
20 | For linked files, should reflect reality if we know it. */ | |
21 | ||
22 | #define N_TXTADDR(x) \ | |
23 | (N_MAGIC(x)==OMAGIC? 0 \ | |
24 | : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \ | |
25 | : TEXT_START_ADDR) |