e6420fc006
When populating `COPY` relocations, it is helpful to know the address of the relocation so that it can be related back to the name of the global symbol whose value it is copying. Unfortunately, the type of `populateRelocation` does not make it straightforward to compute this address. This patch includes three additional arguments to `populateRelocation` (the relocation's `Memory`, its `MemSegment`, and its `MemAddr`) to more easily facilitate computing the address. This is a breaking API change, albet it is a fairly straightforward change to adapt to for most consumers. This is related to #47, although this is not a full fix for the issue. |
||
---|---|---|
.. | ||
examples | ||
src/Data/Macaw | ||
test | ||
ChangeLog.md | ||
LICENSE | ||
macaw-symbolic.cabal | ||
README.org |
Overview
The macaw-symbolic library provides a mechanism for translating machine code functions discovered by macaw into Crucible CFGs that can then be symbolically simulated.
The core macaw-symbolic library supports translating generic macaw into crucible, but is not a standalone library. To translate actual machine code, an architecture-specific backend is required. For example, macaw-x86-symbolic can be used to translate x86_64 binaries into crucible. Examples for using macaw-symbolic (and architecture-specific backends) are available in Data.Macaw.Symbolic.
In order to avoid API bloat, the definitions required to implement a new architecture-specific backend are exported through the Data.Macaw.Symbolic.Backend module.
An additional module, Data.Macaw.Symbolic.Memory, provides an example of how to handle memory address translation in the simulator for machine code programs. There are other possible ways to translate memory addresses, but this module provides a versatile example that can serve many common use cases.