PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
COFF.h
1/* coff.h
2 * Data structures that describe the MIPS COFF format.
3 */
4
5struct coff_filehdr
6{
7 u16 f_magic; /* magic number */
8 u16 f_nscns; /* number of sections */
9 u32 f_timdat; /* time & date stamp */
10 u32 f_symptr; /* file pointer to symbolic header */
11 u32 f_nsyms; /* sizeof(symbolic hdr) */
12 u16 f_opthdr; /* sizeof(optional hdr) */
13 u16 f_flags; /* flags */
14};
15
16#define MIPSELMAGIC 0x0162
17
18#define OMAGIC 0407
19#define SOMAGIC 0x0701
20
21typedef struct aouthdr
22{
23 u16 magic; /* see above */
24 u16 vstamp; /* version stamp */
25 u32 tsize; /* text size in bytes, padded to DW bdry */
26 u32 dsize; /* initialized data " " */
27 u32 bsize; /* uninitialized data " " */
28 u32 entry; /* entry pt. */
29 u32 text_start; /* base of text used for this file */
30 u32 data_start; /* base of data used for this file */
31 u32 bss_start; /* base of bss used for this file */
32 // Instead of the GPR and CPR masks, these 5 fields exist.
33 u32 field_20;
34 u32 field_24;
35 u32 field_28;
36 u32 field_2C;
37 struct iopmod_id *mod_id;
38 u32 gp_value; /* the gp value used for this object */
39} AOUTHDR;
40
41struct scnhdr
42{
43 u8 s_name[8]; /* section name */
44 u32 s_paddr; /* physical address, aliased s_nlib */
45 u32 s_vaddr; /* virtual address */
46 u32 s_size; /* section size */
47 u32 s_scnptr; /* file ptr to raw data for section */
48 u32 s_relptr; /* file ptr to relocation */
49 u32 s_lnnoptr; /* file ptr to gp histogram */
50 u16 s_nreloc; /* number of relocation entries */
51 u16 s_nlnno; /* number of gp histogram entries */
52 u32 s_flags; /* flags */
53};