Python¶
Parser¶
- lief.ELF.parse(obj: str | io.IOBase | os.PathLike | bytes | list[int], config: lief.ELF.ParserConfig) lief.ELF.Binary | None¶
Parse the ELF binary from the given Python object and return a
lief.ELF.BinaryobjectThe 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:
objectThis class is used to tweak the ELF Parser
- class DYNSYM_COUNT(*values)¶
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_METHODSto use for counting the dynamic symbolsFor 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 tolief.ELF.DYNSYM_COUNT_METHODS.COUNT_AUTO
- property page_size int¶
Memory page size if the binary uses a non-standard value.
For instance, SPARCV9 binary can use a page size from 0x2000 to 0x100000.
- 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:
BinaryClass which represents an ELF binary
- class PHDR_RELOC(*values)¶
Bases:
EnumThis enum describes the different ways to relocate the segments table.
- AUTO = 0¶
- BSS_END = 2¶
- FILE_END = 3¶
- PIE_SHIFT = 1¶
- SEGMENT_GAP = 4¶
- class SEC_INSERT_POS(*values)¶
Bases:
EnumThis enum defines where the content of a newly added section should be inserted.
- AUTO = 0¶
- POST_SECTION = 2¶
- POST_SEGMENT = 1¶
- add(self, arg: lief._lief.ELF.DynamicEntry, /) lief._lief.ELF.DynamicEntry¶
- add(self, section: lief._lief.ELF.Section, loaded: bool = True, pos: lief._lief.ELF.Binary.SEC_INSERT_POS = SEC_INSERT_POS.AUTO) lief._lief.ELF.Section | None
- add(self, segment: lief._lief.ELF.Segment, base: int = 0) lief._lief.ELF.Segment | None
- add(self, note: lief._lief.ELF.Note) lief._lief.ELF.Note
- add(self, section: lief._lief.ELF.Section, loaded: bool = True, pos: lief._lief.ELF.Binary.SEC_INSERT_POS = SEC_INSERT_POS.AUTO) lief._lief.ELF.Section | None
Overloaded function.
add(self, arg: lief._lief.ELF.DynamicEntry, /) -> lief._lief.ELF.DynamicEntry
dynamic_entry
add(self, section: lief._lief.ELF.Section, loaded: bool = True, pos: lief._lief.ELF.Binary.SEC_INSERT_POS = SEC_INSERT_POS.AUTO) -> lief._lief.ELF.Section | NoneAdd the given
Sectionto the binary.If the section does not aim at being loaded in memory, the
loadedparameter has to be set toFalse(default:True)add(self, segment: lief._lief.ELF.Segment, base: int = 0) -> lief._lief.ELF.Segment | None
Add a new
Segmentin the binaryadd(self, note: lief._lief.ELF.Note) -> lief._lief.ELF.Note
Add a new
Notein the binary
- add_dynamic_relocation(self, relocation: lief._lief.ELF.Relocation) lief._lief.ELF.Relocation¶
Add a new dynamic relocation.
We consider a dynamic relocation as a relocation which is not plt-related.
- add_dynamic_symbol(self, symbol: lief._lief.ELF.Symbol, symbol_version: lief._lief.ELF.SymbolVersion | None = None) lief._lief.ELF.Symbol¶
Add a dynamic
Symbolto the binaryThe function also takes an optional
lief.ELF.SymbolVersion
- add_exported_function(self, address: int, name: str = '') lief._lief.ELF.Symbol¶
Create a symbol for the function at the given
addressand create an export
- add_library(self, library_name: str) lief._lief.ELF.DynamicEntryLibrary¶
Add a library with the given name as dependency
- add_object_relocation(self, relocation: lief._lief.ELF.Relocation, section: lief._lief.ELF.Section) lief._lief.ELF.Relocation | None¶
Add relocation for object file (.o)
The first parameter is the relocation to add while the second parameter is the
Sectionassociated 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._lief.ELF.Relocation) lief._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.
- add_symtab_symbol(self, symbol: lief._lief.ELF.Symbol) lief._lief.ELF.Symbol¶
Add a static
Symbolto 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
DynamicEntryentries
- property dynamic_relocations lief.ELF.Binary.it_filter_relocation¶
Return an iterator over dynamic
Relocation
- dynsym_idx(self, name: str) int¶
- dynsym_idx(self, symbol: lief._lief.ELF.Symbol) int
Overloaded function.
dynsym_idx(self, name: str) -> intGet the symbol index in the dynamic symbol from the given name or return -1 if the symbol does not exist.
dynsym_idx(self, symbol: lief._lief.ELF.Symbol) -> intGet 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(self, symbol: lief._lief.ELF.Symbol) lief._lief.ELF.Symbol¶
- export_symbol(self, symbol_name: str, value: int = 0) lief._lief.ELF.Symbol
Overloaded function.
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
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
Symbolwhich are exported
- extend(self, segment: lief._lief.ELF.Segment, size: int) lief._lief.ELF.Segment | None¶
- extend(self, segment: lief._lief.ELF.Section, size: int) lief._lief.ELF.Section | None
Overloaded function.
extend(self, segment: lief._lief.ELF.Segment, size: int) -> lief._lief.ELF.Segment | None
Extend the given
Segmentby the given sizeextend(self, segment: lief._lief.ELF.Section, size: int) -> lief._lief.ELF.Section | None
Extend the given
Sectionby the given size
- find_version_requirement(self, libname: str) lief._lief.ELF.SymbolVersionRequirement | None¶
Try to find the
SymbolVersionRequirementassociated with the given library name (e.g.libc.so.6)
- property functions list[lief.Function]¶
List of the functions found in the binary
- get(self, tag: lief._lief.ELF.DynamicEntry.TAG) lief._lief.ELF.DynamicEntry | None¶
- get(self, type: lief._lief.ELF.Segment.TYPE) lief._lief.ELF.Segment | None
- get(self, type: lief._lief.ELF.Note.TYPE) lief._lief.ELF.Note | None
- get(self, type: lief._lief.ELF.Section.TYPE) lief._lief.ELF.Section | None
- get(self, type: lief._lief.ELF.Segment.TYPE) lief._lief.ELF.Segment | None
Overloaded function.
get(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> lief._lief.ELF.DynamicEntry | NoneReturn the first binary’s
DynamicEntryfrom the givenTAG.It returns None if the dynamic entry can’t be found.
get(self, type: lief._lief.ELF.Segment.TYPE) -> lief._lief.ELF.Segment | NoneReturn the first binary’s
Segmentfrom the givenSEGMENT_TYPESIt returns None if the segment can’t be found.
get(self, type: lief._lief.ELF.Note.TYPE) -> lief._lief.ELF.Note | Noneget(self, type: lief._lief.ELF.Section.TYPE) -> lief._lief.ELF.Section | NoneReturn the first binary’s
Sectionfrom the givenELF_SECTION_TYPESIt returns None if the section can’t be found.
- get_dynamic_symbol(self, symbol_name: str) lief._lief.ELF.Symbol | None¶
Get the dynamic symbol from the given name.
It returns None if it can’t be found.
- get_library(self, library_name: str) lief._lief.ELF.DynamicEntryLibrary | None¶
Return the
DynamicEntryLibrarywith the givennameIt returns None if the library can’t be found.
- get_relocated_dynamic_array(self, array_tag: lief._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(self, symbol_name: str) lief._lief.ELF.Relocation | None¶
- get_relocation(self, symbol: lief._lief.ELF.Symbol) lief._lief.ELF.Relocation | None
- get_relocation(self, address: int) lief._lief.ELF.Relocation | None
- get_relocation(self, symbol: lief._lief.ELF.Symbol) lief._lief.ELF.Relocation | None
Overloaded function.
get_relocation(self, symbol_name: str) -> lief._lief.ELF.Relocation | None
Return the
Relocationassociated with the given symbol nameget_relocation(self, symbol: lief._lief.ELF.Symbol) -> lief._lief.ELF.Relocation | None
Return the
Relocationassociated with the givenSymbolget_relocation(self, address: int) -> lief._lief.ELF.Relocation | None
Return the
Relocationassociated with the given address
- get_section(self, section_name: str) lief._lief.ELF.Section | None¶
Return the
Sectionwith the givennameIt returns None if the section can’t be found.
- get_section_idx(self, arg: lief._lief.ELF.Section, /) int | lief._lief.lief_errors¶
- get_section_idx(self, arg: str, /) int | lief._lief.lief_errors
Overloaded function.
get_section_idx(self, arg: lief._lief.ELF.Section, /) -> Union[int, lief._lief.lief_errors]
Find the index of the section given in the first parameter
get_section_idx(self, arg: str, /) -> Union[int, lief._lief.lief_errors]
Find the index of the section with the name given in the first parameter
- get_strings(self, min_size: int = 5) 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
.rodatasection
- get_symtab_symbol(self, symbol_name: str) lief._lief.ELF.Symbol | None¶
Get the static symbol from the given
name.It returns None if it can’t be found.
- property gnu_hash lief.ELF.GnuHash | None¶
Return the
GnuHashobjectHashes are used by the loader to speed up symbol resolution (GNU Version)
- has(self, tag: lief._lief.ELF.DynamicEntry.TAG) bool¶
- has(self, type: lief._lief.ELF.Segment.TYPE) bool
- has(self, type: lief._lief.ELF.Note.TYPE) bool
- has(self, type: lief._lief.ELF.Section.TYPE) bool
- has(self, type: lief._lief.ELF.Segment.TYPE) bool
Overloaded function.
has(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> boolCheck if there exists a
DynamicEntrywith the givenTAGhas(self, type: lief._lief.ELF.Segment.TYPE) -> bool
Check if a
Segmentof type (SEGMENT_TYPES) existshas(self, type: lief._lief.ELF.Note.TYPE) -> bool
Check if a
Noteof type (TYPE) existshas(self, type: lief._lief.ELF.Section.TYPE) -> bool
Check if a
Sectionof type (SECTION_TYPES) exists
- has_dynamic_symbol(self, symbol_name: str) bool¶
Check if the symbol with the given
nameexists 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¶
Trueif 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
Sectionwith the given name exists in the binary
- has_section_with_offset(self, offset: int) bool¶
Check if a
Sectionthat encompasses the given offset exists
- has_section_with_va(self, virtual_address: int) bool¶
Check if a
Sectionthat encompasses the given virtual address exists
- has_symtab_symbol(self, symbol_name: str) bool¶
Check if the symbol with the given
nameexists in the static symbol table
- property header lief.ELF.Header¶
Return
Headerobject
- property imagebase int¶
Return the program image base. (e.g.
0x400000)
- property imported_symbols lief.ELF.Binary.it_filter_symbols¶
Return dynamic
Symbolwhich 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 binary is targeting Android
- 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 object_relocations lief.ELF.Binary.it_filter_relocation¶
Return an iterator over object
Relocation
- property overlay memoryview¶
Overlay data that is not part of the ELF format
- patch_pltgot(self, symbol_name: str, address: int) None¶
- patch_pltgot(self, symbol: lief._lief.ELF.Symbol, address: int) None
Overloaded function.
patch_pltgot(self, symbol_name: str, address: int) -> None
Patch the imported symbol’s name with the
addresspatch_pltgot(self, symbol: lief._lief.ELF.Symbol, address: int) -> None
Patch the imported
Symbolwith theaddress
- 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._lief.ELF.Binary.PHDR_RELOC = PHDR_RELOC.AUTO) 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(self, dynamic_entry: lief._lief.ELF.DynamicEntry) None¶
- remove(self, tag: lief._lief.ELF.DynamicEntry.TAG) None
- remove(self, section: lief._lief.ELF.Section, clear: bool = False) None
- remove(self, segment: lief._lief.ELF.Segment, clear: bool = False) None
- remove(self, type: lief._lief.ELF.Segment.TYPE, clear: bool = False) None
- remove(self, note: lief._lief.ELF.Note) None
- remove(self, type: lief._lief.ELF.Note.TYPE) None
- remove(self, tag: lief._lief.ELF.DynamicEntry.TAG) None
Overloaded function.
remove(self, dynamic_entry: lief._lief.ELF.DynamicEntry) -> None
Remove the given
DynamicEntryfrom the dynamic tableremove(self, tag: lief._lief.ELF.DynamicEntry.TAG) -> None
Remove all the
DynamicEntrywith the givenTAGremove(self, section: lief._lief.ELF.Section, clear: bool = False) -> None
Remove the given
Section. Theclearparameter specifies whether or not we must fill its content with0before removingremove(self, segment: lief._lief.ELF.Segment, clear: bool = False) -> NoneRemove the segment provided in parameter. If
clearis set, the original content of the segment will be filled with zeros before removal.remove(self, type: lief._lief.ELF.Segment.TYPE, clear: bool = False) -> NoneRemove all segments with the given type. If
clearis set, the original content of the segment will be filled with zeros before removal.remove(self, note: lief._lief.ELF.Note) -> None
Remove the given
Noteremove(self, type: lief._lief.ELF.Note.TYPE) -> None
- remove_dynamic_symbol(self, arg: lief._lief.ELF.Symbol, /) None¶
- remove_dynamic_symbol(self, arg: str, /) None
Overloaded function.
remove_dynamic_symbol(self, arg: lief._lief.ELF.Symbol, /) -> None
Remove the given
Symbolfrom the.dynsymsectionremove_dynamic_symbol(self, arg: str, /) -> None
Remove the
Symbolwith the name given in parameter from the.dynsymsection
- remove_library(self, library_name: str) None¶
Remove the given library
- remove_symtab_symbol(self, arg: lief._lief.ELF.Symbol, /) None¶
Remove the given
Symbolfrom the.symtabsection
- remove_version_requirement(self, libname: str) bool¶
Deletes all required symbol versions linked to the specified library name. The function returns true if the operation succeeds, false otherwise.
Warning
To maintain consistency, this function also removes versions associated with dynamic symbols that are linked to the specified library name.
- replace(self, new_segment: lief._lief.ELF.Segment, original_segment: lief._lief.ELF.Segment, base: int = 0) lief._lief.ELF.Segment | None¶
Replace the
Segmentgiven in 2nd parameter with theSegmentgiven in the first parameter and return the updated segment.Warning
The
original_segmentis no longer valid after this function
- section_from_offset(self, offset: int, skip_nobits: bool = True) lief._lief.ELF.Section | None¶
Return the
Sectionwhich encompasses the given offset. It returns None if a section can’t be found.If
skip_nobitsis set (which is the case by default), this function won’t consider sections for which the type isSHT_NOBITS(like.bss, .tbss, ...)
- section_from_virtual_address(self, address: int, skip_nobits: bool = True) lief._lief.ELF.Section | None¶
Return the
Sectionwhich encompasses the given virtual address. It returns None if a section can’t be found.If
skip_nobitsis set (which is the case by default), this function won’t consider sections for which the type isSHT_NOBITS(like.bss, .tbss, ...)
- segment_from_offset(self, offset: int) lief._lief.ELF.Segment | None¶
Return the
Segmentwhich encompasses the given offset. It returns None if a segment can’t be found.
- segment_from_virtual_address(self, address: int) lief._lief.ELF.Segment | None¶
Return the
Segmentwhich encompasses the given virtual address. It returns None if a segment can’t be found.
- property strings list[str | bytes]¶
Return list of strings used in the current ELF file. Basically this function looks for strings in the
.rodatasection
- 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 over
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(self, name: str) int¶
- symtab_idx(self, symbol: lief._lief.ELF.Symbol) int
Overloaded function.
symtab_idx(self, name: str) -> intGet the symbol index in the
.symtabsection from the given name or return -1 if the symbol does not exist.symtab_idx(self, symbol: lief._lief.ELF.Symbol) -> intGet the symbol index in the
.symtabsection or return -1 if the symbol does not exist
- property sysv_hash lief.ELF.SysvHash | None¶
Return the
SysvHashobjectHashes are used by the loader to speed up symbol resolution (SYSV version)
- property type lief.ELF.Header.CLASS¶
Return the binary’s
ELF_CLASS
- property use_gnu_hash bool¶
Trueif GNU hash is used
- property use_sysv_hash bool¶
Trueif SYSV hash is used
- virtual_address_to_offset(self, virtual_address: int) int | lief._lief.lief_errors¶
Convert the virtual address to a file offset
- property virtual_size int¶
Return the size of the mapped binary
- write(self, output: str | os.PathLike) None¶
- write(self, output: str | os.PathLike, config: lief._lief.ELF.Builder.config_t) None
Overloaded function.
write(self, output: Union[str | os.PathLike]) -> None
Rebuild the binary and write it in a file
write(self, output: Union[str | os.PathLike], config: lief._lief.ELF.Builder.config_t) -> None
Rebuild the binary with the given configuration and write it in a file
- write_to_bytes(self, config: lief._lief.ELF.Builder.config_t) bytes¶
- write_to_bytes(self) bytes
Header¶
- class lief.ELF.Header(self)¶
Bases:
ObjectClass which represents the ELF’s header. This class mirrors the raw ELF
Elfxx_Ehdrstructure.- class CLASS(*values)¶
Bases:
EnumMatches the result of
Elfxx_Ehdr.e_ident[EI_CLASS]- ELF32 = 1¶
- ELF64 = 2¶
- NONE = 0¶
- from_value(arg: int) lief.ELF.Header.CLASS = <nanobind.nb_func object>¶
- class ELF_DATA(*values)¶
Bases:
EnumMatches the result of
Elfxx_Ehdr.e_ident[EI_DATA]- LSB = 1¶
- MSB = 2¶
- NONE = 0¶
- from_value(arg: int) lief.ELF.Header.ELF_DATA = <nanobind.nb_func object>¶
- class FILE_TYPE(*values)¶
Bases:
EnumThe type of the underlying ELF file. This enum matches the semantic of
ET_NONE,ET_REL, …- CORE = 4¶
- DYN = 3¶
- EXEC = 2¶
- NONE = 0¶
- REL = 1¶
- from_value(arg: int) lief.ELF.Header.FILE_TYPE = <nanobind.nb_func object>¶
- class OS_ABI(*values)¶
Bases:
Enum- AIX = 7¶
- AMDGPU_HSA = 64¶
- ARM = 97¶
- AROS = 15¶
- C6000_LINUX = 65¶
- CLOUDABI = 17¶
- FENIXOS = 16¶
- FREEBSD = 9¶
- HPUX = 1¶
- HURD = 4¶
- IRIX = 8¶
- LINUX = 3¶
- MODESTO = 11¶
- NETBSD = 2¶
- NSK = 14¶
- OPENBSD = 12¶
- OPENVMS = 13¶
- SOLARIS = 6¶
- STANDALONE = 255¶
- SYSTEMV = 0¶
- TRU64 = 10¶
- from_value(arg: int) lief.ELF.Header.OS_ABI = <nanobind.nb_func object>¶
- class VERSION(*values)¶
Bases:
EnumMatches the result of
Elfxx_Ehdr.e_version- CURRENT = 1¶
- NONE = 0¶
- from_value(arg: int) lief.ELF.Header.VERSION = <nanobind.nb_func object>¶
- property entrypoint int¶
Return the binary entry point
- property file_type lief.ELF.Header.FILE_TYPE¶
Return binary’s type. This field determines if the binary is an executable, a library…
- property flags_list list[lief.ELF.PROCESSOR_FLAGS]¶
Processor flags as a list
- has(self, arg: lief._lief.ELF.PROCESSOR_FLAGS, /) bool¶
Check if the given processor flag is present
- property header_size int¶
Return the size of the ELF header This size should be 64 for an
ELF64binary and 52 for anELF32.
- property identity list[int]¶
Header’s identity.
- property identity_abi_version int¶
Return the ABI version (integer).
- property identity_class lief.ELF.Header.CLASS¶
Header’s class.
- property identity_data lief.ELF.Header.ELF_DATA¶
Specify the data encoding
- property identity_os_abi lief.ELF.Header.OS_ABI¶
Identifies the version of the ABI for which the object is prepared.
- property identity_version lief.ELF.Header.VERSION¶
- property machine_type lief.ELF.ARCH¶
Return the target architecture
- property numberof_sections int¶
Return the number of sections
- property numberof_segments int¶
Return the number of program headers (segments)
- property object_file_version lief.ELF.Header.VERSION¶
Return the version
- property processor_flag int¶
Processor-specific flags
- property program_header_offset int¶
Offset of program table (also known as segments table)
- property program_header_size int¶
Return the size of the raw
Elfxx_Phdrstructure (seelief.ELF.Segment) This size should be 56 for anELF64binary and 32 for anELF32.
- property section_header_offset int¶
Offset of section table
- property section_header_size int¶
Return the size of the raw
Elfxx_Shdr(lief.ELF.Section)This size should be 64 for an
ELF64binary and 40 for anELF32.
- property section_name_table_idx int¶
Return the section index which contains sections’ names
Section¶

- class lief.ELF.Section(self)¶
- class lief.ELF.Section(self, name: str, type: lief._lief.ELF.Section.TYPE = TYPE.PROGBITS)
Bases:
SectionClass which represents an ELF section.
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, name: str, type: lief._lief.ELF.Section.TYPE = TYPE.PROGBITS) -> None
Constructor from a name and a section type
- class FLAGS(*values)¶
Bases:
Flag- AARCH64_PURECODE = 26306674688¶
- ALLOC = 2¶
- ARM_PURECODE = 22011707392¶
- COMPRESSED = 2048¶
- EXCLUDE = 2147483648¶
- EXECINSTR = 4¶
- GNU_RETAIN = 2097152¶
- GROUP = 512¶
- HEX_GPREL = 13153337344¶
- INFO_LINK = 64¶
- LINK_ORDER = 128¶
- 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(*values)¶
Bases:
Enum- AARCH64_ATTRIBUTES = 23353884675¶
- AARCH64_AUTH_RELR = 23353884676¶
- AARCH64_MEMTAG_GLOBALS_DYNAMIC = 23353884680¶
- AARCH64_MEMTAG_GLOBALS_STATIC = 23353884679¶
- 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_AUXSYM = 14763950102¶
- MIPS_CONFLICT = 14763950082¶
- MIPS_CONTENT = 14763950092¶
- MIPS_DEBUG = 14763950085¶
- MIPS_DELTACLASS = 14763950109¶
- MIPS_DELTADECL = 14763950111¶
- MIPS_DELTAINST = 14763950108¶
- MIPS_DELTASYM = 14763950107¶
- MIPS_DENSE = 14763950099¶
- MIPS_DWARF = 14763950110¶
- MIPS_EH_REGION = 14763950119¶
- MIPS_EVENTS = 14763950113¶
- MIPS_EXTSYM = 14763950098¶
- MIPS_FDESC = 14763950097¶
- MIPS_GPTAB = 14763950083¶
- MIPS_IFACE = 14763950091¶
- MIPS_LIBLIST = 14763950080¶
- MIPS_LINE = 14763950105¶
- MIPS_LOCSTR = 14763950104¶
- MIPS_LOCSYM = 14763950101¶
- MIPS_MSYM = 14763950081¶
- MIPS_OPTIONS = 14763950093¶
- MIPS_OPTSYM = 14763950103¶
- MIPS_PACKAGE = 14763950087¶
- MIPS_PACKSYM = 14763950088¶
- MIPS_PDESC = 14763950100¶
- MIPS_PDR_EXCEPTION = 14763950121¶
- MIPS_PIXIE = 14763950115¶
- MIPS_REGINFO = 14763950086¶
- MIPS_RELD = 14763950089¶
- MIPS_RFDESC = 14763950106¶
- MIPS_SHDR = 14763950096¶
- MIPS_SYMBOL_LIB = 14763950112¶
- MIPS_TRANSLATE = 14763950114¶
- MIPS_UCODE = 14763950084¶
- MIPS_WHIRL = 14763950118¶
- MIPS_XHASH = 14763950123¶
- MIPS_XLATE = 14763950116¶
- MIPS_XLATE_DEBUG = 14763950117¶
- MIPS_XLATE_OLD = 14763950120¶
- 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._lief.ELF.Section.FLAGS) None¶
Add the given flag to the list of
flags
- property alignment int¶
Section alignment
- as_frame(self) lief._lief.ELF.Section¶
- clear(self, value: int = 0) lief._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, theentry_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(self, flag: lief._lief.ELF.Section.FLAGS) bool¶
- has(self, segment: lief._lief.ELF.Segment) bool
Overloaded function.
has(self, flag: lief._lief.ELF.Section.FLAGS) -> bool
Check if the given flag is present
has(self, segment: lief._lief.ELF.Segment) -> bool
- property information int¶
Section information (this value depends on the section)
- property is_frame bool¶
- property link int¶
Index to another section
- property original_size int¶
Original size of the section’s data.
This value is used by the
Builderto determine if it needs to be relocated to avoid an overwrite of the data
- remove(self, flag: lief._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:
ObjectClass which represents the ELF segments
- class FLAGS(*values)¶
Bases:
Flag- NONE = 0¶
- R = 4¶
- W = 2¶
- X = 1¶
- from_value(arg: int) lief.ELF.Segment.FLAGS = <nanobind.nb_func object>¶
- class TYPE(*values)¶
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¶
- HP_CORE_COMM = 9007200865353732¶
- HP_CORE_KERNEL = 9007200865353731¶
- HP_CORE_LOADABLE = 9007200865353734¶
- HP_CORE_MMF = 9007200865353737¶
- HP_CORE_NONE = 9007200865353729¶
- HP_CORE_PROC = 9007200865353733¶
- HP_CORE_SHM = 9007200865353736¶
- HP_CORE_STACK = 9007200865353735¶
- HP_CORE_UTSNAME = 9007200865353749¶
- HP_CORE_VERSION = 9007200865353730¶
- HP_FASTBIND = 9007200865353745¶
- HP_HSL_ANNOT = 9007200865353747¶
- HP_OPT_ANNOT = 9007200865353746¶
- HP_PARALLEL = 9007200865353744¶
- HP_STACK = 9007200865353748¶
- HP_TLS = 9007200865353728¶
- IA_64_EXT = 44828721152¶
- IA_64_UNWIND = 44828721153¶
- INTERP = 3¶
- LOAD = 1¶
- MIPS_ABIFLAGS = 27648851971¶
- MIPS_OPTIONS = 27648851970¶
- MIPS_REGINFO = 27648851968¶
- MIPS_RTPROC = 27648851969¶
- NOTE = 4¶
- PAX_FLAGS = 1694766464¶
- 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._lief.ELF.Segment.FLAGS) None¶
Add the given flag to the list of
flags
- property alignment int¶
The offset alignment of the segment
- clear(self) None¶
Clear the content of this 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
- fill(self, value: str) None¶
Fill the content of this segment with the value provided in parameter
- 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(self, flag: lief._lief.ELF.Segment.FLAGS) bool¶
- has(self, section: lief._lief.ELF.Section) bool
- has(self, section_name: str) bool
- has(self, section: lief._lief.ELF.Section) bool
Overloaded function.
has(self, flag: lief._lief.ELF.Segment.FLAGS) -> bool
Check if the given flag is present
has(self, section: lief._lief.ELF.Section) -> bool
Check if the given
Sectionis present insectionshas(self, section_name: str) -> bool
- 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
- property raw_flags int¶
The flag permissions as an integer
- remove(self, flag: lief._lief.ELF.Segment.FLAGS) None¶
Remove the given flag from the list of
flags
- 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
.bsssegment is wrapped by this segment then, virtual_size is larger than physical_size
Dynamic Entry¶

