EPOC File Offsets 00 UID 1 04 UID 2 08 UID 3 0c Checksum 10 Signature // 'EPOC' 14 iCpu // 0x1000 = X86,0x2000= ARM 18 iCheckSumCode // sum of all 32 bit words in text section 1c iCheckSumData // sum of all 32 bit words in data section 20 iVersion // usually the same for all files produced by petran 0 major 1 minor 2 build 24 iTime 2c iFlags 0 exe 1 dll 2 fixed address exe 30 iCodeSize // size of code, import address table, constant sections 34 iDataSize // size of initialised data 38 iHeapSizeMin 3c iHeapSizeMax 40 iStackSize 44 iBssSize 48 iEntryPoint // offset into code of entry point 4c iCodeBase ;code link address // where the code is linked for 50 iDataBase ; data link address // where the data is linked for 54 iDllRefTableCount // filling this in enables E32ROM to leave space for it 58 iExportDirOffset // offset into the file of the export address table 5c iExportDirCount 60 iTextSize // The Import Address Table(IAT) follows the text section in the code section 64 iCodeOffset // offset in file to code section 68 iDataOffset // offset in file to data section 6c iImportOffset // offset in file to import section 70 iCodeRelocOffset // relocations for code and const 74 iDataRelocOffset // relocations for data 78 iPriority // executables priority ÄÄÄÄÄÄÄÄ¿ Priority³ ÄÄÄÄÄÄÄÄÙ Name Value ---- ----- supervisor 3b6h realtime 352h fileserver 2eeh windowsserver 28ah high 1c2h foreground 15eh background 0fah low 096h ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Import Section³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ iImportOffset[06ch] ->iSize +0h E32ImportBlock[iDllRefTableCount[054h]] +4h iOffsetOfDllName (rel to iImportOffset) +0h iNumberOfImports +4h iImport[iNumberOfImports] +8h [60h+64h] [textsize + code offset] IAT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Relocation Section³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ 70h iCodeRelocOffset 74h iDataRelocOffset // Apps seem not to have a data relocation section iSize; (rel to RelocOffset) +0h // size of this relocation section iNumberOfRelocs; +4h // number of relocations in this section ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Relocation Block ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ iBlockBase // Address of Base fixup iSize // Block Size ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ Relocation Entry ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ iFixupType +0h Offset (12 bits) +4h // Offset from Base address in Block