Copyright | (c) Galois Inc 2015-2018 |
---|---|
Maintainer | jhendrix@galois.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data.Macaw.Memory.Symbols
Description
Defines constructors for precisely capturing symbol table information.
Synopsis
- data SymbolInfo = SymbolInfo {}
- data SymbolBinding
- data SymbolVersion
- data SymbolPrecedence
- data SymbolDefType
- data SymbolRequirement
- data SymbolUndefType
Symbols
data SymbolInfo Source #
This provides information about a symbol in the file.
Constructors
SymbolInfo | |
Fields
|
data SymbolBinding Source #
This defines information about the symbol related to whether it is defined (and if so how it binds) or undefined (and if so what requiremens there are for a match).
Constructors
DefinedSymbol !SymbolPrecedence !SymbolDefType | The symbol is defined and globally visible. The strong symbol flag controls the precedence. If true, then this definition must be used for the symbol with that name, and the linker is not allowed to replace the symbol. Is false, then the linker will use a strong symbol if it exists, and one of the weak symbols if it does not. The address is the address the symbol was loaded at. It may not be a valid segment offset if the original binary used symbols at unexpected addresses. |
SymbolSection !SectionIndex | The symbol denotes a section in an object file with the given index. These are primarily intended for relocations. The symbol version should be |
SymbolFile !ByteString | This symbol denotes a file name with the given string The symbol version should be |
UndefinedSymbol !SymbolRequirement !SymbolUndefType | An undefined symbol The Boolean flag controls whether the symbol must be defined.
If it is |
data SymbolVersion #
Constructors
UnversionedSymbol | |
ObjectDefaultSymbol !ByteString | |
ObjectNonDefaultSymbol !ByteString | |
VersionedSymbol !ByteString !ByteString |
Instances
Defined symbol information
data SymbolPrecedence Source #
Describes symbol precedence
Constructors
SymbolStrong | Symbol has high precedence |
SymbolLocal | The symbol has high precedence, but only visible within the object file that created it. |
SymbolWeak | Symbol has low precedence |
data SymbolDefType Source #
This denotes type information associated with a defined
Constructors
SymbolDefUnknown | We do not know what type of object this refers to. |
SymbolDefFunc | This symbol denotes a defined function. |
SymbolDefObject | This symbol denotes a object. |
SymbolDefThreadLocal | This symbol denotes a thread local identifier |
SymbolDefIFunc | This symbol is a IFUNC (e.g., it calls a function to resolve the symbol) |
SymbolDefNoType | This symbol does not have a specified type. |
Undefined symbol infomration
data SymbolRequirement Source #
Describes whether an undefined symbol is required during linking.
Constructors
SymbolRequired | Undefined symbol must be found during linking |
SymbolOptional | Undefined symbol treated as zero if not found during linking. |
data SymbolUndefType Source #
Flags information about an undefined symbol.
Constructors
SymbolUndefThreadLocal | This symbol denotes data stored in a thread. |
SymbolUndefNoType | This is stored globally for application, but otherwise has no type information. Concretely we have seen this symbol type generated by gcc for external functions and data and _GLOBAL_OFFSET_TABLE_ |
SymbolUndefFunc | This symbol is intended to denote a function. |
SymbolUndefObject | This symbol is intended to denote some data. |