- class lief.ELF.DynamicEntry(self)¶
- class lief.ELF.DynamicEntry(self, tag: lief._lief.ELF.DynamicEntry.TAG, value: int)
Bases:
ObjectClass which represents an entry in the dynamic table These entries are located in the
.dynamicsection or thePT_DYNAMICsegmentOverloaded function.
__init__(self) -> None
Default constructor
__init__(self, tag: lief._lief.ELF.DynamicEntry.TAG, value: int) -> None
Constructor from a
TAGand value- class TAG(*values)¶
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¶
- AUXILIARY = 2147483645¶
- BIND_NOW = 24¶
- DEBUG_TAG = 21¶
- FILTER = 2147483647¶
- 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¶
- IA_64_PLT_RESERVE = 36238786560¶
- IA_64_VMS_FIXUP_NEEDED = 35970351128¶
- IA_64_VMS_FIXUP_RELA_CNT = 35970351126¶
- IA_64_VMS_FIXUP_RELA_OFF = 35970351164¶
- IA_64_VMS_FPMODE = 35970351170¶
- IA_64_VMS_IDENT = 35970351116¶
- IA_64_VMS_IMGIOCNT = 35970351106¶
- IA_64_VMS_IMG_RELA_CNT = 35970351122¶
- IA_64_VMS_IMG_RELA_OFF = 35970351160¶
- IA_64_VMS_LINKTIME = 35970351144¶
- IA_64_VMS_LNKFLAGS = 35970351112¶
- IA_64_VMS_NEEDED_IDENT = 35970351120¶
- IA_64_VMS_PLTGOT_OFFSET = 35970351166¶
- IA_64_VMS_PLTGOT_SEG = 35970351168¶
- IA_64_VMS_SEG_NO = 35970351146¶
- IA_64_VMS_SEG_RELA_CNT = 35970351124¶
- IA_64_VMS_SEG_RELA_OFF = 35970351162¶
- IA_64_VMS_STACKSIZE = 35970351136¶
- IA_64_VMS_STRTAB_OFFSET = 35970351156¶
- IA_64_VMS_SUBTYPE = 35970351104¶
- IA_64_VMS_SYMVEC_CNT = 35970351130¶
- IA_64_VMS_SYMVEC_OFFSET = 35970351148¶
- IA_64_VMS_SYMVEC_SEG = 35970351150¶
- IA_64_VMS_SYSVER_OFFSET = 35970351158¶
- IA_64_VMS_UNWINDSZ = 35970351138¶
- IA_64_VMS_UNWIND_CODSEG = 35970351140¶
- IA_64_VMS_UNWIND_INFOSEG = 35970351142¶
- IA_64_VMS_UNWIND_OFFSET = 35970351152¶
- IA_64_VMS_UNWIND_SEG = 35970351154¶
- IA_64_VMS_VIR_MEM_BLK_SIZ = 35970351114¶
- IA_64_VMS_XLATED = 35970351134¶
- 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_GLINK = 23353884672¶
- 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¶
- TLSDESC_GOT = 1879047927¶
- TLSDESC_PLT = 1879047926¶
- 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
TAGwhich 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¶

