gtirb.symbolicexpression module¶
- class gtirb.symbolicexpression.SymAddrAddr(scale, offset, symbol1, symbol2, attributes={})[source]¶
Bases:
SymbolicExpression
Represents a symbolic expression of the form “(Sym1 - Sym2) / Scale + Offset”.
- Variables:
~.scale – Constant scale factor.
~.offset – Constant offset.
~.symbol1 – Symbol representing the base address.
~.symbol2 – Symbol to subtract from
symbol1
.
- __init__(scale, offset, symbol1, symbol2, attributes={})[source]¶
- Parameters:
scale (
int
) – Constant scale factor.offset (
int
) – Constant offset.symbol1 (
gtirb.symbol.Symbol
) – Symbol representing the base address.symbol2 (
gtirb.symbol.Symbol
) – Symbol to subtract fromsymbol1
.attributes (
typing.Iterable
[typing.Union
[int
,gtirb.symbolicexpression.SymbolicExpression.Attribute
]]) –SymobolicExpression.Attribute
s of this expression.
- class gtirb.symbolicexpression.SymAddrConst(offset, symbol, attributes={})[source]¶
Bases:
SymbolicExpression
Represents a symbolic expression of the form “Sym + Offset”.
- Variables:
~.offset – Constant offset.
~.symbol – Symbol representing an address.
- __init__(offset, symbol, attributes={})[source]¶
- Parameters:
offset (
int
) – Constant offset.symbol (
gtirb.symbol.Symbol
) – Symbol representing an address.attributes (
typing.Iterable
[typing.Union
[int
,gtirb.symbolicexpression.SymbolicExpression.Attribute
]]) –SymbolicExpression.Attribute
s of this expression.
- class gtirb.symbolicexpression.SymbolicExpression(attributes={})[source]¶
Bases:
object
Base class of symbolic expression types.
- class Attribute(value)[source]¶
Bases:
Enum
Attributes representing a known property of a symbolic expression. See https://grammatech.github.io/gtirb/md__symbolic_expression.html
- ABS = 2015¶
- CALL = 22¶
- DISP = 3003¶
- DTPMOD = 19¶
- DTPOFF = 17¶
- DTPREL = 16¶
- G0 = 2001¶
- G1 = 2002¶
- G2 = 2003¶
- G3 = 2004¶
- GOT = 0¶
- GOTNTPOFF = 1000¶
- GOTOFF = 2¶
- GOTPC = 1¶
- GOTREL = 3¶
- GPREL = 3002¶
- H = 4000¶
- HA = 4002¶
- HI = 24¶
- HI12 = 2010¶
- HI16 = 3000¶
- HI21 = 2011¶
- HIGH = 4003¶
- HIGHA = 4004¶
- HIGHER = 25¶
- HIGHERA = 4005¶
- HIGHEST = 26¶
- HIGHESTA = 4006¶
- INDNTPOFF = 1001¶
- L = 4001¶
- LO = 23¶
- LO12 = 2007¶
- LO14 = 2009¶
- LO15 = 2008¶
- LO16 = 3001¶
- LOWER16 = 2006¶
- NC = 2014¶
- NOTOC = 4009¶
- NTPOFF = 18¶
- OFST = 3004¶
- PAGE = 20¶
- PAGEOFF = 21¶
- PCREL = 6¶
- PG = 2013¶
- PLT = 4¶
- PLTOFF = 5¶
- PREL = 2016¶
- PREL31 = 2017¶
- S = 2012¶
- SBREL = 2020¶
- SECREL = 7¶
- TARGET1 = 2018¶
- TARGET2 = 2019¶
- TLS = 8¶
- TLSCALL = 12¶
- TLSDESC = 13¶
- TLSGD = 9¶
- TLSLD = 10¶
- TLSLDM = 11¶
- TLSLDO = 2021¶
- TOC = 4008¶
- TOCBASE = 4007¶
- TPOFF = 15¶
- TPREL = 14¶
- UPPER16 = 2005¶