1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI__ALPHA_A_OUT_H__
3 #define _UAPI__ALPHA_A_OUT_H__
5 #include <linux/types.h>
8 * OSF/1 ECOFF header structs. ECOFF files consist of:
9 * - a file header (struct filehdr),
10 * - an a.out header (struct aouthdr),
11 * - one or more section headers (struct scnhdr).
12 * The filhdr's "f_nscns" field contains the
13 * number of section headers.
18 /* OSF/1 "file" header */
19 __u16 f_magic
, f_nscns
;
23 __u16 f_opthdr
, f_flags
;
28 __u64 info
; /* after that it looks quite normal.. */
33 __u64 text_start
; /* with a few additions that actually make sense */
36 __u32 gprmask
, fprmask
; /* bitmask of general & floating point regs used in binary */
56 /* OSF/1 "file" header */
62 * Define's so that the kernel exec code can access the a.out header
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
77 #define N_TXTADDR(x) ((x).a_textstart)
78 #define N_DATADDR(x) ((x).a_datastart)
79 #define N_BSSADDR(x) ((x).a_bssstart)
82 #define N_SYMSIZE(x) 0
84 #define AOUTHSZ sizeof(struct aouthdr)
85 #define SCNHSZ sizeof(struct scnhdr)
89 ((long) N_MAGIC(x) == ZMAGIC ? 0 : \
90 (sizeof(struct exec) + (x).fh.f_nscns*SCNHSZ + SCNROUND - 1) & ~(SCNROUND - 1))
92 #endif /* _UAPI__ALPHA_A_OUT_H__ */