FreeCalypso > hg > tcs211-patches
comparison tool/coffstruct.h @ 6:87e9f30f5f86
ti-libpatch: patching implemented
| author | Space Falcon <falcon@ivan.Harhan.ORG> |
|---|---|
| date | Sat, 06 Jun 2015 04:51:15 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 5:5ba13fd0e737 | 6:87e9f30f5f86 |
|---|---|
| 1 /* | |
| 2 * Here we are going to define the structures found in the COFF artifact | |
| 3 * file to be analyzed. | |
| 4 */ | |
| 5 | |
| 6 struct external_filehdr { | |
| 7 u_char f_magic[2]; /* magic number */ | |
| 8 u_char f_nscns[2]; /* number of sections */ | |
| 9 u_char f_timdat[4]; /* time & date stamp */ | |
| 10 u_char f_symptr[4]; /* file pointer to symtab */ | |
| 11 u_char f_nsyms[4]; /* number of symtab entries */ | |
| 12 u_char f_opthdr[2]; /* sizeof(optional hdr) */ | |
| 13 u_char f_flags[2]; /* flags */ | |
| 14 u_char f_target_id[2]; /* magic no. (TI COFF-specific) */ | |
| 15 }; | |
| 16 | |
| 17 struct external_scnhdr { | |
| 18 u_char s_name[8]; /* section name */ | |
| 19 u_char s_paddr[4]; /* physical address, aliased s_nlib */ | |
| 20 u_char s_vaddr[4]; /* virtual address */ | |
| 21 u_char s_size[4]; /* section size (in WORDS) */ | |
| 22 u_char s_scnptr[4]; /* file ptr to raw data for section */ | |
| 23 u_char s_relptr[4]; /* file ptr to relocation */ | |
| 24 u_char s_lnnoptr[4]; /* file ptr to line numbers */ | |
| 25 u_char s_nreloc[4]; /* number of relocation entries */ | |
| 26 u_char s_nlnno[4]; /* number of line number entries*/ | |
| 27 u_char s_flags[4]; /* flags */ | |
| 28 u_char s_reserved[2]; /* reserved */ | |
| 29 u_char s_page[2]; /* section page number (LOAD) */ | |
| 30 }; | |
| 31 | |
| 32 struct external_syment { | |
| 33 u_char e_name[8]; | |
| 34 u_char e_value[4]; | |
| 35 u_char e_scnum[2]; | |
| 36 u_char e_type[2]; | |
| 37 u_char e_sclass; | |
| 38 u_char e_numaux; | |
| 39 }; | |
| 40 | |
| 41 struct external_reloc { | |
| 42 u_char r_vaddr[4]; | |
| 43 u_char r_symndx[4]; | |
| 44 u_char r_reserved[2]; /* extended pmad byte for COFF2 */ | |
| 45 u_char r_type[2]; | |
| 46 }; |
