lifting-bits / grr

High-throughput fuzzer and emulator of DECREE binaries
Apache License 2.0
241 stars 32 forks source link

Port to macOS #6

Open pgoodman opened 6 years ago

pgoodman commented 6 years ago

Making the assembly portable

For example:

    .align 16
    .globl TraceBranch
    .type TraceBranch, @function
TraceBranch:
    .cfi_startproc

A few of these directives might not work on macOS, and we'd want to wrap things like TraceBranch in a macro call like SYMBOL(TraceBranch) that on macOS will prepend and _.

Snapshotting

This is a bit more challenging. We depend on Linux ptrace to take snapshots of the 32-bit programs (and then fiddle with some initial register state and such). What we really need is an ELF loader of some kind that can create the initial memory image of the loaded program.