pex.exe.elf
¶
Module Contents¶
- class pex.exe.elf.ELF¶
Bases:
object
Subclass of pex.exe module.
This subclass of pex.exe module is intended for providing an implementation of Linux executable and linkable format generator.
- check_elf(data: bytes) bool ¶
Check if data is a Linux executable and linkable format.
- Parameters:
data (bytes) – data to check
- Return bool:
True if data is a Linux executable and linkable format
- static elf_header(data: bytes) dict ¶
Get ELF file data header.
- Parameters:
data (bytes) – data to parse
- Return dict:
header, header names as keys and header offsets as items
- pack_elf(arch: pex.arch.types.Arch | str, data: bytes) bytes ¶
Pack data to a Linux executable and linkable format.
- Parameters:
arch (Union[Arch, str]) – architecture to pack for
data (bytes) – data to pack
- Return bytes:
packed Linux executable and linkable format
- Raises:
RuntimeError – with trailing error message