Skip to content

glibc ¤

Get information about the GLibc

Functions:

Attributes:

P module-attribute ¤

P = ParamSpec('P')

T module-attribute ¤

T = TypeVar('T')

safe_lnk module-attribute ¤

safe_lnk = add_param(
    "safe-linking",
    None,
    "whether glibc uses safe-linking",
    param_class=PARAM_AUTO_BOOLEAN,
)

glibc_version module-attribute ¤

glibc_version = add_param(
    "glibc",
    "",
    "glibc version for heap heuristics resolution (e.g. 2.31)",
    scope=heap,
)

set_glibc_version ¤

set_glibc_version() -> None

get_version ¤

get_version() -> tuple[int, ...] | None

get_libc_filename_from_info_sharedlibrary ¤

get_libc_filename_from_info_sharedlibrary() -> str | None

Get the filename of the libc by parsing the output of info sharedlibrary.

dump_elf_data_section ¤

dump_elf_data_section() -> tuple[int, int, bytes] | None

Dump .data section of libc ELF file

dump_relocations_by_section_name ¤

dump_relocations_by_section_name(
    section_name: str,
) -> tuple[Relocation, ...] | None

Dump relocations of a section by section name of libc ELF file

get_section_address_by_name ¤

get_section_address_by_name(section_name: str) -> int

Find section address of libc by section name

OnlyWhenGlibcLoaded ¤

OnlyWhenGlibcLoaded(function: Callable[P, T]) -> Callable[P, T | None]