- class lief.ELF.DynamicEntryLibrary(self, library_name: str)¶
Bases:
DynamicEntryClass which represents a
DT_NEEDEDentry 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 Entry Run Path¶

- class lief.ELF.DynamicEntryRunPath(self, path: str = '')¶
- class lief.ELF.DynamicEntryRunPath(self, paths: collections.abc.Sequence[str])
Bases:
DynamicEntryClass that represents a
DT_RUNPATHwhich is used by the loader to resolve libraries (DynamicEntryLibrary).Overloaded function.
__init__(self, path: str = '') -> None
Constructor from a (run)path
__init__(self, paths: collections.abc.Sequence[str]) -> None
Constructor from a list of paths
- append(self, path: str) lief._lief.ELF.DynamicEntryRunPath¶
Append the given
path
- insert(self, position: int, path: str) lief._lief.ELF.DynamicEntryRunPath¶
Insert a
pathat the givenposition
- property paths list[str]¶
Paths as a list
- remove(self, path: str) lief._lief.ELF.DynamicEntryRunPath¶
Remove the given
path
- property runpath str | bytes¶
Runpath raw value
Dynamic Entry RPath¶

- class lief.ELF.DynamicEntryRpath(self, path: str = '')¶
- class lief.ELF.DynamicEntryRpath(self, paths: collections.abc.Sequence[str])
Bases:
DynamicEntryClass which represents a
DT_RPATHentry. This attribute is deprecated (cf.man ld) in favour ofDT_RUNPATH(SeeDynamicEntryRunPath)Overloaded function.
__init__(self, path: str = '') -> None
Constructor from (r)path
__init__(self, paths: collections.abc.Sequence[str]) -> None
Constructor from a list of paths
- append(self, path: str) lief._lief.ELF.DynamicEntryRpath¶
Append the given
path
- insert(self, position: int, path: str) lief._lief.ELF.DynamicEntryRpath¶
Insert a
pathat the givenposition
- property paths list[str]¶
Paths as a list
- remove(self, path: str) lief._lief.ELF.DynamicEntryRpath¶
Remove the given
path
- property rpath str | bytes¶
The actual rpath as a string
Dynamic Entry Array¶

