Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

PeFileFormat

Steve Maillet edited this page Jun 5, 2016 · 5 revisions

.NET Micro Framework PE file Format

The .NET Micro Framework PE data format is based on the ECMA-335 specification. Specifically sections II.22 - II.24. Due to the constraints of the systems NETMF targets the PE file format is not an exact match/implementation of the ECMA-335 specification. NETMF PE file format is essentially an extended subset of the format defined in ECMA-335.

Major differences from ECMA-335

  • The number and size of the metadata tables is limited in NETMF to keep the overall memory footprint as low as possible.
  • Since NETMF is designed to operate without an OS the Windows PE32/COFF header, tables and information is stripped out
  • Table indexes are limited to 12 bits
    • This also means that the metadata tokens are 16 bits and not 32 so the actual IL instruction stream is different for NETMF
  • Resources are handled in a very different manner with their own special table in the assembly header

Assembly Header

The Assembly header is the top level structure of every NETMF PE file. On disk the AssemblyHeader structure is at offset 0 of the .PE file. On the device the AssemblyHeader is aligned at a 32 bit boundary within a well known FLASH region ( the DAT region or the Deployment region) with the first assembly at offset 0 of the region.

Clone this wiki locally