/* * Go through the available phsyical memory regions and find one that hold * an image of the specified size.
*/ staticint elf_find_pbase(struct kimage *image, unsignedlong kernel_len, struct elfhdr *ehdr, struct kexec_elf_info *elf_info, unsignedlong *old_pbase, unsignedlong *new_pbase)
{ int i; int ret; struct kexec_buf kbuf = {}; conststruct elf_phdr *phdr; unsignedlong lowest_paddr = ULONG_MAX; unsignedlong lowest_vaddr = ULONG_MAX;
for (i = 0; i < ehdr->e_phnum; i++) {
phdr = &elf_info->proghdrs[i]; if (phdr->p_type != PT_LOAD) continue;
if (lowest_paddr > phdr->p_paddr)
lowest_paddr = phdr->p_paddr;
if (lowest_vaddr > phdr->p_vaddr)
lowest_vaddr = phdr->p_vaddr;
}
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.