- class lief.ELF.DynamicEntryArray(self, tag: lief._lief.ELF.DynamicEntry.TAG, array: collections.abc.Sequence[int])¶
Bases:
DynamicEntryClass that represents an array in the dynamic table. This entry is associated with constructors: -
DT_PREINIT_ARRAY-DT_INIT_ARRAY-DT_FINI_ARRAYThe underlying values are 64-bits integers to cover both: ELF32 and ELF64 binaries.
- append(self, function: int) lief._lief.ELF.DynamicEntryArray¶
Append the given
function
- property array list[int]¶
Return the array as a list of integers
- insert(self, pos: int, function: int) lief._lief.ELF.DynamicEntryArray¶
Insert the given
functionatpos
- remove(self, function: int) lief._lief.ELF.DynamicEntryArray¶
Remove the given
function
Dynamic Entry Flags¶

- class lief.ELF.DynamicEntryFlags¶
Bases:
DynamicEntry- class FLAG(*values)¶
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._lief.ELF.DynamicEntryFlags.FLAG) None¶
Add the given
FLAG
- property flags list[lief.ELF.DynamicEntryFlags.FLAG]¶
Return list of
FLAG
- has(self, flag: lief._lief.ELF.DynamicEntryFlags.FLAG) bool¶
Check if this entry contains the given
FLAG
- remove(self, flag: lief._lief.ELF.DynamicEntryFlags.FLAG) None¶
Remove the given
FLAG
Dynamic Entry Auxiliary¶

