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/kern/imgact_elf64.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/kern/imgact_elf64.c')
-rw-r--r-- | sys/kern/imgact_elf64.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/sys/kern/imgact_elf64.c b/sys/kern/imgact_elf64.c new file mode 100644 index 0000000..ea6d61d --- /dev/null +++ b/sys/kern/imgact_elf64.c @@ -0,0 +1,38 @@ +/*- + * Copyright (c) 2002 Doug Rabson + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * There ought to be a better way of deciding this. + */ +#if defined(__alpha__) || defined(__ia64__) || defined(__sparc64__) + +#define __ELF_WORD_SIZE 64 + +#include <kern/imgact_elf.c> + +#endif |