foxdec-0.1.0.0: Formally Verified x86-64 Decompilation
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Symbol

Synopsis

Documentation

data Symbol Source #

An address a0 can have a symbol.

PointerToFunction: E.g: 0xcfe0 --> malloc Means that reading 8 bytes from address 0xcfe0 produces a pointer to malloc. Thus an instruction: "CALL qword ptr [0xcfe0]" can be seen as "CALL malloc".

PointerToObject: E.g.: 0xd0a8 --> stdout Means that "mov rdi,QWORD PTR [0xd0a8]" can be seen as "mov rdi, QWORD PTR [stdout]"

Relocated_ResolvedObject E.g.: 0xc0fc0 "environ" -> 0xc1340 Sometimes, a relocation has been resolved during linking. In that case, it is no longer an external object. For example, there may be a relocation that maps address 0xc0fc0 to symbol "environ". However, that symbol is an object with an address (e.g., 0xc1340) that itself has been relocated. Symbol "environ" now no longer is an external symbol. Instead, we have *environ = &object, where "object" is the object that 0xc1340 is relocated to.

Constructors

PointerToLabel String Bool

Address a0 is a pointer to memory storing the entry of a function

PointerToObject String Bool

Address a0 can be replaced by the GOT entry of the string, e.g., "stdout wrt ..got" or "optind wrt ..got"

AddressOfObject String Bool

Address a0 can be replaced by the string, e.g., "stdout" or "optind"

AddressOfLabel String Bool

Address a0 can be replaced by the string.

Relocated_ResolvedObject String Word64

At linking time internally resolved relocation

Instances

Instances details
Generic Symbol Source # 
Instance details

Defined in Data.Symbol

Associated Types

type Rep Symbol :: Type -> Type #

Methods

from :: Symbol -> Rep Symbol x #

to :: Rep Symbol x -> Symbol #

Show Symbol Source # 
Instance details

Defined in Data.Symbol

Serialize Symbol Source # 
Instance details

Defined in Data.Symbol

NFData Symbol Source # 
Instance details

Defined in Data.SymbolicExpression

Methods

rnf :: Symbol -> () #

Eq Symbol Source # 
Instance details

Defined in Data.Symbol

Methods

(==) :: Symbol -> Symbol -> Bool #

(/=) :: Symbol -> Symbol -> Bool #

Ord Symbol Source # 
Instance details

Defined in Data.Symbol

type Rep Symbol Source # 
Instance details

Defined in Data.Symbol

type Rep Symbol = D1 ('MetaData "Symbol" "Data.Symbol" "foxdec-0.1.0.0-DGuc5MMkhbvOBLAebyTd5" 'False) ((C1 ('MetaCons "PointerToLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "PointerToObject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool))) :+: (C1 ('MetaCons "AddressOfObject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :+: (C1 ('MetaCons "AddressOfLabel" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :+: C1 ('MetaCons "Relocated_ResolvedObject" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64)))))