// The offset from the linker's original program header load addresses to // the load addresses when embedded into a binary. Set by the extract_linker // tool. externconstchar __dlwrap_linker_offset;
// The real entry point of the binary to use after linker bootstrapping. extern"C"void _start();
/* Find the load bias and base address of an executable or shared object loaded *bythekernel.TheELFfile'sPHDRtablemusthaveaPT_PHDRentry. * *AVDSOdoesn'thaveaPT_PHDRentryinitsPHDRtable.
*/ staticvoid get_elf_base_from_phdr(const ElfW(Phdr)* phdr_table, size_t phdr_count,
ElfW(Addr)* base, ElfW(Addr)* load_bias) { for (size_t i = 0; i < phdr_count; ++i) { if (phdr_table[i].p_type == PT_PHDR) {
*load_bias = reinterpret_cast<ElfW(Addr)>(phdr_table) - phdr_table[i].p_vaddr;
*base = reinterpret_cast<ElfW(Addr)>(phdr_table) - phdr_table[i].p_offset; return;
}
}
}
for (ElfW(auxv_t)* v = args.auxv; v->a_type != AT_NULL; ++v) { if (v->a_type == AT_BASE) { // Set AT_BASE to the embedded linker
v->a_un.a_val = linker_addr;
} if (v->a_type == AT_ENTRY) { // Set AT_ENTRY to the proper entry point
v->a_un.a_val = reinterpret_cast<ElfW(Addr)>(&_start);
}
}
// Return address of linker entry point return linker_addr + linker_entry_offset;
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet am 2026-06-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.