mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-25 21:54:51 +03:00
97c61e471a
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.
79 lines
1.7 KiB
Plaintext
79 lines
1.7 KiB
Plaintext
name: macaw-x86
|
|
version: 0.3.1
|
|
author: Galois, Inc.
|
|
maintainer: jhendrix@galois.com
|
|
build-type: Simple
|
|
cabal-version: >= 1.10
|
|
license: BSD3
|
|
license-file: LICENSE
|
|
tested-with: GHC == 8.0.2
|
|
|
|
library
|
|
build-depends:
|
|
base >= 4.13,
|
|
bytestring,
|
|
containers,
|
|
elf-edit,
|
|
flexdis86 >= 0.1.5,
|
|
lens >= 4.7,
|
|
macaw-base >= 0.3.3,
|
|
mtl,
|
|
parameterized-utils,
|
|
prettyprinter >= 1.7.0,
|
|
text,
|
|
vector
|
|
|
|
hs-source-dirs: src
|
|
|
|
exposed-modules:
|
|
Data.Macaw.X86
|
|
Data.Macaw.X86.ArchTypes
|
|
Data.Macaw.X86.Conditions
|
|
Data.Macaw.X86.Flexdis
|
|
Data.Macaw.X86.Generator
|
|
Data.Macaw.X86.Getters
|
|
Data.Macaw.X86.InstructionDef
|
|
Data.Macaw.X86.Monad
|
|
Data.Macaw.X86.Semantics
|
|
Data.Macaw.X86.Semantics.ADX
|
|
Data.Macaw.X86.Semantics.AESNI
|
|
Data.Macaw.X86.Semantics.AVX
|
|
Data.Macaw.X86.Semantics.BMI2
|
|
Data.Macaw.X86.Semantics.SHA
|
|
Data.Macaw.X86.SyscallInfo
|
|
Data.Macaw.X86.SyscallInfo.FreeBSD
|
|
Data.Macaw.X86.SyscallInfo.Linux
|
|
Data.Macaw.X86.X86Flag
|
|
Data.Macaw.X86.X86Reg
|
|
Data.Macaw.X86.X87ControlReg
|
|
|
|
default-language: Haskell2010
|
|
ghc-options: -Wall -Wcompat
|
|
ghc-options: -fno-warn-unticked-promoted-constructors
|
|
ghc-prof-options: -O2 -fprof-auto-top
|
|
default-extensions: NoStarIsType
|
|
|
|
test-suite macaw-x86-tests
|
|
type: exitcode-stdio-1.0
|
|
default-language: Haskell2010
|
|
ghc-options: -Wall -Wcompat
|
|
main-is: Main.hs
|
|
other-modules: ElfX64Linux
|
|
hs-source-dirs: tests
|
|
build-depends:
|
|
base,
|
|
bytestring,
|
|
containers,
|
|
elf-edit,
|
|
exceptions,
|
|
filemanip,
|
|
filepath,
|
|
lens,
|
|
macaw-base,
|
|
parameterized-utils,
|
|
prettyprinter,
|
|
macaw-x86,
|
|
temporary,
|
|
tasty,
|
|
tasty-hunit
|