- class lief.ELF.DynamicEntryAuxiliary(self, library_name: str)¶
Bases:
DynamicEntryClass which represents a
DT_AUXILIARYentry in the dynamic table. This kind of entry is used to specify a shared object that should be loaded before the current one.Constructor from library name
- property name str | bytes¶
Return the library name
Dynamic Entry Filter¶

- class lief.ELF.DynamicEntryFilter(self, library_name: str)¶
Bases:
DynamicEntryClass which represents a
DT_FILTERentry in the dynamic table. This kind of entry is used to specify a shared object for which the current one is a filter.Constructor from library name
- property name str | bytes¶
Return the library name
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)
- class lief.ELF.Relocation(self, arch: lief._lief.ELF.ARCH)
Bases:
RelocationClass that represents an ELF relocation.
- class ENCODING(*values)¶
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(*values)¶
Bases:
Enum- DYNAMIC = 2¶
- NONE = 0¶
- OBJECT = 3¶
- PLTGOT = 1¶
- from_value(arg: int) lief.ELF.Relocation.PURPOSE = <nanobind.nb_func object>¶
- class TYPE(*values)¶
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¶
- SH_64 = 1879048446¶
- SH_64_PCREL = 1879048447¶
- SH_ALIGN = 1879048221¶
- SH_CODE = 1879048222¶
- SH_COPY = 1879048354¶
- SH_COPY64 = 1879048385¶
- SH_COUNT = 1879048220¶
- SH_DATA = 1879048223¶
- SH_DIR10S = 1879048240¶
- SH_DIR10SL = 1879048242¶
- SH_DIR10SQ = 1879048243¶
- SH_DIR10SW = 1879048241¶
- SH_DIR16 = 1879048225¶
- SH_DIR16S = 1879048245¶
- SH_DIR32 = 1879048193¶
- SH_DIR4U = 1879048234¶
- SH_DIR4UL = 1879048232¶
- SH_DIR4UW = 1879048233¶
- SH_DIR5U = 1879048237¶
- SH_DIR6S = 1879048239¶
- SH_DIR6U = 1879048238¶
- SH_DIR8 = 1879048226¶
- SH_DIR8BP = 1879048199¶
- SH_DIR8L = 1879048201¶
- SH_DIR8S = 1879048231¶
- SH_DIR8SW = 1879048230¶
- SH_DIR8U = 1879048229¶
- SH_DIR8UL = 1879048227¶
- SH_DIR8UW = 1879048228¶
- SH_DIR8W = 1879048200¶
- SH_DIR8WPL = 1879048197¶
- SH_DIR8WPN = 1879048195¶
- SH_DIR8WPZ = 1879048198¶
- SH_FUNCDESC = 1879048399¶
- SH_FUNCDESC_VALUE = 1879048400¶
- SH_GLOB_DAT = 1879048355¶
- SH_GLOB_DAT64 = 1879048386¶
- SH_GNU_VTENTRY = 1879048215¶
- SH_GNU_VTINHERIT = 1879048214¶
- SH_GOT10BY4 = 1879048381¶
- SH_GOT10BY8 = 1879048383¶
- SH_GOT20 = 1879048393¶
- SH_GOT32 = 1879048352¶
- SH_GOTFUNCDESC = 1879048395¶
- SH_GOTFUNCDESC20 = 1879048396¶
- SH_GOTOFF = 1879048358¶
- SH_GOTOFF20 = 1879048394¶
- SH_GOTOFFFUNCDESC = 1879048397¶
- SH_GOTOFFFUNCDESC20 = 1879048398¶
- SH_GOTOFF_HI16 = 1879048376¶
- SH_GOTOFF_LOW16 = 1879048373¶
- SH_GOTOFF_MEDHI16 = 1879048375¶
- SH_GOTOFF_MEDLOW16 = 1879048374¶
- SH_GOTPC = 1879048359¶
- SH_GOTPC_HI16 = 1879048380¶
- SH_GOTPC_LOW16 = 1879048377¶
- SH_GOTPC_MEDHI16 = 1879048379¶
- SH_GOTPC_MEDLOW16 = 1879048378¶
- SH_GOTPLT10BY4 = 1879048382¶
- SH_GOTPLT10BY8 = 1879048384¶
- SH_GOTPLT32 = 1879048360¶
- SH_GOTPLT_HI16 = 1879048368¶
- SH_GOTPLT_LOW16 = 1879048365¶
- SH_GOTPLT_MEDHI16 = 1879048367¶
- SH_GOTPLT_MEDLOW16 = 1879048366¶
- SH_GOT_HI16 = 1879048364¶
- SH_GOT_LOW16 = 1879048361¶
- SH_GOT_MEDHI16 = 1879048363¶
- SH_GOT_MEDLOW16 = 1879048362¶
- SH_IMMS16 = 1879048436¶
- SH_IMMU16 = 1879048437¶
- SH_IMM_HI16 = 1879048444¶
- SH_IMM_HI16_PCREL = 1879048445¶
- SH_IMM_LOW16 = 1879048438¶
- SH_IMM_LOW16_PCREL = 1879048439¶
- SH_IMM_MEDHI16 = 1879048442¶
- SH_IMM_MEDHI16_PCREL = 1879048443¶
- SH_IMM_MEDLOW16 = 1879048440¶
- SH_IMM_MEDLOW16_PCREL = 1879048441¶
- SH_IND12W = 1879048196¶
- SH_JMP_SLOT = 1879048356¶
- SH_JMP_SLOT64 = 1879048387¶
- SH_LABEL = 1879048224¶
- SH_LOOP_END = 1879048203¶
- SH_LOOP_START = 1879048202¶
- SH_NONE = 1879048192¶
- SH_PLT32 = 1879048353¶
- SH_PLT_HI16 = 1879048372¶
- SH_PLT_LOW16 = 1879048369¶
- SH_PLT_MEDHI16 = 1879048371¶
- SH_PLT_MEDLOW16 = 1879048370¶
- SH_PSHA = 1879048235¶
- SH_PSHL = 1879048236¶
- SH_PT_16 = 1879048435¶
- SH_REL32 = 1879048194¶
- SH_RELATIVE = 1879048357¶
- SH_RELATIVE64 = 1879048388¶
- SH_SHMEDIA_CODE = 1879048434¶
- SH_SWITCH16 = 1879048217¶
- SH_SWITCH32 = 1879048218¶
- SH_SWITCH8 = 1879048216¶
- SH_TLS_DTPMOD32 = 1879048341¶
- SH_TLS_DTPOFF32 = 1879048342¶
- SH_TLS_GD_32 = 1879048336¶
- SH_TLS_IE_32 = 1879048339¶
- SH_TLS_LDO_32 = 1879048338¶
- SH_TLS_LD_32 = 1879048337¶
- SH_TLS_LE_32 = 1879048340¶
- SH_TLS_TPOFF32 = 1879048343¶
- SH_USES = 1879048219¶
- 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_PC12DBL = 1476395070¶
- SYSZ_PC16 = 1476395024¶
- SYSZ_PC16DBL = 1476395025¶
- SYSZ_PC24DBL = 1476395072¶
- SYSZ_PC32 = 1476395013¶
- SYSZ_PC32DBL = 1476395027¶
- SYSZ_PC64 = 1476395031¶
- SYSZ_PLT12DBL = 1476395071¶
- SYSZ_PLT16DBL = 1476395026¶
- SYSZ_PLT24DBL = 1476395073¶
- 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¶
Trueif this relocation has alief.ELF.Sectionassociated with.This is usually the case for object files (
.o)
- 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_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,
.ofile, …)
- r_info(self, clazz: lief._lief.ELF.Header.CLASS) int¶
(re)Compute the raw
r_infoattribute based on the given ELF class
- resolve(self, base_address: int = 0) int | lief._lief.lief_errors¶
Try to resolve the value of the relocation such as
*address() = resolve()
- property section lief.ELF.Section | None¶
Sectionin which the relocation is applied or None if not relevant
- property symbol lief.ELF.Symbol | None¶
Symbolassociated with the relocation or None if no symbol is associated with this relocation.
- property symbol_table lief.ELF.Section | None¶
The symbol table
Sectionwhich the relocation references
- property type lief.ELF.Relocation.TYPE¶
Relocation type.
Symbol¶
- class lief.ELF.Symbol(self)¶
Bases:
SymbolClass which represents an ELF symbol
- class BINDING(*values)¶
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(*values)¶
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(*values)¶
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 has static visibility
- property is_variable bool¶
True if the symbol is a variable
- property other int¶
Alias for
visibility
- property section lief.ELF.Section | None¶
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 | None¶
Return the
SymbolVersionassociated with this symbolIt 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 meaning 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:
ObjectOverloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: int, /) -> None
Constructor from
value- as_global(self) None¶
Redefine this version as global by dropping its auxiliary version
- as_local(self) None¶
Redefine this version as local by dropping its auxiliary version
- drop_version(self, value: int) None¶
Drop the versioning requirement and replace the value (local/global)
- 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 | None¶
Return the
SymbolVersionAuxassociated with this version or None if not present.The value can be changed by assigning a
SymbolVersionAuxRequirementwhich must already exist in theSymbolVersionRequirement. One can useadd_aux_requirement()to add a newSymbolVersionAuxRequirement.
- property value int¶
Value associated with the symbol.
If the given SymbolVersion has no 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 tied to.
Symbol Version Auxiliary¶

