mirror of
https://github.com/GaloisInc/macaw.git
synced 2024-11-26 17:38:55 +03:00
14 lines
309 B
Haskell
14 lines
309 B
Haskell
{-# LANGUAGE DataKinds #-}
|
|
module Shared (
|
|
withELF
|
|
) where
|
|
|
|
import qualified Data.ByteString as B
|
|
|
|
import qualified Data.ElfEdit as E
|
|
|
|
withELF :: FilePath -> (E.Elf 64 -> IO ()) -> IO ()
|
|
withELF fp k = do
|
|
bytes <- B.readFile fp
|
|
E.parseElfOrDie (error "ELF32 is unsupported in the test suite") k bytes
|