diff options
author | peter <peter@FreeBSD.org> | 2002-07-20 02:56:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2002-07-20 02:56:12 +0000 |
commit | cc7b2e42482d2eb35468c5dd11903248b12692b2 (patch) | |
tree | 442882c197085f1177ad99039e6387b24c60e44a /sys/compat/svr4/svr4_sysvec.c | |
parent | c458732bcf221adf5c81f68d8d9044444c901a54 (diff) | |
download | FreeBSD-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/compat/svr4/svr4_sysvec.c')
-rw-r--r-- | sys/compat/svr4/svr4_sysvec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/compat/svr4/svr4_sysvec.c b/sys/compat/svr4/svr4_sysvec.c index 1c37adb..c7d67ff 100644 --- a/sys/compat/svr4/svr4_sysvec.c +++ b/sys/compat/svr4/svr4_sysvec.c @@ -179,13 +179,14 @@ struct sysentvec svr4_sysvec = { &svr4_szsigcode, NULL, "SVR4", - elf_coredump, + elf32_coredump, NULL, SVR4_MINSIGSTKSZ }; Elf32_Brandinfo svr4_brand = { ELFOSABI_SYSV, + EM_386, /* XXX only implemented for x86 so far. */ "SVR4", svr4_emul_path, "/lib/libc.so.1", @@ -376,7 +377,7 @@ svr4_elf_modevent(module_t mod, int type, void *data) switch(type) { case MOD_LOAD: - if (elf_insert_brand_entry(&svr4_brand) < 0) + if (elf32_insert_brand_entry(&svr4_brand) < 0) error = EINVAL; if (error) printf("cannot insert svr4 elf brand handler\n"); @@ -385,9 +386,9 @@ svr4_elf_modevent(module_t mod, int type, void *data) break; case MOD_UNLOAD: /* Only allow the emulator to be removed if it isn't in use. */ - if (elf_brand_inuse(&svr4_brand) != 0) { + if (elf32_brand_inuse(&svr4_brand) != 0) { error = EBUSY; - } else if (elf_remove_brand_entry(&svr4_brand) < 0) { + } else if (elf32_remove_brand_entry(&svr4_brand) < 0) { error = EINVAL; } |