Go to the documentation of this file.
25 #define COFF_SHORT_L(ps) ((short)(((unsigned short)((unsigned char)ps[1])<<8)|\
26 ((unsigned short)((unsigned char)ps[0]))))
29 #define COFF_LONG_L(ps) (((long)(((unsigned long)((unsigned char)ps[3])<<24) |\
30 ((unsigned long)((unsigned char)ps[2])<<16) |\
31 ((unsigned long)((unsigned char)ps[1])<<8) |\
32 ((unsigned long)((unsigned char)ps[0])))))
35 #define COFF_SHORT_H(ps) ((short)(((unsigned short)((unsigned char)ps[0])<<8)|\
36 ((unsigned short)((unsigned char)ps[1]))))
39 #define COFF_LONG_H(ps) (((long)(((unsigned long)((unsigned char)ps[0])<<24) |\
40 ((unsigned long)((unsigned char)ps[1])<<16) |\
41 ((unsigned long)((unsigned char)ps[2])<<8) |\
42 ((unsigned long)((unsigned char)ps[3])))))
49 #define COFF_LONG(v) COFF_LONG_L(v)
50 #define COFF_SHORT(v) COFF_SHORT_L(v)
88 #define COFF_F_RELFLG 0000001
89 #define COFF_F_EXEC 0000002
90 #define COFF_F_LNNO 0000004
91 #define COFF_F_LSYMS 0000010
92 #define COFF_F_MINMAL 0000020
93 #define COFF_F_UPDATE 0000040
94 #define COFF_F_SWABD 0000100
95 #define COFF_F_AR16WR 0000200
96 #define COFF_F_AR32WR 0000400
97 #define COFF_F_AR32W 0001000
98 #define COFF_F_PATCH 0002000
99 #define COFF_F_NODF 0002000
101 #define COFF_I386MAGIC 0x14c
104 #define COFF_I386PTXMAGIC 0x154
105 #define COFF_I386AIXMAGIC 0x175
106 #define COFF_I386BADMAG(x) ((COFF_SHORT((x).f_magic) != COFF_I386MAGIC) \
107 && COFF_SHORT((x).f_magic) != COFF_I386PTXMAGIC \
108 && COFF_SHORT((x).f_magic) != COFF_I386AIXMAGIC)
110 #define COFF_I386BADMAG(x) (COFF_SHORT((x).f_magic) != COFF_I386MAGIC)
113 #define COFF_FILHDR struct COFF_filehdr
114 #define COFF_FILHSZ sizeof(COFF_FILHDR)
142 #define COFF_AOUTSZ (sizeof(COFF_AOUTHDR))
144 #define COFF_STMAGIC 0401
145 #define COFF_OMAGIC 0404
146 #define COFF_JMAGIC 0407
147 #define COFF_DMAGIC 0410
148 #define COFF_ZMAGIC 0413
149 #define COFF_SHMAGIC 0443
166 #define COFF_SCNHDR struct COFF_scnhdr
167 #define COFF_SCNHSZ sizeof(COFF_SCNHDR)
173 #define COFF_TEXT ".text"
174 #define COFF_DATA ".data"
175 #define COFF_BSS ".bss"
176 #define COFF_COMMENT ".comment"
177 #define COFF_LIB ".lib"
179 #define COFF_SECT_TEXT 0
180 #define COFF_SECT_DATA 1
181 #define COFF_SECT_BSS 2
182 #define COFF_SECT_REQD 3
184 #define COFF_STYP_REG 0x00
185 #define COFF_STYP_DSECT 0x01
186 #define COFF_STYP_NOLOAD 0x02
187 #define COFF_STYP_GROUP 0x04
188 #define COFF_STYP_PAD 0x08
189 #define COFF_STYP_COPY 0x10
190 #define COFF_STYP_TEXT 0x20
191 #define COFF_STYP_DATA 0x40
192 #define COFF_STYP_BSS 0x80
193 #define COFF_STYP_INFO 0x200
194 #define COFF_STYP_OVER 0x400
195 #define COFF_STYP_LIB 0x800
207 #define COFF_SLIBHD struct COFF_slib
208 #define COFF_SLIBSZ sizeof(COFF_SLIBHD)
226 #define COFF_LINENO struct COFF_lineno
227 #define COFF_LINESZ 6
231 #define COFF_E_SYMNMLEN 8
232 #define COFF_E_FILNMLEN 14
233 #define COFF_E_DIMNUM 4
256 #define COFF_N_BTMASK (0xf)
257 #define COFF_N_TMASK (0x30)
258 #define COFF_N_BTSHFT (4)
259 #define COFF_N_TSHIFT (2)
328 #define COFF_SYMENT struct COFF_syment
329 #define COFF_SYMESZ 18
330 #define COFF_AUXENT union COFF_auxent
331 #define COFF_AUXESZ 18
333 #define COFF_ETEXT "etext"
343 #define COFF_RELOC struct COFF_reloc
344 #define COFF_RELSZ 10
346 #define COFF_DEF_DATA_SECTION_ALIGNMENT 4
347 #define COFF_DEF_BSS_SECTION_ALIGNMENT 4
348 #define COFF_DEF_TEXT_SECTION_ALIGNMENT 4
351 #define COFF_DEF_SECTION_ALIGNMENT 4