1 #ifndef _INTERNAL_RELOC_H
2 #define _INTERNAL_RELOC_H
8 #if UINTPTR_MAX == 0xffffffff
9 typedef Elf32_Ehdr Ehdr;
10 typedef Elf32_Phdr Phdr;
11 typedef Elf32_Sym Sym;
12 #define R_TYPE(x) ((x)&255)
13 #define R_SYM(x) ((x)>>8)
15 typedef Elf64_Ehdr Ehdr;
16 typedef Elf64_Phdr Phdr;
17 typedef Elf64_Sym Sym;
18 #define R_TYPE(x) ((x)&0x7fffffff)
19 #define R_SYM(x) ((x)>>32)
22 /* These enum constants provide unmatchable default values for
23 * any relocation type the arch does not use. */
43 #define IS_RELATIVE(x) ( \
44 (R_TYPE(x) == REL_RELATIVE) || \
45 (R_TYPE(x) == REL_SYM_OR_REL && !R_SYM(x)) )
47 #ifndef NEED_MIPS_GOT_RELOCS
48 #define NEED_MIPS_GOT_RELOCS 0
54 typedef void (*stage2_func)(unsigned char *, size_t *);
55 typedef _Noreturn void (*stage3_func)(size_t *);