Added a test for MUIA_Listview_SelectChange.
[AROS.git] / arch / ppc-chrp / boot / openfirmware / include / elf.h
blob2899184100992efafdf454cdefc249797f9023dd
1 #ifndef ELF_H_
2 #define ELF_H_
4 /*
5 * $Id$
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
20 * MA 02111-1307 USA
23 struct bss_tracker {
24 void *addr;
25 unsigned int length;
28 extern struct bss_tracker tracker[];
30 int load_elf_file(const char *name, void *file, unsigned long virt);
31 char *get_ptr_rw();
32 char *get_ptr_ro();
33 void ptr_ro_add(int amount);
35 #define SHT_PROGBITS 1
36 #define SHT_SYMTAB 2
37 #define SHT_STRTAB 3
38 #define SHT_RELA 4
39 #define SHT_NOBITS 8
40 #define SHT_REL 9
42 #define ET_REL 1
43 #define EM_386 3
44 #define EM_PPC 20
45 #define EM_X86_64 62
47 #define STT_OBJECT 1
48 #define STT_FUNC 2
50 #define SHN_ABS 0xfff1
51 #define SHN_COMMON 0xfff2
52 #define SHN_UNDEF 0
54 #define SHF_WRITE (1 << 0)
55 #define SHF_ALLOC (1 << 1)
56 #define SHF_EXECINSTR (1 << 2)
58 #define R_386_NONE 0
59 #define R_386_32 1
60 #define R_386_PC32 2
62 #define R_X86_64_NONE 0
63 #define R_X86_64_64 1
64 #define R_X86_64_PC32 2
65 #define R_X86_64_32 10
66 #define R_X86_64_32S 11
68 #define R_PPC_NONE 0
69 #define R_PPC_ADDR32 1
70 #define R_PPC_ADDR16_LO 4
71 #define R_PPC_ADDR16_HA 6
72 #define R_PPC_REL24 10
73 #define R_PPC_REL32 26
75 #define ELF64_ST_TYPE(i) ((i) & 0x0F)
77 #define ELF64_R_SYM(i) (unsigned long)((i) >> 32)
78 #define ELF64_R_TYPE(i) (unsigned long)((i) & 0xffffffffULL)
79 #define ELF64_R_INFO(sym, type) (((unsigned long long)(sym) << 32) + (type))
81 #define ELF32_R_SYM(i) ((i) >> 8)
82 #define ELF32_R_TYPE(i) ((i) & 0xff)
83 #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
85 struct elfheader {
86 uint8_t ident[16];
87 uint16_t type;
88 uint16_t machine;
89 uint32_t version;
90 uint32_t entry;
91 uint32_t phoff;
92 uint32_t shoff;
93 uint32_t flags;
94 uint16_t ehsize;
95 uint16_t phentsize;
96 uint16_t phnum;
97 uint16_t shentsize;
98 uint16_t shnum;
99 uint16_t shstrndx;
102 struct sheader {
103 uint32_t name;
104 uint32_t type;
105 uint32_t flags;
106 uint32_t addr;
107 uint32_t offset;
108 uint32_t size;
109 uint32_t link;
110 uint32_t info;
111 uint32_t addralign;
112 uint32_t entsize;
115 struct symbol {
116 uint32_t name;
117 uint32_t value;
118 uint32_t size;
119 uint8_t info;
120 uint8_t other;
121 uint16_t shindex;
124 struct relo {
125 uint32_t offset;
126 uint32_t info;
127 int32_t addend;
130 #endif /*ELF_H_*/