bindings-bfd 0.2.0 → 1.0.0
raw patch · 41 files changed
+1744/−810 lines, 41 filesdep ~arraydep ~containersdep ~unixPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: array, containers, unix
API changes (from Hackage documentation)
- Bindings.Bfd: getByteorder :: Bfd -> IO Endian
- Bindings.Bfd: getFlavour :: Bfd -> IO Flavour
- Bindings.Bfd: getHeaderByteorder :: Bfd -> IO Endian
- Bindings.Bfd: getObjectFlags :: Bfd -> IO [Flags]
- Bindings.Bfd: getSectionFlags :: Bfd -> IO [Flags]
- Bindings.Bfd: getTargetsAndFormats :: FilePath -> IO [(TargetName, Format)]
- Bindings.Bfd: init :: IO ()
- Bindings.Bfd: isBigEndian :: Bfd -> IO Bool
- Bindings.Bfd: isCoffFamily :: Bfd -> IO Bool
- Bindings.Bfd: isHeaderBigEndian :: Bfd -> IO Bool
- Bindings.Bfd: isHeaderLittleEndian :: Bfd -> IO Bool
- Bindings.Bfd: isLittleEndian :: Bfd -> IO Bool
- Bindings.Bfd: type Bfd = Ptr Bfd'
- Bindings.Bfd: type FileMode = String
- Bindings.Bfd.Disasm.I386.Insn: NoInsn :: Insn
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: EA :: String -> String -> Int -> EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: NoEA :: EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: base :: EffectiveAddr -> String
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: data EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: index :: EffectiveAddr -> String
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: instance Eq EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: instance Ord EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: instance Show EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr: scale :: EffectiveAddr -> Int
- Bindings.Bfd.Disasm.I386.Insn.Length: Length :: Int -> Length
- Bindings.Bfd.Disasm.I386.Insn.Length: Unavailable :: Length
- Bindings.Bfd.Disasm.I386.Insn.Length: data Length
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: Mnemonic :: String -> Mnemonic
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: instance Show Mnemonic
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: isBranch :: Mnemonic -> Bool
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: isCall :: Mnemonic -> Bool
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: isJump :: Mnemonic -> Bool
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: isReturn :: Mnemonic -> Bool
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: newtype Mnemonic
- Bindings.Bfd.Disasm.I386.Insn.Mnemonic: un :: Mnemonic -> String
- Bindings.Bfd.Disasm.I386.Insn.Operand: Abs :: Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: AbsSymL :: String -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: AbsSymT :: Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: DirD :: String -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: DirJ :: String -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: Imm :: Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: ImmSym :: Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: IndD :: String -> EffectiveAddr -> Maybe Int -> Maybe Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: IndDSym :: EffectiveAddr -> Int -> Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: IndJ :: EffectiveAddr -> Maybe Int -> Maybe Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: IndJSym :: EffectiveAddr -> Int -> Int -> Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: absolute :: Operand -> Int
- Bindings.Bfd.Disasm.I386.Insn.Operand: addend :: Operand -> Int
- Bindings.Bfd.Disasm.I386.Insn.Operand: address :: Operand -> Maybe Int
- Bindings.Bfd.Disasm.I386.Insn.Operand: data Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: direct :: Operand -> String
- Bindings.Bfd.Disasm.I386.Insn.Operand: displacement :: Operand -> Maybe Int
- Bindings.Bfd.Disasm.I386.Insn.Operand: effAddr :: Operand -> EffectiveAddr
- Bindings.Bfd.Disasm.I386.Insn.Operand: immed :: Operand -> Int
- Bindings.Bfd.Disasm.I386.Insn.Operand: instance Eq Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: instance Ord Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: instance Show Operand
- Bindings.Bfd.Disasm.I386.Insn.Operand: isAbs :: Operand -> Bool
- Bindings.Bfd.Disasm.I386.Insn.Operand: section :: Operand -> String
- Bindings.Bfd.Disasm.I386.Insn.Operand: symbol :: Operand -> String
- Bindings.Bfd.Disasm.I386.Insn.Operand: symbolIndex :: Operand -> Int
- Bindings.Bfd.Disasm.I386.Insn.Prefix: Prefix :: String -> Prefix
- Bindings.Bfd.Disasm.I386.Insn.Prefix: instance Show Prefix
- Bindings.Bfd.Disasm.I386.Insn.Prefix: newtype Prefix
- Bindings.Bfd.Disasm.I386.Insn.Prefix: un :: Prefix -> String
- Bindings.Bfd.Symbol.Flags: NoFlags :: Flags
- Bindings.Bfd.Target: list :: IO [TargetName]
+ Bindings.Bfd: closeAllDone :: Bfd -> IO Bool
+ Bindings.Bfd: data Bfd
+ Bindings.Bfd: demangle :: Bfd -> String -> IO String
+ Bindings.Bfd: getHasMap :: Bfd -> IO Bool
+ Bindings.Bfd: getIsCacheable :: Bfd -> IO Bool
+ Bindings.Bfd: getIsTargetDefaulted :: Bfd -> IO Bool
+ Bindings.Bfd: getIsThinArchive :: Bfd -> IO Bool
+ Bindings.Bfd: getSectionByVma :: Bfd -> Int -> IO (Maybe Section)
+ Bindings.Bfd: getSectionCount :: Bfd -> IO Int
+ Bindings.Bfd: getStartAddress :: Bfd -> IO Vma
+ Bindings.Bfd: getSymbolCount :: Bfd -> IO Int
+ Bindings.Bfd: initialize :: IO ()
+ Bindings.Bfd: instance Show Bfd
+ Bindings.Bfd: mk :: Ptr Bfd' -> Bfd
+ Bindings.Bfd: targetsAndFormats :: FilePath -> IO [(TargetName, Format)]
+ Bindings.Bfd.Disasm.I386.Address: isSymbolic :: Address -> Bool
+ Bindings.Bfd.Disasm.I386.Address: type Address = Either Int Symbol
+ Bindings.Bfd.Disasm.I386.CondCode: Above :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: AboveOrEqual :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Below :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: BelowOrEqual :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Equal :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Greater :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: GreaterOrEqual :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Less :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: LessOrEqual :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: NotEqual :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: NotSigned :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Parity :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Signed :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: Zero :: CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: data CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: instance Show CondCode
+ Bindings.Bfd.Disasm.I386.CondCode: toCondCode :: String -> Maybe CondCode
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: EA :: String -> String -> Int -> EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: NoEA :: EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: base :: EffectiveAddr -> String
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: data EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: index :: EffectiveAddr -> String
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: instance Eq EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: instance Ord EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: instance Show EffectiveAddr
+ Bindings.Bfd.Disasm.I386.EffectiveAddr: scale :: EffectiveAddr -> Int
+ Bindings.Bfd.Disasm.I386.Insn: Extern :: String -> Insn
+ Bindings.Bfd.Disasm.I386.Insn: symbol :: Insn -> String
+ Bindings.Bfd.Disasm.I386.Mnemonic: Add :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: AddCarry :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: AddScalar :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: BitwiseAnd :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: BitwiseExclOr :: XmmType -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: BitwiseNot :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: BitwiseOr :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Branch :: CondCode -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Call :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Compare :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: CompareExchange :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: CompareString :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: CompareUnordered :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Convert :: Int -> Int -> Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: ConvertXmm :: Int -> XmmType -> XmmType -> Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Cpuid :: Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Decrement :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Direction :: Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Divide :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: DivideInt :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: DivideScalar :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Exchange :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: ExchangeAdd :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Increment :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Jump :: Maybe Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Leave :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: LoadEffAddr :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Loop :: Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Move :: Int -> Maybe (Int, Bool) -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveAligned :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveCond :: Int -> CondCode -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveNonTemp :: Either Int XmmType -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MovePacked :: Precision -> Bool -> Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveScalar :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveString :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MoveUnaligned :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Multiply :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MultiplyInt :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: MultiplyScalar :: XmmType -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Negate :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: NoOp :: Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Pop :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Push :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Return :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Rotate :: Int -> Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Set :: CondCode -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Shift :: Int -> Bool -> Bool -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: StoreString :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Subtract :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: SubtractBorrow :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: SubtractScalar :: Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Test :: Int -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: Unpack :: Order -> Precision -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: condCode :: Mnemonic -> CondCode
+ Bindings.Bfd.Disasm.I386.Mnemonic: data Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: instance Show Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: isArith :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isBranch :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isCall :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isHigh1 :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isHigh2 :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isJump :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isReturn :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isRight :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isSet :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isSplit :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: isTruncate :: Mnemonic -> Bool
+ Bindings.Bfd.Disasm.I386.Mnemonic: mbWidth :: Mnemonic -> Maybe Int
+ Bindings.Bfd.Disasm.I386.Mnemonic: mbWidthSignExtend :: Mnemonic -> Maybe (Int, Bool)
+ Bindings.Bfd.Disasm.I386.Mnemonic: numElems :: Mnemonic -> Int
+ Bindings.Bfd.Disasm.I386.Mnemonic: order :: Mnemonic -> Order
+ Bindings.Bfd.Disasm.I386.Mnemonic: precision :: Mnemonic -> Precision
+ Bindings.Bfd.Disasm.I386.Mnemonic: sourceXmmType :: Mnemonic -> XmmType
+ Bindings.Bfd.Disasm.I386.Mnemonic: targetXmmType :: Mnemonic -> XmmType
+ Bindings.Bfd.Disasm.I386.Mnemonic: toMnemonic :: String -> Mnemonic
+ Bindings.Bfd.Disasm.I386.Mnemonic: width1 :: Mnemonic -> Int
+ Bindings.Bfd.Disasm.I386.Mnemonic: width2 :: Mnemonic -> Int
+ Bindings.Bfd.Disasm.I386.Mnemonic: xmmType :: Mnemonic -> XmmType
+ Bindings.Bfd.Disasm.I386.Mnemonic: xmmType2 :: Mnemonic -> Either Int XmmType
+ Bindings.Bfd.Disasm.I386.Operand: Abs :: Address -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: DirD :: String -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: DirJ :: String -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: Imm :: Int -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: IndD :: String -> EffectiveAddr -> Maybe Int -> Maybe Address -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: IndJ :: EffectiveAddr -> Maybe Int -> Maybe Address -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: Length :: Int -> Operand
+ Bindings.Bfd.Disasm.I386.Operand: address :: Operand -> Address
+ Bindings.Bfd.Disasm.I386.Operand: data Operand
+ Bindings.Bfd.Disasm.I386.Operand: direct :: Operand -> String
+ Bindings.Bfd.Disasm.I386.Operand: displacement :: Operand -> Maybe Int
+ Bindings.Bfd.Disasm.I386.Operand: effAddr :: Operand -> EffectiveAddr
+ Bindings.Bfd.Disasm.I386.Operand: immed :: Operand -> Int
+ Bindings.Bfd.Disasm.I386.Operand: instance Eq Operand
+ Bindings.Bfd.Disasm.I386.Operand: instance Ord Operand
+ Bindings.Bfd.Disasm.I386.Operand: instance Show Operand
+ Bindings.Bfd.Disasm.I386.Operand: isAbs :: Operand -> Bool
+ Bindings.Bfd.Disasm.I386.Operand: isDirJ :: Operand -> Bool
+ Bindings.Bfd.Disasm.I386.Operand: isIndJ :: Operand -> Bool
+ Bindings.Bfd.Disasm.I386.Operand: len :: Operand -> Int
+ Bindings.Bfd.Disasm.I386.Operand: mbAddress :: Operand -> Maybe Address
+ Bindings.Bfd.Disasm.I386.Operand: section :: Operand -> String
+ Bindings.Bfd.Disasm.I386.Order: High :: Order
+ Bindings.Bfd.Disasm.I386.Order: Low :: Order
+ Bindings.Bfd.Disasm.I386.Order: data Order
+ Bindings.Bfd.Disasm.I386.Order: instance Show Order
+ Bindings.Bfd.Disasm.I386.Precision: Double :: Precision
+ Bindings.Bfd.Disasm.I386.Precision: Single :: Precision
+ Bindings.Bfd.Disasm.I386.Precision: data Precision
+ Bindings.Bfd.Disasm.I386.Precision: instance Show Precision
+ Bindings.Bfd.Disasm.I386.Prefix: Lock :: Prefix
+ Bindings.Bfd.Disasm.I386.Prefix: Repeat :: Maybe CondCode -> Prefix
+ Bindings.Bfd.Disasm.I386.Prefix: condCode :: Prefix -> Maybe CondCode
+ Bindings.Bfd.Disasm.I386.Prefix: data Prefix
+ Bindings.Bfd.Disasm.I386.Prefix: instance Show Prefix
+ Bindings.Bfd.Disasm.I386.Prefix: toPrefix :: String -> Maybe Prefix
+ Bindings.Bfd.Disasm.I386.Term: Add :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: BitAnd :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: BitExclOr :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: BitOr :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: BitTest :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: Con :: Int -> Term
+ Bindings.Bfd.Disasm.I386.Term: Flag :: Char -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: Flg :: Char -> Term
+ Bindings.Bfd.Disasm.I386.Term: GreaterOrEqual :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: If :: Term -> Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: Nul :: Term
+ Bindings.Bfd.Disasm.I386.Term: Opr :: Int -> Operand -> Term
+ Bindings.Bfd.Disasm.I386.Term: Reg :: String -> Term
+ Bindings.Bfd.Disasm.I386.Term: Stk :: Int -> Int -> Term
+ Bindings.Bfd.Disasm.I386.Term: Subtract :: Term -> Term -> Term
+ Bindings.Bfd.Disasm.I386.Term: Todo :: Term
+ Bindings.Bfd.Disasm.I386.Term: Udf :: Term
+ Bindings.Bfd.Disasm.I386.Term: data Term
+ Bindings.Bfd.Disasm.I386.Term: instance Show Term
+ Bindings.Bfd.Disasm.I386.Term: type Assign = (Term, Term)
+ Bindings.Bfd.Disasm.I386.XmmType: FloatingPt :: Precision -> XmmType
+ Bindings.Bfd.Disasm.I386.XmmType: Int :: Int -> XmmType
+ Bindings.Bfd.Disasm.I386.XmmType: data XmmType
+ Bindings.Bfd.Disasm.I386.XmmType: instance Show XmmType
+ Bindings.Bfd.Disasm.I386.XmmType: precision :: XmmType -> Precision
+ Bindings.Bfd.Disasm.I386.XmmType: width :: XmmType -> Int
+ Bindings.Bfd.Disasm.Info: instance Show Info
+ Bindings.Bfd.Section: externsName :: String
+ Bindings.Bfd.Target: isBigEndian :: Target -> IO Bool
+ Bindings.Bfd.Target: isCoffFamily :: Target -> IO Bool
+ Bindings.Bfd.Target: isHeaderBigEndian :: Target -> IO Bool
+ Bindings.Bfd.Target: isHeaderLittleEndian :: Target -> IO Bool
+ Bindings.Bfd.Target: isLittleEndian :: Target -> IO Bool
+ Bindings.Bfd.Target: listSupported :: IO [TargetName]
- Bindings.Bfd: getFilename :: Bfd -> IO String
+ Bindings.Bfd: getFilename :: Bfd -> IO FilePath
- Bindings.Bfd: open :: FilePath -> Maybe TargetName -> FileMode -> IO Bfd
+ Bindings.Bfd: open :: FilePath -> Maybe TargetName -> String -> IO Bfd
- Bindings.Bfd.Disasm.I386.Insn: Insn :: Prefix -> Mnemonic -> [Operand] -> Insn
+ Bindings.Bfd.Disasm.I386.Insn: Insn :: Maybe Prefix -> Mnemonic -> [Operand] -> Insn
- Bindings.Bfd.Disasm.I386.Insn: prefix :: Insn -> Prefix
+ Bindings.Bfd.Disasm.I386.Insn: prefix :: Insn -> Maybe Prefix
- Bindings.Bfd.Disasm.I386.Parse: happyIn6 :: (Maybe Int) -> (HappyAbsSyn)
+ Bindings.Bfd.Disasm.I386.Parse: happyIn6 :: (Maybe Address) -> (HappyAbsSyn)
- Bindings.Bfd.Disasm.I386.Parse: happyOut6 :: (HappyAbsSyn) -> (Maybe Int)
+ Bindings.Bfd.Disasm.I386.Parse: happyOut6 :: (HappyAbsSyn) -> (Maybe Address)
- Bindings.Bfd.Exception: InvalidOperation :: BfdException
+ Bindings.Bfd.Exception: InvalidOperation :: String -> String -> String -> BfdException
- Bindings.Bfd.SymbolTable: resolveExterns :: SymbolTable -> [(Section, Vma)] -> IO SymbolTable
+ Bindings.Bfd.SymbolTable: resolveExterns :: SymbolTable -> Bfd -> IO (SymbolTable, Section, IntMap Insn)
Files
- TODO +12/−0
- bindings-bfd.cabal +30/−20
- dist/build/Bindings/Bfd/Disasm/I386/Lex.hs +28/−28
- dist/build/Bindings/Bfd/Disasm/I386/Parse.hs +49/−47
- src/Bindings/Bfd.hs-boot +22/−7
- src/Bindings/Bfd.hsc +413/−260
- src/Bindings/Bfd/Disasm/I386/Address.hs +13/−0
- src/Bindings/Bfd/Disasm/I386/CondCode.hs +26/−0
- src/Bindings/Bfd/Disasm/I386/EffectiveAddr.hs +10/−0
- src/Bindings/Bfd/Disasm/I386/Insn.hs +8/−5
- src/Bindings/Bfd/Disasm/I386/Insn/EffectiveAddr.hs +0/−10
- src/Bindings/Bfd/Disasm/I386/Insn/Length.hs +0/−5
- src/Bindings/Bfd/Disasm/I386/Insn/Mnemonic.hs +0/−33
- src/Bindings/Bfd/Disasm/I386/Insn/Operand.hs +0/−57
- src/Bindings/Bfd/Disasm/I386/Insn/Prefix.hs +0/−11
- src/Bindings/Bfd/Disasm/I386/Lex.x +1/−0
- src/Bindings/Bfd/Disasm/I386/Mnemonic.hs +366/−0
- src/Bindings/Bfd/Disasm/I386/Operand.hs +53/−0
- src/Bindings/Bfd/Disasm/I386/Order.hs +6/−0
- src/Bindings/Bfd/Disasm/I386/Parse.y +29/−28
- src/Bindings/Bfd/Disasm/I386/Precision.hs +6/−0
- src/Bindings/Bfd/Disasm/I386/Prefix.hs +20/−0
- src/Bindings/Bfd/Disasm/I386/Term.hs +29/−0
- src/Bindings/Bfd/Disasm/I386/XmmType.hs +12/−0
- src/Bindings/Bfd/Disasm/Info.hsc +1/−1
- src/Bindings/Bfd/Exception.hs +6/−6
- src/Bindings/Bfd/Format.hs +10/−6
- src/Bindings/Bfd/Section.hs-boot +12/−0
- src/Bindings/Bfd/Section.hsc +120/−74
- src/Bindings/Bfd/Symbol.hsc +84/−52
- src/Bindings/Bfd/Symbol/Flags.hs +1/−2
- src/Bindings/Bfd/SymbolTable.hs +46/−40
- src/Bindings/Bfd/Target.hsc +122/−47
- src/cbits/bfd.c +46/−0
- src/cbits/bfd.h +32/−0
- src/cbits/disasm.c +48/−0
- src/cbits/disasm.h +27/−0
- src/cbits/disassembler.c +0/−48
- src/cbits/disassembler.h +0/−23
- src/cbits/section.c +29/−0
- src/cbits/section.h +27/−0
+ TODO view
@@ -0,0 +1,12 @@+High Priority+-------------++- complete each module's exports section+- document code+++Low Priority+------------++- go through code and fix any memory/space leaks+- declare imported varids and types
bindings-bfd.cabal view
@@ -1,39 +1,47 @@ name: bindings-bfd-version: 0.2.0+version: 1.0.0 cabal-version: >= 1.4 build-type: Simple license: LGPL-3 license-file: LICENSE-copyright: (c) 2009, 2010 Michael Nelson-author: Michael Nelson+copyright: (c) 2009,2010,2011 Mick Nelso+author: Mick Nelso maintainer: mcnster@gmail.com stability: alpha homepage: http://projects.haskell.org/bindings-bfd/ bug-reports: mailto:mcnster@gmail.com package-url: darcs://code.haskell.org/bindings-bfd-synopsis: Bindings for libbfd, a component of the GNU `binutils'-description: These are bindings for `libbfd', a component of the GNU- `binutils' package. The bindings lets a Haskell program+synopsis: Bindings for libbfd, a library of the GNU `binutils'+description: These are bindings for `libbfd', a library of the GNU+ `binutils' package. The bindings let a Haskell program query the structure of any executable, object, or - library file format supported by the GNU Project.+ library file format supported by the GNU Project (alot). It also has support for disassembly of code in these- files where appropriate.-category: FFI-tested-with: GHC==6.12.3+ files where available.+category: FFI, Development+tested-with: GHC==7.0.3 extra-source-files: README, LICENSE,- src/cbits/disassembler.h+ TODO,+ src/cbits/bfd.h,+ src/cbits/disasm.h,+ src/cbits/section.h library exposed-modules: Bindings.Bfd Bindings.Bfd.Disasm+ Bindings.Bfd.Disasm.I386.Address+ Bindings.Bfd.Disasm.I386.CondCode+ Bindings.Bfd.Disasm.I386.EffectiveAddr Bindings.Bfd.Disasm.I386.Insn- Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr- Bindings.Bfd.Disasm.I386.Insn.Length- Bindings.Bfd.Disasm.I386.Insn.Mnemonic- Bindings.Bfd.Disasm.I386.Insn.Operand- Bindings.Bfd.Disasm.I386.Insn.Prefix Bindings.Bfd.Disasm.I386.Lex+ Bindings.Bfd.Disasm.I386.Mnemonic+ Bindings.Bfd.Disasm.I386.Operand+ Bindings.Bfd.Disasm.I386.Order Bindings.Bfd.Disasm.I386.Parse+ Bindings.Bfd.Disasm.I386.Precision+ Bindings.Bfd.Disasm.I386.Prefix+ Bindings.Bfd.Disasm.I386.Term+ Bindings.Bfd.Disasm.I386.XmmType Bindings.Bfd.Disasm.Info Bindings.Bfd.Exception Bindings.Bfd.Endian@@ -50,10 +58,10 @@ Bindings.Bfd.Symbol.Flags Bindings.Bfd.SymbolTable Bindings.Bfd.Target- build-depends: array >= 0.3,+ build-depends: array >= 0.3 && < 1, base >= 4.1.0.0 && < 5,- containers >= 0.2.0.1,- unix >= 2.3.2.0+ containers >= 0.2.0.1 && < 1,+ unix >= 2.3.2.0 && < 3 hs-source-dirs: src extensions: CPP, ForeignFunctionInterface@@ -65,7 +73,9 @@ dis-asm.h, stdarg.h, stdio.h- c-sources: src/cbits/disassembler.c+ c-sources: src/cbits/bfd.c,+ src/cbits/disasm.c,+ src/cbits/section.c extra-libraries: bfd, opcodes
dist/build/Bindings/Bfd/Disasm/I386/Lex.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS -fglasgow-exts -cpp #-}+{-# LANGUAGE CPP,MagicHash #-} {-# LINE 1 "src/Bindings/Bfd/Disasm/I386/Lex.x" #-} module Bindings.Bfd.Disasm.I386.Lex (@@ -120,19 +120,19 @@ -- For compatibility with previous versions of Alex, and because we can. alex_base :: AlexAddr-alex_base = AlexA# "\xf6\xff\xff\xff\xfc\xff\xff\xff\xda\xff\xff\xff\x13\x00\x00\x00\x5e\x00\x00\x00\x6a\x00\x00\x00\xd4\xff\xff\xff\x8d\xff\xff\xff\x84\x00\x00\x00\xd1\x00\x00\x00\xeb\x00\x00\x00\xf5\x00\x00\x00\xd6\xff\xff\xff\x9c\xff\xff\xff\x2c\x01\x00\x00\x36\x01\x00\x00\xe5\xff\xff\xff\x9f\xff\xff\xff\x40\x01\x00\x00\x8b\x01\x00\x00\xa5\x01\x00\x00\xf2\x01\x00\x00\x0c\x02\x00\x00\x67\x02\x00\x00\x81\x02\x00\x00\xcc\x02\x00\x00\xe6\x02\x00\x00\x33\x03\x00\x00\x4d\x03\x00\x00\x98\x03\x00\x00\xb2\x03\x00\x00\x0d\x04\x00\x00\x27\x04\x00\x00\x72\x04\x00\x00\x8c\x04\x00\x00\xe7\x04\x00\x00\x01\x05\x00\x00\x4c\x05\x00\x00\x66\x05\x00\x00\xc1\x05\x00\x00\xf8\xff\xff\xff\xc5\xff\xff\xff\x00\x00\x00\x00\xbf\xff\xff\xff\xc3\xff\xff\xff\xc1\xff\xff\xff\x08\x00\x00\x00\x00\x00\x00\x00\x09\x00\x00\x00\x1d\x00\x00\x00\xdb\x05\x00\x00\x26\x06\x00\x00\x40\x06\x00\x00\x00\x00\x00\x00\xc0\xff\xff\xff\x00\x00\x00\x00\xd3\xff\xff\xff\xd5\xff\xff\xff\xde\xff\xff\xff\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#+alex_base = AlexA# "\xf6\xff\xff\xff\xfc\xff\xff\xff\x00\x00\x00\x00\xdc\xff\xff\xff\x43\x00\x00\x00\x5d\x00\x00\x00\xaa\x00\x00\x00\xc4\x00\x00\x00\x1f\x01\x00\x00\x10\x01\x00\x00\x6c\x01\x00\x00\x86\x01\x00\x00\x92\x01\x00\x00\xd4\xff\xff\xff\x8d\xff\xff\xff\xdf\x01\x00\x00\xf9\x01\x00\x00\x44\x02\x00\x00\x4e\x02\x00\x00\xd6\xff\xff\xff\x93\xff\xff\xff\x58\x02\x00\x00\x62\x02\x00\x00\xe7\xff\xff\xff\xa0\xff\xff\xff\x99\x02\x00\x00\xb3\x02\x00\x00\x00\x03\x00\x00\x1a\x03\x00\x00\x67\x03\x00\x00\x81\x03\x00\x00\xcc\x03\x00\x00\xe6\x03\x00\x00\x33\x04\x00\x00\x4d\x04\x00\x00\xa8\x04\x00\x00\xc2\x04\x00\x00\x0d\x05\x00\x00\x27\x05\x00\x00\x72\x05\x00\x00\x8c\x05\x00\x00\xd9\x05\x00\x00\xf3\x05\x00\x00\x3e\x06\x00\x00\x58\x06\x00\x00\xab\x06\x00\x00\xc5\x06\x00\x00\xfd\xff\xff\xff\xc9\xff\xff\xff\x00\x00\x00\x00\xc2\xff\xff\xff\xc4\xff\xff\xff\xcd\xff\xff\xff\x09\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x00\x00\x4d\x00\x00\x00\x18\x07\x00\x00\x32\x07\x00\x00\x7f\x07\x00\x00\x00\x00\x00\x00\xc3\xff\xff\xff\x00\x00\x00\x00\xd3\xff\xff\xff\xd7\xff\xff\xff\xd5\xff\xff\xff\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# alex_table :: AlexAddr-alex_table = AlexA# "\x00\x00\x01\x00\x01\x00\x01\x00\x07\x00\x04\x00\x0d\x00\x01\x00\x01\x00\x01\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x0b\x00\x11\x00\x01\x00\x0f\x00\x25\x00\x3f\x00\x0c\x00\x33\x00\x01\x00\x28\x00\x38\x00\x3c\x00\x40\x00\x2c\x00\x3d\x00\x06\x00\x2d\x00\x2e\x00\x08\x00\x09\x00\x09\x00\x34\x00\x09\x00\x34\x00\x34\x00\x34\x00\x09\x00\x34\x00\x3e\x00\x2a\x00\x2f\x00\x35\x00\x10\x00\x39\x00\x3a\x00\x37\x00\x35\x00\x00\x00\x00\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x36\x00\x3b\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x30\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x14\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x1a\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x36\x00\x00\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x03\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x05\x00\x34\x00\x34\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x15\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x16\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x17\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x18\x00\x34\x00\x34\x00\x34\x00\x34\x00\x1b\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x1c\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x27\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x22\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x1f\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x20\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x23\x00\x21\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x26\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x00\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x32\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#+alex_table = AlexA# "\x00\x00\x01\x00\x01\x00\x01\x00\x0e\x00\x0b\x00\x14\x00\x01\x00\x01\x00\x01\x00\x3d\x00\x12\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x01\x00\x18\x00\x16\x00\x46\x00\x13\x00\x3a\x00\x01\x00\x2c\x00\x3f\x00\x43\x00\x47\x00\x2f\x00\x44\x00\x0d\x00\x33\x00\x34\x00\x0f\x00\x10\x00\x10\x00\x3b\x00\x10\x00\x3b\x00\x3b\x00\x3b\x00\x10\x00\x3b\x00\x45\x00\x35\x00\x31\x00\x36\x00\x17\x00\x40\x00\x3c\x00\x3e\x00\x41\x00\x42\x00\x00\x00\x00\x00\x3c\x00\x04\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x03\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x21\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x37\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x05\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x06\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x07\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x08\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x02\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3d\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x3d\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x0a\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x0c\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x15\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x19\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1c\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1d\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1e\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x1f\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x22\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x23\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x2e\x00\x3b\x00\x3b\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x29\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x26\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x24\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x28\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x2a\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x32\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x2b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x39\x00\x3d\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"# alex_check :: AlexAddr-alex_check = AlexA# "\xff\xff\x0b\x00\x0c\x00\x0d\x00\x30\x00\x78\x00\x30\x00\x0b\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x78\x00\x30\x00\x20\x00\x78\x00\x20\x00\x23\x00\x24\x00\x25\x00\x20\x00\x58\x00\x28\x00\x29\x00\x2a\x00\x62\x00\x2c\x00\x2d\x00\x61\x00\x64\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x29\x00\x29\x00\x73\x00\x3e\x00\x62\x00\x61\x00\x29\x00\x73\x00\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x2e\x00\x64\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#+alex_check = AlexA# "\xff\xff\x0b\x00\x0c\x00\x0d\x00\x30\x00\x78\x00\x30\x00\x0b\x00\x0c\x00\x0d\x00\x2e\x00\x78\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\x30\x00\x78\x00\x23\x00\x24\x00\x25\x00\x20\x00\x20\x00\x28\x00\x29\x00\x2a\x00\x58\x00\x2c\x00\x2d\x00\x62\x00\x61\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x64\x00\x29\x00\x29\x00\x3e\x00\x62\x00\x73\x00\x29\x00\x61\x00\x64\x00\xff\xff\xff\xff\x73\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# alex_deflt :: AlexAddr-alex_deflt = AlexA# "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#+alex_deflt = AlexA# "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"# -alex_accept = listArray (0::Int,64) [[],[(AlexAccSkip)],[(AlexAcc (alex_action_1))],[(AlexAcc (alex_action_1))],[],[(AlexAcc (alex_action_13))],[],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_2))],[(AlexAcc (alex_action_3))],[],[],[],[(AlexAcc (alex_action_4))],[],[],[],[(AlexAcc (alex_action_5))],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_6))],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_7))],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_8))],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_9))],[],[],[(AlexAcc (alex_action_13))],[],[],[(AlexAcc (alex_action_10))],[],[],[],[],[(AlexAcc (alex_action_11))],[],[],[(AlexAcc (alex_action_12))],[],[(AlexAcc (alex_action_13))],[(AlexAcc (alex_action_13))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_15))],[],[],[],[(AlexAcc (alex_action_16))],[(AlexAcc (alex_action_17))],[(AlexAcc (alex_action_18))],[(AlexAcc (alex_action_19))],[(AlexAcc (alex_action_20))]]-{-# LINE 41 "src/Bindings/Bfd/Disasm/I386/Lex.x" #-}+alex_accept = listArray (0::Int,71) [[],[(AlexAccSkip)],[(AlexAccSkip)],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_2))],[(AlexAcc (alex_action_2))],[],[(AlexAcc (alex_action_14))],[],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_3))],[(AlexAcc (alex_action_4))],[],[],[],[(AlexAcc (alex_action_5))],[],[],[],[(AlexAcc (alex_action_6))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_7))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_8))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_9))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_10))],[],[],[(AlexAcc (alex_action_14))],[],[],[(AlexAcc (alex_action_11))],[],[],[],[],[(AlexAcc (alex_action_12))],[],[],[(AlexAcc (alex_action_13))],[],[(AlexAcc (alex_action_14))],[(AlexAcc (alex_action_14))],[],[(AlexAcc (alex_action_15))],[(AlexAcc (alex_action_16))],[],[],[],[(AlexAcc (alex_action_17))],[(AlexAcc (alex_action_18))],[(AlexAcc (alex_action_19))],[(AlexAcc (alex_action_20))],[(AlexAcc (alex_action_21))]]+{-# LINE 42 "src/Bindings/Bfd/Disasm/I386/Lex.x" #-} data Token = Offset Int | Constant Int@@ -167,26 +167,26 @@ lexer = alexScanTokens -alex_action_1 = offset alex_action_2 = offset -alex_action_3 = constant -alex_action_4 = address -alex_action_5 = prefixedMnemonic +alex_action_3 = offset +alex_action_4 = constant +alex_action_5 = address alex_action_6 = prefixedMnemonic alex_action_7 = prefixedMnemonic alex_action_8 = prefixedMnemonic alex_action_9 = prefixedMnemonic alex_action_10 = prefixedMnemonic -alex_action_11 = register +alex_action_11 = prefixedMnemonic alex_action_12 = register -alex_action_13 = mnemonic +alex_action_13 = register alex_action_14 = mnemonic -alex_action_15 = parensL -alex_action_16 = parensR -alex_action_17 = comma -alex_action_18 = colon -alex_action_19 = hash -alex_action_20 = star +alex_action_15 = mnemonic +alex_action_16 = parensL +alex_action_17 = parensR +alex_action_18 = comma +alex_action_19 = colon +alex_action_20 = hash +alex_action_21 = star {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "templates/GenericTemplate.hs" #-} {-# LINE 1 "<built-in>" #-}@@ -217,10 +217,10 @@ #ifdef WORDS_BIGENDIAN narrow16Int# i where- i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)- high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))- low = int2Word# (ord# (indexCharOffAddr# arr off'))- off' = off *# 2#+ i = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)+ high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))+ low = int2Word# (ord# (indexCharOffAddr# arr off'))+ off' = off *# 2# #else indexInt16OffAddr# arr off #endif@@ -317,12 +317,12 @@ let- !(base) = alexIndexInt32OffAddr alex_base s- !((I# (ord_c))) = ord c- !(offset) = (base +# ord_c)- !(check) = alexIndexInt16OffAddr alex_check offset+ (base) = alexIndexInt32OffAddr alex_base s+ ((I# (ord_c))) = ord c+ (offset) = (base +# ord_c)+ (check) = alexIndexInt16OffAddr alex_check offset - !(new_s) = if (offset >=# 0#) && (check ==# ord_c)+ (new_s) = if (offset >=# 0#) && (check ==# ord_c) then alexIndexInt16OffAddr alex_table offset else alexIndexInt16OffAddr alex_deflt s in
dist/build/Bindings/Bfd/Disasm/I386/Parse.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS_GHC -fno-warn-overlapping-patterns #-}+{-# OPTIONS_GHC -w #-} {-# OPTIONS -fglasgow-exts -cpp #-} module Bindings.Bfd.Disasm.I386.Parse where @@ -8,16 +8,17 @@ import Data.Maybe import Data.Word -import Bindings.Bfd.Disasm.I386.Lex as L-import Bindings.Bfd.Disasm.I386.Insn-import Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr-import Bindings.Bfd.Disasm.I386.Insn.Mnemonic as R-import Bindings.Bfd.Disasm.I386.Insn.Operand as O-import Bindings.Bfd.Disasm.I386.Insn.Prefix+import Bindings.Bfd.Disasm.I386.Address+import Bindings.Bfd.Disasm.I386.EffectiveAddr+import Bindings.Bfd.Disasm.I386.Insn as I+import Bindings.Bfd.Disasm.I386.Lex as L+import Bindings.Bfd.Disasm.I386.Mnemonic as R+import Bindings.Bfd.Disasm.I386.Operand as O+import Bindings.Bfd.Disasm.I386.Prefix import qualified Data.Array as Happy_Data_Array import qualified GHC.Exts as Happy_GHC_Exts --- parser produced by Happy Version 1.18.5+-- parser produced by Happy Version 1.18.6 newtype HappyAbsSyn = HappyAbsSyn HappyAny #if __GLASGOW_HASKELL__ >= 607@@ -37,10 +38,10 @@ happyOut5 :: (HappyAbsSyn ) -> ([Operand]) happyOut5 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut5 #-}-happyIn6 :: (Maybe Int) -> (HappyAbsSyn )+happyIn6 :: (Maybe Address) -> (HappyAbsSyn ) happyIn6 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyIn6 #-}-happyOut6 :: (HappyAbsSyn ) -> (Maybe Int)+happyOut6 :: (HappyAbsSyn ) -> (Maybe Address) happyOut6 x = Happy_GHC_Exts.unsafeCoerce# x {-# INLINE happyOut6 #-} happyIn7 :: (Operand) -> (HappyAbsSyn )@@ -159,7 +160,7 @@ = case happyOutTok happy_x_1 of { (PrefixedMnemonic happy_var_1) -> case happyOut5 happy_x_2 of { happy_var_2 -> happyIn4- (Insn (Prefix $ head happy_var_1) (R.Mnemonic $ head $ tail happy_var_1) happy_var_2+ (Insn (toPrefix $ head happy_var_1) (toMnemonic $ head $ tail happy_var_1) happy_var_2 )}} happyReduce_2 = happySpecReduce_2 0# happyReduction_2@@ -168,40 +169,40 @@ = case happyOutTok happy_x_1 of { (L.Mnemonic happy_var_1) -> case happyOut5 happy_x_2 of { happy_var_2 -> happyIn4- (Insn (Prefix "" ) (R.Mnemonic happy_var_1) happy_var_2+ (Insn (Nothing ) (toMnemonic happy_var_1) happy_var_2 )}} happyReduce_3 = happySpecReduce_0 1# happyReduction_3 happyReduction_3 = happyIn5- ([ ]+ ([ ] ) happyReduce_4 = happySpecReduce_1 1# happyReduction_4 happyReduction_4 happy_x_1 = case happyOut7 happy_x_1 of { happy_var_1 -> happyIn5- ([happy_var_1 ]+ ([happy_var_1 ] )} happyReduce_5 = happySpecReduce_1 1# happyReduction_5 happyReduction_5 happy_x_1 = case happyOut8 happy_x_1 of { happy_var_1 -> happyIn5- ([happy_var_1 ]+ ([happy_var_1 ] )} happyReduce_6 = happySpecReduce_1 1# happyReduction_6 happyReduction_6 happy_x_1 = case happyOut9 happy_x_1 of { happy_var_1 -> happyIn5- ([happy_var_1 ]+ ([happy_var_1 ] )} happyReduce_7 = happySpecReduce_1 1# happyReduction_7 happyReduction_7 happy_x_1 = case happyOut10 happy_x_1 of { happy_var_1 -> happyIn5- ([happy_var_1 ]+ ([happy_var_1 ] )} happyReduce_8 = happySpecReduce_2 1# happyReduction_8@@ -210,7 +211,7 @@ = case happyOut11 happy_x_1 of { happy_var_1 -> case happyOut6 happy_x_2 of { happy_var_2 -> happyIn5- ([happy_var_1 { O.address = happy_var_2 } ]+ ([happy_var_1 { O.mbAddress = happy_var_2 } ] )}} happyReduce_9 = happySpecReduce_2 1# happyReduction_9@@ -219,7 +220,7 @@ = case happyOut12 happy_x_1 of { happy_var_1 -> case happyOut6 happy_x_2 of { happy_var_2 -> happyIn5- ([happy_var_1 { O.address = happy_var_2 } ]+ ([happy_var_1 { O.mbAddress = happy_var_2 } ] )}} happyReduce_10 = happySpecReduce_3 1# happyReduction_10@@ -229,7 +230,7 @@ = case happyOut9 happy_x_1 of { happy_var_1 -> case happyOut9 happy_x_3 of { happy_var_3 -> happyIn5- ([happy_var_1 , happy_var_3 ]+ ([happy_var_1 , happy_var_3 ] )}} happyReduce_11 = happyReduce 4# 1# happyReduction_11@@ -242,7 +243,7 @@ case happyOut11 happy_x_3 of { happy_var_3 -> case happyOut6 happy_x_4 of { happy_var_4 -> happyIn5- ([happy_var_1 , happy_var_3 { O.address = happy_var_4 } ]+ ([happy_var_1 , happy_var_3 { O.mbAddress = happy_var_4 } ] ) `HappyStk` happyRest}}} happyReduce_12 = happySpecReduce_3 1# happyReduction_12@@ -252,7 +253,7 @@ = case happyOut9 happy_x_1 of { happy_var_1 -> case happyOut8 happy_x_3 of { happy_var_3 -> happyIn5- ([happy_var_1 , happy_var_3 ]+ ([happy_var_1 , happy_var_3 ] )}} happyReduce_13 = happyReduce 4# 1# happyReduction_13@@ -265,7 +266,7 @@ case happyOut9 happy_x_3 of { happy_var_3 -> case happyOut6 happy_x_4 of { happy_var_4 -> happyIn5- ([happy_var_1 { O.address = happy_var_4 }, happy_var_3 ]+ ([happy_var_1 { O.mbAddress = happy_var_4 }, happy_var_3 ] ) `HappyStk` happyRest}}} happyReduce_14 = happySpecReduce_3 1# happyReduction_14@@ -275,7 +276,7 @@ = case happyOut11 happy_x_1 of { happy_var_1 -> case happyOut11 happy_x_3 of { happy_var_3 -> happyIn5- ([happy_var_1 , happy_var_3 ]+ ([happy_var_1 , happy_var_3 ] )}} happyReduce_15 = happySpecReduce_3 1# happyReduction_15@@ -285,7 +286,7 @@ = case happyOut8 happy_x_1 of { happy_var_1 -> case happyOut9 happy_x_3 of { happy_var_3 -> happyIn5- ([happy_var_1 , happy_var_3 ]+ ([happy_var_1 , happy_var_3 ] )}} happyReduce_16 = happyReduce 4# 1# happyReduction_16@@ -298,7 +299,7 @@ case happyOut11 happy_x_3 of { happy_var_3 -> case happyOut6 happy_x_4 of { happy_var_4 -> happyIn5- ([happy_var_1 , happy_var_3 { O.address = happy_var_4 } ]+ ([happy_var_1 , happy_var_3 { O.mbAddress = happy_var_4 } ] ) `HappyStk` happyRest}}} happyReduce_17 = happyReduce 5# 1# happyReduction_17@@ -312,7 +313,7 @@ case happyOut9 happy_x_3 of { happy_var_3 -> case happyOut9 happy_x_5 of { happy_var_5 -> happyIn5- ([happy_var_1 , happy_var_3 , happy_var_5]+ ([happy_var_1 , happy_var_3 , happy_var_5] ) `HappyStk` happyRest}}} happyReduce_18 = happyReduce 6# 1# happyReduction_18@@ -327,7 +328,7 @@ case happyOut11 happy_x_3 of { happy_var_3 -> case happyOut9 happy_x_5 of { happy_var_5 -> happyIn5- ([happy_var_1 , happy_var_3 , happy_var_5]+ ([happy_var_1 , happy_var_3 , happy_var_5] ) `HappyStk` happyRest}}} happyReduce_19 = happySpecReduce_0 2# happyReduction_19@@ -340,14 +341,14 @@ happy_x_1 = case happyOutTok happy_x_2 of { (Address happy_var_2) -> happyIn6- (Just happy_var_2+ (Just $ Left happy_var_2 )} happyReduce_21 = happySpecReduce_1 3# happyReduction_21 happyReduction_21 happy_x_1 = case happyOutTok happy_x_1 of { (Address happy_var_1) -> happyIn7- (Abs happy_var_1+ (Abs $ Left happy_var_1 )} happyReduce_22 = happySpecReduce_1 4# happyReduction_22@@ -571,13 +572,13 @@ happyShift new_state i tk st- where !(new_state) = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))- where !(off) = indexShortOffAddr happyActOffsets st- !(off_i) = (off Happy_GHC_Exts.+# i)+ where (new_state) = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))+ where (off) = indexShortOffAddr happyActOffsets st+ (off_i) = (off Happy_GHC_Exts.+# i) check = if (off_i Happy_GHC_Exts.>=# (0# :: Happy_GHC_Exts.Int#)) then (indexShortOffAddr happyCheck off_i Happy_GHC_Exts.==# i) else False- !(action)+ (action) | check = indexShortOffAddr happyTable off_i | otherwise = indexShortOffAddr happyDefActions st @@ -587,10 +588,10 @@ indexShortOffAddr (HappyA# arr) off = Happy_GHC_Exts.narrow16Int# i where- !i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)- !high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))- !low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))- !off' = off Happy_GHC_Exts.*# 2#+ i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)+ high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))+ low = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))+ off' = off Happy_GHC_Exts.*# 2# @@ -610,7 +611,7 @@ -- Shifting a token happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =- let !(i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in+ let (i) = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in -- trace "shifting the error token" $ happyDoAction i tk new_state (HappyCons (st) (sts)) (stk) @@ -654,19 +655,19 @@ = happyFail 0# tk st sts stk happyMonadReduce k nt fn j tk st sts stk = happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))- where !(sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts)) drop_stk = happyDropStk k stk happyMonad2Reduce k nt fn 0# tk st sts stk = happyFail 0# tk st sts stk happyMonad2Reduce k nt fn j tk st sts stk = happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))- where !(sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts))+ where (sts1@((HappyCons (st1@(action)) (_)))) = happyDrop k (HappyCons (st) (sts)) drop_stk = happyDropStk k stk - !(off) = indexShortOffAddr happyGotoOffsets st1- !(off_i) = (off Happy_GHC_Exts.+# nt)- !(new_state) = indexShortOffAddr happyTable off_i+ (off) = indexShortOffAddr happyGotoOffsets st1+ (off_i) = (off Happy_GHC_Exts.+# nt)+ (new_state) = indexShortOffAddr happyTable off_i @@ -684,9 +685,9 @@ happyGoto nt j tk st = {- nothing -} happyDoAction j tk new_state- where !(off) = indexShortOffAddr happyGotoOffsets st- !(off_i) = (off Happy_GHC_Exts.+# nt)- !(new_state) = indexShortOffAddr happyTable off_i+ where (off) = indexShortOffAddr happyGotoOffsets st+ (off_i) = (off Happy_GHC_Exts.+# nt)+ (new_state) = indexShortOffAddr happyTable off_i @@ -718,6 +719,7 @@ -- Internal happy errors: +notHappyAtAll :: a notHappyAtAll = error "Internal Happy error\n" -----------------------------------------------------------------------------
src/Bindings/Bfd.hs-boot view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,26 +15,41 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>. -module Bindings.Bfd where+module Bindings.Bfd (+ Bfd(ptr)+ , Bfd'+ , Bindings.Bfd.mk+ , getOctetsPerByte+ , getTarget+ , getSections+) where +import Foreign.C import Foreign.Ptr import Foreign.Storable -import Bindings.Bfd.Flavour import {-# SOURCE #-} Bindings.Bfd.Section import {-# SOURCE #-} Bindings.Bfd.Target -type Bfd = Ptr Bfd'+data Bfd = Bfd {+ ptr :: Ptr Bfd'+ , filePath :: CString+ , target :: CString+ , mode :: CString+ } +instance Show Bfd++ data Bfd' instance Storable Bfd' -getFlavour- :: Bfd- -> IO Flavour+mk+ :: Ptr Bfd'+ -> Bfd getOctetsPerByte :: Bfd
src/Bindings/Bfd.hsc view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,146 +15,125 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>. +-- | This is the top-level module containing operations that can be performed+-- on a Binary Format Descriptor (BFD). A BFD is opened on the binary file+-- to be queried\/manipulated and serves an opaque pointer. + module Bindings.Bfd ( -- * Types- Bfd- , Bfd'- , FileMode- -- * Functions- -- ** Initialization- , init- -- ** Files- , getTargetsAndFormats+ Bfd (ptr)+ -- * Initialization+ , initialize+ -- * File Operations+ , targetsAndFormats , open , close- -- ** Format+ , closeAllDone+ -- * Setting the Format , checkFormat- -- ** Foo- , Bindings.Bfd.getByteorder- , Bindings.Bfd.getHeaderByteorder+ -- * Attributes , getDisasm , getFilename , Bindings.Bfd.getFlags- , Bindings.Bfd.getObjectFlags- , Bindings.Bfd.getSectionFlags- , Bindings.Bfd.getFlavour , getFormat+ , getHasMap+ , getIsCacheable+ , getIsTargetDefaulted+ , getIsThinArchive , getMachine+ , getMyArchive , getOctetsPerByte- -- *** Sections+ , getTarget+ -- ** For Object Files+ , getStartAddress+ , getSymbolCount+ -- ** Sections+ , getSectionCount , getSectionByName+ , getSectionByVma , getSections- -- *** Target- , getTarget- -- *** Foo- , getMyArchive- -- *** Symbols+ -- ** Symbol Tables , getSymbolTable , getDynamicSymbolTable-#if 0- , getSyntheticSymbolTable-#endif- -- *** Relocations+ -- ** Relocations , getDynamicRelocations- -- ** Testing- , isBigEndian- , isLittleEndian- , isHeaderBigEndian- , isHeaderLittleEndian- , isCoffFamily+ -- *+ , demangle+ -- * Internal+ , Bfd'+ , Bindings.Bfd.mk ) where -import Control.Exception-import Control.Monad+import Control.Exception ( catch )+import Control.Monad ( foldM ) -import Data.Bits-import Data.Maybe-import Data.Word+import Data.Bits ( (.&.), bit )+import Data.Word ( Word ) -import Foreign.C-import Foreign.Marshal-import Foreign.Ptr-import Foreign.Storable+import Foreign.C ( CString, CInt, CUInt, newCString, peekCString+ , withCString )+import Foreign.Marshal ( free, mallocArray, peekArray, toBool )+import Foreign.Ptr ( Ptr, nullPtr, wordPtrToPtr )+import Foreign.Storable ( Storable, alignment, peek, peekByteOff, poke, sizeOf ) -import Prelude hiding (catch, init)+import Prelude hiding ( catch ) -import Bindings.Bfd.Disasm-import Bindings.Bfd.Endian-import Bindings.Bfd.Exception-import Bindings.Bfd.Flags as BfdFlags-import Bindings.Bfd.Flavour-import Bindings.Bfd.Format-import Bindings.Bfd.Relocation-import Bindings.Bfd.Section as Section-import Bindings.Bfd.Section.Flags as SectionFlags-import Bindings.Bfd.SymbolTable as SymbolTable-import Bindings.Bfd.Target as Target+import Bindings.Bfd.Disasm ( Disasm )+import Bindings.Bfd.Exception ( BfdException+ , throwExceptionIfFalse+ , throwExceptionIfNull )+import Bindings.Bfd.Flags as BfdFlags ( Flags ( HasReloc ) )+import Bindings.Bfd.Format ( Format ( Object ) )+import Bindings.Bfd.Misc ( Vma, Vma' )+import Bindings.Bfd.Relocation ( Relocation )+import Bindings.Bfd.Section as Section ( Section, SectionName+ , getNext, getSize, getVma )+import Bindings.Bfd.SymbolTable as SymbolTable ( SymbolTable, mk, tablePtr )+import Bindings.Bfd.Target as Target ( Target, TargetName+ , canonicalizeDynamicReloc+ , canonicalizeDynamicSymtab+ , canonicalizeSymtab+ , getDynamicRelocUpperBound+ , getDynamicSymtabUpperBound+ , getName, getSymtabUpperBound+ , listSupported ) #include <bfd.h> -type FileMode = String-+-- PUBLIC ###################################################################### -type Bfd = Ptr Bfd'+-- Types ======================================================================= -data Bfd' = Filename String- | XVec Target- | Format Format- | Flags Int- | Sections Section- | MyArchive Bfd+-- | The opaque pointer to the Binary File Descriptor.+data Bfd = Bfd {+ ptr :: Ptr Bfd'+ , filePath :: CString+ , target :: CString+ , mode :: CString+ } deriving (Show) -instance Storable Bfd' where- sizeOf _ = #size struct bfd- alignment = sizeOf- peekByteOff buf off- | off == (#offset struct bfd, filename) =- do- val <- (#peek struct bfd, filename) buf :: IO CString- str <- peekCString val- return $ Filename str- | off == (#offset struct bfd, xvec) = - do- val <- (#peek struct bfd, xvec) buf :: IO Word- return $ XVec $ wordPtrToPtr $ fromIntegral val- | off == (#offset struct bfd, format) =- do- val <- (#peek struct bfd, format) buf :: IO CUInt- return $ Format $ toEnum $ fromIntegral val- | off == (#offset struct bfd, flags) =- do- val <- (#peek struct bfd, flags) buf :: IO CUInt- return $ Bindings.Bfd.Flags $ fromIntegral val- | off == (#offset struct bfd, sections) =- do- val <- (#peek struct bfd, sections) buf- return $ Sections val- | off == (#offset struct bfd, my_archive) =- do- val <- (#peek struct bfd, my_archive) buf :: IO Bfd- return $ MyArchive val- | otherwise = error $ "internal error: Bfd.peekByteOff " ++ show off- poke _ _ = return ()-+-- Initialization ============================================================== -init+-- | Initialize the library. You need to call 'initialize' once, before using +-- any of the functions in this library.+initialize :: IO ()--- ^ Initialize the library. Call 'init' before making any other calls.-init = c_bfd_init+initialize = c_bfd_init +-- File Operations ============================================================= -getTargetsAndFormats - :: FilePath -- ^ The file to query- -> IO [(TargetName, Format)]--- ^ Returns a 'List' of tuples representing the possible combinations of --- 'TargetName' and 'Format' valid for this 'FilePath'.+-- | Returns a list of tuples representing the possible combinations of +-- 'TargetName' and 'Format' that are valid for this file on this platform. ----- Possible Exceptions: Same as 'open'.-getTargetsAndFormats file =+-- /Possible Exceptions:/ Same as 'open'.+targetsAndFormats + :: FilePath -- ^ file to query+ -> IO [(TargetName, Format)]+targetsAndFormats file = do- ts <- Target.list+ ts <- Target.listSupported let perms = [ (t,f) | t <- ts, f <- enumFrom Object ] foldM g [] perms@@ -165,6 +144,7 @@ xvec1 <- getTarget bfd tn1 <- Target.getName xvec1 ok <- catch (checkFormat bfd f) ((\_ -> return False) :: BfdException -> IO Bool)+ _ <- close bfd case ok of True -> do@@ -175,151 +155,277 @@ else return xs False -> return xs -open- :: FilePath -- ^ File to open- -> Maybe TargetName -- ^ Target- -> FileMode- -> IO Bfd--- ^ Opens a file with the given target and mode--- and returns a bfd object on success. If the target is 'Nothing' then--- the file is opened with the default target.+-- | Opens the file 'FilePath' with the given target 'TargetName' and open mode +-- (as defined by the Unix fopen(3) function) and returns a 'Bfd' object on +-- success. FIXME: and marks it cacheable. ----- Possible exceptions: 'NoMemory' (if any allocation fails), 'SystemCall' --- (if open failed), and 'InvalidTarget' (if supplied target is not supported).+-- If the target is 'Nothing' then the environment variable /GNUTARGET/ is+-- checked for a target name; if this is NULL or not defined then it chooses the+-- the default target if set (see 'setDefault') and sets an internal flag in+-- the 'Bfd' object indicating that the target was defaulted (see +-- 'isTargetDefaulted'), or if not set, the first entry in the target list for +-- the platform. Passing the string \"default\" as the 'TargetName' or setting +-- the environment variable to \"default\" also causes the above behavior. ----- /Note:/ 'open' does not validate that the supplied 'TargetName' is appropriate--- for the supplied file.-open fp targ mode =+-- /Important:/ Before you use the returned 'Bfd' object from a file you have+-- opened, you must call 'checkFormat' to 1) validate that the supplied +-- 'TargetName' is appropriate for the opened file, and 2) set the 'Format' for+-- the 'Bfd'. So for most intents and purposes, opening a file is a two-step+-- process.+--+-- /Possible Exceptions:/ 'NoMemory' (if any allocation fails), 'SystemCall' +-- (if open failed), and 'InvalidTarget' (if supplied target is unknown).+open+ :: FilePath -- ^ file to open+ -> Maybe TargetName -- ^ target+ -> String -- ^ open mode (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\")+ -> IO Bfd+open fp targ mode0 = do fp' <- newCString fp- targ' <- newCString targ0- mode' <- newCString mode- throwExceptionIfNull "open" fp targ0 (c_bfd_fopen fp' targ' mode' (-1))- where- targ0 = fromMaybe "default" targ+ targ' <- + case targ of+ Just t -> newCString t+ Nothing -> return nullPtr+ mode' <- newCString mode0+ let+ cmd = c_bfd_fopen fp' targ' mode' (-1)+ bfd <- throwExceptionIfNull "open" fp (show targ) cmd+ return $ Bfd bfd fp' targ' mode' +-- | Close a 'Bfd' and if all went well, return 'True'. If the 'Bfd' was open+-- for writing, then pending operations are completed and the file written out+-- and closed. If the created file is executable, then chmod(3) is called to+-- mark it as such. close :: Bfd -> IO Bool close bfd = do- r <- c_bfd_close bfd+ r <- c_bfd_close $ ptr bfd+ free $ filePath bfd+ free $ target bfd+ free $ mode bfd return $ toBool r +-- | Close a 'Bfd' and if all went well, return 'True'. Differs from 'close'+-- in that it does not complete any pending operations. This function would be+-- used if the application had just used a 'Bfd' for swapping and didn't want to+-- use any of the writing code. If the created file is executable, then +-- chmod(3) is called to mark it as such.+closeAllDone+ :: Bfd+ -> IO Bool+closeAllDone bfd =+ do+ r <- c_bfd_close_all_done $ ptr bfd+ free $ filePath bfd+ free $ target bfd+ free $ mode bfd+ return $ toBool r +-- Setting the Format ==========================================================++-- | The second part of opening a file (see 'open'). Validates that the +-- 'TargetName' is appropriate for the opened file and if not, silently picks+-- a more suitable 'TargetName', and also sets the 'Format' of the 'Bfd' object+-- representing the opened file.+--+-- /Important:/ You must call this function before using the vast majority of+-- these functions operating on the 'Bfd' as it updates critical data structures.+--+-- /Possible Exceptions:/ 'InvalidOperation' (if the file was opened write-only), checkFormat :: Bfd -> Format -> IO Bool checkFormat bfd format = do- res <- c_bfd_check_format bfd format'+ res <- c_bfd_check_format (ptr bfd) $ fromIntegral $ fromEnum format throwExceptionIfFalse "checkFormat" (show format) (return $ toBool res)- where- format' = fromIntegral $ fromEnum format---getByteorder+{-+checkFormatMatches :: Bfd- -> IO Endian-getByteorder bfd =- do- xvec <- getTarget bfd- Target.getByteorder xvec+ -> Format+ -> IO [TargetName]+-} -getHeaderByteorder- :: Bfd- -> IO Endian-getHeaderByteorder bfd =- do- xvec <- getTarget bfd- Target.getHeaderByteorder xvec+-- Attributes ================================================================== +-- | Returns the disassembler associated with the 'Bfd'. getDisasm :: Bfd -> IO Disasm-getDisasm = c_disassembler- +getDisasm bfd = c_disassembler $ ptr bfd++-- | Returns the 'FilePath' of the file associated with the 'Bfd'. getFilename :: Bfd- -> IO String+ -> IO FilePath getFilename bfd = do- fn <- peekByteOff bfd (#offset struct bfd, filename)+ fn <- peekByteOff (ptr bfd) (#offset struct bfd, filename) return $ unBfd'Filename fn- ++-- | Returns a 'List' of the 'Bfd's set 'Flags'. getFlags :: Bfd -> IO [BfdFlags.Flags] getFlags bfd = do- flags <- peekByteOff bfd (#offset struct bfd, flags)+ flags <- peekByteOff (ptr bfd) (#offset struct bfd, flags) let flags' = filter f $ enumFrom HasReloc where f e = unBfd'Flags flags .&. (bit $ fromEnum e) /= 0 return flags' -getObjectFlags+-- | Returns the 'Format' of the 'Bfd'.+getFormat :: Bfd- -> IO [BfdFlags.Flags]-getObjectFlags bfd =+ -> IO Format+getFormat bfd = do- xvec <- getTarget bfd- Target.getObjectFlags xvec+ format <- peekByteOff (ptr bfd) (#offset struct bfd, format)+ return $ unBfd'Format format -getSectionFlags+-- | Returns 'True' if the 'Bfd' has an archive map. Otherwise 'False'.+getHasMap :: Bfd- -> IO [SectionFlags.Flags]-getSectionFlags bfd =+ -> IO Bool+getHasMap bfd = do- xvec <- getTarget bfd- Target.getSectionFlags xvec+ hm <- c__bfd_peek_has_armap $ ptr bfd+ return $ toBool hm -getFlavour+-- | Returns 'True' if the 'Bfd' is cacheable. Otherwise 'False'.+getIsCacheable :: Bfd- -> IO Flavour-getFlavour bfd =+ -> IO Bool+getIsCacheable bfd = do- xvec <- getTarget bfd- Target.getFlavour xvec+ c <- c__bfd_peek_cacheable $ ptr bfd+ return $ toBool c -getFormat+getIsTargetDefaulted :: Bfd- -> IO Format-getFormat bfd =+ -> IO Bool+getIsTargetDefaulted bfd = do- format <- peekByteOff bfd (#offset struct bfd, format)- return $ unBfd'Format format+ td <- c__bfd_peek_target_defaulted $ ptr bfd+ return $ toBool td +-- | Returns 'True' if the 'Bfd' is a thin archive. Otherwise 'False'.+getIsThinArchive+ :: Bfd+ -> IO Bool+getIsThinArchive bfd =+ do+ ita <- c__bfd_peek_is_thin_archive $ ptr bfd+ return $ toBool ita+ getMachine :: Bfd -> IO Int getMachine bfd = do- m <- c_bfd_get_mach bfd+ m <- c_bfd_get_mach $ ptr bfd return $ fromIntegral m +-- | Returns either a 'Bfd' or 'Nothing'. FIXME+--+-- /Note:/ Do not pass the returned 'Bfd' to 'close' or 'closeAllDone' or a +-- memory leak will occur.+getMyArchive+ :: Bfd+ -> IO (Maybe Bfd)+getMyArchive bfd =+ do+ ma <- peekByteOff (ptr bfd) (#offset struct bfd, my_archive)+ return $ case unBfd'MyArchive ma == nullPtr of+ True -> Nothing+ False -> Just $ Bfd (unBfd'MyArchive ma) nullPtr nullPtr nullPtr+ getOctetsPerByte :: Bfd -> IO Int getOctetsPerByte bfd = do- opb <- c_bfd_octets_per_byte bfd+ opb <- c_bfd_octets_per_byte $ ptr bfd return $ fromIntegral opb +-- | Returns the 'Target' of the 'Bfd'.+getTarget+ :: Bfd+ -> IO Target+getTarget bfd = + do+ xv <- peekByteOff (ptr bfd) (#offset struct bfd, xvec)+ return $ unBfd'XVec xv++-- For Object Files ------------------------------------------------------------++-- | Return the start address. Only valid for 'Object' files.+getStartAddress+ :: Bfd+ -> IO Vma+getStartAddress bfd =+ do+ addr <- peekByteOff (ptr bfd) (#offset struct bfd, start_address)+ return $ unBfd'StartAddress addr++-- | Return the symbol count used for input and output. Only valid for 'Object'+-- files.+-- FIXME: returns 0 when there are symbols and in main/main too!+getSymbolCount+ :: Bfd+ -> IO Int+getSymbolCount bfd =+ do+ sc <- peekByteOff (ptr bfd) (#offset struct bfd, symcount)+ return $ unBfd'SymbolCount sc++-- Sections --------------------------------------------------------------------++-- | Returns the number of 'Section's in the 'Bfd'.+getSectionCount+ :: Bfd+ -> IO Int+getSectionCount bfd =+ do + c <- peekByteOff (ptr bfd) (#offset struct bfd, section_count)+ return $ unBfd'SectionCount c+ getSectionByName :: Bfd -> SectionName -> IO Section-getSectionByName bfd sn = withCString sn (\s -> c_bfd_get_section_by_name bfd s) +getSectionByName bfd sn = withCString sn (\s -> c_bfd_get_section_by_name (ptr bfd) s) +getSectionByVma+ :: Bfd+ -> Int+ -> IO (Maybe Section)+getSectionByVma bfd vma =+ do+ sects <- getSections bfd+ foldM f Nothing sects+ where+ f xs@(Just _ ) _ = return xs+ f (Nothing) xi =+ do+ sectVma <- getVma xi+ sectSize <- getSize xi+ case vma >= sectVma && vma < sectVma + sectSize of+ True -> return $ Just xi+ False -> return $ Nothing+ getSections :: Bfd -> IO [Section] getSections bfd = do- (Sections first) <- peekByteOff bfd (#offset struct bfd, sections)+ (Sections first) <- peekByteOff (ptr bfd) (#offset struct bfd, sections) getSections' first [] where getSections' sect rs@@ -329,23 +435,24 @@ next <- getNext sect getSections' next (sect : rs) -getTarget+#if 0+createSections :: Bfd- -> IO Target-getTarget bfd = + -> IO [(Section, Vma)]+createSections bfd = do- xv <- peekByteOff bfd (#offset struct bfd, xvec)- return $ unBfd'XVec xv+ sects <- getSections bfd+ extSect <- Section.mk "externs" 5+ (_, sectList) <- foldM f (0,[]) $ sects ++ [extSect]+ return $ reverse sectList+ where+ f (vma,xs') sect =+ do+ (vma',snvma) <- createSection sect vma+ return (vma', snvma : xs')+#endif -getMyArchive- :: Bfd- -> IO (Maybe Bfd)-getMyArchive bfd =- do- ma <- peekByteOff bfd (#offset struct bfd, my_archive)- return $ case unBfd'MyArchive ma == nullPtr of- True -> Nothing- False -> Just $ unBfd'MyArchive ma+-- Symbol Tables --------------------------------------------------------------- getSymbolTable :: Bfd@@ -387,6 +494,8 @@ return $ SymbolTable.mk ssyms count #endif +-- Relocations -----------------------------------------------------------------+ getDynamicRelocations :: Bfd -> SymbolTable@@ -402,47 +511,86 @@ prs <- peekArray count ppr mapM peek prs +-- ============================================================================= -isBigEndian+demangle :: Bfd- -> IO Bool-isBigEndian bfd =+ -> String+ -> IO String+demangle bfd str = do- bo <- Bindings.Bfd.getByteorder bfd- return $ bo == Big+ s <- withCString str (\s -> c_bfd_demangle (ptr bfd) s 3)+ case s == nullPtr of+ True -> return ""+ False ->+ do+ s' <- peekCString s+ return s' -isLittleEndian- :: Bfd- -> IO Bool-isLittleEndian bfd =- do- bo <- Bindings.Bfd.getByteorder bfd- return $ bo == Little+-- Internal ==================================================================== -isHeaderBigEndian- :: Bfd- -> IO Bool-isHeaderBigEndian bfd =- do- bo <- Bindings.Bfd.getHeaderByteorder bfd- return $ bo == Big+data Bfd' = Filename String+ | XVec Target+ | Format Format+ | Flags Int+ | Sections Section+ | SectionCount Int+ | StartAddress Int+ | SymbolCount Int+ | MyArchive (Ptr Bfd')+ deriving (Show) -isHeaderLittleEndian- :: Bfd- -> IO Bool-isHeaderLittleEndian bfd =- do- bo <- Bindings.Bfd.getHeaderByteorder bfd- return $ bo == Little+instance Storable Bfd' where+ sizeOf _ = #size struct bfd+ alignment = sizeOf+ peekByteOff buf off+ | off == (#offset struct bfd, filename) =+ do+ val <- (#peek struct bfd, filename) buf :: IO CString+ str <- peekCString val+ return $ Filename str+ | off == (#offset struct bfd, xvec) = + do+ val <- (#peek struct bfd, xvec) buf :: IO Word+ return $ XVec $ wordPtrToPtr $ fromIntegral val+ | off == (#offset struct bfd, format) =+ do+ val <- (#peek struct bfd, format) buf :: IO CUInt+ return $ Format $ toEnum $ fromIntegral val+ | off == (#offset struct bfd, flags) =+ do+ val <- (#peek struct bfd, flags) buf :: IO CUInt+ return $ Bindings.Bfd.Flags $ fromIntegral val+ | off == (#offset struct bfd, sections) =+ do+ val <- (#peek struct bfd, sections) buf+ return $ Sections val+ | off == (#offset struct bfd, section_count) =+ do+ val <- (#peek struct bfd, section_count) buf :: IO CUInt+ return $ SectionCount $ fromIntegral val+ | off == (#offset struct bfd, start_address) =+ do+ val <- (#peek struct bfd, start_address) buf :: IO Vma'+ return $ StartAddress $ fromIntegral val+ | off == (#offset struct bfd, symcount) =+ do+ val <- (#peek struct bfd, symcount) buf :: IO CUInt+ return $ SymbolCount $ fromIntegral val+ | off == (#offset struct bfd, my_archive) =+ do+ val <- (#peek struct bfd, my_archive) buf :: IO (Ptr Bfd')+ return $ MyArchive val+ | otherwise = error $ "internal error: Bfd.peekByteOff " ++ show off+ poke _ _ = return () -isCoffFamily- :: Bfd- -> IO Bool-isCoffFamily bfd =- do- flav <- Bindings.Bfd.getFlavour bfd- return $ flav == Coff || flav == Xcoff+mk+ :: Ptr Bfd'+ -> Bfd+mk p = Bfd p nullPtr nullPtr nullPtr +-- PRIVATE #####################################################################+ unBfd'Filename :: Bfd' -> String@@ -467,43 +615,31 @@ unBfd'Flags (Bindings.Bfd.Flags m) = m unBfd'Flags _ = error "unBfd'Flags" +unBfd'SectionCount+ :: Bfd'+ -> Int+unBfd'SectionCount (SectionCount c) = c+unBfd'SectionCount _ = error "unBfd'SectionCount"++unBfd'StartAddress+ :: Bfd'+ -> Vma+unBfd'StartAddress (StartAddress a) = a+unBfd'StartAddress _ = error "unBfd'StartAddress"++unBfd'SymbolCount+ :: Bfd'+ -> Int+unBfd'SymbolCount (SymbolCount c) = c+unBfd'SymbolCount _ = error "unBfd'SymbolCount"+ unBfd'MyArchive :: Bfd'- -> Bfd+ -> (Ptr Bfd') unBfd'MyArchive (MyArchive ma) = ma unBfd'MyArchive _ = error "unBfd'MyArchive" -#if 0-createSections- :: Bfd- -> IO [(Section, Vma)]-createSections bfd = - do- sects <- getSections bfd- extSect <- Section.mk "externs" 5- (_, sectList) <- foldM f (0,[]) $ sects ++ [extSect]- return $ reverse sectList- where- f (vma,xs') sect =- do- (vma',snvma) <- createSection sect vma- return (vma', snvma : xs') -demangle- :: Bfd- -> String- -> IO String-demangle bfd str =- do- s <- withCString str (\s -> c_bfd_demangle bfd s 3)- case s == nullPtr of- True -> return ""- False ->- do- s' <- peekCString s- return s'-#endif- foreign import ccall unsafe "bfd.h bfd_init" c_bfd_init :: IO () @@ -512,39 +648,56 @@ -> CString -> CString -> CInt- -> IO Bfd+ -> IO (Ptr Bfd') foreign import ccall unsafe "bfd.h bfd_close" c_bfd_close- :: Bfd+ :: Ptr Bfd' -> IO CInt +foreign import ccall unsafe "bfd.h bfd_close_all_done" c_bfd_close_all_done+ :: Ptr Bfd'+ -> IO CInt+ foreign import ccall unsafe "bfd.h bfd_check_format" c_bfd_check_format- :: Bfd+ :: Ptr Bfd' -> CInt -> IO CInt foreign import ccall unsafe "bfd.h bfd_get_mach" c_bfd_get_mach- :: Bfd+ :: Ptr Bfd' -> IO CInt foreign import ccall unsafe "bfd.h bfd_octets_per_byte" c_bfd_octets_per_byte- :: Bfd+ :: Ptr Bfd' -> IO CUInt foreign import ccall unsafe "bfd.h bfd_get_section_by_name" c_bfd_get_section_by_name- :: Bfd+ :: Ptr Bfd' -> CString -> IO Section -#if 0 foreign import ccall unsafe "bfd.h bfd_demangle" c_bfd_demangle- :: Bfd+ :: Ptr Bfd' -> CString -> CInt -> IO CString-#endif foreign import ccall unsafe "dis-asm.h disassembler" c_disassembler- :: Bfd+ :: Ptr Bfd' -> IO Disasm +foreign import ccall unsafe "bfd.h _bfd_peek_target_defaulted" c__bfd_peek_target_defaulted+ :: Ptr Bfd'+ -> IO CInt++foreign import ccall unsafe "bfd.h _bfd_peek_cacheable" c__bfd_peek_cacheable+ :: Ptr Bfd'+ -> IO CInt++foreign import ccall unsafe "bfd.h _bfd_peek_has_armap" c__bfd_peek_has_armap+ :: Ptr Bfd'+ -> IO CInt++foreign import ccall unsafe "bfd.h _bfd_peek_is_thin_archive" c__bfd_peek_is_thin_archive+ :: Ptr Bfd'+ -> IO CInt
+ src/Bindings/Bfd/Disasm/I386/Address.hs view
@@ -0,0 +1,13 @@+module Bindings.Bfd.Disasm.I386.Address where++import Bindings.Bfd.Symbol+++type Address = Either Int Symbol+++isSymbolic+ :: Address+ -> Bool+isSymbolic (Left _ ) = False+isSymbolic (Right _) = True
+ src/Bindings/Bfd/Disasm/I386/CondCode.hs view
@@ -0,0 +1,26 @@+module Bindings.Bfd.Disasm.I386.CondCode where+++data CondCode = Above+ | AboveOrEqual+ | Below+ | BelowOrEqual+ | Equal+ | Greater+ | GreaterOrEqual+ | Less+ | LessOrEqual+ | NotEqual+ | NotSigned+ | Parity+ | Signed+ | Zero+ deriving (Show)+++toCondCode+ :: String+ -> Maybe CondCode+toCondCode "" = Nothing+toCondCode "z" = Just Zero+toCondCode s = error $ "toCondCode: " ++ show s
+ src/Bindings/Bfd/Disasm/I386/EffectiveAddr.hs view
@@ -0,0 +1,10 @@+module Bindings.Bfd.Disasm.I386.EffectiveAddr where+++data EffectiveAddr = EA {+ base :: String+ , index :: String+ , scale :: Int+ }+ | NoEA+ deriving (Eq, Ord, Show)
src/Bindings/Bfd/Disasm/I386/Insn.hs view
@@ -1,14 +1,17 @@ module Bindings.Bfd.Disasm.I386.Insn where -import Bindings.Bfd.Disasm.I386.Insn.Mnemonic-import Bindings.Bfd.Disasm.I386.Insn.Operand-import Bindings.Bfd.Disasm.I386.Insn.Prefix+import Bindings.Bfd.Disasm.I386.Mnemonic+import Bindings.Bfd.Disasm.I386.Operand+import Bindings.Bfd.Disasm.I386.Prefix data Insn = Insn {- prefix :: Prefix+ prefix :: Maybe Prefix , mnemonic :: Mnemonic , operands :: [Operand] }- | NoInsn+ | Extern {+ symbol :: String+ } deriving (Show)+
− src/Bindings/Bfd/Disasm/I386/Insn/EffectiveAddr.hs
@@ -1,10 +0,0 @@-module Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr where---data EffectiveAddr = EA {- base :: String- , index :: String- , scale :: Int- }- | NoEA- deriving (Eq, Ord, Show)
− src/Bindings/Bfd/Disasm/I386/Insn/Length.hs
@@ -1,5 +0,0 @@-module Bindings.Bfd.Disasm.I386.Insn.Length where---data Length = Length Int- | Unavailable
− src/Bindings/Bfd/Disasm/I386/Insn/Mnemonic.hs
@@ -1,33 +0,0 @@-module Bindings.Bfd.Disasm.I386.Insn.Mnemonic where--import Data.List---newtype Mnemonic = Mnemonic String- deriving (Show)--un- :: Mnemonic- -> String-un (Mnemonic s) = s---isCall- :: Mnemonic- -> Bool-isCall m = isPrefixOf "call" $ un m--isJump- :: Mnemonic- -> Bool-isJump m = isPrefixOf "jmp" $ un m--isBranch- :: Mnemonic- -> Bool-isBranch m = ((isPrefixOf "j" $ un m) && (not $ isPrefixOf "jmp" $ un m)) || (isPrefixOf "loop" $ un m)--isReturn- :: Mnemonic- -> Bool-isReturn m = isPrefixOf "ret" $ un m
− src/Bindings/Bfd/Disasm/I386/Insn/Operand.hs
@@ -1,57 +0,0 @@-module Bindings.Bfd.Disasm.I386.Insn.Operand where--import Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr---data Operand = Imm {- immed :: Int- }- | IndD {- section :: String- , effAddr :: EffectiveAddr- , displacement :: Maybe Int- , address :: Maybe Int- }- | IndJ {- effAddr :: EffectiveAddr- , displacement :: Maybe Int- , address :: Maybe Int- }- | DirD {- direct :: String- }- | DirJ {- direct :: String- }- | Abs {- absolute :: Int- }- -- the following constructors are created by canonicalizing the above- | ImmSym {- symbolIndex :: Int- }- | IndDSym {- effAddr :: EffectiveAddr- , symbolIndex :: Int- , addend :: Int- }- | IndJSym {- effAddr :: EffectiveAddr- , symbolIndex :: Int- , addend :: Int- }- | AbsSymT {- symbolIndex :: Int- }- | AbsSymL {- symbol :: String- }- deriving (Eq, Ord, Show)---isAbs- :: Operand- -> Bool-isAbs (Abs _) = True-isAbs _ = False-
− src/Bindings/Bfd/Disasm/I386/Insn/Prefix.hs
@@ -1,11 +0,0 @@-module Bindings.Bfd.Disasm.I386.Insn.Prefix where---newtype Prefix = Prefix String- deriving (Show)---un- :: Prefix- -> String-un (Prefix s) = s
src/Bindings/Bfd/Disasm/I386/Lex.x view
@@ -17,6 +17,7 @@ tokens :- $whitestuff+ ;+ "data32 " ; "-"{0,1}"0x"$hexdigit+ { offset } $scale { offset } "$0x"$hexdigit+ { constant }
+ src/Bindings/Bfd/Disasm/I386/Mnemonic.hs view
@@ -0,0 +1,366 @@+module Bindings.Bfd.Disasm.I386.Mnemonic where++import Bindings.Bfd.Disasm.I386.CondCode+import Bindings.Bfd.Disasm.I386.Order+import Bindings.Bfd.Disasm.I386.Precision+import Bindings.Bfd.Disasm.I386.XmmType+++data Mnemonic = Add {+ width1 :: Int+ }+ | AddCarry {+ width1 :: Int+ }+ | AddScalar {+ precision :: Precision+ }+ | BitwiseAnd {+ width1 :: Int+ }+ | BitwiseExclOr {+ xmmType :: XmmType+ }+ | BitwiseNot {+ width1 :: Int+ }+ | BitwiseOr {+ width1 :: Int+ }+ | Branch {+ condCode :: CondCode+ }+ | Call {+ width1 :: Int+ }+ | Compare {+ width1 :: Int+ }+ | CompareExchange {+ width1 :: Int+ }+ | CompareString {+ width1 :: Int+ }+ | CompareUnordered {+ precision :: Precision+ }+ | Convert {+ width1 :: Int+ , width2 :: Int+ , isSplit :: Bool+ }+ | ConvertXmm {+ numElems :: Int+ , sourceXmmType :: XmmType+ , targetXmmType :: XmmType+ , isTruncate :: Bool+ }+ | Cpuid+ | Decrement {+ width1 :: Int+ }+ | Direction {+ isSet :: Bool+ }+ | Divide {+ width1 :: Int+ }+ | DivideInt {+ width1 :: Int+ }+ | DivideScalar {+ precision :: Precision+ }+ | Exchange {+ width1 :: Int+ }+ | ExchangeAdd {+ width1 :: Int+ }+ | Increment {+ width1 :: Int+ }+ | Jump {+ mbWidth :: Maybe Int+ }+ | Leave {+ width1 :: Int+ }+ | LoadEffAddr {+ width1 :: Int+ }+ | Loop+ | Move {+ width1 :: Int+ , mbWidthSignExtend :: Maybe (Int, Bool)+ }+ | MoveAligned {+ precision :: Precision+ }+ | MoveCond {+ width1 :: Int+ , condCode :: CondCode+ }+ | MoveNonTemp {+ xmmType2 :: Either Int XmmType+ }+ | MovePacked {+ precision :: Precision+ , isHigh1 :: Bool+ , isHigh2 :: Bool+ }+ | MoveScalar {+ precision :: Precision+ }+ | MoveString {+ width1 :: Int+ }+ | MoveUnaligned {+ precision :: Precision+ }+ | Multiply {+ width1 :: Int+ }+ | MultiplyInt {+ width1 :: Int+ }+ | MultiplyScalar {+ xmmType :: XmmType+ }+ | Negate {+ width1 :: Int+ }+ | NoOp+ | Pop {+ width1 :: Int+ }+ | Push {+ width1 :: Int+ }+ | Return {+ width1 :: Int+ }+ | Rotate {+ width1 :: Int+ , isRight :: Bool+ }+ | Set {+ condCode :: CondCode+ }+ | Shift {+ width1 :: Int+ , isRight :: Bool+ , isArith :: Bool+ }+ | StoreString {+ width1 :: Int+ }+ | Subtract {+ width1 :: Int+ }+ | SubtractBorrow {+ width1 :: Int+ }+ | SubtractScalar {+ precision :: Precision+ }+ | Test {+ width1 :: Int+ }+ | Unpack {+ order :: Order+ , precision :: Precision+ }+ deriving (Show)+++toMnemonic+ :: String+ -> Mnemonic+toMnemonic s+ | s == "adcl" = AddCarry 4+ | s == "addb" = Add 1+ | s == "addl" = Add 4+ | s == "addq" = Add 8+ | s == "addsd" = AddScalar Double+ | s == "addss" = AddScalar Single+ | s == "addw" = Add 2+ | s == "andb" = BitwiseAnd 1+ | s == "andl" = BitwiseAnd 4+ | s == "andq" = BitwiseAnd 8+ | s == "andw" = BitwiseAnd 2+ | s == "callq" = Call 8+ | s == "cld" = Direction False+ | s == "cltd" = Convert 4 8 True+ | s == "cltq" = Convert 4 8 False+ | s == "cmovael" = MoveCond 4 AboveOrEqual+ | s == "cmovaeq" = MoveCond 8 AboveOrEqual+ | s == "cmoval" = MoveCond 4 Above+ | s == "cmovaq" = MoveCond 8 Above+ | s == "cmovbel" = MoveCond 4 BelowOrEqual+ | s == "cmovbeq" = MoveCond 8 BelowOrEqual+ | s == "cmovbl" = MoveCond 4 Below+ | s == "cmovbq" = MoveCond 8 Below+ | s == "cmovel" = MoveCond 4 Equal+ | s == "cmoveq" = MoveCond 8 Equal+ | s == "cmovgel" = MoveCond 4 GreaterOrEqual+ | s == "cmovgl" = MoveCond 4 Greater+ | s == "cmovlel" = MoveCond 4 LessOrEqual+ | s == "cmovll" = MoveCond 4 Less+ | s == "cmovnel" = MoveCond 4 NotEqual+ | s == "cmovneq" = MoveCond 8 NotEqual+ | s == "cmpb" = Compare 1+ | s == "cmpl" = Compare 4+ | s == "cmpsb" = CompareString 1+ | s == "cmpq" = Compare 8+ | s == "cmpw" = Compare 2+ | s == "cmpxchgl" = CompareExchange 4+ | s == "cmpxchgq" = CompareExchange 8+ | s == "cpuid" = Cpuid+ | s == "cvtpd2ps" = ConvertXmm 2 (FloatingPt Double) (FloatingPt Single) False+ | s == "cvtps2pd" = ConvertXmm 2 (FloatingPt Single) (FloatingPt Double) False+ | s == "cvtsd2ss" = ConvertXmm 1 (FloatingPt Double) (Int 0) False -- shouldn't this have a size postfix? it doesn't...+ | s == "cvtsi2sdl" = ConvertXmm 1 (Int 4) (FloatingPt Double) False+ | s == "cvtsi2sdq" = ConvertXmm 1 (Int 8) (FloatingPt Double) False+ | s == "cvtsi2ssl" = ConvertXmm 1 (Int 4) (FloatingPt Single) False+ | s == "cvtsi2ssq" = ConvertXmm 1 (Int 8) (FloatingPt Single) False+ | s == "cvtss2sd" = ConvertXmm 1 (FloatingPt Single) (FloatingPt Double) False+ | s == "cvttsd2si" = ConvertXmm 1 (FloatingPt Double) (Int 0) True -- shouldn't this have a size postfix? it doesn't...+ | s == "cvttss2siq" = ConvertXmm 1 (FloatingPt Single) (Int 8) True+ | s == "cwtl" = Convert 2 4 False+ | s == "decb" = Decrement 1+ | s == "decl" = Decrement 4+ | s == "decq" = Decrement 8+ | s == "divl" = Divide 4+ | s == "divq" = Divide 8+ | s == "divsd" = DivideScalar Double+ | s == "divss" = DivideScalar Single+ | s == "idivl" = DivideInt 4+ | s == "imull" = MultiplyInt 4+ | s == "imulq" = MultiplyInt 8+ | s == "incl" = Increment 4+ | s == "incq" = Increment 8+ | s == "ja" = Branch Above+ | s == "jae" = Branch AboveOrEqual+ | s == "jb" = Branch Below+ | s == "jbe" = Branch BelowOrEqual+ | s == "je" = Branch Equal+ | s == "jg" = Branch Greater+ | s == "jge" = Branch GreaterOrEqual+ | s == "jl" = Branch Less+ | s == "jle" = Branch LessOrEqual+ | s == "jne" = Branch NotEqual+ | s == "jns" = Branch NotSigned+ | s == "jmp" = Jump Nothing+ | s == "jmpq" = Jump $ Just 8+ | s == "jp" = Branch Parity+ | s == "js" = Branch Signed+ | s == "leal" = LoadEffAddr 4+ | s == "leaq" = LoadEffAddr 8+ | s == "leaveq" = Leave 8+ | s == "movabsq" = Move 8 Nothing+ | s == "movaps" = MoveAligned Single+ | s == "movb" = Move 1 Nothing+ | s == "movl" = Move 4 Nothing+ | s == "movlpd" = MovePacked Double False False+ | s == "movntps" = MoveNonTemp $ Right $ FloatingPt Single+ | s == "movq" = Move 8 Nothing+ | s == "movsbl" = Move 1 $ Just (4, True)+ | s == "movsbq" = Move 1 $ Just (8, True)+ | s == "movsd" = MoveString 4+ | s == "movslq" = Move 4 $ Just (8, True)+ | s == "movsq" = MoveString 8+ | s == "movss" = MoveScalar Single+ | s == "movswl" = Move 2 $ Just (4, True)+ | s == "movswq" = Move 2 $ Just (8, True)+ | s == "movups" = MoveUnaligned Single+ | s == "movw" = Move 2 Nothing+ | s == "movzbl" = Move 1 $ Just (4, False)+ | s == "movzwl" = Move 2 $ Just (4, False)+ | s == "mull" = Multiply 4+ | s == "mulq" = Multiply 8+ | s == "mulss" = MultiplyScalar $ FloatingPt Single+ | s == "negl" = Negate 4+ | s == "negq" = Negate 8+ | s == "nop" = NoOp+ | s == "nopl" = NoOp+ | s == "nopw" = NoOp+ | s == "notl" = BitwiseNot 4+ | s == "notq" = BitwiseNot 8+ | s == "orb" = BitwiseOr 1+ | s == "orl" = BitwiseOr 4+ | s == "orq" = BitwiseOr 8+ | s == "orw" = BitwiseOr 2+ | s == "popq" = Pop 8+ | s == "pushq" = Push 8+ | s == "roll" = Rotate 4 False+ | s == "retq" = Return 8+ | s == "sarl" = Shift 4 True True+ | s == "sarq" = Shift 8 True True+ | s == "sbbl" = SubtractBorrow 4+ | s == "sbbq" = SubtractBorrow 8+ | s == "seta" = Set Above+ | s == "setb" = Set Below+ | s == "setbe" = Set BelowOrEqual+ | s == "sete" = Set Equal+ | s == "setg" = Set Greater+ | s == "setl" = Set Less+ | s == "setle" = Set LessOrEqual+ | s == "setne" = Set NotEqual+ | s == "shll" = Shift 4 False False+ | s == "shlq" = Shift 8 False False+ | s == "shrb" = Shift 1 True False+ | s == "shrl" = Shift 4 True False+ | s == "shrq" = Shift 8 True False+ | s == "shrw" = Shift 2 True False+ | s == "stosq" = StoreString 8+ | s == "subb" = Subtract 1+ | s == "subl" = Subtract 4+ | s == "subq" = Subtract 8+ | s == "subss" = SubtractScalar Single+ | s == "testb" = Test 1+ | s == "testl" = Test 4+ | s == "testq" = Test 8+ | s == "testw" = Test 2+ | s == "ucomiss" = CompareUnordered Single+ | s == "unpcklpd" = Unpack Low Double+ | s == "unpcklps" = Unpack Low Single+ | s == "xaddl" = ExchangeAdd 4+ | s == "xchgl" = Exchange 4+ | s == "xchgq" = Exchange 8+ | s == "xchgw" = Exchange 2+ | s == "xorb" = BitwiseExclOr $ Int 1+ | s == "xorl" = BitwiseExclOr $ Int 4+ | s == "xorpd" = BitwiseExclOr $ FloatingPt Double+ | s == "xorps" = BitwiseExclOr $ FloatingPt Single+ | s == "xorq" = BitwiseExclOr $ Int 8+ | s == "xorw" = BitwiseExclOr $ Int 2+ | otherwise = error $ "toMnemonic: " ++ show s+++isCall+ :: Mnemonic+ -> Bool+isCall (Call _) = True+isCall _ = False++isJump+ :: Mnemonic+ -> Bool+isJump (Jump _) = True+isJump _ = False++isBranch+ :: Mnemonic+ -> Bool+isBranch (Branch _) = True+isBranch (Loop ) = True+isBranch _ = False++isReturn+ :: Mnemonic+ -> Bool+isReturn (Return _) = True+isReturn _ = False+
+ src/Bindings/Bfd/Disasm/I386/Operand.hs view
@@ -0,0 +1,53 @@+module Bindings.Bfd.Disasm.I386.Operand where++import Bindings.Bfd.Disasm.I386.Address+import Bindings.Bfd.Disasm.I386.EffectiveAddr+++data Operand = Abs {+ address :: Address+ }+ | DirD {+ direct :: String+ }+ | DirJ {+ direct :: String+ }+ | Imm {+ immed :: Int+ }+ | IndD {+ section :: String+ , effAddr :: EffectiveAddr+ , displacement :: Maybe Int+ , mbAddress :: Maybe Address+ }+ | IndJ {+ effAddr :: EffectiveAddr+ , displacement :: Maybe Int+ , mbAddress :: Maybe Address+ }+ -- must be last in the operand list in Insn+ | Length {+ len :: Int+ }+ deriving (Eq, Ord, Show)+++isAbs+ :: Operand+ -> Bool+isAbs (Abs _) = True+isAbs _ = False++isIndJ+ :: Operand+ -> Bool+isIndJ (IndJ _ _ _) = True+isIndJ _ = False++isDirJ+ :: Operand+ -> Bool+isDirJ (DirJ _) = True+isDirJ _ = False
+ src/Bindings/Bfd/Disasm/I386/Order.hs view
@@ -0,0 +1,6 @@+module Bindings.Bfd.Disasm.I386.Order where+++data Order = Low+ | High+ deriving (Show)
src/Bindings/Bfd/Disasm/I386/Parse.y view
@@ -7,12 +7,13 @@ import Data.Maybe import Data.Word -import Bindings.Bfd.Disasm.I386.Lex as L-import Bindings.Bfd.Disasm.I386.Insn-import Bindings.Bfd.Disasm.I386.Insn.EffectiveAddr-import Bindings.Bfd.Disasm.I386.Insn.Mnemonic as R-import Bindings.Bfd.Disasm.I386.Insn.Operand as O-import Bindings.Bfd.Disasm.I386.Insn.Prefix+import Bindings.Bfd.Disasm.I386.Address+import Bindings.Bfd.Disasm.I386.EffectiveAddr+import Bindings.Bfd.Disasm.I386.Insn as I+import Bindings.Bfd.Disasm.I386.Lex as L+import Bindings.Bfd.Disasm.I386.Mnemonic as R+import Bindings.Bfd.Disasm.I386.Operand as O+import Bindings.Bfd.Disasm.I386.Prefix } %name parse@@ -33,33 +34,33 @@ %% insn :: { Insn }- : PREFIXEDMNEMONIC operands { Insn (Prefix $ head $1) (R.Mnemonic $ head $ tail $1) $2 }- | MNEMONIC operands { Insn (Prefix "" ) (R.Mnemonic $1) $2 }+ : PREFIXEDMNEMONIC operands { Insn (toPrefix $ head $1) (toMnemonic $ head $ tail $1) $2 }+ | MNEMONIC operands { Insn (Nothing ) (toMnemonic $1) $2 } operands :: { [Operand] }- : {- empty -} { [ ]} -- nop- | absolute { [$1 ]} -- jle 12345- | immed { [$1 ]} -- pushq $12345- | directD { [$1 ]} -- inc %rax- | directJ { [$1 ]} -- callq *%rdx- | indirD address { [$1 { O.address = $2 } ]} -- inc 12345(%rax)- | indirJ address { [$1 { O.address = $2 } ]} -- callq *12345(%rbx)- | directD ',' directD { [$1 , $3 ]} -- mov %rax,%rbx- | directD ',' indirD address { [$1 , $3 { O.address = $4 } ]} -- mov %rax,12345(%rbx)- | directD ',' immed { [$1 , $3 ]} -- out %ax,$0x12- | indirD ',' directD address { [$1 { O.address = $4 }, $3 ]} -- mov 12345(%rbx),%rax- | indirD ',' indirD { [$1 , $3 ]} -- rep movsq %ds:(%rsi),%es:(%rdi)- | immed ',' directD { [$1 , $3 ]} -- mov $12345,%rax- | immed ',' indirD address { [$1 , $3 { O.address = $4 } ]} -- mov $12345,12345(%rax)- | immed ',' directD ',' directD { [$1 , $3 , $5]} -- imul $12345,%rax,%rbx- | immed ',' indirD ',' directD address { [$1 , $3 , $5]} -- imul $12345,12345(%rbp),%eax+ : {- empty -} { [ ]} -- nop+ | absolute { [$1 ]} -- jle 12345+ | immed { [$1 ]} -- pushq $12345+ | directD { [$1 ]} -- inc %rax+ | directJ { [$1 ]} -- callq *%rdx+ | indirD address { [$1 { O.mbAddress = $2 } ]} -- inc 12345(%rax)+ | indirJ address { [$1 { O.mbAddress = $2 } ]} -- callq *12345(%rbx)+ | directD ',' directD { [$1 , $3 ]} -- mov %rax,%rbx+ | directD ',' indirD address { [$1 , $3 { O.mbAddress = $4 } ]} -- mov %rax,12345(%rbx)+ | directD ',' immed { [$1 , $3 ]} -- out %ax,$0x12+ | indirD ',' directD address { [$1 { O.mbAddress = $4 }, $3 ]} -- mov 12345(%rbx),%rax+ | indirD ',' indirD { [$1 , $3 ]} -- rep movsq %ds:(%rsi),%es:(%rdi)+ | immed ',' directD { [$1 , $3 ]} -- mov $12345,%rax+ | immed ',' indirD address { [$1 , $3 { O.mbAddress = $4 } ]} -- mov $12345,12345(%rax)+ | immed ',' directD ',' directD { [$1 , $3 , $5]} -- imul $12345,%rax,%rbx+ | immed ',' indirD ',' directD address { [$1 , $3 , $5]} -- imul $12345,12345(%rbp),%eax -address :: { Maybe Int }- : {- empty -} { Nothing }- | '#' ADDRESS { Just $2 }+address :: { Maybe Address }+ : {- empty -} { Nothing }+ | '#' ADDRESS { Just $ Left $2 } absolute :: { Operand }- : ADDRESS { Abs $1 }+ : ADDRESS { Abs $ Left $1 } immed :: { Operand } : CONSTANT { Imm $1 }
+ src/Bindings/Bfd/Disasm/I386/Precision.hs view
@@ -0,0 +1,6 @@+module Bindings.Bfd.Disasm.I386.Precision where+++data Precision = Single+ | Double+ deriving (Show)
+ src/Bindings/Bfd/Disasm/I386/Prefix.hs view
@@ -0,0 +1,20 @@+module Bindings.Bfd.Disasm.I386.Prefix where++import Bindings.Bfd.Disasm.I386.CondCode+++data Prefix = Lock+ | Repeat {+ condCode :: Maybe CondCode+ }+ deriving (Show)++toPrefix+ :: String+ -> Maybe Prefix+toPrefix s+ | s == "lock" = Just Lock+ | take 3 s == "rep" = Just $ Repeat $ toCondCode $ drop 3 s+ | otherwise = error $ "toPrefix: " ++ show s++
+ src/Bindings/Bfd/Disasm/I386/Term.hs view
@@ -0,0 +1,29 @@+module Bindings.Bfd.Disasm.I386.Term where++import Bindings.Bfd.Disasm.I386.Operand+++data Term = Term `Add` Term+ | Term `BitAnd` Term+ | Term `BitExclOr` Term+ | Term `BitOr` Term+ | Term `BitTest` Term+ | Term `GreaterOrEqual` Term+ | Term `Subtract` Term+ | If Term Term Term+ | Flag Char Term -- right hand side+ -- terminals+ | Opr Int Operand -- Int is width+ | Stk Int Int+ | Reg String+ | Flg Char+ | Con Int -- assumed to be 64-bits+ | Udf -- undefined+ | Nul+ | Todo -- FIXME+ deriving (Show)++type Assign = (Term, Term)+++
+ src/Bindings/Bfd/Disasm/I386/XmmType.hs view
@@ -0,0 +1,12 @@+module Bindings.Bfd.Disasm.I386.XmmType where++import Bindings.Bfd.Disasm.I386.Precision+++data XmmType = Int {+ width :: Int+ }+ | FloatingPt {+ precision :: Precision+ }+ deriving (Show)
src/Bindings/Bfd/Disasm/Info.hsc view
@@ -34,7 +34,7 @@ data Info = Info Info0 Fd- deriving (Eq)+ deriving (Eq, Show) type Info0 = Ptr Info'
src/Bindings/Bfd/Exception.hs view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -26,7 +26,7 @@ import Foreign.C import Foreign.Ptr -import Bindings.Bfd.Target+import {-# SOURCE #-} Bindings.Bfd.Target type FunctionName = String@@ -38,7 +38,7 @@ | InvalidTarget FunctionName FilePath TargetName | WrongFormat | WrongObjectFormat - | InvalidOperation + | InvalidOperation String String String | NoMemory | NoSymbols | NoArmap @@ -62,7 +62,7 @@ show (InvalidTarget fn fp tn ) = fp ++ ": " ++ fn ++ ": '" ++ tn ++ "': invalid target" show (WrongFormat ) = "3" show (WrongObjectFormat ) = "4"- show (InvalidOperation ) = "5"+ show (InvalidOperation s1 s2 s3 ) = s2 ++ ": " ++ s1 ++ ": '" ++ s3 ++ "': invalid operation" show (NoMemory ) = "6" show (NoSymbols ) = "7" show (NoArmap ) = "8"@@ -104,7 +104,7 @@ do res <- f if res == False- then throwException fn ff ""+ then throwException fn ff ff else return res throwException@@ -124,7 +124,7 @@ 2 -> InvalidTarget s1 s2 s3 3 -> WrongFormat 4 -> WrongObjectFormat - 5 -> InvalidOperation + 5 -> InvalidOperation s1 s2 s3 6 -> NoMemory 7 -> NoSymbols 8 -> NoArmap
src/Bindings/Bfd/Format.hs view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,12 +15,16 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>. -module Bindings.Bfd.Format where+-- | Describes the underlying format of the file that the 'Bfd' represents.+module Bindings.Bfd.Format (+ -- * Types+ Format(..)+) where -data Format = Unknown- | Object- | Archive- | Core+data Format = Unknown -- ^ File format is unknown+ | Object -- ^ Linker\/assembler\/compiler output+ | Archive -- ^ Object archive file+ | Core -- ^ Core dump deriving (Enum, Eq, Show)
src/Bindings/Bfd/Section.hs-boot view
@@ -46,6 +46,15 @@ :: Section -> IO Vma +getSize+ :: Section+ -> IO Int++setVma+ :: Section+ -> Vma+ -> IO ()+ isUndefined :: Section -> Bool@@ -53,3 +62,6 @@ isAbsolute :: Section -> Bool++externsName+ :: String
src/Bindings/Bfd/Section.hsc view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -18,35 +18,40 @@ module Bindings.Bfd.Section ( -- * Types Section- , Section' , SectionName -- * Functions -- ** Creating , Bindings.Bfd.Section.mk- -- ** Reading\/Writing- , getAlignment- , setAlignment , Bindings.Bfd.Section.getContents+ -- * Flags , Bindings.Bfd.Section.getFlags- , getLimit- , getLma- , Bindings.Bfd.Section.getName+ -- * SectionName , Bindings.Bfd.Section.setName+ , Bindings.Bfd.Section.getName , getNext+ -- * Section Size+ , Bindings.Bfd.Section.getSize , getRawsize+ , getLimit , Bindings.Bfd.Section.getOutputSection , setOutputSection , getRelocatedContents , getRelocations- , Bindings.Bfd.Section.getSize , Bindings.Bfd.Section.getSymbol- , getVma+ -- * Addressing , setVma+ , getVma+ , getLma+ , setAlignment+ , getAlignment -- ** Testing , isAbsolute , isCommon , isExterns+ , externsName , isUndefined+ -- * Internal+ , Section' ) where import Data.Bits@@ -136,6 +141,8 @@ (#poke struct bfd_section, name) buf cs | off == (#offset struct bfd_section, vma) = (#poke struct bfd_section, vma) buf (unSection'Vma val)+ | off == (#offset struct bfd_section, lma) =+ (#poke struct bfd_section, lma) buf (unSection'Vma val) | off == (#offset struct bfd_section, alignment_power) = (#poke struct bfd_section, alignment_power) buf (unSection'AlignmentPower val) | off == (#offset struct bfd_section, output_section) =@@ -156,20 +163,6 @@ return sect -getAlignment- :: Section- -> IO Int-getAlignment sect =- do- ap <- peekByteOff sect (#offset struct bfd_section, alignment_power)- return $ unSection'AlignmentPower ap--setAlignment- :: Section- -> Int- -> IO ()-setAlignment sect align = pokeByteOff sect (#offset struct bfd_section, alignment_power) (AlignmentPower align)- getContents :: Section -> Bfd@@ -178,14 +171,17 @@ -> IO Contents getContents sect bfd offset count = allocaArray count f where- f ptr =+ f p = do let offset' = fromIntegral offset count' = fromIntegral count- _ <- c_bfd_get_section_contents bfd sect ptr offset' count' -- FIXME: if not ok, throw exception- peekCAStringLen (ptr, count)+ _ <- c_bfd_get_section_contents (ptr bfd) sect p offset' count' -- FIXME: if not ok, throw exception+ peekCAStringLen (p, count) +-- -----------------------------------------------------------------------------++-- | Returns a list of the 'Section's 'Flags'. getFlags :: Section -> IO [Flags]@@ -198,29 +194,15 @@ f e = unSection'Flags flags .&. (bit $ fromEnum e) /= 0 return flags' -getLimit- :: Section- -> Bfd- -> IO Int-getLimit sect bfd =- do- rs <- getRawsize sect- case rs == 0 of- True ->- do- sz <- Bindings.Bfd.Section.getSize sect- opb <- getOctetsPerByte bfd- return $ sz `quot` opb- False -> return rs+-- ----------------------------------------------------------------------------- -getLma+setName :: Section- -> IO Vma-getLma sect =- do- lma <- peekByteOff sect (#offset struct bfd_section, lma)- return $ unSection'Lma lma+ -> SectionName+ -> IO ()+setName sect name = pokeByteOff sect (#offset struct bfd_section, name) (Bindings.Bfd.Section.Name name) +-- | Returns the 'SectionName'. getName :: Section -> IO SectionName@@ -229,11 +211,7 @@ n <- peekByteOff sect (#offset struct bfd_section, name) return $ unSection'Name n -setName- :: Section- -> SectionName- -> IO ()-setName sect name = pokeByteOff sect (#offset struct bfd_section, name) (Bindings.Bfd.Section.Name name)+-- ----------------------------------------------------------------------------- getNext :: Section@@ -243,6 +221,17 @@ s <- peekByteOff sect (#offset struct bfd_section, next) return $ unSection'Next s +-- -----------------------------------------------------------------------------++-- | Return the 'Size' of the 'Section'.+getSize+ :: Section+ -> IO Size+getSize sect = + do+ s <- peekByteOff sect (#offset struct bfd_section, size)+ return $ unSection'Size s+ getRawsize :: Section -> IO Size@@ -251,6 +240,26 @@ rs <- peekByteOff sect (#offset struct bfd_section, rawsize) return $ unSection'Rawsize rs +-- | If the raw size (see 'getRawSize') is not zero then return the raw size.+-- Otherwise return the division of the size (see 'getSize') by the octets per +-- byte (see 'getOctetsPerByte').+getLimit+ :: Section+ -> Bfd+ -> IO Int+getLimit sect bfd =+ do+ rs <- getRawsize sect+ case rs == 0 of+ True ->+ do+ sz <- Bindings.Bfd.Section.getSize sect+ opb <- getOctetsPerByte bfd+ return $ sz `quot` opb+ False -> return rs++-- -----------------------------------------------------------------------------+ getOutputSection :: Section -> IO Section@@ -272,12 +281,12 @@ -> IO [Relocation] getRelocations sect bfd st = do- bound <- c_bfd_get_reloc_upper_bound bfd sect+ bound <- c_bfd_get_reloc_upper_bound (ptr bfd) sect let ptrs = fromIntegral bound `quot` (#const sizeof(arelent *)) ppr <- mallocArray ptrs- count <- c_bfd_canonicalize_reloc bfd sect ppr $ tablePtr st+ count <- c_bfd_canonicalize_reloc (ptr bfd) sect ppr $ tablePtr st prs <- peekArray (fromIntegral count) ppr mapM peek prs @@ -291,26 +300,18 @@ count <- Bindings.Bfd.Section.getSize sect allocaArray count (f count) where- f count ptr = + f count p = do let li = nullPtr isR = fromBool False lo <- LinkOrder.mk sect setOutputSection sect sect- buf <- c_bfd_get_relocated_section_contents bfd li lo ptr isR $ tablePtr syms+ buf <- c_bfd_get_relocated_section_contents (ptr bfd) li lo p isR $ tablePtr syms case buf == nullPtr of True -> error "bfd_get_relocated_section_contents failed" False -> peekCAStringLen (buf, count) -getSize- :: Section- -> IO Size-getSize sect = - do- s <- peekByteOff sect (#offset struct bfd_section, size)- return $ unSection'Size s- getSymbol :: Section -> IO Symbol@@ -319,6 +320,21 @@ sym <- peekByteOff sect (#offset struct bfd_section, symbol) return $ unSection'Symbol sym +-- -----------------------------------------------------------------------------++-- | Sets both the VMA and LMA of the 'Section' to the given 'Vma' and sets the+-- 'Section's /user_set_vma/ flag to 'True'.+setVma+ :: Section+ -> Vma+ -> IO ()+setVma sect vma = + do+ pokeByteOff sect (#offset struct bfd_section, vma) (Vma vma)+ pokeByteOff sect (#offset struct bfd_section, lma) (Vma vma)+ c__section_poke_user_set_vma sect 1++-- | Returns the 'Vma' of the 'Section'. getVma :: Section -> IO Vma@@ -327,18 +343,39 @@ s <- peekByteOff sect (#offset struct bfd_section, vma) return $ unSection'Vma s -setVma+-- | Returns the LMA of the 'Section'.+getLma :: Section- -> Vma+ -> IO Vma+getLma sect =+ do+ lma <- peekByteOff sect (#offset struct bfd_section, lma)+ return $ unSection'Lma lma++-- | Sets the alignment power of the 'Section'.+setAlignment+ :: Section+ -> Int -> IO ()-setVma sect vma = pokeByteOff sect (#offset struct bfd_section, vma) (Vma vma)+setAlignment sect align = pokeByteOff sect (#offset struct bfd_section, alignment_power) (AlignmentPower align) +-- | Returns the alignment power of the 'Section'.+getAlignment+ :: Section+ -> IO Int+getAlignment sect =+ do+ ap <- peekByteOff sect (#offset struct bfd_section, alignment_power)+ return $ unSection'AlignmentPower ap +-- -----------------------------------------------------------------------------+ isAbsolute :: Section -> Bool isAbsolute sect = sect == c_bfd_abs_section +-- | Return 'True' if 'IsCommon' is found in the 'Section's 'Flags'. isCommon :: Section -> IO Bool@@ -353,15 +390,19 @@ isExterns sect = do n <- Bindings.Bfd.Section.getName sect- return $ n == "externs"+ return $ n == externsName +externsName+ :: String+externsName = "externs"+ isUndefined :: Section -> Bool isUndefined sect = sect == c_bfd_und_section -- Given a section-+{- createSection :: Section -> Vma@@ -379,7 +420,7 @@ setVma sect vma' return (vma' + size, (sect, vma')) _ -> return (origVma + size, (sect, origVma))-+-} unSection'Name :: Section'@@ -443,7 +484,7 @@ foreign import ccall unsafe "bfd.h bfd_get_section_contents" c_bfd_get_section_contents- :: Bfd+ :: Ptr Bfd' -> Section -> Contents' -> FilePtr'@@ -451,19 +492,19 @@ -> IO Bool foreign import ccall unsafe "bfd.h bfd_get_reloc_upper_bound" c_bfd_get_reloc_upper_bound- :: Bfd+ :: Ptr Bfd' -> Section -> IO CLong foreign import ccall unsafe "bfd.h bfd_canonicalize_reloc" c_bfd_canonicalize_reloc- :: Bfd+ :: Ptr Bfd' -> Section -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong foreign import ccall unsafe "bfd.h bfd_get_relocated_section_contents" c_bfd_get_relocated_section_contents- :: Bfd+ :: Ptr Bfd' -> LinkInfo -> LinkOrder -> Contents'@@ -476,3 +517,8 @@ foreign import ccall unsafe "bfd.h &bfd_abs_section" c_bfd_abs_section :: Section++foreign import ccall unsafe "section.h _section_poke_user_set_vma" c__section_poke_user_set_vma+ :: Section+ -> CInt+ -> IO ()
src/Bindings/Bfd/Symbol.hsc view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -18,23 +18,26 @@ module Bindings.Bfd.Symbol ( -- * Types Symbol- , Symbol' , SymbolName- -- * Foo+ -- * Addressing , getBase+ , setValue+ , getValue+ , getValue' , getBfd , getFlags , Bindings.Bfd.Symbol.getFlavour- , Bindings.Bfd.Symbol.getName+ -- * SymbolName , setName- , getSection+ , Bindings.Bfd.Symbol.getName+ -- * Sections , setSection+ , getSection , Bindings.Bfd.Symbol.getOutputSection- , getSize- , getValue- , setValue- , getValue'+ , Bindings.Bfd.Symbol.getSize , Bindings.Bfd.Symbol.print+ -- * Internal+ , Symbol' ) where import Data.Bits@@ -51,7 +54,7 @@ import Bindings.Bfd.Misc import {-# SOURCE #-} Bindings.Bfd.Section as Section import Bindings.Bfd.Symbol.Flags as SymbolFlags-import Bindings.Bfd.Target+import Bindings.Bfd.Target as Target #include <bfd.h> @@ -60,7 +63,7 @@ type Symbol = Ptr Symbol' -data Symbol' = Bfd Bfd +data Symbol' = Bfd (Ptr Bfd') | Name CString | Value Vma | Flags Int@@ -74,8 +77,8 @@ peekByteOff buf off | off == (#offset struct bfd_symbol, the_bfd) = do- val <- (#peek struct bfd_symbol, the_bfd) buf :: IO Bfd- return $ Bfd val+ val <- (#peek struct bfd_symbol, the_bfd) buf :: IO (Ptr Bfd')+ return $ Bindings.Bfd.Symbol.Bfd val | off == (#offset struct bfd_symbol, name) = do val <- (#peek struct bfd_symbol, name) buf :: IO Word@@ -105,8 +108,8 @@ unSymbol'TheBfd :: Symbol'- -> Bfd-unSymbol'TheBfd (Bfd b) = b+ -> Ptr Bfd'+unSymbol'TheBfd (Bindings.Bfd.Symbol.Bfd b) = b unSymbol'TheBfd _ = error "unSymbol'TheBfd" unSymbol'Name@@ -134,6 +137,9 @@ unSymbol'Section _ = error "unSymbol'Section" +-- -----------------------------------------------------------------------------++-- | Returns the 'Vma' of the 'Section' that the symbol belongs to. getBase :: Symbol -> IO Vma@@ -142,13 +148,46 @@ sect <- getSection sym getVma sect +-- | Set the offset of the 'Symbol' within its 'Section'.+setValue+ :: Symbol+ -> Vma+ -> IO ()+setValue sym vma = pokeByteOff sym (#offset struct bfd_symbol, value) (Value vma)++-- | Returns the offset of the 'Symbol' within its 'Section'.+getValue+ :: Symbol+ -> IO Vma+getValue sym =+ do+ v <- peekByteOff sym (#offset struct bfd_symbol, value)+ return $ unSymbol'Value v++-- | Returns the absolute 'Vma' of the 'Symbol' (that is, its 'getBase' + +-- 'getValue'.+getValue'+ :: Symbol+ -> IO Vma+getValue' sym =+ do+ base <- getBase sym+ val <- getValue sym+ return $ base + val++-- -----------------------------------------------------------------------------++-- | Returns the 'Bfd' that the 'Symbol' belongs to.+--+-- /Note:/ If the returned 'Bfd' should not be passed to 'close' or +-- 'closeAllDone' there will be memory leaks. getBfd :: Symbol -> IO Bfd getBfd sym = do bfd <- peekByteOff sym (#offset struct bfd_symbol, the_bfd)- return $ unSymbol'TheBfd bfd+ return $ Bfd.mk $ unSymbol'TheBfd bfd getFlags :: Symbol@@ -162,6 +201,8 @@ f e = unSymbol'Flags flags .&. (bit $ fromEnum e) /= 0 return flags' +-- | If the 'Symbol' has the 'Synthetic' flag set then return 'Unknown', +-- otherwise returns 'getFlavour' on the 'Symbol's 'Bfd'\'s 'Target'. getFlavour :: Symbol -> IO Flavour@@ -173,16 +214,14 @@ False -> do bfd <- getBfd sym- Bfd.getFlavour bfd+ targ <- getTarget bfd+ Target.getFlavour targ -getName- :: Symbol- -> IO SymbolName-getName sym =- do- s' <- peekByteOff sym (#offset struct bfd_symbol, name)- peekCString $ unSymbol'Name s'+-- ----------------------------------------------------------------------------- +-- | Sets the 'SymbolName' of the 'Symbol'.+--+-- /Note:/ The memory allocated to the 'SymbolName' is never freed. setName :: Symbol -> SymbolName@@ -192,20 +231,34 @@ cs <- newCString name pokeByteOff sym (#offset struct bfd_symbol, name) $ Bindings.Bfd.Symbol.Name cs -getSection+-- | Returns the 'SymbolName' of the 'Symbol'.+getName :: Symbol- -> IO Section-getSection sym =+ -> IO SymbolName+getName sym = do- sect <- peekByteOff sym (#offset struct bfd_symbol, section)- return $ unSymbol'Section sect+ s' <- peekByteOff sym (#offset struct bfd_symbol, name)+ peekCString $ unSymbol'Name s' +-- -----------------------------------------------------------------------------++-- | Sets the 'Symbol's 'Section'. setSection :: Symbol -> Section -> IO () setSection sym sect = pokeByteOff sym (#offset struct bfd_symbol, section) $ Section sect +-- | Returns the 'Symbol's 'Section'.+getSection+ :: Symbol+ -> IO Section+getSection sym =+ do+ sect <- peekByteOff sym (#offset struct bfd_symbol, section)+ return $ unSymbol'Section sect++-- | Returns the 'Symbol's output 'Section'. getOutputSection :: Symbol -> IO Section@@ -214,6 +267,8 @@ sect <- getSection sym Section.getOutputSection sect +-- -----------------------------------------------------------------------------+ getSize :: Symbol -> Bfd@@ -224,29 +279,6 @@ let size = read $ "0x" ++ (head $ tail $ reverse $ words str) return size--getValue- :: Symbol- -> IO Vma-getValue sym =- do- v <- peekByteOff sym (#offset struct bfd_symbol, value)- return $ unSymbol'Value v--setValue- :: Symbol- -> Vma- -> IO ()-setValue sym vma = pokeByteOff sym (#offset struct bfd_symbol, value) (Value vma)--getValue'- :: Symbol- -> IO Vma-getValue' sym =- do- base <- getBase sym- val <- getValue sym- return $ base + val print :: Symbol
src/Bindings/Bfd/Symbol/Flags.hs view
@@ -21,8 +21,7 @@ ) where -data Flags = NoFlags- | Local+data Flags = Local | Global | Debugging | Function
src/Bindings/Bfd/SymbolTable.hs view
@@ -20,12 +20,14 @@ import Control.Monad import Data.Char+import qualified Data.IntMap as IntMap import Data.List-import qualified Data.Map as Map import Foreign.Marshal import Foreign.Ptr +import {-# SOURCE #-} Bindings.Bfd+import Bindings.Bfd.Disasm.I386.Insn import Bindings.Bfd.Misc import {-# SOURCE #-} Bindings.Bfd.Section as Section import Bindings.Bfd.Symbol as Symbol@@ -76,47 +78,51 @@ resolveExterns :: SymbolTable- -> [(Section, Vma)]- -> IO SymbolTable-resolveExterns symt sectList =+ -> Bfd+ -> IO (SymbolTable, Section, IntMap.IntMap Insn)+resolveExterns symTab bfd = do- syms <- toList symt- undefs <- filterM getUndefs syms+ -- Create the externs section following the last section in the file.+ let- (extSect, extVma) = last sectList- foldM_ pointToExtern (extSect, extVma) undefs- map' <- sectMap- mapM_ (sectSymValue map') syms- return symt- where- sectSymValue map0 sym =- do- sect <- getSection sym- case isAbsolute sect of- True -> return () -- absolute symbols are already absolute- False ->- do- name <- Section.getName sect- value <- getValue sym- let- t =- case Map.lookup name map0 of- Just v -> v- Nothing -> error $ "lookup on sect: " ++ show name ++ " " ++ show value ++ "\n" ++ show map0- setValue sym $ value + t- pointToExtern (es,ev) sym =- do- setValue sym ev- setSection sym es- return (es, ev + externSpacing) - getUndefs sym =- do- sect <- getSection sym- return $ isUndefined sect- sectMap = - do- sectList' <- mapM (\(s,v) -> Section.getName s >>= \n -> return (n,v)) sectList- return $ Map.fromList sectList'+ align = 3+ externsSect <- Section.mk externsName align++ sects <- getSections bfd+ let+ lastSect = last sects+ lastSectVma <- getVma lastSect+ lastSectSize <- Section.getSize lastSect++ let+ externsVma = alignToPower (lastSectVma + lastSectSize) align+ setVma externsSect externsVma++ -- Make a list of the undefined Symbols++ syms <- toList symTab++ let+ isUndef sym =+ do+ sect <- getSection sym+ return $ isUndefined sect+ undefs <- filterM isUndef syms++ -- Set the value of each undefined Symbol to a location in the+ -- externs section++ let+ pointToExtern (vma, cs) sym =+ do+ setValue sym vma+ setSection sym externsSect+ name <- Symbol.getName sym+ return (vma + externSpacing, (vma, Extern name) : cs)++ (_,externs) <- foldM pointToExtern (externsVma,[]) undefs++ return (symTab, externsSect, IntMap.fromList externs) externSpacing :: Int
src/Bindings/Bfd/Target.hsc view
@@ -1,6 +1,6 @@ -- This file is part of Bindings-bfd. ----- Copyright (C) 2010 Michael Nelson+-- Copyright (C) 2010,2011 Mick Nelso -- -- Bindings-bfd is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by@@ -15,18 +15,18 @@ -- You should have received a copy of the GNU Lesser General Public License -- along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>. +-- | The "Target" represents a particular back-end used to interpret the "Bfd". module Bindings.Bfd.Target ( -- * Types Target- , Target' , TargetName- -- * Functions- -- ** Platform- , list+ -- * Platform+ , listSupported , setDefault- -- ** Target+ -- * Byte Order , getByteorder , getHeaderByteorder+ -- * , getObjectFlags , getSectionFlags , Bindings.Bfd.Target.getFlavour@@ -40,7 +40,18 @@ -- ** Relocations , getDynamicRelocUpperBound , canonicalizeDynamicReloc+ -- * Testing+ -- ** Byte Order+ , isBigEndian+ , isLittleEndian+ , isHeaderBigEndian+ , isHeaderLittleEndian+ -- ** Coff Family+ , isCoffFamily+ -- * , getPrintSymbol+ -- * Internal+ , Target' ) where import Data.Bits@@ -53,6 +64,7 @@ import {-# SOURCE #-} Bindings.Bfd import Bindings.Bfd.Endian+import Bindings.Bfd.Exception import Bindings.Bfd.Flags as BfdFlags import Bindings.Bfd.Flavour import Bindings.Bfd.Misc@@ -74,14 +86,14 @@ | HeaderByteorder Endian | ObjectFlags [BfdFlags.Flags] | SectionFlags [SectionFlags.Flags]- | GetSymtabUpperBound (FunPtr (Bfd -> IO CLong))- | CanonicalizeSymtab (FunPtr (Bfd -> Ptr Symbol -> IO CLong))- | PrintSymbol (FunPtr (Bfd -> File -> Symbol -> CUInt -> IO ()))- | GetDynamicSymtabUpperBound (FunPtr (Bfd -> IO CLong))- | CanonicalizeDynamicSymtab (FunPtr (Bfd -> Ptr Symbol -> IO CLong))- | GetSyntheticSymtab (FunPtr (Bfd -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong))- | GetDynamicRelocUpperBound (FunPtr (Bfd -> IO CLong))- | CanonicalizeDynamicReloc (FunPtr (Bfd -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong))+ | GetSymtabUpperBound (FunPtr (Ptr Bfd' -> IO CLong))+ | CanonicalizeSymtab (FunPtr (Ptr Bfd' -> Ptr Symbol -> IO CLong))+ | PrintSymbol (FunPtr (Ptr Bfd' -> File -> Symbol -> CUInt -> IO ()))+ | GetDynamicSymtabUpperBound (FunPtr (Ptr Bfd' -> IO CLong))+ | CanonicalizeDynamicSymtab (FunPtr (Ptr Bfd' -> Ptr Symbol -> IO CLong))+ | GetSyntheticSymtab (FunPtr (Ptr Bfd' -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong))+ | GetDynamicRelocUpperBound (FunPtr (Ptr Bfd' -> IO CLong))+ | CanonicalizeDynamicReloc (FunPtr (Ptr Bfd' -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong)) deriving (Show) instance Storable Target' where@@ -156,24 +168,30 @@ | otherwise = error $ "internal error: Bfd.Target.peekByteOff " ++ show off -list+-- | Return a list of target names that can possibly be interpreted by this+-- particular platform.+listSupported :: IO [TargetName]-list = +listSupported = do let pts = c_bfd_target_list ps <- peekArray0 nullPtr pts- mapM peekCString ps+ res <- mapM peekCString ps+ free pts -- FIXME is this dodgy?+ return res +-- | Set the default target name for use with 'open' etc. when 'TargetName' is+-- equal to \"default\" or empty. Returns 'True' if successful.+--+-- /Possible exceptions:/ 'InvalidTarget' setDefault :: TargetName -> IO Bool setDefault tn = do- s <- newCString tn- r <- c_bfd_set_default_target s- return $ toBool r-+ r <- withCString tn (\s -> c_bfd_set_default_target s)+ throwExceptionIfFalse "setDefault" tn (return $ toBool r) getByteorder :: Target@@ -233,7 +251,7 @@ getSymtabUpperBound targ bfd = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_get_symtab_upper_bound)- r <- d_Bfd_CLong (unTarget'GetSymtabUpperBound fn) bfd+ r <- d_Bfd_CLong (unTarget'GetSymtabUpperBound fn) $ ptr bfd return $ fromIntegral r canonicalizeSymtab@@ -244,7 +262,7 @@ canonicalizeSymtab targ bfd ps = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_canonicalize_symtab)- r <- d_Bfd_PtrSymbol_CLong (unTarget'CanonicalizeSymtab fn) bfd ps+ r <- d_Bfd_PtrSymbol_CLong (unTarget'CanonicalizeSymtab fn) (ptr bfd) ps return $ fromIntegral r getDynamicSymtabUpperBound@@ -254,7 +272,7 @@ getDynamicSymtabUpperBound targ bfd = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_get_dynamic_symtab_upper_bound)- r <- d_Bfd_CLong (unTarget'GetDynamicSymtabUpperBound fn) bfd+ r <- d_Bfd_CLong (unTarget'GetDynamicSymtabUpperBound fn) (ptr bfd) return $ fromIntegral r canonicalizeDynamicSymtab@@ -265,7 +283,7 @@ canonicalizeDynamicSymtab targ bfd ps = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_canonicalize_dynamic_symtab)- r <- d_Bfd_PtrSymbol_CLong (unTarget'CanonicalizeDynamicSymtab fn) bfd ps+ r <- d_Bfd_PtrSymbol_CLong (unTarget'CanonicalizeDynamicSymtab fn) (ptr bfd) ps return $ fromIntegral r getSyntheticSymtab@@ -278,7 +296,7 @@ getSyntheticSymtab targ bfd sst dst synth = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_get_synthetic_symtab)- r <- d_Bfd_CLong_PtrSymbol_CLong_PtrSymbol_PtrSymbol_CLong (fn' fn) bfd sts stp dts dtp synth+ r <- d_Bfd_CLong_PtrSymbol_CLong_PtrSymbol_PtrSymbol_CLong (fn' fn) (ptr bfd) sts stp dts dtp synth return $ fromIntegral r where fn' = unTarget'GetSyntheticSymtab@@ -294,7 +312,7 @@ getDynamicRelocUpperBound targ bfd = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_get_dynamic_reloc_upper_bound)- r <- d_Bfd_CLong (unTarget'GetDynamicRelocUpperBound fn) bfd+ r <- d_Bfd_CLong (unTarget'GetDynamicRelocUpperBound fn) (ptr bfd) return $ fromIntegral r canonicalizeDynamicReloc@@ -306,10 +324,66 @@ canonicalizeDynamicReloc targ bfd rels syms = do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_canonicalize_dynamic_reloc)- r <- d_Bfd_PtrPtrRelocation_PtrSymbol_CLong (unTarget'CanonicalizeDynamicReloc fn) bfd rels syms+ r <- d_Bfd_PtrPtrRelocation_PtrSymbol_CLong (unTarget'CanonicalizeDynamicReloc fn) (ptr bfd) rels syms return $ fromIntegral r +-- Testing =====================================================================+-- Byte Order ------------------------------------------------------------------ +-- | Returns 'True' if the 'Target's byte order (see 'getByteorder') is 'Big'.+-- Otherwise 'False'.+isBigEndian+ :: Target+ -> IO Bool+isBigEndian targ =+ do+ bo <- getByteorder targ+ return $ bo == Big++-- | Returns 'True' if the 'Target's byte order (see 'getByteorder') is 'Little'.+-- Otherwise 'False'.+isLittleEndian+ :: Target+ -> IO Bool+isLittleEndian targ =+ do+ bo <- getByteorder targ+ return $ bo == Little++-- | Returns 'True' if the 'Target's header byte order (see 'getHeaderByteOrder')+-- is 'Big'. Otherwise 'False'.+isHeaderBigEndian+ :: Target+ -> IO Bool+isHeaderBigEndian targ =+ do+ bo <- getHeaderByteorder targ+ return $ bo == Big++-- | Returns 'True' if the 'Target's header byte order (see 'getHeaderByteOrder')+-- is 'Little'. Otherwise 'False'.+isHeaderLittleEndian+ :: Target+ -> IO Bool+isHeaderLittleEndian targ =+ do+ bo <- getHeaderByteorder targ+ return $ bo == Little++-- Coff Family -----------------------------------------------------------------++-- | Returns 'True' if the 'Flavour' of the 'Target' is either 'Coff' or 'Xcoff'.+-- Otherwise 'False'.+isCoffFamily+ :: Target+ -> IO Bool+isCoffFamily targ =+ do+ flav <- getFlavour targ+ return $ flav == Coff || flav == Xcoff++-- -----------------------------------------------------------------------------+ unTarget'Name :: Target' -> TargetName@@ -348,49 +422,49 @@ unTarget'GetSymtabUpperBound :: Target'- -> FunPtr (Bfd -> IO CLong)+ -> FunPtr (Ptr Bfd' -> IO CLong) unTarget'GetSymtabUpperBound (GetSymtabUpperBound fn) = fn unTarget'GetSymtabUpperBound _ = error "unTarget'GetSymtabUpperBound" unTarget'CanonicalizeSymtab :: Target'- -> FunPtr (Bfd -> Ptr Symbol -> IO CLong)+ -> FunPtr (Ptr Bfd' -> Ptr Symbol -> IO CLong) unTarget'CanonicalizeSymtab (CanonicalizeSymtab fn) = fn unTarget'CanonicalizeSymtab _ = error "unTarget'CanonicalizeSymtab" unTarget'GetDynamicSymtabUpperBound :: Target'- -> FunPtr (Bfd -> IO CLong)+ -> FunPtr (Ptr Bfd' -> IO CLong) unTarget'GetDynamicSymtabUpperBound (GetDynamicSymtabUpperBound fn) = fn unTarget'GetDynamicSymtabUpperBound _ = error "unTarget'GetDynamicSymtabUpperBound" unTarget'CanonicalizeDynamicSymtab :: Target'- -> FunPtr (Bfd -> Ptr Symbol -> IO CLong)+ -> FunPtr (Ptr Bfd' -> Ptr Symbol -> IO CLong) unTarget'CanonicalizeDynamicSymtab (CanonicalizeDynamicSymtab fn) = fn unTarget'CanonicalizeDynamicSymtab _ = error "unTarget'CanonicalizeDynamicSymtab" unTarget'GetSyntheticSymtab :: Target'- -> FunPtr (Bfd -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong)+ -> FunPtr (Ptr Bfd' -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong) unTarget'GetSyntheticSymtab (GetSyntheticSymtab fn) = fn unTarget'GetSyntheticSymtab _ = error "unTarget'GetSyntheticSymtab" unTarget'GetDynamicRelocUpperBound :: Target'- -> FunPtr (Bfd -> IO CLong)+ -> FunPtr (Ptr Bfd' -> IO CLong) unTarget'GetDynamicRelocUpperBound (GetDynamicRelocUpperBound fn) = fn unTarget'GetDynamicRelocUpperBound _ = error "unTarget'GetDynamicRelocUpperBound" unTarget'CanonicalizeDynamicReloc :: Target'- -> FunPtr (Bfd -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong)+ -> FunPtr (Ptr Bfd' -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong) unTarget'CanonicalizeDynamicReloc (CanonicalizeDynamicReloc fn) = fn unTarget'CanonicalizeDynamicReloc _ = error "unTarget'CanonicalizeDynamicReloc" unXVec2 :: Target'- -> FunPtr (Bfd -> File -> Symbol -> CUInt -> IO ())+ -> FunPtr (Ptr Bfd' -> File -> Symbol -> CUInt -> IO ()) unXVec2 (PrintSymbol fn) = fn unXVec2 x = error $ "internal error: unXVec2 " ++ show x @@ -405,9 +479,10 @@ do fn <- peekByteOff targ (#offset struct bfd_target, _bfd_print_symbol) let- f = d_Bfd_File_Symbol_CUInt_Void (unXVec2 fn) bfd file sym 2+ f = d_Bfd_File_Symbol_CUInt_Void (unXVec2 fn) (ptr bfd) file sym 2 return f +-- ----------------------------------------------------------------------------- foreign import ccall unsafe "bfd.h bfd_target_list" c_bfd_target_list :: Ptr CString@@ -417,21 +492,21 @@ -> IO CInt foreign import ccall unsafe "dynamic" d_Bfd_CLong- :: FunPtr (Bfd -> IO CLong)- -> (Bfd -> IO CLong)+ :: FunPtr (Ptr Bfd' -> IO CLong)+ -> (Ptr Bfd' -> IO CLong) foreign import ccall unsafe "dynamic" d_Bfd_CLong_PtrSymbol_CLong_PtrSymbol_PtrSymbol_CLong- :: FunPtr (Bfd -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong) - -> (Bfd -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong)+ :: FunPtr (Ptr Bfd' -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong) + -> (Ptr Bfd' -> CLong -> Ptr Symbol -> CLong -> Ptr Symbol -> Ptr Symbol -> IO CLong) foreign import ccall unsafe "dynamic" d_Bfd_PtrSymbol_CLong- :: FunPtr (Bfd -> Ptr Symbol -> IO CLong)- -> (Bfd -> Ptr Symbol -> IO CLong)+ :: FunPtr (Ptr Bfd' -> Ptr Symbol -> IO CLong)+ -> (Ptr Bfd' -> Ptr Symbol -> IO CLong) foreign import ccall unsafe "dynamic" d_Bfd_PtrPtrRelocation_PtrSymbol_CLong- :: FunPtr (Bfd -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong) - -> (Bfd -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong)+ :: FunPtr (Ptr Bfd' -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong) + -> (Ptr Bfd' -> Ptr (Ptr Relocation) -> Ptr Symbol -> IO CLong) foreign import ccall unsafe "dynamic" d_Bfd_File_Symbol_CUInt_Void- :: FunPtr (Bfd -> File -> Symbol -> CUInt -> IO ()) - -> (Bfd -> File -> Symbol -> CUInt -> IO ())+ :: FunPtr (Ptr Bfd' -> File -> Symbol -> CUInt -> IO ()) + -> (Ptr Bfd' -> File -> Symbol -> CUInt -> IO ())
+ src/cbits/bfd.c view
@@ -0,0 +1,46 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#include <bfd.h> /* the system bfd defs */++#include "bfd.h" /* our matching include file in cbits */++int +_bfd_peek_target_defaulted (struct bfd *bfd)+{+ return bfd->target_defaulted;+}++int+_bfd_peek_cacheable (struct bfd *bfd)+{+ return bfd->cacheable;+}++int+_bfd_peek_has_armap (struct bfd *bfd)+{+ return bfd->has_armap;+}++int+_bfd_peek_is_thin_archive (struct bfd *bfd)+{+ return bfd->is_thin_archive;+}+
+ src/cbits/bfd.h view
@@ -0,0 +1,32 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#ifndef __CBITS_BFD_CBITS_H__+#define __CBITS_BFD_CBITS_H__++#include <bfd.h>++#include "bfd.h"+++int _bfd_peek_target_defaulted (struct bfd *);+int _bfd_peek_cacheable (struct bfd *);+int _bfd_peek_has_armap (struct bfd *);+int _bfd_peek_is_thin_archive (struct bfd *);++#endif /* __CBITS_BFD_CBITS_H__ */
+ src/cbits/disasm.c view
@@ -0,0 +1,48 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2010,2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#include <stdarg.h>+#include <stdio.h>++#include <dis-asm.h>++#include "disasm.h"+++int+_bfd_disassembler_info_fprintf (void *fp, + const char *fmt,+ ...)+{+ va_list ap;+ int r;++ va_start (ap, fmt);+ r = vfprintf (fp, fmt, ap);+ fflush (fp);+ va_end (ap);++ return r;+}++void+_bfd_disassembler_info_print_address (bfd_vma vma, + struct disassemble_info *info)+{+ (*info->fprintf_func) (info->stream, ">0x%016x", vma);+}
+ src/cbits/disasm.h view
@@ -0,0 +1,27 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2010,2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#ifndef __CBITS_DISASM_H__+#define __CBITS_DISASM_H__++#include <dis-asm.h>++int _bfd_disassembler_info_fprintf (void *, const char *, ...);+void _bfd_disassembler_info_print_address (bfd_vma, struct disassemble_info *);++#endif /* __CBITS_DISASM_H__ */
− src/cbits/disassembler.c
@@ -1,48 +0,0 @@-/* This file is part of Bindings-bfd.- *- * Copyright (C) 2010 Michael Nelson- *- * Bindings-bfd is free software: you can redistribute it and/or modify- * it under the terms of the GNU Lesser General Public License as published by- * the Free Software Foundation, either version 3 of the License, or- * (at your option) any later version.- *- * Bindings-bfd is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU Lesser General Public License for more details.- *- * You should have received a copy of the GNU Lesser General Public License- * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.- */--#include <stdarg.h>-#include <stdio.h>--#include <dis-asm.h>--#include "disassembler.h"---int-_bfd_disassembler_info_fprintf (void *fp, - const char *fmt,- ...)-{- va_list ap;- int r;-- va_start (ap, fmt);- r = vfprintf (fp, fmt, ap);- fflush (fp);- va_end (ap);-- return r;-}--void-_bfd_disassembler_info_print_address (bfd_vma vma, - struct disassemble_info *info)-{- (*info->fprintf_func) (info->stream, ">0x%016x", vma);-}
− src/cbits/disassembler.h
@@ -1,23 +0,0 @@-/* This file is part of Bindings-bfd.- *- * Copyright (C) 2010 Michael Nelson- *- * Bindings-bfd is free software: you can redistribute it and/or modify- * it under the terms of the GNU Lesser General Public License as published by- * the Free Software Foundation, either version 3 of the License, or- * (at your option) any later version.- *- * Bindings-bfd is distributed in the hope that it will be useful,- * but WITHOUT ANY WARRANTY; without even the implied warranty of- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the- * GNU Lesser General Public License for more details.- *- * You should have received a copy of the GNU Lesser General Public License- * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.- */--#include <dis-asm.h>--int _bfd_disassembler_info_fprintf (void *, const char *, ...);-void _bfd_disassembler_info_print_address (bfd_vma, struct disassemble_info *);-
+ src/cbits/section.c view
@@ -0,0 +1,29 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#include <bfd.h>++#include "section.h"+++void+_section_poke_user_set_vma (struct bfd_section *sect, + int usv)+{+ sect->user_set_vma = usv;+}
+ src/cbits/section.h view
@@ -0,0 +1,27 @@+/* This file is part of Bindings-bfd.+ *+ * Copyright (C) 2011 Mick Nelso+ *+ * Bindings-bfd is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Lesser General Public License as published by+ * the Free Software Foundation, either version 3 of the License, or+ * (at your option) any later version.+ *+ * Bindings-bfd is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with Bindings-bfd. If not, see <http://www.gnu.org/licenses/>.+ */++#ifndef __SECTION_H__+#define __SECTION_H__++#include <bfd.h>+++void _section_poke_user_set_vma (struct bfd_section *, int);++#endif /* __SECTION_H__ */