blob: 3bdcdfe70bd1a84f158401b7fc7230bd56718445 [file] [log] [blame]
Simon Glassf2bf7ad2015-08-04 12:33:45 -06001/*
2 * Brought in from Linux 4.1, removed things not useful to U-Boot.
3 * The definitions perhaps came from the GNU Library which is GPL.
4 *
5 * SPDX-License-Identifier: GPL-2.0+
6 */
7
8#ifndef _ASM_X86_ELF_H
9#define _ASM_X86_ELF_H
10
11/* ELF register definitions */
12#define R_386_NONE 0
13#define R_386_32 1
14#define R_386_PC32 2
15#define R_386_GOT32 3
16#define R_386_PLT32 4
17#define R_386_COPY 5
18#define R_386_GLOB_DAT 6
19#define R_386_JMP_SLOT 7
20#define R_386_RELATIVE 8
21#define R_386_GOTOFF 9
22#define R_386_GOTPC 10
23#define R_386_NUM 11
24
25/* x86-64 relocation types */
26#define R_X86_64_NONE 0 /* No reloc */
27#define R_X86_64_64 1 /* Direct 64 bit */
28#define R_X86_64_PC32 2 /* PC relative 32 bit signed */
29#define R_X86_64_GOT32 3 /* 32 bit GOT entry */
30#define R_X86_64_PLT32 4 /* 32 bit PLT address */
31#define R_X86_64_COPY 5 /* Copy symbol at runtime */
32#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
33#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */
34#define R_X86_64_RELATIVE 8 /* Adjust by program base */
35/* 32 bit signed pc relative offset to GOT */
36#define R_X86_64_GOTPCREL 9
37#define R_X86_64_32 10 /* Direct 32 bit zero extended */
38#define R_X86_64_32S 11 /* Direct 32 bit sign extended */
39#define R_X86_64_16 12 /* Direct 16 bit zero extended */
40#define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */
41#define R_X86_64_8 14 /* Direct 8 bit sign extended */
42#define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */
43
44#define R_X86_64_NUM 16
45
46#endif