Python

Parser

lief.ELF.parse(*args) lief.ELF.Binary | None
lief.ELF.parse(raw: collections.abc.Sequence[int], config: lief._lief.ELF.ParserConfig = <lief._lief.ELF.ParserConfig object at 0x7bd680044a50>) lief._lief.ELF.Binary | None
lief.ELF.parse(obj: Union[io.IOBase | os.PathLike], config: lief._lief.ELF.ParserConfig = <lief._lief.ELF.ParserConfig object at 0x7bd680044b10>) lief._lief.ELF.Binary | None

Overloaded function.

  1. parse(filename: str, config: lief._lief.ELF.ParserConfig = <lief._lief.ELF.ParserConfig object at 0x7bd680044ae0>) -> Optional[lief._lief.ELF.Binary]

    Parse the ELF binary from the given file path and return a lief.ELF.Binary object

    The second argument is an optional configuration (ParserConfig) that can be used to define which part(s) of the ELF should be parsed or skipped.

  2. parse(raw: collections.abc.Sequence[int], config: lief._lief.ELF.ParserConfig = <lief._lief.ELF.ParserConfig object at 0x7bd680044a50>) -> Optional[lief._lief.ELF.Binary]

    Parse the ELF binary from the given list of bytes and return a lief.ELF.Binary object

    The second argument is an optional configuration (ParserConfig) that can be used to define which part(s) of the ELF should be parsed or skipped.

  3. parse(obj: Union[io.IOBase | os.PathLike], config: lief._lief.ELF.ParserConfig = <lief._lief.ELF.ParserConfig object at 0x7bd680044b10>) -> Optional[lief._lief.ELF.Binary]

    Parse the ELF binary from the given Python object and return a lief.ELF.Binary object

    The second argument is an optional configuration (ParserConfig) that can be used to define which part(s) of the ELF should be parsed or skipped.

class lief.ELF.ParserConfig(self)

Bases: object

This class is used to tweak the ELF Parser