Symbol Version Definition¶
- class lief.ELF.SymbolVersionDefinition¶
Bases:
ObjectClass which represents an entry defined in
DT_VERDEFor.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)
- property ndx int¶
Numeric value used as an index in the
SymbolVersiontable
- 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:
ObjectClass which represents an entry in the
DT_VERNEEDor.gnu.version_rtable- add_auxiliary_requirement(self, arg: lief._lief.ELF.SymbolVersionAuxRequirement, /) lief._lief.ELF.SymbolVersionAuxRequirement¶
Add an auxiliary version requirement to the existing entries
- find_aux(self, name: str) lief._lief.ELF.SymbolVersionAuxRequirement | None¶
Try to find the
SymbolVersionAuxRequirementwith the given name (e.g.GLIBC_2.27)
- get_auxiliary_symbols(self) lief._lief.ELF.SymbolVersionRequirement.it_aux_requirement¶
Auxiliary entries (iterator over
SymbolVersionAuxRequirement)
- property name str¶
Library’s name associated with this requirement (e.g.
libc.so.6)
- remove_aux_requirement(self, name: str) bool¶
- remove_aux_requirement(self, aux: lief._lief.ELF.SymbolVersionAuxRequirement) bool
Overloaded function.
remove_aux_requirement(self, name: str) -> boolTry to remove the auxiliary requirement symbol with the given name. The function returns true if the operation succeeds, false otherwise.
Warning
This function invalidates all the references (pointers) of
SymbolVersionAuxRequirement. Therefore, the user is responsible to ensure that the auxiliary requirement is no longer used in the ELF binary (e.g. inSymbolVersion)remove_aux_requirement(self, aux: lief._lief.ELF.SymbolVersionAuxRequirement) -> boolTry to remove the given auxiliary requirement symbol. The function returns true if the operation succeeds, false otherwise.
Warning
This function invalidates all the references (pointers) of
SymbolVersionAuxRequirement. Therefore, the user is responsible to ensure that the auxiliary requirement is no longer used in the ELF binary (e.g. inSymbolVersion)
- property version int¶
Version revision. Should be 1
Symbol Version Auxiliary Requirement¶
- class lief.ELF.SymbolVersionAuxRequirement(self)¶
Bases:
SymbolVersionAuxDefault 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:
ObjectClass 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(self, symbol_name: str) bool¶
- check(self, hash_value: int) bool
Overloaded function.
check(self, symbol_name: str) -> bool
Check if the symbol probably exists. If the returned value is
falseyou can assume at100%that the symbol with the given name doesn’t exist. Iftrueyou can’t do any assumptioncheck(self, hash_value: int) -> bool
Check if the symbol associated with the given hash probably exists. If the returned value is
falseyou can assume at100%that the symbol doesn’t exist. Iftrueyou can’t do any assumption
- check_bloom_filter(self, hash: int) bool¶
Check if the given hash passes the bloom filter
- check_bucket(self, hash: int) bool¶
Check if the given hash passes 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:
ObjectClass 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¶

