1
2 #ifndef __SPARC_A_OUT_H__
3 #define __SPARC_A_OUT_H__
4
5 #define SPARC_PGSIZE 0x2000
6 #define SEGMENT_SIZE SPARC_PGSIZE
7
8 struct exec {
9 unsigned char a_dynamic:1;
10 unsigned char a_toolversion:7;
11 unsigned char a_machtype;
12 unsigned short a_info;
13 unsigned long a_text;
14 unsigned long a_data;
15 unsigned long a_bss;
16 unsigned long a_syms;
17 unsigned long a_entry;
18 unsigned long a_trsize;
19 unsigned long a_drsize;
20 };
21
22
23 #define N_TXTOFF(x) (N_MAGIC(x) == ZMAGIC ? 0 : sizeof (struct exec))
24
25
26 #define N_SYMOFF(x) (N_TXTOFF(x) + (x).a_text + \
27 (x).a_data + (x).a_trsize + \
28 (x).a_drsize)
29
30
31 #define N_TXTADDR(x) (((N_MAGIC(x) == ZMAGIC) && \
32 ((x).a_entry < SPARC_PGSIZE)) ? \
33 0 : SPARC_PGSIZE)
34
35
36 #define N_DATADDR(x) (N_MAGIC(x)==OMAGIC ? \
37 (N_TXTADDR(x) + (x).a_text) \
38 : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x))))
39
40 #define N_TRSIZE(a) ((a).a_trsize)
41 #define N_DRSIZE(a) ((a).a_drsize)
42 #define N_SYMSIZE(a) ((a).a_syms)
43
44 #ifdef __KERNEL__
45
46 #define STACK_TOP TASK_SIZE
47
48 #endif
49
50 #endif