2 meinOS - A unix-like x86 microkernel operating system
3 Copyright (C) 2008 Janosch Gräf <janosch.graef@gmx.net>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
29 #define ET_LOPROC 0xff00
30 #define ET_HIPROC 0xffff
57 #define ELFCLASSNONE 0
64 // Programm Header Type
65 #define PT_NULL 0x00000000
66 #define PT_LOAD 0x00000001
67 #define PT_DYNAMIC 0x00000002
68 #define PT_INTERP 0x00000003
69 #define PT_NOTE 0x00000004
70 #define PT_SHLIB 0x00000005
71 #define PT_PHDR 0x00000006
72 #define PT_LOPROC 0x70000000
73 #define PT_HIPROC 0x7fffffff
75 #define PT_LOOS 0x60000000
76 #define PT_HIOS 0x6fffffff
77 #define PT_GNU_EH_FRAME 0x6474e550
78 #define PT_GNU_STACK (PT_LOOS+0x474e551)
80 // Programm Header Flag
86 uint8_t ident
[EI_NIDENT
];
100 } __attribute__ ((packed
)) elf_header_t
;
111 } __attribute__ ((packed
)) elf_progheader_t
;
118 elf_t
*elf_create(const char *file
);
119 void elf_destroy(elf_t
*elf
);
120 void *elf_load(elf_t
*elf
,pid_t pid
);
122 #endif /* _EXE_ELF_H_ */