1*a9fa9459Szrj /* ix86 ELF support for BFD.
2*a9fa9459Szrj    Copyright (C) 1998-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj 
4*a9fa9459Szrj    This file is part of BFD, the Binary File Descriptor library.
5*a9fa9459Szrj 
6*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
7*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
8*a9fa9459Szrj    the Free Software Foundation; either version 3 of the License, or
9*a9fa9459Szrj    (at your option) any later version.
10*a9fa9459Szrj 
11*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
12*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*a9fa9459Szrj    GNU General Public License for more details.
15*a9fa9459Szrj 
16*a9fa9459Szrj    You should have received a copy of the GNU General Public License
17*a9fa9459Szrj    along with this program; if not, write to the Free Software Foundation,
18*a9fa9459Szrj    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
19*a9fa9459Szrj 
20*a9fa9459Szrj #ifndef _ELF_I386_H
21*a9fa9459Szrj #define _ELF_I386_H
22*a9fa9459Szrj 
23*a9fa9459Szrj #include "elf/reloc-macros.h"
24*a9fa9459Szrj 
25*a9fa9459Szrj START_RELOC_NUMBERS (elf_i386_reloc_type)
26*a9fa9459Szrj      RELOC_NUMBER (R_386_NONE,      0)	/* No reloc */
27*a9fa9459Szrj      RELOC_NUMBER (R_386_32,        1)	/* Direct 32 bit  */
28*a9fa9459Szrj      RELOC_NUMBER (R_386_PC32,      2)	/* PC relative 32 bit */
29*a9fa9459Szrj      RELOC_NUMBER (R_386_GOT32,     3)	/* 32 bit GOT entry */
30*a9fa9459Szrj      RELOC_NUMBER (R_386_PLT32,	    4)	/* 32 bit PLT address */
31*a9fa9459Szrj      RELOC_NUMBER (R_386_COPY,	    5)	/* Copy symbol at runtime */
32*a9fa9459Szrj      RELOC_NUMBER (R_386_GLOB_DAT,  6)	/* Create GOT entry */
33*a9fa9459Szrj      RELOC_NUMBER (R_386_JUMP_SLOT, 7)	/* Create PLT entry */
34*a9fa9459Szrj      RELOC_NUMBER (R_386_RELATIVE,  8)	/* Adjust by program base */
35*a9fa9459Szrj      RELOC_NUMBER (R_386_GOTOFF,    9)	/* 32 bit offset to GOT */
36*a9fa9459Szrj      RELOC_NUMBER (R_386_GOTPC,    10)	/* 32 bit PC relative offset to GOT */
37*a9fa9459Szrj      RELOC_NUMBER (R_386_32PLT,    11)	/* Used by Sun */
38*a9fa9459Szrj      FAKE_RELOC   (FIRST_INVALID_RELOC, 12)
39*a9fa9459Szrj      FAKE_RELOC   (LAST_INVALID_RELOC,  13)
40*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_TPOFF,14)
41*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_IE,   15)
42*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GOTIE,16)
43*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LE,   17)
44*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GD,   18)
45*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDM,  19)
46*a9fa9459Szrj      RELOC_NUMBER (R_386_16,       20)
47*a9fa9459Szrj      RELOC_NUMBER (R_386_PC16,     21)
48*a9fa9459Szrj      RELOC_NUMBER (R_386_8,	   22)
49*a9fa9459Szrj      RELOC_NUMBER (R_386_PC8,      23)
50*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GD_32,    24)
51*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GD_PUSH,  25)
52*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GD_CALL,  26)
53*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GD_POP,   27)
54*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDM_32,   28)
55*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDM_PUSH, 29)
56*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDM_CALL, 30)
57*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDM_POP,  31)
58*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LDO_32,   32)
59*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_IE_32,    33)
60*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_LE_32,    34)
61*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_DTPMOD32, 35)
62*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_DTPOFF32, 36)
63*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_TPOFF32,  37)
64*a9fa9459Szrj      RELOC_NUMBER (R_386_SIZE32,       38) /* 32-bit symbol size */
65*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_GOTDESC,  39)
66*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_DESC_CALL,40)
67*a9fa9459Szrj      RELOC_NUMBER (R_386_TLS_DESC,     41)
68*a9fa9459Szrj      RELOC_NUMBER (R_386_IRELATIVE,    42) /* Adjust indirectly by program base */
69*a9fa9459Szrj      /* Load from 32 bit GOT entry, relaxable.  */
70*a9fa9459Szrj      RELOC_NUMBER (R_386_GOT32X,       43)
71*a9fa9459Szrj 
72*a9fa9459Szrj      /* Used by Intel.  */
73*a9fa9459Szrj      RELOC_NUMBER (R_386_USED_BY_INTEL_200, 200)
74*a9fa9459Szrj 
75*a9fa9459Szrj      /* These are GNU extensions to enable C++ vtable garbage collection.  */
76*a9fa9459Szrj      RELOC_NUMBER (R_386_GNU_VTINHERIT, 250)
77*a9fa9459Szrj      RELOC_NUMBER (R_386_GNU_VTENTRY, 251)
78*a9fa9459Szrj END_RELOC_NUMBERS (R_386_max)
79*a9fa9459Szrj 
80*a9fa9459Szrj #endif
81