macaw/macaw-aarch32-symbolic
Ryan Scott 97c61e471a Add basic support for simulating PLT stubs and shared libraries
This extends `Data.Macaw.Symbolic.Testing` in `macaw-symbolic` to be able to
handle binaries that depend on shared libraries. This is fully functional for
the x86-64 and AArch32 symbolic backends, and I have added test cases to the
respective repos demonstrating that it works. (The PowerPC backend is not yet
supported. At a minimum, this is blocked on GaloisInc/elf-edit#35.)

To implement this, I also needed to add some additional infrastructure to
`macaw-base` (I put this infrastructure here as it doesn't depend on any
Crucible-specific functionality):

* `Data.Macaw.Memory.ElfLoader.DynamicDependencies`: a basic ELF dynamic
  loader that performs a breadth-first search over all `DT_NEEDED` entries
  that an ELF binary depends on (both directly and indirectly).
* `Data.Macaw.Memory.ElfLoader.PLTStubs`: a collection of heuristics for
  detecting the addresses of PLT stubs in a dynamically linked binary.

It is worth noting that shared libraries are rife with nuance and subtlety,
and the way `macaw` models shared libraries is not 100% accurate. I have
written a length `Note [Shared libraries]` in `Data.Macaw.Symbolic.Testing`
to describe where corners had to be cut.

Fixes #318.
2023-02-23 17:16:12 -05:00
..
src/Data/Macaw/AArch32 aarch32: Implement support for conditional calls (#289) 2022-05-20 15:17:26 -07:00
tests Add basic support for simulating PLT stubs and shared libraries 2023-02-23 17:16:12 -05:00
CHANGELOG.md Add a (dummy) symbolic backend for AArch32 2020-04-05 21:16:03 -07:00
LICENSE Add a (dummy) symbolic backend for AArch32 2020-04-05 21:16:03 -07:00
macaw-aarch32-symbolic.cabal aarch32: Implement support for conditional calls (#289) 2022-05-20 15:17:26 -07:00
Setup.hs Add a (dummy) symbolic backend for AArch32 2020-04-05 21:16:03 -07:00