You Are Here:

Community: Wiki

This page was last modified on 8 December 2007, at 20:46.

E32Image file format on Symbian OS 9

From Forum Nokia Wiki

This article explains briefly the E32Image file format on Symbian OS v9 or newer. Please check some links at the end of this article for more detailed information.


Contents

Introduction

The executable files on Symbian OS v9, i.e., .exe or .dll, use a special format, called E32Image. It is based on ELF file format. It is different on pre-Symbian OS v9. The E32Image on pre-Symbian OS v9 is based on PE file format.

E32Image added some Symbian-specific information to the header. It also replaces function names with ordinal numbers. The tool used to translate ELF into E32Image is called elftran and elf2e32.

The difference between elftran and elf2e32 is the input file. The elftran tool translates ELF file in ABIv1 format into E32Image. The elf232 translates ELF file in newer format, ABIv2, into E32Image.


Like standard ELF executable file, E32Image contains of several sections, i.e.:

  • Code section. It contains three parts: text section, export address table and import address table.
  • BSS section. It contains un-initialized data.
  • Data section. It contains initialized data.
  • Import section. It contains the information about all imported functions used by the code.
  • Relocation section. It contains relocation table needed by Symbian OS loader to load the code.

Header information

The header information of E32Image is defined in a header file called f32image.h. It is part of the public Symbian SDKs located at \epoc32\include. The declaration of the header is splitted into three parts.

The first part, E32ImageHeader, is the main part. It is quite similar to the header on pre-Symbian OS 9.

class E32ImageHeader
{
public:
TUint32 iUid1;
TUint32 iUid2;
TUint32 iUid3;
TUint32 iUidChecksum;
TUint iSignature;
TUint32 iHeaderCrc;
TUint32 iModuleVersion;
TUint32 iCompressionType;
TVersion iToolsVersion;
TUint32 iTimeLo;
TUint32 iTimeHi;
TUint iFlags;
TInt iCodeSize;
TInt iDataSize;
TInt iHeapSizeMin;
TInt iHeapSizeMax;
TInt iStackSize;
TInt iBssSize;
TUint iEntryPoint;
TUint iCodeBase;
TUint iDataBase;
TInt iDllRefTableCount;
TUint iExportDirOffset;
TInt iExportDirCount;
TInt iTextSize;
TUint iCodeOffset;
TUint iDataOffset;
TUint iImportOffset;
TUint iCodeRelocOffset;
TUint iDataRelocOffset;
TUint16 iProcessPriority;
TUint16 iCpuIdentifier;
};

The second part, E32ImageHeaderComp is needed when the executable file is compressed.

class E32ImageHeaderComp : public E32ImageHeader
{
public:
TUint32 iUncompressedSize;
};

The third part, E32ImageHeaderV contains some extra information.

class E32ImageHeaderV : public E32ImageHeaderComp
{
public:
SSecurityInfo iS;
TUint32 iExceptionDescriptor;
TUint32 iSpare2;
TUint16 iExportDescSize;
TUint8 iExportDescType;
TUint8 iExportDesc[1];
};

E32ImageHeader

  • iUid1, iUid2, iUid3, are the first, second and third UIDs of the executable file respectively.
  • iUidChecksum, is the checksum of the first three UIDs.
  • iSignature, is a unique signature of E32 file, always has a value of 'EPOC'.
  • iHeaderCrc, is the checksum of entire header, calculated with CCITT CRC-32 algorithm.
  • iModuleVersion, is the version number for this executable.
  • iCompressionType, is the UID of the library used to compress the executable file. It is 0 if the executable is not compressed or KUidCompressionDeflate (=0x101F 7AFC) if it is compressed with Deflate algorithm.
  • iToolsVersion, is the version of ELFTRAN that generates this file.
  • iTimeLo, iTimeHi, is the lowest and highest word of the timestamp when the file is created respectively.
  • iFlags, flags for this executable. There are some flags defined in f32image.h, for example, KImageDll, KImageNoCallEntryPoint, etc.
  • iCodeSize, is the size of code section, import address table, constant data and export dir.
  • iDataSize, is size of initialized data.
  • iHeapSizeMin, is the minimum size of the heap.
  • iHeapSizeMax, is the maximum size of the heap.
  • iStackSize, is the size of the stack.
  • iBssSize, is the size of the un-initialized data section.
  • iEntryPoint, is the offset into code of entry point.
  • iCodeBase, where the code is linked for.
  • iDataBase, where the data is linked for.
  • iDllRefTableCount, is the number of DLLs imported by this program.
  • iExportDirOffset, is the offset into the file of the export address table.
  • iExportDirCount, is the offset of the export address table.
  • iTextSize, is size of just the text section.
  • iCodeOffset, is the file offset to code section.
  • iDataOffset, is the file offset to data section.
  • iImportOffset, is the file offset to import section.
  • iCodeRelocOffset, is the relocations for code and constants.
  • iDataRelocOffset, is the relocations for data.
  • iProcessPriority, is the executables priority.
  • iCpuIdentifier, is the identifier of CPU.


E32ImageHeaderComp

  • iUncompressedSize, the uncompressed size of file. Remember that E32Image file might be compressed.


E32ImageHeaderV

  • iS.iSecureId, is secure ID of the executable. It is usually the same as the UID3 of the executable.
  • iS.iVendorId, is vendor ID of executable. For third party application, it is usually 0.
  • iS.iCaps.iCaps, is capabilities needed to run the executable. The definition of all Symbian OS capabilities can be found at e32capability.h.
  • iExceptionDescriptor, is the offset in bytes from start of code section to Exception Descriptor, bit 0 set if valid
  • iSpare2, reserved.
  • iExportDescSize, is the size of bitmap section.
  • iExportDescType[1], is type of description of holes in export table.
  • iExportDesc[1], is the description of holes in export table.


Internal links


External links

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fE4cockingE5fphoneE5fkeypadX qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX qdcZtitleQSxE4cockingE20phoneE20keypadE20E2dE20ForumE20NokiaE20WikiX qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qrssZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qfnZdistributionQUxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2fX qfnZtopicQUqfnTopicZhardwareQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZupdatedQDx2008E2d10E2d02X qfnZuserE5ftagQSxhardwareX qmarsZdescriptionQSxEa0E20WikiE20javaE20symbianE5fosE20s60E20maemoE20cE2bE2bE20WikiE20HomeE20WikiE20HelpE20OverviewE20GlossaryE20CreateE20PageE20ProposeE20anE20ArticleE20SpotlightE20TopicE20E2dE20WE52TE20WidgetsE20ProgrammingE20E4canguageE20E2dE20SymbianE20CE2bE2bE20E2dE20OpenE20CE2fCE2bE2bE20E2dE20JavaE20E2dE20FlashE20E4citeE20E2dE20PythonE20WebE20TechnologiesE20E2dE20WE52TE20WidgetsE20E2dE20WidSetsE20ToolsE20andE20SE44KE20CodeE20E45E78amplesE20KnowledgeE20BaseE20TechnologyE20AreasE20SoftwareE20PlatformsE20E44evelopmentE20ProcessE20E3fE3fWikiE20ChineseE20E3fE3fE3fWikiE20JapaneseE20PortugueseE2fBrazilianE20E52ussianE20WhatE20linksE20hereE20UploadE20fileE20SpecialE20pagesE20PrintableE20versionE44ownloadE20asE20PE44FE20GoE20ToE20E2eE2eE2eX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