1 #ifndef __ALPHA_A_OUT_H__
2 #define __ALPHA_A_OUT_H__
3
4
5
6
7
8
9
10
11
12
13 struct filehdr
14 {
15
16 __u16 f_magic, f_nscns;
17 __u32 f_timdat;
18 __u64 f_symptr;
19 __u32 f_nsyms;
20 __u16 f_opthdr, f_flags;
21 };
22
23 struct aouthdr
24 {
25 __u64 info;
26 __u64 tsize;
27 __u64 dsize;
28 __u64 bsize;
29 __u64 entry;
30 __u64 text_start;
31 __u64 data_start;
32 __u64 bss_start;
33 __u32 gprmask, fprmask;
34 __u64 gpvalue;
35 };
36
37 struct scnhdr
38 {
39 char s_name[8];
40 __u64 s_paddr;
41 __u64 s_vaddr;
42 __u64 s_size;
43 __u64 s_scnptr;
44 __u64 s_relptr;
45 __u64 s_lnnoptr;
46 __u16 s_nreloc;
47 __u16 s_nlnno;
48 __u32 s_flags;
49 };
50
51 struct exec
52 {
53
54 struct filehdr fh;
55 struct aouthdr ah;
56 };
57
58
59
60
61
62 #define a_info ah.info
63 #define a_text ah.tsize
64 #define a_data ah.dsize
65 #define a_bss ah.bsize
66 #define a_entry ah.entry
67 #define a_textstart ah.text_start
68 #define a_datastart ah.data_start
69 #define a_bssstart ah.bss_start
70 #define a_gprmask ah.gprmask
71 #define a_fprmask ah.fprmask
72 #define a_gpvalue ah.gpvalue
73
74 #define N_TXTADDR(x) ((x).a_textstart)
75 #define N_DATADDR(x) ((x).a_datastart)
76 #define N_BSSADDR(x) ((x).a_bssstart)
77 #define N_DRSIZE(x) 0
78 #define N_TRSIZE(x) 0
79 #define N_SYMSIZE(x) 0
80
81 #define AOUTHSZ sizeof(struct aouthdr)
82 #define SCNHSZ sizeof(struct scnhdr)
83 #define SCNROUND 16
84
85 #define N_TXTOFF(x) \
86 ((long) N_MAGIC(x) == ZMAGIC ? 0 : \
87 (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
88
89 #ifdef __KERNEL__
90
91 #define STACK_TOP (0x00120000000UL)
92
93 #endif
94
95 #endif