X hits on this document





17 / 120

4 Reversing and Patching Wintel Machine Code

The executable representation of software, otherwise known as machine code, is

typically the result of translating a program written in a high-level language, using a

compiler, to an object file, a file which contains platform-specific machine instructions.

The object file is made executable using linker, a tool which resolves the external

dependencies that the object file has, such as operating system libraries. In contrast to

high-level languages, there are low-level languages which are still considered to be high-

level by a computer's CPU because the language syntax is still a textual or mnemonic

abstraction of the processor's instruction set. For example, assembly language, a

language that uses helpful mnemonics to represent machine instructions, still must be

translated to an object file and made executable by a linker. However the translation

from assembly code to machine code is done by an assembler instead of a compiler—

reflecting the closeness of the assembly language's syntax to actual machine code.

The reason why compilers translate programs coded in high-level and low-level

languages to machine code is three-fold: CPUs only understand machine instructions,

having a CPU dynamically translate higher-level language statements to machine

instructions would consume significant, additional CPU time, and (3) a CPU that could

dynamically translate multiple high-level languages to machine code would be extremely

complex, expensive, and cumbersome to maintain—imagine having to update the

firmware in your microprocessor every time a bug is fixed or a feature is added to the

C++ language!


Document info
Document views205
Page views206
Page last viewedMon Oct 24 20:06:43 UTC 2016