- class lief.ELF.Note¶
Bases:
ObjectClass which represents an ELF note.
- class TYPE(*values)¶
Bases:
EnumLIEF 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._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
nameof 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¶

- 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¶

- class lief.ELF.CorePrStatus¶
Bases:
Note- class Registers¶
Bases:
object- class AARCH64(*values)¶
Bases:
EnumRegisters 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(*values)¶
Bases:
EnumRegisters 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(*values)¶
Bases:
EnumRegisters 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(*values)¶
Bases:
EnumRegisters for the x86-64 architecture (
x86_64)- CS = 17¶
- DS = 23¶
- EFLAGS = 18¶
- ES = 24¶
- FS_BASE = 21¶
- GS_BASE = 22¶
- 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(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86) int | None¶
- get(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86_64) int | None
- get(self, reg: lief._lief.ELF.CorePrStatus.Registers.ARM) int | None
- get(self, reg: lief._lief.ELF.CorePrStatus.Registers.AARCH64) int | None
- get(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86_64) 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 guaranteed to be as long as the number of registers defined in the
Registersor 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.Registers.AARCH64.X20.value]
- property return_value int | None¶
The value of the register that holds the return value according to the calling convention.
- set(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86, value: int) lief._lief.ok_error_t¶
- set(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86_64, value: int) lief._lief.ok_error_t
- set(self, reg: lief._lief.ELF.CorePrStatus.Registers.ARM, value: int) lief._lief.ok_error_t
- set(self, reg: lief._lief.ELF.CorePrStatus.Registers.AARCH64, value: int) lief._lief.ok_error_t
- set(self, reg: lief._lief.ELF.CorePrStatus.Registers.X86_64, value: int) lief._lief.ok_error_t
Change the register value
- property sp int | None¶
Return the stack pointer value
- property status lief.ELF.CorePrStatus.pr_status_t¶
Status information from a core dump
This structure mirrors the kernel’s
prstatusdata embedded inNT_PRSTATUScore-dump notes and exposes signal state, process identifiers, and CPU-time accounting.
Core File¶

