diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aaec2fd6..8000f9ee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - ghc-ver: ["8.6.5", "8.8.4"] + ghc-ver: ["8.6.5", "8.8.4", "8.10.2"] # complete all jobs fail-fast: false name: Macaw - GHC v${{ matrix.ghc-ver }} - ubuntu-latest diff --git a/base/src/Data/Macaw/CFG/Rewriter.hs b/base/src/Data/Macaw/CFG/Rewriter.hs index e4d902d5..72a72ef3 100644 --- a/base/src/Data/Macaw/CFG/Rewriter.hs +++ b/base/src/Data/Macaw/CFG/Rewriter.hs @@ -38,7 +38,7 @@ import Control.Monad.ST import Control.Monad.State.Strict import Data.BinarySymbols import Data.Bits -import Data.List +import Data.List (find) import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import Data.Maybe diff --git a/base/src/Data/Macaw/DebugLogging.hs b/base/src/Data/Macaw/DebugLogging.hs index 8aff2f40..048ef6d0 100644 --- a/base/src/Data/Macaw/DebugLogging.hs +++ b/base/src/Data/Macaw/DebugLogging.hs @@ -23,7 +23,7 @@ module Data.Macaw.DebugLogging ) where import Data.IORef -import Data.List +import Data.List (find, (\\)) import Debug.Trace import System.IO.Unsafe -- For debugKeys import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) diff --git a/base/src/Data/Macaw/Dwarf.hs b/base/src/Data/Macaw/Dwarf.hs index 097edff3..79a628f3 100644 --- a/base/src/Data/Macaw/Dwarf.hs +++ b/base/src/Data/Macaw/Dwarf.hs @@ -63,7 +63,7 @@ import Data.Dwarf as Dwarf import qualified Data.ElfEdit as Elf import Data.Foldable import Data.Int -import Data.List +import Data.List (partition, sortOn) import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe diff --git a/base/src/Data/Macaw/Memory/ElfLoader.hs b/base/src/Data/Macaw/Memory/ElfLoader.hs index 97529d29..638f11c1 100644 --- a/base/src/Data/Macaw/Memory/ElfLoader.hs +++ b/base/src/Data/Macaw/Memory/ElfLoader.hs @@ -752,16 +752,6 @@ relaTargetARM64 end msegIndex symtab rel addend relFlag = , relocationEndianness = end , relocationJumpSlot = True } - Elf.R_AARCH64_GLOB_DAT -> do - sym <- resolveRelocationSym symtab (Elf.relSym rel) - pure $! Relocation { relocationSym = sym - , relocationOffset = addend - , relocationIsRel = False - , relocationSize = 8 - , relocationIsSigned = False - , relocationEndianness = end - , relocationJumpSlot = False - } tp -> do throwError $ RelocationUnsupportedType (show tp) diff --git a/cabal.project.dist.ghc-8.10.2.freeze b/cabal.project.dist.ghc-8.10.2.freeze new file mode 100644 index 00000000..5295f122 --- /dev/null +++ b/cabal.project.dist.ghc-8.10.2.freeze @@ -0,0 +1,229 @@ +constraints: any.BoundedChan ==1.0.3.0, + any.Cabal ==3.2.0.0, + any.HUnit ==1.6.0.0, + any.IntervalMap ==0.6.1.2, + any.Only ==0.1, + any.QuickCheck ==2.14.1, + QuickCheck -old-random +templatehaskell, + any.SHA ==1.6.4.4, + SHA -exe, + any.StateVar ==1.2, + any.adjunctions ==4.4, + any.ansi-terminal ==0.11, + ansi-terminal -example, + any.ansi-wl-pprint ==0.6.9, + ansi-wl-pprint -example, + any.array ==0.5.4.0, + asl-translator -asl-lite +unsafe-operations, + any.async ==2.2.2, + async -bench, + any.atomic-primops ==0.8.4, + atomic-primops -debug, + any.attoparsec ==0.13.2.4, + attoparsec -developer, + any.base ==4.14.1.0, + any.base-compat ==0.11.2, + any.base-orphans ==0.8.3, + any.base16-bytestring ==1.0.0.0, + any.bifunctors ==5.5.7, + bifunctors +semigroups +tagged, + any.bimap ==0.4.0, + any.binary ==0.8.8.0, + any.bitwise ==1.0.0.1, + any.blaze-builder ==0.4.1.0, + any.blaze-textual ==0.2.1.0, + blaze-textual -developer -integer-simple +native, + any.boomerang ==1.4.6, + any.bv-sized ==1.0.2, + any.bytestring ==0.10.10.0, + any.bytestring-builder ==0.10.8.2.0, + bytestring-builder +bytestring_has_builder, + any.cabal-doctest ==1.0.8, + any.call-stack ==0.2.0, + any.case-insensitive ==1.2.1.0, + any.cereal ==0.5.8.1, + cereal -bytestring-builder, + any.clock ==0.8, + clock -llvm, + any.code-page ==0.2, + any.colour ==2.3.5, + any.comonad ==5.0.6, + comonad +containers +distributive +test-doctests, + any.constraints ==0.12, + any.containers ==0.6.2.1, + any.contravariant ==1.5.2, + contravariant +semigroups +statevar +tagged, + crucible +unsafe-operations, + any.data-binary-ieee754 ==0.4.4, + any.data-default-class ==0.1.2.0, + any.deepseq ==1.4.4.0, + any.deriving-compat ==0.5.9, + deriving-compat +base-4-9 +new-functor-classes +template-haskell-2-11, + any.direct-sqlite ==2.3.26, + direct-sqlite +fulltextsearch +haveusleep +json1 -systemlib +urifilenames, + any.directory ==1.3.6.0, + dismantle-arm-xml -asl-lite, + any.distributive ==0.6.2, + distributive +semigroups +tagged, + any.doctest ==0.16.3, + any.dotgen ==0.4.3, + dotgen -devel, + any.exceptions ==0.10.4, + any.extra ==1.7.8, + any.fgl ==5.7.0.3, + fgl +containers042, + any.fgl-visualize ==0.1.0.1, + any.filemanip ==0.3.6.3, + any.filepath ==1.4.2.1, + any.fingertree ==0.1.4.2, + any.finite-typelits ==0.1.4.2, + any.free ==5.1.3, + any.generic-random ==1.3.0.1, + any.ghc ==8.10.2, + any.ghc-boot ==8.10.2, + any.ghc-boot-th ==8.10.2, + any.ghc-heap ==8.10.2, + any.ghc-paths ==0.1.0.12, + any.ghc-prim ==0.6.1, + any.ghci ==8.10.2, + any.gitrev ==1.3.1, + any.haggle ==0.1.0.0, + any.happy ==1.20.0, + any.hashable ==1.3.0.0, + hashable -examples +integer-gmp +sse2 -sse41, + any.hashtables ==1.2.4.1, + hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks, + any.haskell-lexer ==1.1, + any.hpc ==0.6.1.0, + any.hsc2hs ==0.68.7, + hsc2hs -in-ghc-tree, + any.hspec ==2.7.4, + any.hspec-core ==2.7.4, + any.hspec-discover ==2.7.4, + any.hspec-expectations ==0.8.2, + any.ilist ==0.4.0.1, + any.indexed-list-literals ==0.2.1.3, + any.integer-gmp ==1.0.3.0, + any.integer-logarithms ==1.0.3, + integer-logarithms -check-bounds +integer-gmp, + any.invariant ==0.5.3, + any.io-streams ==1.5.2.0, + io-streams +network -nointeractivetests +zlib, + any.itanium-abi ==0.1.1.1, + any.json ==0.10, + json +generic -mapdict +parsec +pretty +split-base, + any.kan-extensions ==5.2.1, + any.lens ==4.19.2, + lens -benchmark-uniplate -dump-splices +inlining -j -old-inline-pragmas -safe +test-doctests +test-hunit +test-properties +test-templates +trustworthy, + llvm-pretty-bc-parser -fuzz -regressions, + any.located-base ==0.1.1.1, + any.logict ==0.7.0.3, + any.lumberjack ==0.1.0.2, + any.math-functions ==0.3.4.1, + math-functions +system-erf +system-expm1, + any.megaparsec ==7.0.5, + megaparsec -dev, + any.microlens ==0.4.11.2, + any.microlens-th ==0.4.3.6, + any.monad-primitive ==0.1, + any.monadLib ==3.10, + any.mtl ==2.2.2, + any.mwc-random ==0.14.0.0, + any.network ==3.1.2.0, + network -devel, + any.old-locale ==1.0.0.7, + any.optparse-applicative ==0.16.0.0, + any.ordered-containers ==0.2.2, + any.panic ==0.4.0.1, + any.parallel ==3.2.2.0, + any.parameterized-utils ==2.1.1, + parameterized-utils +unsafe-operations, + any.parsec ==3.1.14.0, + any.parser-combinators ==1.2.1, + parser-combinators -dev, + any.pretty ==1.1.3.6, + any.pretty-hex ==1.1, + any.pretty-show ==1.10, + any.prettyprinter ==1.6.2, + prettyprinter -buildreadme, + any.prettyprinter-ansi-terminal ==1.1.2, + any.primitive ==0.7.1.0, + any.process ==1.6.9.0, + any.profunctors ==5.6, + any.quickcheck-io ==0.2.0, + any.random ==1.2.0, + any.ref-tf ==0.4.0.2, + any.reflection ==2.1.6, + reflection -slow +template-haskell, + any.regex-base ==0.94.0.0, + any.regex-tdfa ==1.3.1.0, + regex-tdfa -force-o2, + any.rts ==1.0, + any.s-cargot ==0.1.4.0, + s-cargot -build-example, + any.s-cargot-letbind ==0.2.3.0, + any.scheduler ==1.4.2.3, + any.scientific ==0.3.6.2, + scientific -bytestring-builder -integer-simple, + any.semigroupoids ==5.3.4, + semigroupoids +comonad +containers +contravariant +distributive +doctests +tagged +unordered-containers, + any.semigroups ==0.19.1, + semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers, + any.setenv ==0.1.1.3, + any.smallcheck ==1.2.0, + any.split ==0.2.3.4, + any.splitmix ==0.1.0.2, + splitmix -optimised-mixer, + any.sqlite-simple ==0.4.18.0, + any.stm ==2.5.0.0, + any.syb ==0.7.1, + any.tagged ==0.8.6, + tagged +deepseq +transformers, + any.tasty ==1.3.1, + tasty +clock, + any.tasty-expected-failure ==0.12.1, + any.tasty-golden ==2.3.4, + tasty-golden -build-example, + any.tasty-hspec ==1.1.5.1, + any.tasty-hunit ==0.10.0.2, + any.tasty-quickcheck ==0.10.1.1, + any.tasty-smallcheck ==0.8.1, + any.template-haskell ==2.16.0.0, + any.temporary ==1.3, + any.terminfo ==0.4.1.4, + any.text ==1.2.3.2, + any.tf-random ==0.5, + any.th-abstraction ==0.3.2.0, + any.th-lift ==0.8.2, + any.time ==1.9.3, + any.transformers ==0.5.6.2, + any.transformers-base ==0.4.5.2, + transformers-base +orphaninstances, + any.transformers-compat ==0.6.6, + transformers-compat -five +five-three -four +generic-deriving +mtl -three -two, + any.type-equality ==1, + any.unbounded-delays ==0.1.1.0, + any.uniplate ==1.6.12, + uniplate +separate_syb +typeable_fingerprint, + any.unix ==2.7.2.2, + any.unix-compat ==0.5.2, + unix-compat -old-time, + any.unliftio ==0.2.13, + any.unliftio-core ==0.2.0.1, + any.unordered-containers ==0.2.13.0, + unordered-containers -debug, + any.utf8-string ==1.0.1.1, + any.vector ==0.12.1.2, + vector +boundschecks -internalchecks -unsafechecks -wall, + any.vector-sized ==1.4.2, + any.versions ==3.5.4, + any.void ==0.7.3, + void -safe, + any.wcwidth ==0.0.2, + wcwidth -cli +split-base, + what4 -drealtestdisable -solvertests -stptestdisable, + any.xml ==1.3.14, + any.zenc ==0.1.1, + any.zlib ==0.6.2.2, + zlib -bundled-c-zlib -non-blocking-ffi -pkg-config, + any.zlib-bindings ==0.1.1.5 diff --git a/x86/src/Data/Macaw/X86/Getters.hs b/x86/src/Data/Macaw/X86/Getters.hs index ba60cce2..b536f83a 100644 --- a/x86/src/Data/Macaw/X86/Getters.hs +++ b/x86/src/Data/Macaw/X86/Getters.hs @@ -193,7 +193,6 @@ getBVAddress ar = F.DS -> pure offset F.FS -> (.+ offset) <$> evalArchFn ReadFSBase F.GS -> (.+ offset) <$> evalArchFn ReadGSBase - _ -> error "Unexpected segment" -- | Translate a flexdis address-refrence into a one-byte address. getBV8Addr :: F.AddrRef -> X86Generator st ids (Location (Addr ids) (BVType 8))