PERFORCE change 79238 for review
Peter Wemm
peter at FreeBSD.org
Thu Jun 30 05:15:39 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=79238
Change 79238 by peter at peter_overcee on 2005/06/30 05:15:27
This really is ia32-specific, not amd64 specific. sparc64
binaries running 32 bit address space apps will probably not
need the same hacks.
Affected files ...
.. //depot/projects/hammer/sys/kern/imgact_elf.c#30 edit
Differences ...
==== //depot/projects/hammer/sys/kern/imgact_elf.c#30 (text+ko) ====
@@ -31,6 +31,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/sys/kern/imgact_elf.c,v 1.161 2005/05/24 22:21:44 cognet Exp $");
+#include "opt_compat.h"
+
#include <sys/param.h>
#include <sys/exec.h>
#include <sys/fcntl.h>
@@ -66,7 +68,7 @@
#include <machine/elf.h>
#include <machine/md_var.h>
-#if defined(__amd64__) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
#include <machine/fpu.h>
#include <compat/ia32/ia32_reg.h>
#endif
@@ -1123,7 +1125,7 @@
td)); /* XXXKSE */
}
-#if defined(__amd64__) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
typedef struct prstatus32 elf_prstatus_t;
typedef struct prpsinfo32 elf_prpsinfo_t;
typedef struct fpreg32 elf_prfpregset_t;
@@ -1207,7 +1209,7 @@
status->pr_osreldate = osreldate;
status->pr_cursig = p->p_sig;
status->pr_pid = thr->td_tid;
-#if defined(__amd64__) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
fill_regs32(thr, &status->pr_reg);
fill_fpregs32(thr, fpregset);
#else
@@ -1259,7 +1261,7 @@
ehdr->e_ident[EI_ABIVERSION] = 0;
ehdr->e_ident[EI_PAD] = 0;
ehdr->e_type = ET_CORE;
-#if defined(__amd64__) && __ELF_WORD_SIZE == 32
+#if defined(COMPAT_IA32) && __ELF_WORD_SIZE == 32
ehdr->e_machine = EM_386;
#else
ehdr->e_machine = ELF_ARCH;
More information about the p4-projects
mailing list