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