class DYNSYM_COUNT(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AUTO = 0
HASH = 2
RELOCATIONS = 3
SECTION = 1
from_value(arg: int) lief.ELF.ParserConfig.DYNSYM_COUNT = <nanobind.nb_func object>
all = <lief._lief.ELF.ParserConfig object>
property count_mtd lief.ELF.ParserConfig.DYNSYM_COUNT

The DYNSYM_COUNT_METHODS to use for counting the dynamic symbols

For weird binaries (e.g sectionless) you can choose the method for counting dynamic symbols (lief.ELF.DYNSYM_COUNT_METHODS). By default, the value is set to lief.ELF.DYNSYM_COUNT_METHODS.COUNT_AUTO

property parse_dyn_symbols bool

Whether dynamic symbols (those from .dynsym) should be parsed

property parse_notes bool

Whether ELF notes information should be parsed

property parse_overlay bool

Whether the overlay data should be parsed

property parse_relocations bool

Whether relocations (including plt-like relocations) should be parsed.

property parse_symbol_versions bool

Whether versioning symbols should be parsed

property parse_symtab_symbols bool

Whether debug symbols (those from .symtab) should be parsed


Binary

class lief.ELF.Binary

Bases: Binary

Class which represents an ELF binary

class PHDR_RELOC(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

This enum describes the different ways to relocate the segments table.

AUTO = 0
BSS_END = 2
FILE_END = 3
PIE_SHIFT = 1
SEGMENT_GAP = 4
add(*args) lief.ELF.DynamicEntry | lief.ELF.Segment | lief.ELF.Note | lief.ELF.Section

Overloaded function.

  1. add(self, arg: lief._lief.ELF.DynamicEntry, /) -> lief._lief.ELF.DynamicEntry

dynamic_entry

  1. add(self, section: lief._lief.ELF.Section, loaded: bool = True) -> lief._lief.ELF.Section

    Add the given Section to the binary.

    If the section does not aim at being loaded in memory, the loaded parameter has to be set to False (default: True)

  2. add(self, segment: lief._lief.ELF.Segment, base: int = 0) -> lief._lief.ELF.Segment

Add a new Segment in the binary

  1. add(self, note: lief._lief.ELF.Note) -> lief._lief.ELF.Note

Add a new Note in the binary

add_dynamic_relocation(self, relocation: lief.ELF.Relocation) lief.ELF.Relocation

Add a new dynamic relocation.

We consider a dynamic relocation as a relocation which is not plt-related.

See: lief.ELF.Binary.add_pltgot_relocation()

add_dynamic_symbol(self, symbol: lief.ELF.Symbol, symbol_version: lief.ELF.SymbolVersion | None) lief.ELF.Symbol

Add a dynamic Symbol to the binary

The function also takes an optional lief.ELF.SymbolVersion

add_exported_function(self, address: int, name: str) lief.ELF.Symbol

Create a symbol for the function at the given address and create an export

add_library(self, library_name: str) lief.ELF.DynamicEntryLibrary

Add a library with the given name as dependency

add_object_relocation(self, relocation: lief.ELF.Relocation, section: lief.ELF.Section) lief.ELF.Relocation

Add relocation for object file (.o)

The first parameter is the section to add while the second parameter is the Section associated with the relocation.

If there is an error, this function returns a nullptr. Otherwise, it returns the relocation added.”,

add_pltgot_relocation(self, relocation: lief.ELF.Relocation) lief.ELF.Relocation

Add a .plt.got relocation. This kind of relocation is usually associated with a PLT stub that aims at resolving the underlying symbol.

See: lief.ELF.Binary.add_dynamic_relocation()

add_symtab_symbol(self, symbol: lief.ELF.Symbol) lief.ELF.Symbol

Add a static Symbol to the binary

property dtor_functions list[lief.Function]

List of the binary destructors (typically, the functions located in the .fini_array)

property dynamic_entries lief.ELF.Binary.it_dynamic_entries

Return an iterator to DynamicEntry entries as a list

property dynamic_relocations lief.ELF.Binary.it_filter_relocation

Return an iterator over dynamics Relocation

property dynamic_symbols lief.ELF.Binary.it_symbols

Return an iterator to dynamic Symbol

dynsym_idx(*args) int

Overloaded function.

  1. dynsym_idx(self, name: str) -> int

    Get the symbol index in the dynamic symbol from the given name or return -1 if the symbol does not exist.

  2. dynsym_idx(self, symbol: lief._lief.ELF.Symbol) -> int

    Get the symbol index in the dynamic symbol table for the given symbol or return -1 if the symbol does not exist

property eof_offset int

Return the last offset used by the ELF binary according to both, the sections table and the segments table.

export_symbol(*args) lief.ELF.Symbol

Overloaded function.

  1. export_symbol(self, symbol: lief._lief.ELF.Symbol) -> lief._lief.ELF.Symbol

Export the given symbol and create an entry if it doesn’t exist

  1. export_symbol(self, symbol_name: str, value: int = 0) -> lief._lief.ELF.Symbol

Export the symbol with the given name and create an entry if it doesn’t exist

property exported_symbols lief.ELF.Binary.it_filter_symbols

Return dynamic Symbol which are exported

extend(*args) lief.ELF.Segment | lief.ELF.Section

Overloaded function.

  1. extend(self, segment: lief._lief.ELF.Segment, size: int) -> lief._lief.ELF.Segment

Extend the given given Segment by the given size

  1. extend(self, segment: lief._lief.ELF.Section, size: int) -> lief._lief.ELF.Section

Extend the given given Section by the given size

property functions list[lief.Function]

List of the functions found the in the binary

get(*args) lief.ELF.DynamicEntry | lief.ELF.Segment | lief.ELF.Note | lief.ELF.Section

Overloaded function.

  1. get(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> lief._lief.ELF.DynamicEntry

    Return the first binary’s DynamicEntry from the given TAG.

    It returns None if the dynamic entry can’t be found.

  2. get(self, type: lief._lief.ELF.Segment.TYPE) -> lief._lief.ELF.Segment

    Return the first binary’s Segment from the given SEGMENT_TYPES

    It returns None if the segment can’t be found.

  3. get(self, type: lief._lief.ELF.Note.TYPE) -> lief._lief.ELF.Note

    Return the first binary’s Note from the given TYPE.

    It returns None if the note can’t be found.

  4. get(self, type: lief._lief.ELF.Section.TYPE) -> lief._lief.ELF.Section

    Return the first binary’s Section from the given ELF_SECTION_TYPES

    It returns None if the section can’t be found.

get_dynamic_symbol(self, symbol_name: str) lief.ELF.Symbol

Get the dynamic symbol from the given name.

It returns None if it can’t be found.

get_library(self, library_name: str) lief.ELF.DynamicEntryLibrary

Return the DynamicEntryLibrary with the given name

It returns None if the library can’t be found.

get_relocated_dynamic_array(self, array_tag: lief.ELF.DynamicEntry.TAG) list[int]

Return the array defined by the given tag (e.g. INIT_ARRAY with relocations applied (if any)

get_relocation(*args) lief.ELF.Relocation

Overloaded function.

  1. get_relocation(self, symbol_name: str) -> lief._lief.ELF.Relocation

Return the Relocation associated with the given symbol name

  1. get_relocation(self, symbol: lief._lief.ELF.Symbol) -> lief._lief.ELF.Relocation

Return the Relocation associated with the given Symbol

  1. get_relocation(self, address: int) -> lief._lief.ELF.Relocation

Return the Relocation associated with the given address

get_section(self, section_name: str) lief.ELF.Section

Return the Section with the given name

It returns None if the section can’t be found.

get_strings(self, min_size: int) list[str]

Return list of strings used in the current ELF file with a minimal size given in first parameter (Default: 5) It looks for strings in the .roadata section

get_symtab_symbol(self, symbol_name: str) lief.ELF.Symbol

Get the static symbol from the given name.

It returns None if it can’t be found.

property gnu_hash lief.ELF.GnuHash

Return the GnuHash object

Hash are used by the loader to speed up symbols resolution (GNU Version)

has(*args) bool

Overloaded function.

  1. has(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> bool

    Check if it exists a DynamicEntry with the given TAG

  2. has(self, type: lief._lief.ELF.Segment.TYPE) -> bool

Check if a Segment of type (SEGMENT_TYPES) exists

  1. has(self, type: lief._lief.ELF.Note.TYPE) -> bool

Check if a Note of type (TYPE) exists

  1. has(self, type: lief._lief.ELF.Section.TYPE) -> bool

Check if a Section of type (SECTION_TYPES) exists

has_dynamic_symbol(self, symbol_name: str) bool

Check if the symbol with the given name exists in the dynamic symbol table

property has_interpreter bool

Check if the binary uses a loader (also named linker or interpreter)

has_library(self, library_name: str) bool

Check if the given library name exists in the current binary

property has_notes bool

True if the binary contains notes

property has_overlay bool

True if data are appended to the end of the binary

has_section(self, section_name: str) bool

Check if a Section with the given name exists in the binary

has_section_with_offset(self, offset: int) bool

Check if a Section that encompasses the given offset exists

has_section_with_va(self, virtual_address: int) bool

Check if a Section that encompasses the given virtual address exists

has_symtab_symbol(self, symbol_name: str) bool

Check if the symbol with the given name exists in the static symbol table

property header lief.ELF.Header

Return Header object

property imagebase int

Return the program image base. (e.g. 0x400000)

property imported_symbols lief.ELF.Binary.it_filter_symbols

Return dynamic Symbol which are imported

property interpreter str

ELF interpreter (loader) if any. (e.g. /lib64/ld-linux-x86-64.so.2)

property is_pie bool

Check if the binary has been compiled with -fpie -pie flags

To do so we check if there is a PT_INTERP segment and if the binary type is ET_DYN (Shared object)

property is_targeting_android bool

True if the current is targeting Android

class it_dyn_symtab_symbols

Bases: object

Iterator over lief._lief.ELF.Symbol

class it_dynamic_entries

Bases: object

Iterator over lief._lief.ELF.DynamicEntry

class it_filter_relocation

Bases: object

Iterator over lief._lief.ELF.Relocation

class it_filter_symbols

Bases: object

Iterator over lief._lief.ELF.Symbol

class it_notes

Bases: object

Iterator over lief._lief.ELF.Note

class it_relocations

Bases: object

Iterator over lief._lief.ELF.Relocation

class it_sections

Bases: object

Iterator over lief._lief.ELF.Section

class it_segments

Bases: object

Iterator over lief._lief.ELF.Segment

class it_symbols

Bases: object

Iterator over lief._lief.ELF.Symbol

class it_symbols_version

Bases: object

Iterator over lief._lief.ELF.SymbolVersion

class it_symbols_version_definition

Bases: object

Iterator over lief._lief.ELF.SymbolVersionDefinition

class it_symbols_version_requirement

Bases: object

Iterator over lief._lief.ELF.SymbolVersionRequirement

property last_offset_section int

Return the last offset used in binary according to sections table

property last_offset_segment int

Return the last offset used in binary according to segments table

property next_virtual_address int

Return the next virtual address available

property notes lief.ELF.Binary.it_notes

Return an iterator over the Note entries

property object_relocations lief.ELF.Binary.it_filter_relocation

Return an iterator over object Relocation

property overlay memoryview

Overlay data that are not a part of the ELF format

patch_pltgot(*args) None

Overloaded function.

  1. patch_pltgot(self, symbol_name: str, address: int) -> None

Patch the imported symbol’s name with the address

  1. patch_pltgot(self, symbol: lief._lief.ELF.Symbol, address: int) -> None

Patch the imported Symbol with the address

permute_dynamic_symbols(self, permutation: collections.abc.Sequence[int]) None

Apply the given permutation on the dynamic symbols table

property pltgot_relocations lief.ELF.Binary.it_filter_relocation

Return an iterator over PLT/GOT Relocation

relocate_phdr_table(self, type: lief.ELF.Binary.PHDR_RELOC) int

Force relocating the segments table in a specific way (see: PHDR_RELOC).

This function can be used to enforce a specific relocation of the segments table. Upon successful relocation, the function returns the offset of the relocated segments table. Otherwise, if the function fails, it returns 0

property relocations lief.ELF.Binary.it_relocations

Return an iterator over all Relocation

remove(*args) None

Overloaded function.

  1. remove(self, dynamic_entry: lief._lief.ELF.DynamicEntry) -> None

Remove the given DynamicEntry from the dynamic table

  1. remove(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> None

Remove all the DynamicEntry with the given TAG

  1. remove(self, section: lief._lief.ELF.Section, clear: bool = False) -> None

Remove the given Section. The clear parameter specifies whether or not we must fill its content with 0 before removing

  1. remove(self, note: lief._lief.ELF.Note) -> None

Remove the given Note

  1. remove(self, type: lief._lief.ELF.Note.TYPE) -> None

Remove all the Note with the given TYPE

remove_dynamic_symbol(*args) None

Overloaded function.

  1. remove_dynamic_symbol(self, arg: lief._lief.ELF.Symbol, /) -> None

Remove the given Symbol from the .dynsym section

  1. remove_dynamic_symbol(self, arg: str, /) -> None

Remove the Symbol with the name given in parameter from the .dynsym section

remove_library(self, library_name: str) None

Remove the given library

remove_symtab_symbol(self, arg: lief.ELF.Symbol) None

Remove the given Symbol from the .symtab section

replace(self, new_segment: lief.ELF.Segment, original_segment: lief.ELF.Segment, base: int) lief.ELF.Segment

Replace the Segment given in 2nd parameter with the Segment given in the first parameter and return the updated segment.

Warning

The original_segment is no longer valid after this function

section_from_offset(self, offset: int, skip_nobits: bool) lief.ELF.Section

Return the Section which encompasses the given offset. It returns None if a section can’t be found.

If skip_nobits is set (which is the case by default), this function won’t consider sections for which the type is SHT_NOBITS (like .bss, .tbss, ...)

section_from_virtual_address(self, address: int, skip_nobits: bool) lief.ELF.Section

Return the Section which encompasses the given virtual address. It returns None if a section can’t be found.

If skip_nobits is set (which is the case by default), this function won’t consider sections for which the type is SHT_NOBITS (like .bss, .tbss, ...)

property sections lief.ELF.Binary.it_sections

Return an iterator over binary’s Section

segment_from_offset(self, offset: int) lief.ELF.Segment

Return the Segment which encompasses the given offset. It returns None if a segment can’t be found.

segment_from_virtual_address(self, address: int) lief.ELF.Segment

Return the Segment which encompasses the given virtual address. It returns None if a segment can’t be found.

property segments lief.ELF.Binary.it_segments

Return an iterator to binary’s Segment

property strings list[str | bytes]

Return list of strings used in the current ELF file. Basically this function looks for strings in the .roadata section

strip(self) None

Strip the binary

property symbols lief.ELF.Binary.it_dyn_symtab_symbols

Return an iterator over both static and dynamic Symbol

property symbols_version lief.ELF.Binary.it_symbols_version

Return an iterator SymbolVersion

property symbols_version_definition lief.ELF.Binary.it_symbols_version_definition

Return an iterator to SymbolVersionDefinition

property symbols_version_requirement lief.ELF.Binary.it_symbols_version_requirement

Return an iterator to SymbolVersionRequirement

symtab_idx(*args) int

Overloaded function.

  1. symtab_idx(self, name: str) -> int

    Get the symbol index in the .symtab section from the given name or return -1 if the symbol does not exist.

  2. symtab_idx(self, symbol: lief._lief.ELF.Symbol) -> int

    Get the symbol index in the .symtab section or return -1 if the symbol does not exist

property symtab_symbols lief.ELF.Binary.it_symbols

Return an iterator to static Symbol

property sysv_hash lief.ELF.SysvHash

Return the SysvHash object

Hash are used by the loader to speed up symbols resolution (SYSV version)

property type lief.ELF.Header.CLASS

Return the binary’s ELF_CLASS

property use_gnu_hash bool

True if GNU hash is used

property use_sysv_hash bool

True if SYSV hash is used

virtual_address_to_offset(self, virtual_address: int) int | lief.lief_errors

Convert the virtual address to a file offset

property virtual_size int

Return the size of the mapped binary

write(*args) None

Overloaded function.

  1. write(self, output: str) -> None

Rebuild the binary and write it in a file

  1. write(self, output: str, config: lief._lief.ELF.Builder.config_t) -> None

Rebuild the binary with the given configuration and write it in a file



Section

Inheritance diagram of lief._lief.ELF.Section
class lief.ELF.Section(self)
class lief.ELF.Section(self, name: str, type: lief._lief.ELF.Section.TYPE = TYPE.PROGBITS)

Bases: Section

Class which represents an ELF section.

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, name: str, type: lief._lief.ELF.Section.TYPE = TYPE.PROGBITS) -> None

Constructor from a name and a section type

class FLAGS(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Flag

ALLOC = 2
ARM_PURECODE = 22011707392
COMPRESSED = 2048
EXCLUDE = 2147483648
EXECINSTR = 4
GNU_RETAIN = 2097152
GROUP = 512
HEX_GPREL = 13153337344
MERGE = 16
MIPS_ADDR = 18253611008
MIPS_GPREL = 17448304640
MIPS_LOCAL = 17246978048
MIPS_MERGE = 17716740096
MIPS_NAMES = 17213423616
MIPS_NODUPES = 17196646400
MIPS_NOSTRIP = 17314086912
MIPS_STRING = 19327352832
NONE = 0
OS_NONCONFORMING = 256
STRINGS = 32
TLS = 1024
WRITE = 1
X86_64_LARGE = 8858370048
XCORE_SHF_CP_SECTION = 4831838208
XCORE_SHF_DP_SECTION = 4563402752
from_value(arg: int) lief.ELF.Section.FLAGS = <nanobind.nb_func object>
class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ANDROID_REL = 1610612737
ANDROID_RELA = 1610612738
ANDROID_RELR = 1879047936
ARM_ATTRIBUTES = 6174015491
ARM_DEBUGOVERLAY = 6174015492
ARM_EXIDX = 6174015489
ARM_OVERLAYSECTION = 6174015493
ARM_PREEMPTMAP = 6174015490
DYNAMIC = 6
DYNSYM = 11
FINI_ARRAY = 15
GNU_ATTRIBUTES = 1879048181
GNU_HASH = 1879048182
GNU_VERDEF = 1879048189
GNU_VERNEED = 1879048190
GNU_VERSYM = 1879048191
GROUP = 17
HASH = 5
HEX_ORDERED = 10468982784
INIT_ARRAY = 14
LLVM_ADDRSIG = 1879002115
MIPS_ABIFLAGS = 14763950122
MIPS_OPTIONS = 14763950093
MIPS_REGINFO = 14763950086
NOBITS = 8
NOTE = 7
PREINIT_ARRAY = 16
PROGBITS = 1
REL = 9
RELA = 4
RELR = 19
RISCV_ATTRIBUTES = 19058917379
SHLIB = 10
SHT_NULL_ = 0
STRTAB = 3
SYMTAB = 2
SYMTAB_SHNDX = 18
X86_64_UNWIND = 10468982785
from_value(arg: int) lief.ELF.Section.TYPE = <nanobind.nb_func object>
add(self, flag: lief.ELF.Section.FLAGS) None

Add the given flag to the list of flags

property alignment int

Section alignment

as_frame(self) lief.ELF.Section
clear(self, value: int) lief.ELF.Section

Clear the content of the section with the given value

property entry_size int

This property returns the size of an element in the case of a section that contains an array.

Example:

The .dynamic section contains an array of DynamicEntry. As the size of the raw C structure of this entry is 0x10 (sizeof(Elf64_Dyn)) in a ELF64, the entry_size, is set to this value.

property file_offset int

Offset of the section’s content

property flags int

Return the section’s flags as an integer

property flags_list list[lief.ELF.Section.FLAGS]

Return section’s flags as a list

has(*args) bool

Overloaded function.

  1. has(self, flag: lief._lief.ELF.Section.FLAGS) -> bool

Check if the given flag is present

  1. has(self, segment: lief._lief.ELF.Segment) -> bool

Check if the given Segment is present in segments

property information int

Section information (this value depends on the section)

property is_frame bool
class it_segments

Bases: object

Iterator over lief._lief.ELF.Segment

Index to another section

property original_size int

Original size of the section’s data.

This value is used by the Builder to determine if it needs to be relocated to avoid an override of the data

remove(self, flag: lief.ELF.Section.FLAGS) None

Remove the given flag from the list of flags

property segments lief.ELF.Section.it_segments

Return segment(s) associated with the given section

property type lief.ELF.Section.TYPE

Return the type of the section


Segment

class lief.ELF.Segment(self)

Bases: Object

Class which represents the ELF segments

class FLAGS(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Flag

NONE = 0
R = 4
W = 2
X = 1
from_value(arg: int) lief.ELF.Segment.FLAGS = <nanobind.nb_func object>
class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AARCH64_MEMTAG_MTE = 19058917378
ARM_ARCHEXT = 10468982784
ARM_EXIDX = 10468982785
DYNAMIC = 2
GNU_EH_FRAME = 1685382480
GNU_PROPERTY = 1685382483
GNU_RELRO = 1685382482
GNU_STACK = 1685382481
INTERP = 3
LOAD = 1
MIPS_ABIFLAGS = 27648851971
MIPS_OPTIONS = 27648851970
MIPS_REGINFO = 27648851968
MIPS_RTPROC = 27648851969
NOTE = 4
PHDR = 6
PT_NULL_ = 0
RISCV_ATTRIBUTES = 36238786563
SHLIB = 5
TLS = 7
from_value(arg: int) lief.ELF.Segment.TYPE = <nanobind.nb_func object>
add(self, flag: lief.ELF.Segment.FLAGS) None

Add the given flag to the list of flags

property alignment int

The offset alignment of the segment

property content memoryview

The raw data associated with this segment.

property file_offset int

The file offset of the data associated with this segment

property flags lief.ELF.Segment.FLAGS

The flag permissions associated with this segment

from_raw(arg: bytes) lief.ELF.Segment | lief.lief_errors = <nanobind.nb_func object>
has(*args) bool

Overloaded function.

  1. has(self, flag: lief._lief.ELF.Segment.FLAGS) -> bool

Check if the given flag is present

  1. has(self, section: lief._lief.ELF.Section) -> bool

Check if the given Section is present in sections

  1. has(self, section_name: str) -> bool

Check if the given Section ‘s name is present in sections

class it_sections

Bases: object

Iterator over lief._lief.ELF.Section

property physical_address int

The physical address of the segment. This value is not really relevant on systems like Linux or Android. On the other hand, Qualcomm trustlets might use this value.

Usually this value matches virtual_address

property physical_size int

The file size of the data associated with this segment

remove(self, flag: lief.ELF.Segment.FLAGS) None

Remove the given flag from the list of flags

property sections lief.ELF.Segment.it_sections

Iterator over the Section wrapped by this segment

property type lief.ELF.Segment.TYPE

Segment’s type

property virtual_address int

The virtual address of the segment.

Warning

The ELF format specifications require the following relationship:

\[\text{virtual address} \equiv \text{file offset} \pmod{\text{page size}} \text{virtual address} \equiv \text{file offset} \pmod{\text{alignment}}\]
property virtual_size int

The in-memory size of this segment.

Usually, if the .bss segment is wrapped by this segment then, virtual_size is larger than physical_size


Dynamic Entry

Inheritance diagram of lief._lief.ELF.DynamicEntryRpath, lief._lief.ELF.DynamicSharedObject, lief._lief.ELF.DynamicEntryRunPath, lief._lief.ELF.DynamicEntry, lief._lief.ELF.DynamicEntryFlags, lief._lief.ELF.DynamicEntryLibrary, lief._lief.ELF.DynamicEntryArray
class lief.ELF.DynamicEntry(self)
class lief.ELF.DynamicEntry(self, tag: lief._lief.ELF.DynamicEntry.TAG, value: int)

Bases: Object

Class which represents an entry in the dynamic table These entries are located in the .dynamic section or the PT_DYNAMIC segment

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, tag: lief._lief.ELF.DynamicEntry.TAG, value: int) -> None

Constructor from a TAG and value

class TAG(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AARCH64_BTI_PLT = 10468982785
AARCH64_MEMTAG_GLOBALS = 10468982797
AARCH64_MEMTAG_GLOBALSSZ = 10468982799
AARCH64_MEMTAG_HEAP = 10468982795
AARCH64_MEMTAG_MODE = 10468982793
AARCH64_MEMTAG_STACK = 10468982796
AARCH64_PAC_PLT = 10468982787
AARCH64_VARIANT_PCS = 10468982789
ANDROID_REL = 1610612751
ANDROID_RELA = 1610612753
ANDROID_RELASZ = 1610612754
ANDROID_RELR = 1879040000
ANDROID_RELRCOUNT = 1879040005
ANDROID_RELRENT = 1879040003
ANDROID_RELRSZ = 1879040001
ANDROID_RELSZ = 1610612752
ANDROID_REL_OFFSET = 1610612749
ANDROID_REL_SIZE = 1610612750
BIND_NOW = 24
DEBUG_TAG = 21
FINI = 13
FINI_ARRAY = 26
FINI_ARRAYSZ = 28
FLAGS = 30
FLAGS_1 = 1879048187
GNU_HASH = 1879047925
HASH = 4
HEXAGON_PLT = 14763950082
HEXAGON_SYMSZ = 14763950080
HEXAGON_VER = 14763950081
INIT = 12
INIT_ARRAY = 25
INIT_ARRAYSZ = 27
JMPREL = 23
MIPS_AUX_DYNAMIC = 6174015537
MIPS_BASE_ADDRESS = 6174015494
MIPS_COMPACT_SIZE = 6174015535
MIPS_CONFLICT = 6174015496
MIPS_CONFLICTNO = 6174015499
MIPS_CXX_FLAGS = 6174015522
MIPS_DELTA_CLASS = 6174015511
MIPS_DELTA_CLASSSYM = 6174015520
MIPS_DELTA_CLASSSYM_NO = 6174015521
MIPS_DELTA_CLASS_NO = 6174015512
MIPS_DELTA_INSTANCE = 6174015513
MIPS_DELTA_INSTANCE_NO = 6174015514
MIPS_DELTA_RELOC = 6174015515
MIPS_DELTA_RELOC_NO = 6174015516
MIPS_DELTA_SYM = 6174015517
MIPS_DELTA_SYM_NO = 6174015518
MIPS_DYNSTR_ALIGN = 6174015531
MIPS_FLAGS = 6174015493
MIPS_GOTSYM = 6174015507
MIPS_GP_VALUE = 6174015536
MIPS_HIDDEN_GOTIDX = 6174015527
MIPS_HIPAGENO = 6174015508
MIPS_ICHECKSUM = 6174015491
MIPS_INTERFACE = 6174015530
MIPS_INTERFACE_SIZE = 6174015532
MIPS_IVERSION = 6174015492
MIPS_LIBLIST = 6174015497
MIPS_LIBLISTNO = 6174015504
MIPS_LOCALPAGE_GOTIDX = 6174015525
MIPS_LOCAL_GOTIDX = 6174015526
MIPS_LOCAL_GOTNO = 6174015498
MIPS_MSYM = 6174015495
MIPS_OPTIONS = 6174015529
MIPS_PERF_SUFFIX = 6174015534
MIPS_PIXIE_INIT = 6174015523
MIPS_PLTGOT = 6174015538
MIPS_PROTECTED_GOTIDX = 6174015528
MIPS_RLD_MAP = 6174015510
MIPS_RLD_MAP_REL = 6174015541
MIPS_RLD_TEXT_RESOLVE_ADDR = 6174015533
MIPS_RLD_VERSION = 6174015489
MIPS_RWPLT = 6174015540
MIPS_SYMBOL_LIB = 6174015524
MIPS_SYMTABNO = 6174015505
MIPS_TIME_STAMP = 6174015490
MIPS_UNREFEXTNO = 6174015506
MIPS_XHASH = 6174015542
NEEDED = 1
NULL = 0
PLTGOT = 3
PLTREL = 20
PLTRELSZ = 2
PPC64_OPT = 23353884675
PPC_GOT = 19058917376
PPC_OPT = 19058917377
PREINIT_ARRAY = 32
PREINIT_ARRAYSZ = 33
REL = 17
RELA = 7
RELACOUNT = 1879048185
RELAENT = 9
RELASZ = 8
RELCOUNT = 1879048186
RELENT = 19
RELR = 36
RELRENT = 37
RELRSZ = 35
RELSZ = 18
RISCV_VARIANT_CC = 27648851971
RPATH = 15
RUNPATH = 29
SONAME = 14
STRSZ = 10
STRTAB = 5
SYMBOLIC = 16
SYMENT = 11
SYMTAB = 6
SYMTAB_SHNDX = 34
TEXTREL = 22
UNKNOWN = 18446744073709551615
VERDEF = 1879048188
VERDEFNUM = 1879048189
VERNEED = 1879048190
VERNEEDNUM = 1879048191
VERSYM = 1879048176
X86_64_PLT = 31943819264
X86_64_PLTENT = 31943819267
X86_64_PLTSZ = 31943819265
from_value(arg: int) lief.ELF.DynamicEntry.TAG = <nanobind.nb_func object>
property tag lief.ELF.DynamicEntry.TAG

Return the entry’s TAG which represent the entry type

property value int

Return the entry’s value

The meaning of the value strongly depends on the tag. It can be an offset, an index, a flag, …


Dynamic Entry Library

Inheritance diagram of lief._lief.ELF.DynamicEntryLibrary
class lief.ELF.DynamicEntryLibrary(self, library_name: str)

Bases: DynamicEntry

Class which represents a DT_NEEDED entry in the dynamic table.

This kind of entry is usually used to create library dependency.

Constructor from a library name

property name str | bytes

Library associated with this entry (e.g. libc.so.6)


Dynamic Shared Object

Inheritance diagram of lief._lief.ELF.DynamicSharedObject
class lief.ELF.DynamicSharedObject(self, library_name: str)

Bases: DynamicEntry

Class which represents a DT_SONAME entry in the dynamic table This kind of entry is usually used no name the original library.

This entry is not present for executable.

Constructor from library name

property name str | bytes

Return the library name


Dynamic Entry Run Path

Inheritance diagram of lief._lief.ELF.DynamicEntryRunPath
class lief.ELF.DynamicEntryRunPath(self, path: str = '')
class lief.ELF.DynamicEntryRunPath(self, paths: collections.abc.Sequence[str])

Bases: DynamicEntry

Class that represents a DT_RUNPATH wich is used by the loader to resolve libraries (DynamicEntryLibrary).

Overloaded function.

  1. __init__(self, path: str = '') -> None

Constructor from a (run)path

  1. __init__(self, paths: collections.abc.Sequence[str]) -> None

Constructor from a list of paths

append(self, path: str) lief.ELF.DynamicEntryRunPath

Append the given path

insert(self, position: int, path: str) lief.ELF.DynamicEntryRunPath

Insert a path at the given position

property paths list[str]

Paths as a list

remove(self, path: str) lief.ELF.DynamicEntryRunPath

Remove the given path

property runpath str | bytes

Runpath raw value


Dynamic Entry RPath

Inheritance diagram of lief._lief.ELF.DynamicEntryRpath
class lief.ELF.DynamicEntryRpath(self, path: str = '')
class lief.ELF.DynamicEntryRpath(self, paths: collections.abc.Sequence[str])

Bases: DynamicEntry

Class which represents a DT_RPATH entry. This attribute is deprecated (cf. man ld) in favour of DT_RUNPATH (See DynamicRunPath)

Overloaded function.

  1. __init__(self, path: str = '') -> None

Constructor from (r)path

  1. __init__(self, paths: collections.abc.Sequence[str]) -> None

Constructor from a list of paths

append(self, path: str) lief.ELF.DynamicEntryRpath

Append the given path

insert(self, position: int, path: str) lief.ELF.DynamicEntryRpath

Insert a path at the given position

property paths list[str]

Paths as a list

remove(self, path: str) lief.ELF.DynamicEntryRpath

Remove the given path

property rpath str | bytes

The actual rpath as a string


Dynamic Entry Array

Inheritance diagram of lief._lief.ELF.DynamicEntryArray
class lief.ELF.DynamicEntryArray(self, tag: lief._lief.ELF.DynamicEntry.TAG, array: collections.abc.Sequence[int])

Bases: DynamicEntry

Class that represent an Array in the dynamic table. This entry is associated with constructors: - DT_PREINIT_ARRAY - DT_INIT_ARRAY - DT_FINI_ARRAY

The underlying values are 64-bits integers to cover both: ELF32 and ELF64 binaries.

append(self, function: int) lief.ELF.DynamicEntryArray

Append the given function

property array list[int]

Return the array as a list of intergers

insert(self, pos: int, function: int) lief.ELF.DynamicEntryArray

Insert the given function at pos

remove(self, function: int) lief.ELF.DynamicEntryArray

Remove the given function


Dynamic Entry Flags

Inheritance diagram of lief._lief.ELF.DynamicEntryFlags
class lief.ELF.DynamicEntryFlags

Bases: DynamicEntry

class FLAG(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

BIND_NOW = 8
CONFALT = 4294975488
DIRECT = 4294967552
DISPRELDNE = 4295000064
DISPRELPND = 4295032832
EDITED = 4297064448
ENDFILTEE = 4294983680
GLOBAL = 4294967298
GLOBAUDIT = 4311744512
GROUP = 4294967300
HANDLE_ORIGIN = 4294967424
IGNMULDEF = 4295229440
INITFIRST = 4294967328
INTERPOSE = 4294968320
KMOD = 4563402752
LOADFLTR = 4294967312
NOCOMMON = 5368709120
NODEFLIB = 4294969344
NODELETE = 4294967304
NODIRECT = 4295098368
NODUMP = 4294971392
NOHDR = 4296015872
NOKSYMS = 4295491584
NOOPEN = 4294967360
NORELOC = 4299161600
NOW = 4294967297
ORIGIN = 1
PIE = 4429185024
SINGLETON = 4328521728
STATIC_TLS = 16
SYMBOLIC = 2
SYMINTPOSE = 4303355904
TEXTREL = 4
TRANS = 4294967808
WEAKFILTER = 4831838208
from_value(arg: int) lief.ELF.DynamicEntryFlags.FLAG = <nanobind.nb_func object>
add(self, flag: lief.ELF.DynamicEntryFlags.FLAG) None

Add the given FLAG

property flags list[lief.ELF.DynamicEntryFlags.FLAG]

Return list of FLAG

has(self, flag: lief.ELF.DynamicEntryFlags.FLAG) bool

Check if this entry contains the given FLAG

remove(self, flag: lief.ELF.DynamicEntryFlags.FLAG) None

Remove the given FLAG


Relocations

class lief.ELF.Relocation(self)
class lief.ELF.Relocation(self, arch: lief._lief.ELF.ARCH)
class lief.ELF.Relocation(self, address: int, type: lief._lief.ELF.Relocation.TYPE, encoding: lief._lief.ELF.Relocation.ENCODING)

Bases: Relocation

Class that represents an ELF relocation.

class ENCODING(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ANDROID_SLEB = 4
REL = 1
RELA = 2
RELR = 3
UNKNOWN = 0
from_value(arg: int) lief.ELF.Relocation.ENCODING = <nanobind.nb_func object>
class PURPOSE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

DYNAMIC = 2
NONE = 0
OBJECT = 3
PLTGOT = 1
from_value(arg: int) lief.ELF.Relocation.PURPOSE = <nanobind.nb_func object>
class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AARCH64_ABS16 = 268435715
AARCH64_ABS32 = 268435714
AARCH64_ABS64 = 268435713
AARCH64_ADD_ABS_LO12_NC = 268435733
AARCH64_ADR_GOT_PAGE = 268435767
AARCH64_ADR_PREL_LO21 = 268435730
AARCH64_ADR_PREL_PG_HI21 = 268435731
AARCH64_ADR_PREL_PG_HI21_NC = 268435732
AARCH64_CALL26 = 268435739
AARCH64_CONDBR19 = 268435736
AARCH64_COPY = 268436480
AARCH64_GLOB_DAT = 268436481
AARCH64_GOTREL32 = 268435764
AARCH64_GOTREL64 = 268435763
AARCH64_GOT_LD_PREL19 = 268435765
AARCH64_IRELATIVE = 268436488
AARCH64_JUMP26 = 268435738
AARCH64_JUMP_SLOT = 268436482
AARCH64_LD64_GOTOFF_LO15 = 268435766
AARCH64_LD64_GOTPAGE_LO15 = 268435769
AARCH64_LD64_GOT_LO12_NC = 268435768
AARCH64_LDST128_ABS_LO12_NC = 268435755
AARCH64_LDST16_ABS_LO12_NC = 268435740
AARCH64_LDST32_ABS_LO12_NC = 268435741
AARCH64_LDST64_ABS_LO12_NC = 268435742
AARCH64_LDST8_ABS_LO12_NC = 268435734
AARCH64_LD_PREL_LO19 = 268435729
AARCH64_MOVW_GOTOFF_G0 = 268435756
AARCH64_MOVW_GOTOFF_G0_NC = 268435757
AARCH64_MOVW_GOTOFF_G1 = 268435758
AARCH64_MOVW_GOTOFF_G1_NC = 268435759
AARCH64_MOVW_GOTOFF_G2 = 268435760
AARCH64_MOVW_GOTOFF_G2_NC = 268435761
AARCH64_MOVW_GOTOFF_G3 = 268435762
AARCH64_MOVW_PREL_G0 = 268435743
AARCH64_MOVW_PREL_G0_NC = 268435744
AARCH64_MOVW_PREL_G1 = 268435745
AARCH64_MOVW_PREL_G1_NC = 268435746
AARCH64_MOVW_PREL_G2 = 268435747
AARCH64_MOVW_PREL_G2_NC = 268435748
AARCH64_MOVW_PREL_G3 = 268435749
AARCH64_MOVW_SABS_G0 = 268435726
AARCH64_MOVW_SABS_G1 = 268435727
AARCH64_MOVW_SABS_G2 = 268435728
AARCH64_MOVW_UABS_G0 = 268435719
AARCH64_MOVW_UABS_G0_NC = 268435720
AARCH64_MOVW_UABS_G1 = 268435721
AARCH64_MOVW_UABS_G1_NC = 268435722
AARCH64_MOVW_UABS_G2 = 268435723
AARCH64_MOVW_UABS_G2_NC = 268435724
AARCH64_MOVW_UABS_G3 = 268435725
AARCH64_NONE = 268435456
AARCH64_PREL16 = 268435718
AARCH64_PREL32 = 268435717
AARCH64_PREL64 = 268435716
AARCH64_RELATIVE = 268436483
AARCH64_TLSDESC = 268436487
AARCH64_TLSDESC_ADD = 268436024
AARCH64_TLSDESC_ADD_LO12_NC = 268436020
AARCH64_TLSDESC_ADR_PAGE21 = 268436018
AARCH64_TLSDESC_ADR_PREL21 = 268436017
AARCH64_TLSDESC_CALL = 268436025
AARCH64_TLSDESC_LD64_LO12_NC = 268436019
AARCH64_TLSDESC_LDR = 268436023
AARCH64_TLSDESC_LD_PREL19 = 268436016
AARCH64_TLSDESC_OFF_G0_NC = 268436022
AARCH64_TLSDESC_OFF_G1 = 268436021
AARCH64_TLSGD_ADD_LO12_NC = 268435970
AARCH64_TLSGD_ADR_PAGE21 = 268435969
AARCH64_TLSGD_ADR_PREL21 = 268435968
AARCH64_TLSGD_MOVW_G0_NC = 268435972
AARCH64_TLSGD_MOVW_G1 = 268435971
AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 = 268435997
AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC = 268435998
AARCH64_TLSIE_LD_GOTTPREL_PREL19 = 268435999
AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC = 268435996
AARCH64_TLSIE_MOVW_GOTTPREL_G1 = 268435995
AARCH64_TLSLD_ADD_DTPREL_HI12 = 268435984
AARCH64_TLSLD_ADD_DTPREL_LO12 = 268435985
AARCH64_TLSLD_ADD_DTPREL_LO12_NC = 268435986
AARCH64_TLSLD_ADD_LO12_NC = 268435975
AARCH64_TLSLD_ADR_PAGE21 = 268435974
AARCH64_TLSLD_ADR_PREL21 = 268435973
AARCH64_TLSLD_LDST128_DTPREL_LO12 = 268436028
AARCH64_TLSLD_LDST128_DTPREL_LO12_NC = 268436029
AARCH64_TLSLD_LDST16_DTPREL_LO12 = 268435989
AARCH64_TLSLD_LDST16_DTPREL_LO12_NC = 268435990
AARCH64_TLSLD_LDST32_DTPREL_LO12 = 268435991
AARCH64_TLSLD_LDST32_DTPREL_LO12_NC = 268435992
AARCH64_TLSLD_LDST64_DTPREL_LO12 = 268435993
AARCH64_TLSLD_LDST64_DTPREL_LO12_NC = 268435994
AARCH64_TLSLD_LDST8_DTPREL_LO12 = 268435987
AARCH64_TLSLD_LDST8_DTPREL_LO12_NC = 268435988
AARCH64_TLSLD_LD_PREL19 = 268435978
AARCH64_TLSLD_MOVW_DTPREL_G0 = 268435982
AARCH64_TLSLD_MOVW_DTPREL_G0_NC = 268435983
AARCH64_TLSLD_MOVW_DTPREL_G1 = 268435980
AARCH64_TLSLD_MOVW_DTPREL_G1_NC = 268435981
AARCH64_TLSLD_MOVW_DTPREL_G2 = 268435979
AARCH64_TLSLD_MOVW_G0_NC = 268435977
AARCH64_TLSLD_MOVW_G1 = 268435976
AARCH64_TLSLE_ADD_TPREL_HI12 = 268436005
AARCH64_TLSLE_ADD_TPREL_LO12 = 268436006
AARCH64_TLSLE_ADD_TPREL_LO12_NC = 268436007
AARCH64_TLSLE_LDST128_TPREL_LO12 = 268436026
AARCH64_TLSLE_LDST128_TPREL_LO12_NC = 268436027
AARCH64_TLSLE_LDST16_TPREL_LO12 = 268436010
AARCH64_TLSLE_LDST16_TPREL_LO12_NC = 268436011
AARCH64_TLSLE_LDST32_TPREL_LO12 = 268436012
AARCH64_TLSLE_LDST32_TPREL_LO12_NC = 268436013
AARCH64_TLSLE_LDST64_TPREL_LO12 = 268436014
AARCH64_TLSLE_LDST64_TPREL_LO12_NC = 268436015
AARCH64_TLSLE_LDST8_TPREL_LO12 = 268436008
AARCH64_TLSLE_LDST8_TPREL_LO12_NC = 268436009
AARCH64_TLSLE_MOVW_TPREL_G0 = 268436003
AARCH64_TLSLE_MOVW_TPREL_G0_NC = 268436004
AARCH64_TLSLE_MOVW_TPREL_G1 = 268436001
AARCH64_TLSLE_MOVW_TPREL_G1_NC = 268436002
AARCH64_TLSLE_MOVW_TPREL_G2 = 268436000
AARCH64_TLS_DTPMOD64 = 268436485
AARCH64_TLS_DTPREL64 = 268436484
AARCH64_TLS_TPREL64 = 268436486
AARCH64_TSTBR14 = 268435735
ARM_ABS12 = 402653190
ARM_ABS16 = 402653189
ARM_ABS32 = 402653186
ARM_ABS32_NOI = 402653239
ARM_ABS8 = 402653192
ARM_ALU_PCREL_15_8 = 402653217
ARM_ALU_PCREL_23_15 = 402653218
ARM_ALU_PCREL_7_0 = 402653216
ARM_ALU_PC_G0 = 402653242
ARM_ALU_PC_G0_NC = 402653241
ARM_ALU_PC_G1 = 402653244
ARM_ALU_PC_G1_NC = 402653243
ARM_ALU_PC_G2 = 402653245
ARM_ALU_SBREL_19_12_NC = 402653220
ARM_ALU_SBREL_27_20_CK = 402653221
ARM_ALU_SB_G0 = 402653255
ARM_ALU_SB_G0_NC = 402653254
ARM_ALU_SB_G1 = 402653257
ARM_ALU_SB_G1_NC = 402653256
ARM_ALU_SB_G2 = 402653258
ARM_BASE_ABS = 402653215
ARM_BASE_PREL = 402653209
ARM_BREL_ADJ = 402653196
ARM_CALL = 402653212
ARM_COPY = 402653204
ARM_GLOB_DAT = 402653205
ARM_GNU_VTENTRY = 402653284
ARM_GNU_VTINHERIT = 402653285
ARM_GOTOFF12 = 402653282
ARM_GOTOFF32 = 402653208
ARM_GOTRELAX = 402653283
ARM_GOT_ABS = 402653279
ARM_GOT_BREL = 402653210
ARM_GOT_BREL12 = 402653281
ARM_GOT_PREL = 402653280
ARM_IRELATIVE = 402653344
ARM_JUMP24 = 402653213
ARM_JUMP_SLOT = 402653206
ARM_LDC_PC_G0 = 402653251
ARM_LDC_PC_G1 = 402653252
ARM_LDC_PC_G2 = 402653253
ARM_LDC_SB_G0 = 402653265
ARM_LDC_SB_G1 = 402653266
ARM_LDC_SB_G2 = 402653267
ARM_LDRS_PC_G0 = 402653248
ARM_LDRS_PC_G1 = 402653249
ARM_LDRS_PC_G2 = 402653250
ARM_LDRS_SB_G0 = 402653262
ARM_LDRS_SB_G1 = 402653263
ARM_LDRS_SB_G2 = 402653264
ARM_LDR_PC_G0 = 402653188
ARM_LDR_PC_G1 = 402653246
ARM_LDR_PC_G2 = 402653247
ARM_LDR_SBREL_11_0_NC = 402653219
ARM_LDR_SB_G0 = 402653259
ARM_LDR_SB_G1 = 402653260
ARM_LDR_SB_G2 = 402653261
ARM_ME_TOO = 402653312
ARM_MOVT_ABS = 402653228
ARM_MOVT_BREL = 402653269
ARM_MOVT_PREL = 402653230
ARM_MOVW_ABS_NC = 402653227
ARM_MOVW_BREL = 402653270
ARM_MOVW_BREL_NC = 402653268
ARM_MOVW_PREL_NC = 402653229
ARM_NONE = 402653184
ARM_PC24 = 402653185
ARM_PLT32 = 402653211
ARM_PLT32_ABS = 402653278
ARM_PREL31 = 402653226
ARM_PRIVATE_0 = 402653296
ARM_PRIVATE_1 = 402653297
ARM_PRIVATE_10 = 402653306
ARM_PRIVATE_11 = 402653307
ARM_PRIVATE_12 = 402653308
ARM_PRIVATE_13 = 402653309
ARM_PRIVATE_14 = 402653310
ARM_PRIVATE_15 = 402653311
ARM_PRIVATE_2 = 402653298
ARM_PRIVATE_3 = 402653299
ARM_PRIVATE_4 = 402653300
ARM_PRIVATE_5 = 402653301
ARM_PRIVATE_6 = 402653302
ARM_PRIVATE_7 = 402653303
ARM_PRIVATE_8 = 402653304
ARM_PRIVATE_9 = 402653305
ARM_RBASE = 402653438
ARM_REL32 = 402653187
ARM_REL32_NOI = 402653240
ARM_RELATIVE = 402653207
ARM_RPC24 = 402653437
ARM_RREL32 = 402653436
ARM_RSBREL32 = 402653434
ARM_RXPC25 = 402653433
ARM_SBREL31 = 402653223
ARM_SBREL32 = 402653193
ARM_TARGET1 = 402653222
ARM_TARGET2 = 402653225
ARM_THM_ABS5 = 402653191
ARM_THM_ALU_PREL_11_0 = 402653237
ARM_THM_CALL = 402653194
ARM_THM_JUMP11 = 402653286
ARM_THM_JUMP19 = 402653235
ARM_THM_JUMP24 = 402653214
ARM_THM_JUMP6 = 402653236
ARM_THM_JUMP8 = 402653287
ARM_THM_MOVT_ABS = 402653232
ARM_THM_MOVT_BREL = 402653272
ARM_THM_MOVT_PREL = 402653234
ARM_THM_MOVW_ABS_NC = 402653231
ARM_THM_MOVW_BREL = 402653273
ARM_THM_MOVW_BREL_NC = 402653271
ARM_THM_MOVW_PREL_NC = 402653233
ARM_THM_PC12 = 402653238
ARM_THM_PC8 = 402653195
ARM_THM_RPC22 = 402653435
ARM_THM_SWI8 = 402653198
ARM_THM_TLS_CALL = 402653277
ARM_THM_TLS_DESCSEQ16 = 402653313
ARM_THM_TLS_DESCSEQ32 = 402653314
ARM_THM_XPC22 = 402653200
ARM_TLS_CALL = 402653275
ARM_TLS_DESC = 402653197
ARM_TLS_DESCSEQ = 402653276
ARM_TLS_DTPMOD32 = 402653201
ARM_TLS_DTPOFF32 = 402653202
ARM_TLS_GD32 = 402653288
ARM_TLS_GOTDESC = 402653274
ARM_TLS_IE12GP = 402653295
ARM_TLS_IE32 = 402653291
ARM_TLS_LDM32 = 402653289
ARM_TLS_LDO12 = 402653293
ARM_TLS_LDO32 = 402653290
ARM_TLS_LE12 = 402653294
ARM_TLS_LE32 = 402653292
ARM_TLS_TPOFF32 = 402653203
ARM_V4BX = 402653224
ARM_XPC25 = 402653199
BPF_64_32 = 1744830474
BPF_64_64 = 1744830465
BPF_64_ABS32 = 1744830467
BPF_64_ABS64 = 1744830466
BPF_64_NODYLD32 = 1744830468
BPF_NONE = 1744830464
HEX_10_X = 536870938
HEX_11_X = 536870937
HEX_12_X = 536870936
HEX_16 = 536870919
HEX_16_X = 536870935
HEX_32 = 536870918
HEX_32_6_X = 536870929
HEX_32_PCREL = 536870943
HEX_6_PCREL_X = 536870977
HEX_6_X = 536870942
HEX_7_X = 536870941
HEX_8 = 536870920
HEX_8_X = 536870940
HEX_9_X = 536870939
HEX_B13_PCREL = 536870926
HEX_B13_PCREL_X = 536870932
HEX_B15_PCREL = 536870914
HEX_B15_PCREL_X = 536870931
HEX_B22_PCREL = 536870913
HEX_B22_PCREL_X = 536870930
HEX_B32_PCREL_X = 536870928
HEX_B7_PCREL = 536870915
HEX_B7_PCREL_X = 536870934
HEX_B9_PCREL = 536870927
HEX_B9_PCREL_X = 536870933
HEX_COPY = 536870944
HEX_DTPMOD_32 = 536870956
HEX_DTPREL_11_X = 536870986
HEX_DTPREL_16 = 536870960
HEX_DTPREL_16_X = 536870985
HEX_DTPREL_32 = 536870959
HEX_DTPREL_32_6_X = 536870984
HEX_DTPREL_HI16 = 536870958
HEX_DTPREL_LO16 = 536870957
HEX_GD_GOT_11_X = 536870989
HEX_GD_GOT_16 = 536870965
HEX_GD_GOT_16_X = 536870988
HEX_GD_GOT_32 = 536870964
HEX_GD_GOT_32_6_X = 536870987
HEX_GD_GOT_HI16 = 536870963
HEX_GD_GOT_LO16 = 536870962
HEX_GD_PLT_B22_PCREL = 536870961
HEX_GLOB_DAT = 536870945
HEX_GOTREL_11_X = 536870980
HEX_GOTREL_16_X = 536870979
HEX_GOTREL_32 = 536870951
HEX_GOTREL_32_6_X = 536870978
HEX_GOTREL_HI16 = 536870950
HEX_GOTREL_LO16 = 536870949
HEX_GOT_11_X = 536870983
HEX_GOT_16 = 536870955
HEX_GOT_16_X = 536870982
HEX_GOT_32 = 536870954
HEX_GOT_32_6_X = 536870981
HEX_GOT_HI16 = 536870953
HEX_GOT_LO16 = 536870952
HEX_GPREL16_0 = 536870921
HEX_GPREL16_1 = 536870922
HEX_GPREL16_2 = 536870923
HEX_GPREL16_3 = 536870924
HEX_HI16 = 536870917
HEX_HL16 = 536870925
HEX_IE_16_X = 536870991
HEX_IE_32 = 536870968
HEX_IE_32_6_X = 536870990
HEX_IE_GOT_11_X = 536870994
HEX_IE_GOT_16 = 536870972
HEX_IE_GOT_16_X = 536870993
HEX_IE_GOT_32 = 536870971
HEX_IE_GOT_32_6_X = 536870992
HEX_IE_GOT_HI16 = 536870970
HEX_IE_GOT_LO16 = 536870969
HEX_IE_HI16 = 536870967
HEX_IE_LO16 = 536870966
HEX_JMP_SLOT = 536870946
HEX_LD_GOT_11_X = 536871005
HEX_LD_GOT_16 = 536871002
HEX_LD_GOT_16_X = 536871004
HEX_LD_GOT_32 = 536871001
HEX_LD_GOT_32_6_X = 536871003
HEX_LD_GOT_HI16 = 536871000
HEX_LD_GOT_LO16 = 536870999
HEX_LD_PLT_B22_PCREL = 536870998
HEX_LO16 = 536870916
HEX_NONE = 536870912
HEX_PLT_B22_PCREL = 536870948
HEX_RELATIVE = 536870947
HEX_TPREL_11_X = 536870997
HEX_TPREL_16 = 536870976
HEX_TPREL_16_X = 536870996
HEX_TPREL_32 = 536870975
HEX_TPREL_32_6_X = 536870995
HEX_TPREL_HI16 = 536870974
HEX_TPREL_LO16 = 536870973
LARCH_32 = 805306369
LARCH_32_PCREL = 805306467
LARCH_64 = 805306370
LARCH_64_PCREL = 805306477
LARCH_ABS64_HI12 = 805306438
LARCH_ABS64_LO20 = 805306437
LARCH_ABS_HI20 = 805306435
LARCH_ABS_LO12 = 805306436
LARCH_ADD16 = 805306416
LARCH_ADD24 = 805306417
LARCH_ADD32 = 805306418
LARCH_ADD6 = 805306473
LARCH_ADD64 = 805306419
LARCH_ADD8 = 805306415
LARCH_ADD_ULEB128 = 805306475
LARCH_ALIGN = 805306470
LARCH_B16 = 805306432
LARCH_B21 = 805306433
LARCH_B26 = 805306434
LARCH_CALL36 = 805306478
LARCH_COPY = 805306372
LARCH_GNU_VTENTRY = 805306426
LARCH_GNU_VTINHERIT = 805306425
LARCH_GOT64_HI12 = 805306450
LARCH_GOT64_LO20 = 805306449
LARCH_GOT64_PC_HI12 = 805306446
LARCH_GOT64_PC_LO20 = 805306445
LARCH_GOT_HI20 = 805306447
LARCH_GOT_LO12 = 805306448
LARCH_GOT_PC_HI20 = 805306443
LARCH_GOT_PC_LO12 = 805306444
LARCH_IRELATIVE = 805306380
LARCH_JUMP_SLOT = 805306373
LARCH_MARK_LA = 805306388
LARCH_MARK_PCREL = 805306389
LARCH_NONE = 805306368
LARCH_PCALA64_HI12 = 805306442
LARCH_PCALA64_LO20 = 805306441
LARCH_PCALA_HI20 = 805306439
LARCH_PCALA_LO12 = 805306440
LARCH_PCREL20_S2 = 805306471
LARCH_RELATIVE = 805306371
LARCH_RELAX = 805306468
LARCH_SOP_ADD = 805306403
LARCH_SOP_AND = 805306404
LARCH_SOP_ASSERT = 805306398
LARCH_SOP_IF_ELSE = 805306405
LARCH_SOP_NOT = 805306399
LARCH_SOP_POP_32_S_0_10_10_16_S2 = 805306413
LARCH_SOP_POP_32_S_0_5_10_16_S2 = 805306412
LARCH_SOP_POP_32_S_10_12 = 805306408
LARCH_SOP_POP_32_S_10_16 = 805306409
LARCH_SOP_POP_32_S_10_16_S2 = 805306410
LARCH_SOP_POP_32_S_10_5 = 805306406
LARCH_SOP_POP_32_S_5_20 = 805306411
LARCH_SOP_POP_32_U = 805306414
LARCH_SOP_POP_32_U_10_12 = 805306407
LARCH_SOP_PUSH_ABSOLUTE = 805306391
LARCH_SOP_PUSH_DUP = 805306392
LARCH_SOP_PUSH_GPREL = 805306393
LARCH_SOP_PUSH_PCREL = 805306390
LARCH_SOP_PUSH_PLT_PCREL = 805306397
LARCH_SOP_PUSH_TLS_GD = 805306396
LARCH_SOP_PUSH_TLS_GOT = 805306395
LARCH_SOP_PUSH_TLS_TPREL = 805306394
LARCH_SOP_SL = 805306401
LARCH_SOP_SR = 805306402
LARCH_SOP_SUB = 805306400
LARCH_SUB16 = 805306421
LARCH_SUB24 = 805306422
LARCH_SUB32 = 805306423
LARCH_SUB6 = 805306474
LARCH_SUB64 = 805306424
LARCH_SUB8 = 805306420
LARCH_SUB_ULEB128 = 805306476
LARCH_TLS_DESC32 = 805306381
LARCH_TLS_DESC64 = 805306382
LARCH_TLS_DESC64_HI12 = 805306486
LARCH_TLS_DESC64_LO20 = 805306485
LARCH_TLS_DESC64_PC_HI12 = 805306482
LARCH_TLS_DESC64_PC_LO20 = 805306481
LARCH_TLS_DESC_CALL = 805306488
LARCH_TLS_DESC_HI20 = 805306483
LARCH_TLS_DESC_LD = 805306487
LARCH_TLS_DESC_LO12 = 805306484
LARCH_TLS_DESC_PCREL20_S2 = 805306494
LARCH_TLS_DESC_PC_HI20 = 805306479
LARCH_TLS_DESC_PC_LO12 = 805306480
LARCH_TLS_DTPMOD32 = 805306374
LARCH_TLS_DTPMOD64 = 805306375
LARCH_TLS_DTPREL32 = 805306376
LARCH_TLS_DTPREL64 = 805306377
LARCH_TLS_GD_HI20 = 805306466
LARCH_TLS_GD_PCREL20_S2 = 805306493
LARCH_TLS_GD_PC_HI20 = 805306465
LARCH_TLS_IE64_HI12 = 805306462
LARCH_TLS_IE64_LO20 = 805306461
LARCH_TLS_IE64_PC_HI12 = 805306458
LARCH_TLS_IE64_PC_LO20 = 805306457
LARCH_TLS_IE_HI20 = 805306459
LARCH_TLS_IE_LO12 = 805306460
LARCH_TLS_IE_PC_HI20 = 805306455
LARCH_TLS_IE_PC_LO12 = 805306456
LARCH_TLS_LD_HI20 = 805306464
LARCH_TLS_LD_PCREL20_S2 = 805306492
LARCH_TLS_LD_PC_HI20 = 805306463
LARCH_TLS_LE64_HI12 = 805306454
LARCH_TLS_LE64_LO20 = 805306453
LARCH_TLS_LE_ADD_R = 805306490
LARCH_TLS_LE_HI20 = 805306451
LARCH_TLS_LE_HI20_R = 805306489
LARCH_TLS_LE_LO12 = 805306452
LARCH_TLS_LE_LO12_R = 805306491
LARCH_TLS_TPREL32 = 805306378
LARCH_TLS_TPREL64 = 805306379
MICROMIPS_26_S1 = 939524229
MICROMIPS_CALL16 = 939524238
MICROMIPS_CALL_HI16 = 939524249
MICROMIPS_CALL_LO16 = 939524250
MICROMIPS_GOT16 = 939524234
MICROMIPS_GOT_DISP = 939524241
MICROMIPS_GOT_HI16 = 939524244
MICROMIPS_GOT_LO16 = 939524245
MICROMIPS_GOT_OFST = 939524243
MICROMIPS_GOT_PAGE = 939524242
MICROMIPS_GPREL16 = 939524232
MICROMIPS_GPREL7_S2 = 939524268
MICROMIPS_HI0_LO16 = 939524253
MICROMIPS_HI16 = 939524230
MICROMIPS_HIGHER = 939524247
MICROMIPS_HIGHEST = 939524248
MICROMIPS_JALR = 939524252
MICROMIPS_LITERAL = 939524233
MICROMIPS_LO16 = 939524231
MICROMIPS_PC10_S1 = 939524236
MICROMIPS_PC16_S1 = 939524237
MICROMIPS_PC18_S3 = 939524272
MICROMIPS_PC19_S2 = 939524273
MICROMIPS_PC21_S2 = 939524270
MICROMIPS_PC23_S2 = 939524269
MICROMIPS_PC26_S2 = 939524271
MICROMIPS_PC7_S1 = 939524235
MICROMIPS_SCN_DISP = 939524251
MICROMIPS_SUB = 939524246
MICROMIPS_TLS_DTPREL_HI16 = 939524260
MICROMIPS_TLS_DTPREL_LO16 = 939524261
MICROMIPS_TLS_GD = 939524258
MICROMIPS_TLS_GOTTPREL = 939524262
MICROMIPS_TLS_LDM = 939524259
MICROMIPS_TLS_TPREL_HI16 = 939524265
MICROMIPS_TLS_TPREL_LO16 = 939524266
MIPS16_26 = 939524196
MIPS16_CALL16 = 939524199
MIPS16_GOT16 = 939524198
MIPS16_GPREL = 939524197
MIPS16_HI16 = 939524200
MIPS16_LO16 = 939524201
MIPS16_TLS_DTPREL_HI16 = 939524204
MIPS16_TLS_DTPREL_LO16 = 939524205
MIPS16_TLS_GD = 939524202
MIPS16_TLS_GOTTPREL = 939524206
MIPS16_TLS_LDM = 939524203
MIPS16_TLS_TPREL_HI16 = 939524207
MIPS16_TLS_TPREL_LO16 = 939524208
MIPS_16 = 939524097
MIPS_26 = 939524100
MIPS_32 = 939524098
MIPS_64 = 939524114
MIPS_ADD_IMMEDIATE = 939524130
MIPS_CALL16 = 939524107
MIPS_CALL_HI16 = 939524126
MIPS_CALL_LO16 = 939524127
MIPS_COPY = 939524222
MIPS_DELETE = 939524123
MIPS_EH = 939524345
MIPS_GLOB_DAT = 939524147
MIPS_GOT16 = 939524105
MIPS_GOT_DISP = 939524115
MIPS_GOT_HI16 = 939524118
MIPS_GOT_LO16 = 939524119
MIPS_GOT_OFST = 939524117
MIPS_GOT_PAGE = 939524116
MIPS_GPREL16 = 939524103
MIPS_GPREL32 = 939524108
MIPS_HI16 = 939524101
MIPS_HIGHER = 939524124
MIPS_HIGHEST = 939524125
MIPS_INSERT_A = 939524121
MIPS_INSERT_B = 939524122
MIPS_JALR = 939524133
MIPS_JUMP_SLOT = 939524223
MIPS_LITERAL = 939524104
MIPS_LO16 = 939524102
MIPS_NONE = 939524096
MIPS_NUM = 939524314
MIPS_PC16 = 939524106
MIPS_PC18_S3 = 939524158
MIPS_PC19_S2 = 939524159
MIPS_PC21_S2 = 939524156
MIPS_PC26_S2 = 939524157
MIPS_PC32 = 939524344
MIPS_PCHI16 = 939524160
MIPS_PCLO16 = 939524161
MIPS_PJUMP = 939524131
MIPS_REL16 = 939524129
MIPS_REL32 = 939524099
MIPS_RELGOT = 939524132
MIPS_SCN_DISP = 939524128
MIPS_SHIFT5 = 939524112
MIPS_SHIFT6 = 939524113
MIPS_SUB = 939524120
MIPS_TLS_DTPMOD32 = 939524134
MIPS_TLS_DTPMOD64 = 939524136
MIPS_TLS_DTPREL32 = 939524135
MIPS_TLS_DTPREL64 = 939524137
MIPS_TLS_DTPREL_HI16 = 939524140
MIPS_TLS_DTPREL_LO16 = 939524141
MIPS_TLS_GD = 939524138
MIPS_TLS_GOTTPREL = 939524142
MIPS_TLS_LDM = 939524139
MIPS_TLS_TPREL32 = 939524143
MIPS_TLS_TPREL64 = 939524144
MIPS_TLS_TPREL_HI16 = 939524145
MIPS_TLS_TPREL_LO16 = 939524146
MIPS_UNUSED1 = 939524109
MIPS_UNUSED2 = 939524110
MIPS_UNUSED3 = 939524111
PPC64_ADDR14 = 1207959559
PPC64_ADDR14_BRNTAKEN = 1207959561
PPC64_ADDR14_BRTAKEN = 1207959560
PPC64_ADDR16 = 1207959555
PPC64_ADDR16_DS = 1207959608
PPC64_ADDR16_HA = 1207959558
PPC64_ADDR16_HI = 1207959557
PPC64_ADDR16_HIGHER = 1207959591
PPC64_ADDR16_HIGHERA = 1207959592
PPC64_ADDR16_HIGHEST = 1207959593
PPC64_ADDR16_HIGHESTA = 1207959594
PPC64_ADDR16_LO = 1207959556
PPC64_ADDR16_LO_DS = 1207959609
PPC64_ADDR24 = 1207959554
PPC64_ADDR32 = 1207959553
PPC64_ADDR64 = 1207959590
PPC64_DTPMOD64 = 1207959620
PPC64_DTPREL16 = 1207959626
PPC64_DTPREL16_DS = 1207959653
PPC64_DTPREL16_HA = 1207959629
PPC64_DTPREL16_HI = 1207959628
PPC64_DTPREL16_HIGHER = 1207959655
PPC64_DTPREL16_HIGHERA = 1207959656
PPC64_DTPREL16_HIGHEST = 1207959657
PPC64_DTPREL16_HIGHESTA = 1207959658
PPC64_DTPREL16_LO = 1207959627
PPC64_DTPREL16_LO_DS = 1207959654
PPC64_DTPREL64 = 1207959630
PPC64_GOT16 = 1207959566
PPC64_GOT16_DS = 1207959610
PPC64_GOT16_HA = 1207959569
PPC64_GOT16_HI = 1207959568
PPC64_GOT16_LO = 1207959567
PPC64_GOT16_LO_DS = 1207959611
PPC64_GOT_DTPREL16_DS = 1207959643
PPC64_GOT_DTPREL16_HA = 1207959646
PPC64_GOT_DTPREL16_HI = 1207959645
PPC64_GOT_DTPREL16_LO_DS = 1207959644
PPC64_GOT_TLSGD16 = 1207959631
PPC64_GOT_TLSGD16_HA = 1207959634
PPC64_GOT_TLSGD16_HI = 1207959633
PPC64_GOT_TLSGD16_LO = 1207959632
PPC64_GOT_TLSLD16 = 1207959635
PPC64_GOT_TLSLD16_HA = 1207959638
PPC64_GOT_TLSLD16_HI = 1207959637
PPC64_GOT_TLSLD16_LO = 1207959636
PPC64_GOT_TPREL16_DS = 1207959639
PPC64_GOT_TPREL16_HA = 1207959642
PPC64_GOT_TPREL16_HI = 1207959641
PPC64_GOT_TPREL16_LO_DS = 1207959640
PPC64_JMP_SLOT = 1207959573
PPC64_NONE = 1207959552
PPC64_REL14 = 1207959563
PPC64_REL14_BRNTAKEN = 1207959565
PPC64_REL14_BRTAKEN = 1207959564
PPC64_REL16 = 1207959801
PPC64_REL16_HA = 1207959804
PPC64_REL16_HI = 1207959803
PPC64_REL16_LO = 1207959802
PPC64_REL24 = 1207959562
PPC64_REL32 = 1207959578
PPC64_REL64 = 1207959596
PPC64_RELATIVE = 1207959574
PPC64_TLS = 1207959619
PPC64_TLSGD = 1207959659
PPC64_TLSLD = 1207959660
PPC64_TOC = 1207959603
PPC64_TOC16 = 1207959599
PPC64_TOC16_DS = 1207959615
PPC64_TOC16_HA = 1207959602
PPC64_TOC16_HI = 1207959601
PPC64_TOC16_LO = 1207959600
PPC64_TOC16_LO_DS = 1207959616
PPC64_TPREL16 = 1207959621
PPC64_TPREL16_DS = 1207959647
PPC64_TPREL16_HA = 1207959624
PPC64_TPREL16_HI = 1207959623
PPC64_TPREL16_HIGHER = 1207959649
PPC64_TPREL16_HIGHERA = 1207959650
PPC64_TPREL16_HIGHEST = 1207959651
PPC64_TPREL16_HIGHESTA = 1207959652
PPC64_TPREL16_LO = 1207959622
PPC64_TPREL16_LO_DS = 1207959648
PPC64_TPREL64 = 1207959625
PPC_ADDR14 = 1073741831
PPC_ADDR14_BRNTAKEN = 1073741833
PPC_ADDR14_BRTAKEN = 1073741832
PPC_ADDR16 = 1073741827
PPC_ADDR16_HA = 1073741830
PPC_ADDR16_HI = 1073741829
PPC_ADDR16_LO = 1073741828
PPC_ADDR24 = 1073741826
PPC_ADDR32 = 1073741825
PPC_DTPMOD32 = 1073741892
PPC_DTPREL16 = 1073741898
PPC_DTPREL16_HA = 1073741901
PPC_DTPREL16_HI = 1073741900
PPC_DTPREL16_LO = 1073741899
PPC_DTPREL32 = 1073741902
PPC_GOT16 = 1073741838
PPC_GOT16_HA = 1073741841
PPC_GOT16_HI = 1073741840
PPC_GOT16_LO = 1073741839
PPC_GOT_DTPREL16 = 1073741915
PPC_GOT_DTPREL16_HA = 1073741918
PPC_GOT_DTPREL16_HI = 1073741917
PPC_GOT_DTPREL16_LO = 1073741916
PPC_GOT_TLSGD16 = 1073741903
PPC_GOT_TLSGD16_HA = 1073741906
PPC_GOT_TLSGD16_HI = 1073741905
PPC_GOT_TLSGD16_LO = 1073741904
PPC_GOT_TLSLD16 = 1073741907
PPC_GOT_TLSLD16_HA = 1073741910
PPC_GOT_TLSLD16_HI = 1073741909
PPC_GOT_TLSLD16_LO = 1073741908
PPC_GOT_TPREL16 = 1073741911
PPC_GOT_TPREL16_HA = 1073741914
PPC_GOT_TPREL16_HI = 1073741913
PPC_GOT_TPREL16_LO = 1073741912
PPC_JMP_SLOT = 1073741845
PPC_LOCAL24PC = 1073741847
PPC_NONE = 1073741824
PPC_PLTREL24 = 1073741842
PPC_REL14 = 1073741835
PPC_REL14_BRNTAKEN = 1073741837
PPC_REL14_BRTAKEN = 1073741836
PPC_REL16 = 1073742073
PPC_REL16_HA = 1073742076
PPC_REL16_HI = 1073742075
PPC_REL16_LO = 1073742074
PPC_REL24 = 1073741834
PPC_REL32 = 1073741850
PPC_RELATIVE = 1073741846
PPC_TLS = 1073741891
PPC_TLSGD = 1073741919
PPC_TLSLD = 1073741920
PPC_TPREL16 = 1073741893
PPC_TPREL16_HA = 1073741896
PPC_TPREL16_HI = 1073741895
PPC_TPREL16_LO = 1073741894
PPC_TPREL32 = 1073741897
RISCV_32 = 1610612737
RISCV_32_PCREL = 1610612793
RISCV_64 = 1610612738
RISCV_ADD16 = 1610612770
RISCV_ADD32 = 1610612771
RISCV_ADD64 = 1610612772
RISCV_ADD8 = 1610612769
RISCV_ALIGN = 1610612779
RISCV_BRANCH = 1610612752
RISCV_CALL = 1610612754
RISCV_CALL_PLT = 1610612755
RISCV_COPY = 1610612740
RISCV_GOT32_PCREL = 1610612777
RISCV_GOT_HI20 = 1610612756
RISCV_HI20 = 1610612762
RISCV_IRELATIVE = 1610612794
RISCV_JAL = 1610612753
RISCV_JUMP_SLOT = 1610612741
RISCV_LO12_I = 1610612763
RISCV_LO12_S = 1610612764
RISCV_NONE = 1610612736
RISCV_PCREL_HI20 = 1610612759
RISCV_PCREL_LO12_I = 1610612760
RISCV_PCREL_LO12_S = 1610612761
RISCV_PLT32 = 1610612795
RISCV_RELATIVE = 1610612739
RISCV_RELAX = 1610612787
RISCV_RVC_BRANCH = 1610612780
RISCV_RVC_JUMP = 1610612781
RISCV_RVC_LUI = 1610612782
RISCV_SET16 = 1610612791
RISCV_SET32 = 1610612792
RISCV_SET6 = 1610612789
RISCV_SET8 = 1610612790
RISCV_SET_ULEB128 = 1610612796
RISCV_SUB16 = 1610612774
RISCV_SUB32 = 1610612775
RISCV_SUB6 = 1610612788
RISCV_SUB64 = 1610612776
RISCV_SUB8 = 1610612773
RISCV_SUB_ULEB128 = 1610612797
RISCV_TLSDESC = 1610612748
RISCV_TLSDESC_ADD_LO12 = 1610612800
RISCV_TLSDESC_CALL = 1610612801
RISCV_TLSDESC_HI20 = 1610612798
RISCV_TLSDESC_LOAD_LO12 = 1610612799
RISCV_TLS_DTPMOD32 = 1610612742
RISCV_TLS_DTPMOD64 = 1610612743
RISCV_TLS_DTPREL32 = 1610612744
RISCV_TLS_DTPREL64 = 1610612745
RISCV_TLS_GD_HI20 = 1610612758
RISCV_TLS_GOT_HI20 = 1610612757
RISCV_TLS_TPREL32 = 1610612746
RISCV_TLS_TPREL64 = 1610612747
RISCV_TPREL_ADD = 1610612768
RISCV_TPREL_HI20 = 1610612765
RISCV_TPREL_LO12_I = 1610612766
RISCV_TPREL_LO12_S = 1610612767
SPARC_10 = 1342177310
SPARC_11 = 1342177311
SPARC_13 = 1342177291
SPARC_16 = 1342177282
SPARC_22 = 1342177290
SPARC_32 = 1342177283
SPARC_5 = 1342177324
SPARC_6 = 1342177325
SPARC_64 = 1342177312
SPARC_7 = 1342177323
SPARC_8 = 1342177281
SPARC_COPY = 1342177299
SPARC_DISP16 = 1342177285
SPARC_DISP32 = 1342177286
SPARC_DISP64 = 1342177326
SPARC_DISP8 = 1342177284
SPARC_GLOB_DAT = 1342177300
SPARC_GOT10 = 1342177293
SPARC_GOT13 = 1342177294
SPARC_GOT22 = 1342177295
SPARC_GOTDATA_HIX22 = 1342177360
SPARC_GOTDATA_LOX10 = 1342177361
SPARC_GOTDATA_OP = 1342177364
SPARC_GOTDATA_OP_HIX22 = 1342177362
SPARC_GOTDATA_OP_LOX10 = 1342177363
SPARC_H44 = 1342177330
SPARC_HH22 = 1342177314
SPARC_HI22 = 1342177289
SPARC_HIPLT22 = 1342177305
SPARC_HIX22 = 1342177328
SPARC_HM10 = 1342177315
SPARC_JMP_SLOT = 1342177301
SPARC_L44 = 1342177332
SPARC_LM22 = 1342177316
SPARC_LO10 = 1342177292
SPARC_LOPLT10 = 1342177306
SPARC_LOX10 = 1342177329
SPARC_M44 = 1342177331
SPARC_NONE = 1342177280
SPARC_OLO10 = 1342177313
SPARC_PC10 = 1342177296
SPARC_PC22 = 1342177297
SPARC_PCPLT10 = 1342177309
SPARC_PCPLT22 = 1342177308
SPARC_PCPLT32 = 1342177307
SPARC_PC_HH22 = 1342177317
SPARC_PC_HM10 = 1342177318
SPARC_PC_LM22 = 1342177319
SPARC_PLT32 = 1342177304
SPARC_PLT64 = 1342177327
SPARC_REGISTER = 1342177333
SPARC_RELATIVE = 1342177302
SPARC_TLS_DTPMOD32 = 1342177354
SPARC_TLS_DTPMOD64 = 1342177355
SPARC_TLS_DTPOFF32 = 1342177356
SPARC_TLS_DTPOFF64 = 1342177357
SPARC_TLS_GD_ADD = 1342177338
SPARC_TLS_GD_CALL = 1342177339
SPARC_TLS_GD_HI22 = 1342177336
SPARC_TLS_GD_LO10 = 1342177337
SPARC_TLS_IE_ADD = 1342177351
SPARC_TLS_IE_HI22 = 1342177347
SPARC_TLS_IE_LD = 1342177349
SPARC_TLS_IE_LDX = 1342177350
SPARC_TLS_IE_LO10 = 1342177348
SPARC_TLS_LDM_ADD = 1342177342
SPARC_TLS_LDM_CALL = 1342177343
SPARC_TLS_LDM_HI22 = 1342177340
SPARC_TLS_LDM_LO10 = 1342177341
SPARC_TLS_LDO_ADD = 1342177346
SPARC_TLS_LDO_HIX22 = 1342177344
SPARC_TLS_LDO_LOX10 = 1342177345
SPARC_TLS_LE_HIX22 = 1342177352
SPARC_TLS_LE_LOX10 = 1342177353
SPARC_TLS_TPOFF32 = 1342177358
SPARC_TLS_TPOFF64 = 1342177359
SPARC_UA16 = 1342177335
SPARC_UA32 = 1342177303
SPARC_UA64 = 1342177334
SPARC_WDISP16 = 1342177320
SPARC_WDISP19 = 1342177321
SPARC_WDISP22 = 1342177288
SPARC_WDISP30 = 1342177287
SPARC_WPLT30 = 1342177298
SYSZ_12 = 1476395010
SYSZ_16 = 1476395011
SYSZ_20 = 1476395065
SYSZ_32 = 1476395012
SYSZ_64 = 1476395030
SYSZ_8 = 1476395009
SYSZ_COPY = 1476395017
SYSZ_GLOB_DAT = 1476395018
SYSZ_GOT12 = 1476395014
SYSZ_GOT16 = 1476395023
SYSZ_GOT20 = 1476395066
SYSZ_GOT32 = 1476395015
SYSZ_GOT64 = 1476395032
SYSZ_GOTENT = 1476395034
SYSZ_GOTOFF = 1476395021
SYSZ_GOTOFF16 = 1476395035
SYSZ_GOTOFF64 = 1476395036
SYSZ_GOTPC = 1476395022
SYSZ_GOTPCDBL = 1476395029
SYSZ_GOTPLT12 = 1476395037
SYSZ_GOTPLT16 = 1476395038
SYSZ_GOTPLT20 = 1476395067
SYSZ_GOTPLT32 = 1476395039
SYSZ_GOTPLT64 = 1476395040
SYSZ_GOTPLTENT = 1476395041
SYSZ_IRELATIVE = 1476395069
SYSZ_JMP_SLOT = 1476395019
SYSZ_NONE = 1476395008
SYSZ_PC16 = 1476395024
SYSZ_PC16DBL = 1476395025
SYSZ_PC32 = 1476395013
SYSZ_PC32DBL = 1476395027
SYSZ_PC64 = 1476395031
SYSZ_PLT16DBL = 1476395026
SYSZ_PLT32 = 1476395016
SYSZ_PLT32DBL = 1476395028
SYSZ_PLT64 = 1476395033
SYSZ_PLTOFF16 = 1476395042
SYSZ_PLTOFF32 = 1476395043
SYSZ_PLTOFF64 = 1476395044
SYSZ_RELATIVE = 1476395020
SYSZ_TLS_DTPMOD = 1476395062
SYSZ_TLS_DTPOFF = 1476395063
SYSZ_TLS_GD32 = 1476395048
SYSZ_TLS_GD64 = 1476395049
SYSZ_TLS_GDCALL = 1476395046
SYSZ_TLS_GOTIE12 = 1476395050
SYSZ_TLS_GOTIE20 = 1476395068
SYSZ_TLS_GOTIE32 = 1476395051
SYSZ_TLS_GOTIE64 = 1476395052
SYSZ_TLS_IE32 = 1476395055
SYSZ_TLS_IE64 = 1476395056
SYSZ_TLS_IEENT = 1476395057
SYSZ_TLS_LDCALL = 1476395047
SYSZ_TLS_LDM32 = 1476395053
SYSZ_TLS_LDM64 = 1476395054
SYSZ_TLS_LDO32 = 1476395060
SYSZ_TLS_LDO64 = 1476395061
SYSZ_TLS_LE32 = 1476395058
SYSZ_TLS_LE64 = 1476395059
SYSZ_TLS_LOAD = 1476395045
SYSZ_TLS_TPOFF = 1476395064
X86_16 = 671088660
X86_32 = 671088641
X86_32PLT = 671088651
X86_64_16 = 134217740
X86_64_32 = 134217738
X86_64_32S = 134217739
X86_64_64 = 134217729
X86_64_8 = 134217742
X86_64_COPY = 134217733
X86_64_DTPMOD64 = 134217744
X86_64_DTPOFF32 = 134217749
X86_64_DTPOFF64 = 134217745
X86_64_GLOB_DAT = 134217734
X86_64_GOT32 = 134217731
X86_64_GOT64 = 134217755
X86_64_GOTOFF64 = 134217753
X86_64_GOTPC32 = 134217754
X86_64_GOTPC32_TLSDESC = 134217762
X86_64_GOTPC64 = 134217757
X86_64_GOTPCREL = 134217737
X86_64_GOTPCREL64 = 134217756
X86_64_GOTPCRELX = 134217769
X86_64_GOTPLT64 = 134217758
X86_64_GOTTPOFF = 134217750
X86_64_IRELATIVE = 134217765
X86_64_JUMP_SLOT = 134217735
X86_64_NONE = 134217728
X86_64_PC16 = 134217741
X86_64_PC32 = 134217730
X86_64_PC32_BND = 134217767
X86_64_PC64 = 134217752
X86_64_PC8 = 134217743
X86_64_PLT32 = 134217732
X86_64_PLT32_BND = 134217768
X86_64_PLTOFF64 = 134217759
X86_64_RELATIVE = 134217736
X86_64_RELATIVE64 = 134217766
X86_64_REX_GOTPCRELX = 134217770
X86_64_SIZE32 = 134217760
X86_64_SIZE64 = 134217761
X86_64_TLSDESC = 134217764
X86_64_TLSDESC_CALL = 134217763
X86_64_TLSGD = 134217747
X86_64_TLSLD = 134217748
X86_64_TPOFF32 = 134217751
X86_64_TPOFF64 = 134217746
X86_8 = 671088662
X86_COPY = 671088645
X86_GLOB_DAT = 671088646
X86_GOT32 = 671088643
X86_GOTOFF = 671088649
X86_GOTPC = 671088650
X86_IRELATIVE = 671088682
X86_JUMP_SLOT = 671088647
X86_NONE = 671088640
X86_PC16 = 671088661
X86_PC32 = 671088642
X86_PC8 = 671088663
X86_PLT32 = 671088644
X86_RELATIVE = 671088648
X86_TLS_DESC = 671088681
X86_TLS_DESC_CALL = 671088680
X86_TLS_DTPMOD32 = 671088675
X86_TLS_DTPOFF32 = 671088676
X86_TLS_GD = 671088658
X86_TLS_GD_32 = 671088664
X86_TLS_GD_CALL = 671088666
X86_TLS_GD_POP = 671088667
X86_TLS_GD_PUSH = 671088665
X86_TLS_GOTDESC = 671088679
X86_TLS_GOTIE = 671088656
X86_TLS_IE = 671088655
X86_TLS_IE_32 = 671088673
X86_TLS_LDM = 671088659
X86_TLS_LDM_32 = 671088668
X86_TLS_LDM_CALL = 671088670
X86_TLS_LDM_POP = 671088671
X86_TLS_LDM_PUSH = 671088669
X86_TLS_LDO_32 = 671088672
X86_TLS_LE = 671088657
X86_TLS_LE_32 = 671088674
X86_TLS_TPOFF = 671088654
X86_TLS_TPOFF32 = 671088677
from_value(arg: int) lief.ELF.Relocation.TYPE = <nanobind.nb_func object>
property addend int

Additional value

property encoding lief.ELF.Relocation.ENCODING

The encoding of the relocation

property has_section bool

True if this relocation has a lief.ELF.Section associated with.

This is usually the case for object files (.o)

property has_symbol bool

True if a Symbol is associated with the relocation

property info int

Extra information like the symbol index

property is_android_packed bool

True if the relocation is using the Android packed relocation format

property is_rel bool

Check if the relocation uses the implicit addend (i.e. not present in the ELF structure)

property is_rela bool

True if the relocation uses the addend proprety

property is_relatively_encoded bool

True if the relocation is using the relative encoding

property purpose lief.ELF.Relocation.PURPOSE

Purpose of the relocation. This value provides the information about how the relocation is used (PLT/GOT resolution, .o file, …)

r_info(self, clazz: lief.ELF.Header.CLASS) int

(re)Compute the raw r_info attribute based on the given ELF class

resolve(self, base_address: int) int | lief.lief_errors

Try to resolve the value of the relocation such as *address() = resolve()

property section lief.ELF.Section

Section in which the relocation is applied or None if not relevant

property symbol lief.ELF.Symbol

Symbol associated with the relocation or None if no symbol are associated with this relocation.

property symbol_table lief.ELF.Section

the symbol table Section which the relocation references

property type lief.ELF.Relocation.TYPE

Relocation type.


Symbol

class lief.ELF.Symbol(self)

Bases: Symbol

Class which represents an ELF symbol

class BINDING(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

GLOBAL = 1
GNU_UNIQUE = 10
LOCAL = 0
WEAK = 2
from_value(arg: int) lief.ELF.Symbol.BINDING = <nanobind.nb_func object>
class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

COMMON = 5
FILE = 4
FUNC = 2
GNU_IFUNC = 10
NOTYPE = 0
OBJECT = 1
SECTION = 3
TLS = 6
from_value(arg: int) lief.ELF.Symbol.TYPE = <nanobind.nb_func object>
class VISIBILITY(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

DEFAULT = 0
HIDDEN = 2
INTERNAL = 1
PROTECTED = 3
from_value(arg: int) lief.ELF.Symbol.VISIBILITY = <nanobind.nb_func object>
property binding lief.ELF.Symbol.BINDING

A symbol’s binding determines the linkage visibility and behavior.

property demangled_name str

Symbol’s name demangled or an empty string if the demangling is not possible/failed

property exported bool

Whether the symbol is exported

property has_version bool

Check if this symbols has a SymbolVersion

property imported bool

Whether the symbol is imported

property information int

This property specifies the symbol’s type and binding attributes

property is_function bool

True if the symbol is a function

property is_static bool

True if the symbol is a static visibility

property is_variable bool

True if the symbol is a variable

property other int

Alias for visibility

property section lief.ELF.Section

Return the section (Section) associated with this symbol if any. Otherwise, return None.

property shndx int

Section index associated with the symbol

property size int

Many symbols have associated sizes. For example, a data object’s size is the number of bytes contained in the object. This member holds 0 if the symbol has no size or an unknown size.

property symbol_version lief.ELF.SymbolVersion

Return the SymbolVersion associated with this symbol

It returns None if no version is tied to this symbol.

property type lief.ELF.Symbol.TYPE

The symbol’s type provides a general classification for the associated entity.

property value int

This member has different menaing depending on the symbol’s type and the type of the ELF file (library, object, …)

  • In relocatable files, this property contains the alignment constraints of the symbol for which the section index is SHN_COMMON.

  • In relocatable files, can also contain a section’s offset for a defined symbol. That is, value is an offset from the beginning of the section associated with this symbol.

  • In executable and libraries, this property contains a virtual address.

property visibility lief.ELF.Symbol.VISIBILITY

Symbol visibility. It’s basically an alias on other


Symbol Version

class lief.ELF.SymbolVersion(self)
class lief.ELF.SymbolVersion(self, arg: int, /)

Bases: Object

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: int, /) -> None

Constructor from value

global_ = <lief._lief.ELF.SymbolVersion object>
property has_auxiliary_version bool

Check if this symbols has a SymbolVersionAux

local = <lief._lief.ELF.SymbolVersion object>
property symbol_version_auxiliary lief.ELF.SymbolVersionAux

Return the SymbolVersionAux associated with this version or None if not present.

The value can be changed by assigning a SymbolVersionAuxRequirement which must already exist in the SymbolVersionRequirement. Once can use add_aux_requirement() to add a new SymbolVersionAuxRequirement.

property value int

Value associated with the symbol.

If the given SymbolVersion hasn’t Auxiliary version:

  • 0 : The symbol is local

  • 1 : The symbol is global

All other values are used for versions in the own object or in any of the dependencies. This is the version the symbol is tight to.


Symbol Version Auxiliary

Inheritance diagram of lief._lief.ELF.SymbolVersionAux, lief._lief.ELF.SymbolVersionAuxRequirement
class lief.ELF.SymbolVersionAux

Bases: Object

Class which represents an Auxiliary Symbol version

property name str | bytes

Symbol’s name (e.g. GLIBC_2.2.5)


Symbol Version Definition

class lief.ELF.SymbolVersionDefinition

Bases: Object

Class which represents an entry defined in DT_VERDEF or .gnu.version_d

property auxiliary_symbols lief.ELF.SymbolVersionDefinition.it_version_aux
property flags int

Version information

property hash int

Hash value of the symbol’s name (using ELF hash function)

class it_version_aux

Bases: object

Iterator over lief._lief.ELF.SymbolVersionAux

property ndx int

Numeric value used as an index in the :class`~.ELF.SymbolVersion` table

property version int

Version revision. Should be 1

This field should always have the value 1. It will be changed if the versioning implementation has to be changed in an incompatible way.


Symbol Version Requirement

class lief.ELF.SymbolVersionRequirement

Bases: Object

Class which represents an entry in the DT_VERNEED or .gnu.version_r table

add_auxiliary_requirement(self, arg: lief.ELF.SymbolVersionAuxRequirement) lief.ELF.SymbolVersionAuxRequirement

Add an auxiliary version requirement to the existing entries

get_auxiliary_symbols(self) lief.ELF.SymbolVersionRequirement.it_aux_requirement

Auxiliary entries (iterator over SymbolVersionAuxRequirement)

class it_aux_requirement

Bases: object

Iterator over lief._lief.ELF.SymbolVersionAuxRequirement

property name str

Library’s name associated with this requirement (e.g. libc.so.6)

property version int

Version revision. Should be 1


Symbol Version Auxiliary Requirement

class lief.ELF.SymbolVersionAuxRequirement(self)

Bases: SymbolVersionAux

Default constructor

property flags int

Bitmask of flags

property hash int

Hash value of the dependency name (use ELF hashing function)

property other int

It returns the unique version index for the file which is used in the version symbol table. If the highest bit (bit 15) is set this is a hidden symbol which cannot be referenced from outside the object.


GNU Hash table

class lief.ELF.GnuHash(self)

Bases: Object

Class which provides a view over the GNU Hash implementation. Most of the fields are read-only since the values are re-computed by the lief.ELF.Builder.

property bloom_filters list[int]

Bloom filters

property buckets list[int]

hash buckets

check(*args) bool

Overloaded function.

  1. check(self, symbol_name: str) -> bool

Check if the symbol probably exists. If the returned value is false you can assume at 100% that the symbol with the given name doesn’t exists. If true you can’t do any assumption

  1. check(self, hash_value: int) -> bool

Check if the symbol associated with the given probably exists. If the returned value is false you can assume at 100% that the symbol doesn’t exists. If true you can’t do any assumption

check_bloom_filter(self, hash: int) bool

Check if the given hash pass the bloom filter

check_bucket(self, hash: int) bool

Check if the given hash pass the bucket filter

property hash_values list[int]

Hash values

property nb_buckets int

Return the number of buckets

property shift2 int

Shift count used in the bloom filter

property symbol_index int

Index of the first symbol in the dynamic symbols table which is accessible with the hash table


SYSV Hash table

class lief.ELF.SysvHash(self)

Bases: Object

Class which represents the SYSV hash for the symbols resolution

References:

property buckets list[int]

Buckets values

property chains list[int]

Chains values

property nbucket int

Return the number of buckets

property nchain int

Return the number of chains (symbol table index)


Note

Inheritance diagram of lief._lief.ELF.CorePrPsInfo, lief._lief.ELF.NoteGnuProperty, lief._lief.ELF.Note, lief._lief.ELF.CorePrStatus, lief._lief.ELF.QNXStack, lief._lief.ELF.CoreSigInfo, lief._lief.ELF.CoreAuxv, lief._lief.ELF.NoteAbi, lief._lief.ELF.AndroidIdent, lief._lief.ELF.CoreFile
class lief.ELF.Note

Bases: Object

Class which represents an ELF note.

class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

LIEF representation of the ELF NT_ values.

ANDROID_IDENT = 38
ANDROID_KUSER = 40
ANDROID_MEMTAG = 39
CORE_ARM_HW_BREAK = 25
CORE_ARM_HW_WATCH = 26
CORE_ARM_PACA_KEYS = 30
CORE_ARM_PACG_KEYS = 31
CORE_ARM_PAC_MASK = 29
CORE_ARM_SVE = 28
CORE_ARM_SYSTEM_CALL = 27
CORE_ARM_TLS = 24
CORE_ARM_VFP = 23
CORE_AUXV = 13
CORE_FILE = 20
CORE_FPREGS = 15
CORE_FPREGSET = 10
CORE_LWPSINFO = 18
CORE_LWPSTATUS = 17
CORE_PAC_ENABLED_KEYS = 33
CORE_PRPSINFO = 11
CORE_PRSTATUS = 9
CORE_PRXFPREG = 21
CORE_PSINFO = 16
CORE_PSTATUS = 14
CORE_SIGINFO = 22
CORE_TAGGED_ADDR_CTRL = 32
CORE_TASKSTRUCT = 12
CORE_WIN32PSTATUS = 19
CORE_X86_CET = 37
CORE_X86_IOPERM = 35
CORE_X86_TLS = 34
CORE_X86_XSTATE = 36
CRASHPAD = 8
GNU_ABI_TAG = 1
GNU_BUILD_ATTRIBUTE_FUNC = 7
GNU_BUILD_ATTRIBUTE_OPEN = 6
GNU_BUILD_ID = 3
GNU_GOLD_VERSION = 4
GNU_HWCAP = 2
GNU_PROPERTY_TYPE_0 = 5
GO_BUILDID = 41
QNX_STACK = 43
STAPSDT = 42
UNKNOWN = 0
from_value(arg: int) lief.ELF.Note.TYPE = <nanobind.nb_func object>
copy(self) lief.ELF.Note | None

Duplicate the current instance of this object

create(*args) lief.ELF.Note | None = <nanobind.nb_func object>
property description memoryview

Return the description associated with the note

property name str

Return the name of the note also known as the owner.

property original_type int

Return the original NT_ value of the note.

This value should be interpreted according the name of the note.

property size int

Size of the raw note

property type lief.ELF.Note.TYPE

Return the LIEF type representation of the note.


Core PrPsInfo

Inheritance diagram of lief._lief.ELF.CorePrPsInfo
class lief.ELF.CorePrPsInfo

Bases: Note

property info lief.ELF.CorePrPsInfo.info_t | None
class info_t

Bases: object

property args str
property args_stripped str
property filename str
property filename_stripped str
property flag int
property gid int
property nice int
property pgrp int
property pid int
property ppid int
property sid int
property sname str
property state int
property uid int
property zombie bool

Core PrStatus

Inheritance diagram of lief._lief.ELF.CorePrStatus
class lief.ELF.CorePrStatus

Bases: Note

class Registers

Bases: object

class AARCH64(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Registers for the AARCH64 architecture (AARCH64)

PC = 32
PSTATE = 33
X0 = 0
X1 = 1
X10 = 10
X11 = 11
X12 = 12
X13 = 13
X14 = 14
X15 = 15
X16 = 16
X17 = 17
X18 = 18
X19 = 19
X2 = 2
X20 = 20
X21 = 21
X22 = 22
X23 = 23
X24 = 24
X25 = 25
X26 = 26
X27 = 27
X28 = 28
X29 = 29
X3 = 3
X30 = 30
X31 = 31
X4 = 4
X5 = 5
X6 = 6
X7 = 7
X8 = 8
X9 = 9
from_value(arg: int) lief.ELF.CorePrStatus.Registers.AARCH64 = <nanobind.nb_func object>
class ARM(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Registers for the ARM architecture (ARM)

CPSR = 16
R0 = 0
R1 = 1
R10 = 10
R11 = 11
R12 = 12
R13 = 13
R14 = 14
R15 = 15
R2 = 2
R3 = 3
R4 = 4
R5 = 5
R6 = 6
R7 = 7
R8 = 8
R9 = 9
from_value(arg: int) lief.ELF.CorePrStatus.Registers.ARM = <nanobind.nb_func object>
class X86(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Registers for the x86 architecture (i386)

CS = 13
DS = 7
EAX = 6
EBP = 5
EBX = 0
ECX = 1
EDI = 4
EDX = 2
EFLAGS = 14
EIP = 12
ES = 8
ESI = 3
ESP = 15
FS = 9
GS = 10
ORIG_EAX = 11
SS = 16
from_value(arg: int) lief.ELF.CorePrStatus.Registers.X86 = <nanobind.nb_func object>
class X86_64(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Registers for the x86-64 architecture (x86_64)

CS = 17
EFLAGS = 18
ORIG_RAX = 15
R10 = 7
R11 = 6
R12 = 3
R13 = 2
R14 = 1
R15 = 0
R8 = 9
R9 = 8
RAX = 10
RBP = 4
RBX = 5
RCX = 11
RDI = 14
RDX = 12
RIP = 16
RSI = 13
RSP = 19
SS = 20
from_value(arg: int) lief.ELF.CorePrStatus.Registers.X86_64 = <nanobind.nb_func object>
property architecture lief.ELF.ARCH

Original target architecture.

get(*args) int | None

Get the register value or non if it is not present

property pc int | None

Return the program counter value (rip, pc, eip etc)

class pr_status_t

Bases: object

property cstime lief.ELF.CorePrStatus.timeval_t
property cursig int
property cutime lief.ELF.CorePrStatus.timeval_t
property info lief.ELF.CorePrStatus.siginfo_t
property pgrp int
property pid int
property ppid int
property reserved int
property sid int
property sighold int
property sigpend int
property stime lief.ELF.CorePrStatus.timeval_t
property utime lief.ELF.CorePrStatus.timeval_t
property register_values list[int]

List of the register values. This list is guarantee to be as long as the number of registers defined in the Registers or empty if it can’t be resolved.

Thus, one can access a specific register through:

reg_vals: list[int] = note.register_values()
x20 = reg_vals[CorePrStatus.Registesr.AARCH64.X20.value]
property return_value int | None

The value of the register that holds the return value according to the calling convention.

set(*args) lief.ok_error_t

Change the register value

class siginfo_t

Bases: object

property errno int
property sicode int
property signo int
property sp int | None

Return the stack pointer value

property status lief.ELF.CorePrStatus.pr_status_t

Info associated with the signal

class timeval_t

Bases: object

property sec int
property usec int

Core File

Inheritance diagram of lief._lief.ELF.CoreFile
class lief.ELF.CoreFile

Bases: Note

class entry_t

Bases: object

property end int

End address of mapped file

property file_ofs int

Offset (in core) of mapped file

property path str

Path of mapped file

property start int

Start address of mapped file

property files lief.ELF.CoreFile.files_t

List of files mapped in core. (list of CoreFileEntry)

class files_t(self)
class files_t(self, arg: lief._lief.ELF.CoreFile.files_t)
class files_t(self, arg: collections.abc.Iterable[lief._lief.ELF.CoreFile.entry_t], /)

Bases: object

Overloaded function.

  1. __init__(self) -> None

Default constructor

  1. __init__(self, arg: lief._lief.ELF.CoreFile.files_t) -> None

Copy constructor

  1. __init__(self, arg: collections.abc.Iterable[lief._lief.ELF.CoreFile.entry_t], /) -> None

Construct from an iterable object

append(self, arg: lief.ELF.CoreFile.entry_t) None

Append arg to the end of the list.

clear(self) None

Remove all items from list.

extend(self, arg: lief.ELF.CoreFile.files_t) None

Extend self by appending elements from arg.

insert(self, arg0: int, arg1: lief.ELF.CoreFile.entry_t) None

Insert object arg1 before index arg0.

pop(self, index: int) lief.ELF.CoreFile.entry_t

Remove and return item at index (default last).


Core Siginfo

Inheritance diagram of lief._lief.ELF.CoreSigInfo
class lief.ELF.CoreSigInfo

Bases: Note

property sigcode int | None

Signal code

property sigerrno int | None

If non-zero, an errno value associated with this signal

property signo int | None

Signal number


Core Auxiliary Vector

Inheritance diagram of lief._lief.ELF.CoreAuxv
class lief.ELF.CoreAuxv

Bases: Note

class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

BASE = 7
BASE_PLATFORM = 24
CLKTCK = 17
DCACHEBSIZE = 19
EGID = 14
END = 0
ENTRY = 9
EUID = 12
EXECFD = 2
EXECFN = 31
FLAGS = 8
FPUCW = 18
GID = 13
HWCAP = 16
HWCAP2 = 26
ICACHEBSIZE = 20
IGNORE = 1
IGNOREPPC = 22
NOTELF = 10
PAGESZ = 6
PHDR = 3
PHENT = 4
PHNUM = 5
RANDOM = 25
SECURE = 23
SYSINFO = 32
SYSINFO_EHDR = 33
TGT_PLATFORM = 15
UCACHEBSIZE = 21
UID = 11
from_value(arg: int) lief.ELF.CoreAuxv.TYPE = <nanobind.nb_func object>
get(self, type: lief.ELF.CoreAuxv.TYPE) int | None

Get the auxv value from the provided type. Return None if it is not present.

set(*args) bool

Overloaded function.

  1. set(self, type: lief._lief.ELF.CoreAuxv.TYPE, value: int) -> bool

    Change the value for the given type.

  2. set(self, arg: collections.abc.Mapping[lief._lief.ELF.CoreAuxv.TYPE, int], /) -> bool

    Replace all the values by the given dictionary.

property values dict[lief.ELF.CoreAuxv.TYPE, int]

Return the auxiliary vector as a dictionary of TYPE / int


Android Ident

Inheritance diagram of lief._lief.ELF.AndroidIdent
class lief.ELF.AndroidIdent

Bases: Note

property ndk_build_number str

Android NDK build number

property ndk_version str

Android NDK version used to build the current binary

property sdk_version int

Target SDK platform


QNX Stack

Inheritance diagram of lief._lief.ELF.QNXStack
class lief.ELF.QNXStack

Bases: Note

property is_executable bool

Whether the stack is executable

property stack_allocated int

Size of the stack pre-allocated (upfront)

property stack_size int

Size of the stack


Note ABI

Inheritance diagram of lief._lief.ELF.NoteAbi
class lief.ELF.NoteAbi

Bases: Note

Class that wraps the NT_GNU_ABI_TAG note

class ABI(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ABI recognized by this note

FREEBSD = 3
GNU = 1
LINUX = 0
NACL = 6
NETBSD = 4
SOLARIS2 = 2
SYLLABLE = 5
from_value(arg: int) lief.ELF.NoteAbi.ABI = <nanobind.nb_func object>
property abi lief.ELF.NoteAbi.ABI | None

Return the target ABI

property version list[int] | None

Return the target version as (Major, Minor, Patch)


Note Gnu Property

Inheritance diagram of lief._lief.ELF.NoteGnuProperty
Inheritance diagram of lief._lief.ELF.StackSize, lief._lief.ELF.AArch64Feature, lief._lief.ELF.X86Features, lief._lief.ELF.AArch64PAuth, lief._lief.ELF.Generic, lief._lief.ELF.NoteNoCopyOnProtected, lief._lief.ELF.X86ISA
class lief.ELF.NoteGnuProperty

Bases: Note

This object represents the NT_GNU_PROPERTY_TYPE_0 note.

class Property

Bases: object

This class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note

class TYPE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

LIEF’s mirror types of the original GNU_PROPERTY_ values

AARCH64_FEATURES = 2
AARCH64_PAUTH = 3
GENERIC = 1
NEEDED = 8
NO_COPY_ON_PROTECTED = 5
STACK_SIZE = 4
UNKNOWN = 0
X86_FEATURE = 7
X86_ISA = 6
from_value(arg: int) lief.ELF.NoteGnuProperty.Property.TYPE = <nanobind.nb_func object>
property type lief.ELF.NoteGnuProperty.Property.TYPE
find(self, arg: lief.ELF.NoteGnuProperty.Property.TYPE) lief.ELF.NoteGnuProperty.Property | None

Find the property with the given type or return None

property properties list[lief.ELF.NoteGnuProperty.Property | None]

Return the properties as a list of Property


Generic

Inheritance diagram of lief._lief.ELF.Generic
class lief.ELF.Generic

Bases: Property

This class represents a property which doesn’t have a concrete LIEF implementation.

property raw_type int

The original raw type as an integer. This value might depends on the architecture and/or the file type.


AArch64 Feature

Inheritance diagram of lief._lief.ELF.AArch64Feature
class lief.ELF.AArch64Feature

Bases: Property

This class represents the GNU_PROPERTY_AARCH64_FEATURE_1_AND note.

class FEATURE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

BTI = 1
PAC = 2
UNKNOWN = 0
from_value(arg: int) lief.ELF.AArch64Feature.FEATURE = <nanobind.nb_func object>
property features list[lief.ELF.AArch64Feature.FEATURE]

Return the list of the supported features.


AArch64 PAuth

Inheritance diagram of lief._lief.ELF.AArch64PAuth
class lief.ELF.AArch64PAuth

Bases: Property

This class represents the GNU_PROPERTY_AARCH64_FEATURE_PAUTH note.

Note

If both: AArch64PAuth.platform and AArch64PAuth.version are set to 0, this means that the binary is incompatible with PAuth ABI extension.

property platform int

64-bit value that specifies the platform vendor.

A 0 value is associated with an invalid platform while the value 1 is associated with a baremetal platform.

property version int

64-bit value that identifies the signing schema used by the ELF file.


No Copy on Protected

Inheritance diagram of lief._lief.ELF.NoteNoCopyOnProtected
class lief.ELF.NoteNoCopyOnProtected

Bases: Property

This class provides an interface over the GNU_PROPERTY_NO_COPY_ON_PROTECTED property. This property indicates that the linker shouldn’t copy relocations against protected symbols.


Stack Size

Inheritance diagram of lief._lief.ELF.StackSize
class lief.ELF.StackSize

Bases: Property

This class provides an interface over the GNU_PROPERTY_STACK_SIZE property This property can be used by the loader to raise the stack limit.

property stack_size int

X86 Feature

Inheritance diagram of lief._lief.ELF.X86Features
class lief.ELF.X86Features

Bases: Property

This class interfaces the different GNU_PROPERTY_X86_FEATURE_* properties which includes:

  • GNU_PROPERTY_X86_FEATURE_1_AND

  • GNU_PROPERTY_X86_FEATURE_2_USED

  • GNU_PROPERTY_X86_FEATURE_2_NEEDED

class FEATURE(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Features provided by these different properties

FXSR = 11
IBT = 1
LAM_U48 = 3
LAM_U57 = 4
MASK = 16
MMX = 7
SHSTK = 2
TMM = 15
UNKNOWN = 0
X86 = 5
X87 = 6
XMM = 8
XSAVE = 12
XSAVEC = 14
XSAVEOPT = 13
YMM = 9
ZMM = 10
from_value(arg: int) lief.ELF.X86Features.FEATURE = <nanobind.nb_func object>
class FLAG(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Flag according to the _AND, _USED or _NEEDED suffixes

NEEDED = 2
NONE = 0
USED = 1
from_value(arg: int) lief.ELF.X86Features.FLAG = <nanobind.nb_func object>
property features list[tuple[lief.ELF.X86Features.FLAG, lief.ELF.X86Features.FEATURE]]

List of the features as a pair of (FLAG, FEATURE).


X86 ISA

Inheritance diagram of lief._lief.ELF.X86ISA
class lief.ELF.X86ISA

Bases: Property

This class interfaces the different GNU_PROPERTY_X86_ISA_* properties which includes:

  • GNU_PROPERTY_X86_ISA_1_USED

  • GNU_PROPERTY_X86_ISA_1_NEEDED

  • GNU_PROPERTY_X86_COMPAT_ISA_1_USED

  • GNU_PROPERTY_X86_COMPAT_ISA_1_NEEDED

  • GNU_PROPERTY_X86_COMPAT_2_ISA_1_USED

  • GNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED

class FLAG(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

NEEDED = 2
NONE = 0
USED = 1
from_value(arg: int) lief.ELF.X86ISA.FLAG = <nanobind.nb_func object>
class ISA(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AVX = 16
AVX2 = 17
AVX512BW = 24
AVX512CD = 19
AVX512DQ = 23
AVX512ER = 20
AVX512F = 18
AVX512PF = 21
AVX512VL = 22
AVX512_4FMAPS = 25
AVX512_4VNNIW = 26
AVX512_BF16 = 32
AVX512_BITALG = 27
AVX512_IFMA = 28
AVX512_VBMI = 29
AVX512_VBMI2 = 30
AVX512_VNNI = 31
BASELINE = 1
CMOV = 5
FMA = 6
I486 = 7
I586 = 8
I686 = 9
SSE = 10
SSE2 = 11
SSE3 = 12
SSE4_1 = 14
SSE4_2 = 15
SSSE3 = 13
UNKNOWN = 0
V2 = 2
V3 = 3
V4 = 4
from_value(arg: int) lief.ELF.X86ISA.ISA = <nanobind.nb_func object>
property values list[tuple[lief.ELF.X86ISA.FLAG, lief.ELF.X86ISA.ISA]]

List of the ISA values in this property


Builder

class lief.ELF.Builder(self, elf_binary: lief._lief.ELF.Binary)

Bases: object

Class which takes an lief.ELF.Binary object and reconstructs a valid binary

Constructor that takes a Binary

build(self) None

Perform the build of the provided ELF binary

property config lief.ELF.Builder.config_t

Tweak the ELF builder with the provided config parameter

class config_t(self)

Bases: object

Interface to tweak the Builder

property android_rela bool

Rebuild ANDROID_RELA

property coredump_notes bool

Rebuild the Coredump notes

property dt_hash bool

Rebuild HASH

property dyn_str bool

Rebuild STRTAB

property dynamic_section bool

Rebuild the PT_DYNAMIC segment

property fini_array bool

Rebuild FINI_ARRAY

property force_relocate bool

Force to relocate all the ELF structures that can be relocated (mostly for testing)

property init_array bool

Rebuild INIT_ARRAY

property interpreter bool

Rebuild the PT_INTERP segment

property jmprel bool

Rebuild JMPREL

property notes bool

Rebuild PT_NOTES segment(s)

property preinit_array bool

Rebuild PREINIT_ARRAY

property rela bool

Rebuild RELA

property relr bool

Rebuild RELR

property static_symtab bool

Rebuild .symtab section

property sym_verdef bool

Rebuild VERDEF

property sym_verneed bool

Rebuild VERNEED

property sym_versym bool

Rebuild VERSYM

property symtab bool

Rebuild SYMTAB

get_build(self) list[int]

Return the build result as a list of bytes

write(self, output: str) None

Write the build result into the output file

Enums

Architectures

class lief.ELF.ARCH(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

AARCH64 = 183
ALPHA = 41
ALTERA_NIOS2 = 113
AMDGPU = 224
ARC = 45
ARCA = 109
ARC_COMPACT = 93
ARC_COMPACT2 = 195
ARM = 40
AVR = 83
AVR32 = 185
BA1 = 201
BA2 = 202
BLACKFIN = 106
BPF = 247
C166 = 116
CDP = 215
CE = 119
CLOUDSHIELD = 192
COGE = 216
COLDFIRE = 52
COOL = 217
COREA_1ST = 193
COREA_2ND = 194
CR = 103
CR16 = 177
CRAYNV2 = 172
CRIS = 76
CRX = 114
CSKY = 252
CSR_KALIMBA = 219
CUDA = 190
CYPRESS_M8C = 161
D10V = 85
D30V = 86
DSP24 = 136
DSPIC30F = 118
DXP = 112
ECOG16 = 176
ECOG1X = 168
ECOG2 = 134
ETPU = 178
EXCESS = 111
F2MC16 = 104
FIREPATH = 78
FR20 = 37
FR30 = 84
FX66 = 66
H8S = 48
H8_300 = 46
H8_300H = 47
H8_500 = 49
HEXAGON = 164
HUANY = 81
I386 = 3
I60 = 19
I860 = 7
IAMCU = 6
IA_64 = 50
INTEL205 = 205
INTEL206 = 206
INTEL207 = 207
INTEL208 = 208
INTEL209 = 209
IP2K = 101
JAVELIN = 77
K10M = 181
KM32 = 210
KMX16 = 212
KMX32 = 211
KMX8 = 213
KVARC = 214
L10M = 180
LATTICEMICO32 = 138
LOONGARCH = 258
M16C = 117
M32 = 1
M32C = 120
M32R = 88
M56800EX = 200
M68HC05 = 72
M68HC08 = 71
M68HC11 = 70
M68HC12 = 53
M68HC16 = 69
M68K = 4
M78KOR = 199
M8051 = 165
M88K = 5
MANIK = 171
MAX = 102
MAXQ30 = 169
MCHP_PIC = 204
MCST_ELBRUS = 175
ME16 = 59
METAG = 174
MIPS = 8
MIPS_RS3_LE = 10
MIPS_X = 51
MMA = 54
MMDSP_PLUS = 160
MMIX = 80
MN10200 = 90
MN10300 = 89
MSP430 = 105
NCPU = 56
NDR1 = 57
NDS32 = 167
NONE = 0
NORC = 218
NS32K = 97
OPEN8 = 196
OPENRISC = 92
PARISC = 15
PCP = 55
PDP10 = 64
PDP11 = 65
PDSP = 63
PJ = 91
PPC = 20
PPC64 = 21
PRISM = 82
R32C = 162
RCE = 39
RH32 = 38
RISCV = 243
RL78 = 197
RS08 = 132
RX = 173
S370 = 9
S390 = 22
SCORE7 = 135
SEP = 108
SE_C17 = 139
SE_C33 = 107
SH = 42
SHARC = 133
SLE9X = 179
SNP1K = 99
SPARC = 2
SPARC32PLUS = 18
SPARCV9 = 43
SPU = 23
ST100 = 60
ST19 = 74
ST200 = 100
ST7 = 68
ST9PLUS = 67
STARCORE = 58
STM8 = 186
STXP7X = 166
SVX = 73
TILE64 = 187
TILEGX = 191
TILEPRO = 188
TINYJ = 61
TI_C2000 = 141
TI_C5500 = 142
TI_C6000 = 140
TMM_GPP = 96
TPC = 98
TRICORE = 44
TRIMEDIA = 163
TSK3000 = 131
UNICORE = 110
V800 = 36
V850 = 87
VAX = 75
VIDEOCORE = 95
VIDEOCORE3 = 137
VIDEOCORE5 = 198
VPP500 = 17
X86_64 = 62
XCORE = 203
XGATE = 115
XIMO16 = 170
XTENSA = 94
ZSP = 79
from_value(arg: int) lief.ELF.ARCH = <nanobind.nb_func object>

Processor Flags

class lief.ELF.PROCESSOR_FLAGS(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ARM_EABI_UNKNOWN = 8796093022208
ARM_EABI_VER1 = 8796109799424
ARM_EABI_VER2 = 8796126576640
ARM_EABI_VER3 = 8796143353856
ARM_EABI_VER4 = 8796160131072
ARM_EABI_VER5 = 8796176908288
ARM_SOFT_FLOAT = 8796093022720
ARM_VFP_FLOAT = 8796093023232
HEXAGON_ISA_V2 = 17592186044432
HEXAGON_ISA_V3 = 17592186044448
HEXAGON_ISA_V4 = 17592186044464
HEXAGON_ISA_V5 = 17592186044480
HEXAGON_MACH_V2 = 17592186044417
HEXAGON_MACH_V3 = 17592186044418
HEXAGON_MACH_V4 = 17592186044419
HEXAGON_MACH_V5 = 17592186044420
LOONGARCH_ABI_DOUBLE_FLOAT = 26388279066627
LOONGARCH_ABI_SINGLE_FLOAT = 26388279066626
LOONGARCH_ABI_SOFT_FLOAT = 26388279066625
MIPS_32BITMODE = 35184372089088
MIPS_ABI2 = 35184372088864
MIPS_ABI_EABI32 = 35184372101120
MIPS_ABI_EABI64 = 35184372105216
MIPS_ABI_O32 = 35184372092928
MIPS_ABI_O64 = 35184372097024
MIPS_ARCH_1 = 35184372088832
MIPS_ARCH_2 = 35184640524288
MIPS_ARCH_3 = 35184908959744
MIPS_ARCH_32 = 35185714266112
MIPS_ARCH_32R2 = 35186251137024
MIPS_ARCH_32R6 = 35186788007936
MIPS_ARCH_4 = 35185177395200
MIPS_ARCH_5 = 35185445830656
MIPS_ARCH_64 = 35185982701568
MIPS_ARCH_64R2 = 35186519572480
MIPS_ARCH_64R6 = 35187056443392
MIPS_ARCH_ASE_M16 = 35184439197696
MIPS_ARCH_ASE_MDMX = 35184506306560
MIPS_CPIC = 35184372088836
MIPS_FP64 = 35184372089344
MIPS_MACH_3900 = 35184380542976
MIPS_MACH_4010 = 35184380608512
MIPS_MACH_4100 = 35184380674048
MIPS_MACH_4111 = 35184381001728
MIPS_MACH_4120 = 35184380936192
MIPS_MACH_4650 = 35184380805120
MIPS_MACH_5400 = 35184381591552
MIPS_MACH_5500 = 35184382050304
MIPS_MACH_5900 = 35184381657088
MIPS_MACH_9000 = 35184382115840
MIPS_MACH_LS2E = 35184382574592
MIPS_MACH_LS2F = 35184382640128
MIPS_MACH_LS3A = 35184382705664
MIPS_MACH_OCTEON = 35184381198336
MIPS_MACH_OCTEON2 = 35184381329408
MIPS_MACH_OCTEON3 = 35184381394944
MIPS_MACH_SB1 = 35184381132800
MIPS_MACH_XLR = 35184381263872
MIPS_MICROMIPS = 35184405643264
MIPS_NAN2008 = 35184372089856
MIPS_NOREORDER = 35184372088833
MIPS_PIC = 35184372088834
RISCV_FLOAT_ABI_DOUBLE = 43980465111044
RISCV_FLOAT_ABI_QUAD = 43980465111046
RISCV_FLOAT_ABI_RVE = 43980465111048
RISCV_FLOAT_ABI_SINGLE = 43980465111042
RISCV_FLOAT_ABI_SOFT = 43980465111040
RISCV_FLOAT_ABI_TSO = 43980465111056
RISCV_RVC = 43980465111041
from_value(arg: int) lief.ELF.PROCESSOR_FLAGS = <nanobind.nb_func object>