summaryrefslogtreecommitdiffstats
path: root/sys/sys/imgact_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/sys/imgact_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/sys/imgact_elf.h')
-rw-r--r--sys/sys/imgact_elf.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index ecaf40d..1cc3014 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -37,6 +37,8 @@
#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);}
+struct thread;
+
#if ELF_TARG_CLASS == ELFCLASS32
/*
@@ -57,6 +59,7 @@ typedef struct {
typedef struct {
int brand;
+ int machine;
const char *compat_3_brand; /* pre Binutils 2.10 method (FBSD 3) */
const char *emul_path;
const char *interp_path;
@@ -65,9 +68,11 @@ typedef struct {
#define MAX_BRANDS 8
-int elf_brand_inuse(Elf32_Brandinfo *entry);
-int elf_insert_brand_entry(Elf32_Brandinfo *entry);
-int elf_remove_brand_entry(Elf32_Brandinfo *entry);
+int elf32_brand_inuse(Elf32_Brandinfo *entry);
+int elf32_insert_brand_entry(Elf32_Brandinfo *entry);
+int elf32_remove_brand_entry(Elf32_Brandinfo *entry);
+int elf32_freebsd_fixup(register_t **, struct image_params *);
+int elf32_coredump(struct thread *, struct vnode *, off_t);
#else /* !(ELF_TARG_CLASS == ELFCLASS32) */
@@ -89,6 +94,7 @@ typedef struct {
typedef struct {
int brand;
+ int machine;
const char *compat_3_brand; /* pre Binutils 2.10 method (FBSD 3) */
const char *emul_path;
const char *interp_path;
@@ -97,16 +103,14 @@ typedef struct {
#define MAX_BRANDS 8
-int elf_brand_inuse(Elf64_Brandinfo *entry);
-int elf_insert_brand_entry(Elf64_Brandinfo *entry);
-int elf_remove_brand_entry(Elf64_Brandinfo *entry);
+int elf64_brand_inuse(Elf64_Brandinfo *entry);
+int elf64_insert_brand_entry(Elf64_Brandinfo *entry);
+int elf64_remove_brand_entry(Elf64_Brandinfo *entry);
+int elf64_freebsd_fixup(register_t **, struct image_params *);
+int elf64_coredump(struct thread *, struct vnode *, off_t);
#endif /* ELF_TARG_CLASS == ELFCLASS32 */
-struct thread;
-
-int elf_coredump(struct thread *, struct vnode *, off_t);
-
#endif /* _KERNEL */
#endif /* !_SYS_IMGACT_ELF_H_ */
OpenPOWER on IntegriCloud