diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/elf-fdpic.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/elf-fdpic.h')
-rw-r--r-- | include/linux/elf-fdpic.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h new file mode 100644 index 000000000000..9f5b7456bff3 --- /dev/null +++ b/include/linux/elf-fdpic.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* elf-fdpic.h: FDPIC ELF load map | ||
2 | * | ||
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_ELF_FDPIC_H | ||
13 | #define _LINUX_ELF_FDPIC_H | ||
14 | |||
15 | #include <linux/elf.h> | ||
16 | |||
17 | #define PT_GNU_STACK (PT_LOOS + 0x474e551) | ||
18 | |||
19 | /* segment mappings for ELF FDPIC libraries/executables/interpreters */ | ||
20 | struct elf32_fdpic_loadseg { | ||
21 | Elf32_Addr addr; /* core address to which mapped */ | ||
22 | Elf32_Addr p_vaddr; /* VMA recorded in file */ | ||
23 | Elf32_Word p_memsz; /* allocation size recorded in file */ | ||
24 | }; | ||
25 | |||
26 | struct elf32_fdpic_loadmap { | ||
27 | Elf32_Half version; /* version of these structures, just in case... */ | ||
28 | Elf32_Half nsegs; /* number of segments */ | ||
29 | struct elf32_fdpic_loadseg segs[]; | ||
30 | }; | ||
31 | |||
32 | #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 | ||
33 | |||
34 | /* | ||
35 | * binfmt binary parameters structure | ||
36 | */ | ||
37 | struct elf_fdpic_params { | ||
38 | struct elfhdr hdr; /* ref copy of ELF header */ | ||
39 | struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */ | ||
40 | struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */ | ||
41 | unsigned long elfhdr_addr; /* mapped ELF header user address */ | ||
42 | unsigned long ph_addr; /* mapped PT_PHDR user address */ | ||
43 | unsigned long map_addr; /* mapped loadmap user address */ | ||
44 | unsigned long entry_addr; /* mapped entry user address */ | ||
45 | unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */ | ||
46 | unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */ | ||
47 | unsigned long load_addr; /* user address at which to map binary */ | ||
48 | unsigned long flags; | ||
49 | #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */ | ||
50 | #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */ | ||
51 | #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */ | ||
52 | #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant | ||
53 | * displacement */ | ||
54 | #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */ | ||
55 | #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */ | ||
56 | #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */ | ||
57 | #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */ | ||
58 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | ||
59 | }; | ||
60 | |||
61 | #ifdef CONFIG_MMU | ||
62 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | ||
63 | struct elf_fdpic_params *interp_params, | ||
64 | unsigned long *start_stack, | ||
65 | unsigned long *start_brk); | ||
66 | #endif | ||
67 | |||
68 | #endif /* _LINUX_ELF_FDPIC_H */ | ||