5 Copyright (C) 2006 The AROS Development Team. All rights reserved.
22 #define SHN_ABS 0xfff1
23 #define SHN_COMMON 0xfff2
26 #define SHF_WRITE (1 << 0)
27 #define SHF_ALLOC (1 << 1)
28 #define SHF_EXECINSTR (1 << 2)
34 #define ELF64_ST_TYPE(i) ((i) & 0x0F)
36 #define ELF32_R_SYM(val) ((val) >> 8)
37 #define ELF32_R_TYPE(val) ((val) & 0xff)
38 #define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff))
42 unsigned char ident
[16];
44 unsigned short machine
;
50 unsigned short ehsize
;
51 unsigned short phentsize
;
53 unsigned short shentsize
;
55 unsigned short shstrndx
;
57 /* these are internal, and not part of the header proper. they are wider
58 * versions of shnum and shstrndx for when they don't fit in the header
59 * and we need to get them from the first section header. see
60 * load_header() for details
62 unsigned int int_shnum
;
63 unsigned int int_shstrndx
;
76 unsigned int addralign
;
82 unsigned int name
; /* Offset of the name string in the string table */
83 unsigned int value
; /* Varies; eg. the offset of the symbol in its hunk */
84 unsigned int size
; /* How much memory does the symbol occupy */
85 unsigned char info
; /* What kind of symbol is this ? (global, variable, etc) */
86 unsigned char other
; /* undefined */
87 unsigned short shindex
; /* In which section is the symbol defined ? */
93 unsigned int offset
; /* Address of the relocation relative to the section it refers to */
94 unsigned int info
; /* Type of the relocation */
97 int load_elf_file(void *, ULONG_PTR
);
98 void *kernel_lowest();
99 void *kernel_highest();
100 void set_base_address(void *tracker
, void ** sysbaseaddr
);
102 #endif /*ELFLOADER_H_*/