]>
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. */ |
d7f8f106 JG |
5 | |
6 | #define SEG_SIZE_SPARC PAGE_SIZE | |
e10f519d | 7 | #define SEG_SIZE_SUN3 0x20000 /* Resolution of r/w protection hw */ |
d7f8f106 | 8 | |
66d4e1bb | 9 | #define TEXT_START_ADDR PAGE_SIZE /* Location 0 is not accessible */ |
8a400a18 | 10 | #define N_HEADER_IN_TEXT(x) 1 |
a07cc613 | 11 | |
66d4e1bb | 12 | /* Non-default definitions of the accessor macros... */ |
a07cc613 | 13 | |
d7f8f106 JG |
14 | /* Segment size varies on Sun-3 versus Sun-4. */ |
15 | ||
16 | #define N_SEGSIZE(x) (N_MACHTYPE(x) == M_SPARC? SEG_SIZE_SPARC: \ | |
17 | N_MACHTYPE(x) == M_68020? SEG_SIZE_SUN3: \ | |
18 | /* Guess? */ PAGE_SIZE) | |
19 | ||
66d4e1bb JG |
20 | /* Virtual Address of text segment from the a.out file. For OMAGIC, |
21 | (almost always "unlinked .o's" these days), should be zero. | |
22 | Sun added a kludge so that shared libraries linked ZMAGIC get | |
23 | an address of zero if a_entry (!!!) is lower than the otherwise | |
24 | expected text address. These kludges have gotta go! | |
25 | For linked files, should reflect reality if we know it. */ | |
26 | ||
27 | #define N_TXTADDR(x) \ | |
28 | (N_MAGIC(x)==OMAGIC? 0 \ | |
29 | : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \ | |
8a400a18 | 30 | : TEXT_START_ADDR+EXEC_BYTES_SIZE) |