-
Notifications
You must be signed in to change notification settings - Fork 253
Platform
A platform or operating environment describes details of a decompiled program's environment that cannot be described by the processor architecture. For instance, many computers define trap or interrupt instructions, whose functionality depends on the operating environment the program is run in.
All platform implementations implement the Reko.Core.IPlatform
interface. The convenience class Reko.Core.Platform
may be used by implementors of IPlatform
to share functionality. Most of the code in Reko only uses the IPlatform
interface.
Importantly, each platform is associated with a short unique string called the platform identifier. This identifier is used by the different image loaders to resolve platform references. For instance, the PeImageLoader
class, which is responsible for loading PE image files, will want to load a platform called win32
, win32mips
or win32arm
depending on the processor type of the PE image.
Platforms are registered with Reko by adding an <Environment>
element in the reko.config
file. The Name
attribute specifies the platform identifier. The Type
attribute specifies the type name of the class that implements the IPlatform
interface.
Platforms may define a memory map to describe interrupt vectors, memory mapped I/O addresses, or other well known memory locations. This is done by creating a memory map file (e.g. platformname.xml
) and adding a MemoryMap
attribute with the value "platformname.xml"
.