Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/link_elf.c
Show First 20 Lines • Show All 985 Lines • ▼ Show 20 Lines | #endif | ||||
lf = linker_make_file(filename, &link_elf_class); | lf = linker_make_file(filename, &link_elf_class); | ||||
if (lf == NULL) { | if (lf == NULL) { | ||||
error = ENOMEM; | error = ENOMEM; | ||||
goto out; | goto out; | ||||
} | } | ||||
ef = (elf_file_t) lf; | ef = (elf_file_t) lf; | ||||
#ifdef SPARSE_MAPPING | #ifdef SPARSE_MAPPING | ||||
ef->object = vm_object_allocate(OBJT_DEFAULT, mapsize >> PAGE_SHIFT); | ef->object = vm_object_allocate(OBJT_PHYS, atop(mapsize)); | ||||
if (ef->object == NULL) { | if (ef->object == NULL) { | ||||
error = ENOMEM; | error = ENOMEM; | ||||
goto out; | goto out; | ||||
} | } | ||||
#ifdef __amd64__ | #ifdef __amd64__ | ||||
mapbase = (caddr_t)KERNBASE; | mapbase = (caddr_t)KERNBASE; | ||||
#else | #else | ||||
mapbase = (caddr_t)vm_map_min(kernel_map); | mapbase = (caddr_t)vm_map_min(kernel_map); | ||||
▲ Show 20 Lines • Show All 799 Lines • Show Last 20 Lines |