Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powerpc/elf64_machdep.c
Show First 20 Lines • Show All 129 Lines • ▼ Show 20 Lines | struct sysentvec elf64_freebsd_sysvec_v2 = { | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_thread_detach = NULL, | .sv_thread_detach = NULL, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
.sv_hwcap = &cpu_features, | .sv_hwcap = &cpu_features, | ||||
.sv_hwcap2 = &cpu_features2, | .sv_hwcap2 = &cpu_features2, | ||||
}; | }; | ||||
INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); | INIT_SYSENTVEC(elf64_sysvec_v2, &elf64_freebsd_sysvec_v2); | ||||
static boolean_t ppc64_elfv1_header_match(struct image_params *params); | static boolean_t ppc64_elfv1_header_match(struct image_params *params, | ||||
static boolean_t ppc64_elfv2_header_match(struct image_params *params); | int32_t *, uint32_t *); | ||||
static boolean_t ppc64_elfv2_header_match(struct image_params *params, | |||||
int32_t *, uint32_t *); | |||||
static Elf64_Brandinfo freebsd_brand_info_elfv1 = { | static Elf64_Brandinfo freebsd_brand_info_elfv1 = { | ||||
.brand = ELFOSABI_FREEBSD, | .brand = ELFOSABI_FREEBSD, | ||||
.machine = EM_PPC64, | .machine = EM_PPC64, | ||||
.compat_3_brand = "FreeBSD", | .compat_3_brand = "FreeBSD", | ||||
.emul_path = NULL, | .emul_path = NULL, | ||||
.interp_path = "/libexec/ld-elf.so.1", | .interp_path = "/libexec/ld-elf.so.1", | ||||
.sysvec = &elf64_freebsd_sysvec_v1, | .sysvec = &elf64_freebsd_sysvec_v1, | ||||
Show All 39 Lines | |||||
SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, | SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, | ||||
(sysinit_cfunc_t) elf64_insert_brand_entry, | (sysinit_cfunc_t) elf64_insert_brand_entry, | ||||
&freebsd_brand_oinfo); | &freebsd_brand_oinfo); | ||||
void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); | void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); | ||||
static boolean_t | static boolean_t | ||||
ppc64_elfv1_header_match(struct image_params *params) | ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, | ||||
uint32_t *fctl0 __unused) | |||||
{ | { | ||||
const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; | const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; | ||||
int abi = (hdr->e_flags & 3); | int abi = (hdr->e_flags & 3); | ||||
return (abi == 0 || abi == 1); | return (abi == 0 || abi == 1); | ||||
} | } | ||||
static boolean_t | static boolean_t | ||||
ppc64_elfv2_header_match(struct image_params *params) | ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, | ||||
uint32_t *fctl0 __unused) | |||||
{ | { | ||||
const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; | const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; | ||||
int abi = (hdr->e_flags & 3); | int abi = (hdr->e_flags & 3); | ||||
return (abi == 2); | return (abi == 2); | ||||
} | } | ||||
static void | static void | ||||
▲ Show 20 Lines • Show All 218 Lines • Show Last 20 Lines |