macaw/macaw-aarch32
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 Add basic support for simulating PLT stubs and shared libraries 2023-02-23 17:16:12 -05:00
tests Revisit handling of tail calls 2022-06-27 15:02:43 -07:00
ChangeLog.md Revise handling of syscalls in AArch32 to match X86 (#246) 2021-11-24 11:59:56 -08:00
LICENSE Rename macaw-asl to macaw-aarch32 2020-04-05 15:16:39 -07:00
macaw-aarch32.cabal Revise handling of syscalls in AArch32 to match X86 (#246) 2021-11-24 11:59:56 -08:00
REAMDE.md Support for mixed ARM/Thumb binaries (#174) 2020-11-02 12:48:01 -08:00
Setup.hs Rename macaw-asl to macaw-aarch32 2020-04-05 15:16:39 -07:00