- 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], /)
- class files_t(self, arg: lief._lief.ELF.CoreFile.files_t)
Bases:
objectOverloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: lief._lief.ELF.CoreFile.files_t) -> None
Copy constructor
__init__(self, arg: collections.abc.Iterable[lief._lief.ELF.CoreFile.entry_t], /) -> None
Construct from an iterable object
- append(self, arg: lief._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._lief.ELF.CoreFile.files_t, /) None¶
Extend self by appending elements from arg.
- insert(self, arg0: int, arg1: lief._lief.ELF.CoreFile.entry_t, /) None¶
Insert object arg1 before index arg0.
- pop(self, index: int = -1) lief._lief.ELF.CoreFile.entry_t¶
Remove and return item at index (default last).
Core Siginfo¶

Core Auxiliary Vector¶

- class lief.ELF.CoreAuxv¶
Bases:
Note- class TYPE(*values)¶
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¶
- IGNOREPPC = 22¶
- IGNORE_TY = 1¶
- 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._lief.ELF.CoreAuxv.TYPE) int | None¶
Get the auxv value from the provided type. Return None if it is not present.
- set(self, type: lief._lief.ELF.CoreAuxv.TYPE, value: int) bool¶
- set(self, arg: collections.abc.Mapping[lief._lief.ELF.CoreAuxv.TYPE, int], /) bool
Overloaded function.
set(self, type: lief._lief.ELF.CoreAuxv.TYPE, value: int) -> boolChange the value for the given type.
set(self, arg: collections.abc.Mapping[lief._lief.ELF.CoreAuxv.TYPE, int], /) -> boolReplace 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¶

QNX Stack¶

Note ABI¶

- class lief.ELF.NoteAbi¶
Bases:
NoteClass that wraps the NT_GNU_ABI_TAG note
- class ABI(*values)¶
Bases:
EnumABI 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¶


- class lief.ELF.NoteGnuProperty¶
Bases:
NoteThis object represents the NT_GNU_PROPERTY_TYPE_0 note.
- class Property¶
Bases:
objectThis class wraps the different properties that can be used in a NT_GNU_PROPERTY_TYPE_0 note
- class TYPE(*values)¶
Bases:
EnumLIEF’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._lief.ELF.NoteGnuProperty.Property.TYPE, /) lief._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¶

AArch64 Feature¶

- class lief.ELF.AArch64Feature¶
Bases:
PropertyThis class represents the
GNU_PROPERTY_AARCH64_FEATURE_1_ANDnote.- class FEATURE(*values)¶
Bases:
Enum- BTI = 1¶
- GCS = 3¶
- 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¶

- class lief.ELF.AArch64PAuth¶
Bases:
PropertyThis class represents the
GNU_PROPERTY_AARCH64_FEATURE_PAUTHnote.Note
If both:
AArch64PAuth.platformandAArch64PAuth.versionare 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
0value is associated with an invalid platform while the value1is associated with a baremetal platform.
- property version int¶
64-bit value that identifies the signing schema used by the ELF file.
Needed¶

- class lief.ELF.Needed¶
Bases:
PropertyThis class represents the
GNU_PROPERTY_1_NEEDEDnote property which provides information about additional features the object file needs at runtime.- class NEED(*values)¶
Bases:
Enum- INDIRECT_EXTERN_ACCESS = 1¶
- NEED = 0¶
- from_value(arg: int) lief.ELF.Needed.NEED = <nanobind.nb_func object>¶
- property needs list[lief.ELF.Needed.NEED]¶
Return the list of the needed features.
No Copy on Protected¶

Stack Size¶

X86 Feature¶

- class lief.ELF.X86Features¶
Bases:
PropertyThis class interfaces the different
GNU_PROPERTY_X86_FEATURE_*properties which includes:GNU_PROPERTY_X86_FEATURE_1_ANDGNU_PROPERTY_X86_FEATURE_2_USEDGNU_PROPERTY_X86_FEATURE_2_NEEDED
- class FEATURE(*values)¶
Bases:
EnumFeatures 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(*values)¶
Bases:
EnumFlag according to the
_AND,_USEDor_NEEDEDsuffixes- 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]]¶
X86 ISA¶

- class lief.ELF.X86ISA¶
Bases:
PropertyThis class interfaces the different
GNU_PROPERTY_X86_ISA_*properties which includes:GNU_PROPERTY_X86_ISA_1_USEDGNU_PROPERTY_X86_ISA_1_NEEDEDGNU_PROPERTY_X86_COMPAT_ISA_1_USEDGNU_PROPERTY_X86_COMPAT_ISA_1_NEEDEDGNU_PROPERTY_X86_COMPAT_2_ISA_1_USEDGNU_PROPERTY_X86_COMPAT_2_ISA_1_NEEDED
- class FLAG(*values)¶
Bases:
Enum- NEEDED = 2¶
- NONE = 0¶
- USED = 1¶
- from_value(arg: int) lief.ELF.X86ISA.FLAG = <nanobind.nb_func object>¶
- class ISA(*values)¶
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: lief._lief.ELF.Binary)¶
- class lief.ELF.Builder(self, elf: lief._lief.ELF.Binary, config: lief._lief.ELF.Builder.config_t)
Bases:
objectClass which takes an
lief.ELF.Binaryobject and reconstructs a valid binary- build(self) None¶
Perform the build of the provided ELF binary
- property config lief.ELF.Builder.config_t¶
Configuration of the builder
- class config_t(self)¶
Bases:
objectInterface to tweak the
Builder- property android_rela bool¶
Rebuild
ANDROID_RELA
- property coredump_notes bool¶
Rebuild the Coredump notes
- 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 keep_empty_version_requirement bool¶
Remove entries in
.gnu.version_rif they are not associated with at least one version
- property notes bool¶
Rebuild PT_NOTES segment(s)
- property preinit_array bool¶
Rebuild
PREINIT_ARRAY
- property skip_dynamic bool¶
Skip relocating the PT_DYNAMIC segment (only relevant if
force_relocateis set)
- property static_symtab bool¶
Rebuild .symtab section
- get_build(self) list[int]¶
Return the build result as a
listof bytes
- write(self, output: str) None¶
Write the build result into the
outputfile
Enums¶
Architectures¶
- class lief.ELF.ARCH(*values)¶
Bases:
Enum- AARCH64 = 183¶
- ALPHA = 41¶
- ALPHA_ALT = 36902¶
- 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(*values)¶
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>¶
Utilities¶
- lief.ELF.check_layout(binary: lief.ELF.Binary) tuple[bool, str]¶
Check that the layout of the given binary is correct.
- lief.is_elf(*args) bool¶
- lief.is_elf(raw: collections.abc.Sequence[int]) bool
Overloaded function.
is_elf(filename: Union[str | os.PathLike]) -> bool
Check if the given file is an
ELFis_elf(raw: collections.abc.Sequence[int]) -> bool
Check if the given raw data is an
ELF
