Index: sys/kern/imgact_elf.c =================================================================== --- sys/kern/imgact_elf.c +++ sys/kern/imgact_elf.c @@ -1335,7 +1335,6 @@ imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; imgp->proc->p_fctl0 = fctl0; - imgp->proc->p_elf_machine = hdr->e_machine; imgp->proc->p_elf_flags = hdr->e_flags; ret: @@ -1813,8 +1812,10 @@ Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + Elf_Brandinfo *bi; ehdr = (Elf_Ehdr *)hdr; + bi = td->td_proc->p_elf_brandinfo; ehdr->e_ident[EI_MAG0] = ELFMAG0; ehdr->e_ident[EI_MAG1] = ELFMAG1; @@ -1827,7 +1828,7 @@ ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = td->td_proc->p_elf_machine; + ehdr->e_machine = bi->machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); Index: sys/sys/proc.h =================================================================== --- sys/sys/proc.h +++ sys/sys/proc.h @@ -700,7 +700,7 @@ pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - uint16_t p_elf_machine; /* (x) ELF machine type */ + uint32_t p_reserved; uint64_t p_elf_flags; /* (x) ELF flags */ void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for non ELF binaries. */