summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/elf.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2002-07-20 02:56:12 +0000
committerpeter <peter@FreeBSD.org>2002-07-20 02:56:12 +0000
commitcc7b2e42482d2eb35468c5dd11903248b12692b2 (patch)
tree442882c197085f1177ad99039e6387b24c60e44a /sys/ia64/include/elf.h
parentc458732bcf221adf5c81f68d8d9044444c901a54 (diff)
downloadFreeBSD-src-cc7b2e42482d2eb35468c5dd11903248b12692b2.zip
FreeBSD-src-cc7b2e42482d2eb35468c5dd11903248b12692b2.tar.gz
Infrastructure tweaks to allow having both an Elf32 and an Elf64 executable
handler in the kernel at the same time. Also, allow for the exec_new_vmspace() code to build a different sized vmspace depending on the executable environment. This is a big help for execing i386 binaries on ia64. The ELF exec code grows the ability to map partial pages when there is a page size difference, eg: emulating 4K pages on 8K or 16K hardware pages. Flesh out the i386 emulation support for ia64. At this point, the only binary that I know of that fails is cvsup, because the cvsup runtime tries to execute code in pages not marked executable. Obtained from: dfr (mostly, many tweaks from me).
Diffstat (limited to 'sys/ia64/include/elf.h')
-rw-r--r--sys/ia64/include/elf.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/ia64/include/elf.h b/sys/ia64/include/elf.h
index 1160293..7da0700 100644
--- a/sys/ia64/include/elf.h
+++ b/sys/ia64/include/elf.h
@@ -33,9 +33,13 @@
* ELF definitions for the IA-64 architecture.
*/
+#ifndef __ELF_WORD_SIZE
+#define __ELF_WORD_SIZE 64
+#endif
+
#include <sys/elf64.h> /* Definitions common to all 64 bit architectures. */
+#include <sys/elf32.h> /* Definitions common to all 32 bit architectures. */
-#define __ELF_WORD_SIZE 64 /* Used by <sys/elf_generic.h> */
#include <sys/elf_generic.h>
#define ELF_ARCH EM_IA_64
@@ -52,6 +56,13 @@
typedef struct { /* Auxiliary vector entry on initial stack */
int a_type; /* Entry type. */
union {
+ int a_val; /* Integer value. */
+ } a_un;
+} Elf32_Auxinfo;
+
+typedef struct { /* Auxiliary vector entry on initial stack */
+ int a_type; /* Entry type. */
+ union {
long a_val; /* Integer value. */
void *a_ptr; /* Address. */
void (*a_fcn)(void); /* Function pointer (not used). */
@@ -194,7 +205,11 @@ __ElfType(Auxinfo);
#define R_IA64_LDXMOV 0x87 /* immediate22 special */
/* Define "machine" characteristics */
+#if __ELF_WORD_SIZE == 32
+#define ELF_TARG_CLASS ELFCLASS32
+#else
#define ELF_TARG_CLASS ELFCLASS64
+#endif
#define ELF_TARG_DATA ELFDATA2LSB
#define ELF_TARG_MACH EM_IA_64
#define ELF_TARG_VER 1
OpenPOWER on IntegriCloud