Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / compat / linux / arch / amd64 / linux_exec.h
blob82dae5d6fc8bbd2ee0c268c0262830b8eadd068d
1 /* $NetBSD: linux_exec.h,v 1.3 2005/12/16 14:16:14 christos Exp $ */
3 /*-
4 * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed by Emmanuel Dreyfus
17 * 4. The name of the author may not be used to endorse or promote
18 * products derived from this software without specific prior written
19 * permission.
21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE.
34 #ifndef _AMD64_LINUX_EXEC_H
35 #define _AMD64_LINUX_EXEC_H
37 #ifndef ELFSIZE
38 #define ELFSIZE 64
39 #endif
40 #include <sys/exec_elf.h>
42 /* This is only for a.out, and a.out does not support amd64 */
43 #define LINUX_M_I386 100
44 #define LINUX_MID_MACHINE LINUX_M_I386
46 #define LINUX_USRSTACK 0x800000000000
47 #define LINUX_USRSTACK32 0xc0000000
49 /* Counted from linux_exec_machdep.c */
50 #define LINUX_ELF_AUX_ENTRIES 16
52 /* Hardware platform identifier string */
53 #define LINUX_PLATFORM "x86_64"
55 /* The extra data (ELF auxiliary table and platform name) on stack */
56 struct linux_extra_stack_data64 {
57 Aux64Info ai[LINUX_ELF_AUX_ENTRIES];
58 char pad[1]; /*sizeof(long) - (sizeof(LINUX_PLATFORM) % sizeof(long))*/
59 char hw_platform[sizeof(LINUX_PLATFORM)];
61 #define LINUX_ELF_AUX_ARGSIZ sizeof(struct linux_extra_stack_data64)
63 /* we have special powerpc ELF copyargs */
64 #define LINUX_MACHDEP_ELF_COPYARGS
66 #define LINUX_DEBUGLINK_SIGNATURE
68 int linux_exec_setup_stack(struct lwp *, struct exec_package *);
70 #endif /* !_AMD64_LINUX_EXEC_H */