1 #ifndef __ALPHA_A_OUT_H__
2 #define __ALPHA_A_OUT_H__
4 #include <linux/types.h>
7 * OSF/1 ECOFF header structs. ECOFF files consist of:
8 * - a file header (struct filehdr),
9 * - an a.out header (struct aouthdr),
10 * - one or more section headers (struct scnhdr).
11 * The filhdr's "f_nscns" field contains the
12 * number of section headers.
17 /* OSF/1 "file" header */
18 __u16 f_magic
, f_nscns
;
22 __u16 f_opthdr
, f_flags
;
27 __u64 info
; /* after that it looks quite normal.. */
32 __u64 text_start
; /* with a few additions that actually make sense */
35 __u32 gprmask
, fprmask
; /* bitmask of general & floating point regs used in binary */
55 /* OSF/1 "file" header */
61 * Define's so that the kernel exec code can access the a.out header
64 #define a_info ah.info
65 #define a_text ah.tsize
66 #define a_data ah.dsize
67 #define a_bss ah.bsize
68 #define a_entry ah.entry
69 #define a_textstart ah.text_start
70 #define a_datastart ah.data_start
71 #define a_bssstart ah.bss_start
72 #define a_gprmask ah.gprmask
73 #define a_fprmask ah.fprmask
74 #define a_gpvalue ah.gpvalue
76 #define N_TXTADDR(x) ((x).a_textstart)
77 #define N_DATADDR(x) ((x).a_datastart)
78 #define N_BSSADDR(x) ((x).a_bssstart)
81 #define N_SYMSIZE(x) 0
83 #define AOUTHSZ sizeof(struct aouthdr)
84 #define SCNHSZ sizeof(struct scnhdr)
88 ((long) N_MAGIC(x) == ZMAGIC ? 0 : \
89 (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
93 /* Assume that start addresses below 4G belong to a TASO application.
94 Unfortunately, there is no proper bit in the exec header to check.
95 Worse, we have to notice the start address before swapping to use
96 /sbin/loader, which of course is _not_ a TASO application. */
97 #define SET_AOUT_PERSONALITY(BFPM, EX) \
98 set_personality (((BFPM->sh_bang || EX.ah.entry < 0x100000000L \
99 ? ADDR_LIMIT_32BIT : 0) | PER_OSF4))
102 (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL)
104 #define STACK_TOP_MAX 0x00120000000UL
108 #endif /* __A_OUT_GNU_H__ */