xref: /illumos-gate/usr/src/lib/libdwarf/common/dwarf_reloc_386.h (revision 8222814ef8560ee0ba222eca8ca5acffc6cd0e44)
1 /*
2   Copyright (C) 2007-2012 David Anderson. All Rights Reserved.
3   Portions Copyright (C) 2012 SN Systems Ltd. All rights reserved.
4 
5   This program is free software; you can redistribute it and/or modify it
6   under the terms of version 2.1 of the GNU Lesser General Public License
7   published by the Free Software Foundation.
8 
9   This program is distributed in the hope that it would be useful, but
10   WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 
13   Further, this software is distributed without any warranty that it is
14   free of the rightful claim of any third person regarding infringement
15   or the like.  Any license provided herein, whether implied or
16   otherwise, applies only to this software file.  Patent licenses, if
17   any, provided herein do not apply to combinations of this program with
18   other software, or any other product whatsoever.
19 
20   You should have received a copy of the GNU Lesser General Public License along
21   with this program; if not, write the Free Software Foundation, Inc., 51
22   Franklin Street - Fifth Floor, Boston MA 02110-1301, USA.
23 */
24 /* The address of the Free Software Foundation is
25    Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
26    Boston, MA 02110-1301, USA.
27 */
28 
29 #ifndef DWARF_RELOC_386_H
30 #define DWARF_RELOC_386_H
31 
32 /* Include the definitions only in the case of Windows */
33 #ifdef _WIN32
34 /* Relocation types for i386 architecture */
35 #define R_386_NONE         0
36 #define R_386_32           1
37 #define R_386_PC32         2
38 #define R_386_GOT32        3
39 #define R_386_PLT32        4
40 #define R_386_COPY         5
41 #define R_386_GLOB_DAT     6
42 #define R_386_JMP_SLOT     7
43 #define R_386_RELATIVE     8
44 #define R_386_GOTOFF       9
45 #define R_386_GOTPC        10
46 #define R_386_32PLT        11
47 #define R_386_TLS_TPOFF    14
48 #define R_386_TLS_IE       15
49 #define R_386_TLS_GOTIE    16
50 #define R_386_TLS_LE       17
51 #define R_386_TLS_LDM      19
52 #define R_386_16           20
53 #define R_386_PC16         21
54 #define R_386_8            22
55 #define R_386_PC8          23
56 #define R_386_TLS_GD_32    24
57 #define R_386_TLS_GD_PUSH  25
58 #define R_386_TLS_GD_CALL  26
59 #define R_386_TLS_GD_POP   27
60 #define R_386_TLS_LDM_32   28
61 #define R_386_TLS_LDM_PUSH 29
62 #define R_386_TLS_LDM_CALL 30
63 #define R_386_TLS_LDM_POP  31
64 #define R_386_TLS_LDO_32   32
65 #define R_386_TLS_IE_32    33
66 #define R_386_TLS_LE_32    34
67 #define R_386_TLS_DTPMOD32 35
68 #define R_386_TLS_DTPOFF32 36
69 #define R_386_TLS_TPOFF32  37
70 #define R_386_SIZE32       38
71 #define R_386_TLS_GOTDESC  39
72 #define R_386_TLS_DESC_CALL 40
73 #define R_386_TLS_DESC     41
74 #define R_386_IRELATIVE    42
75 #define R_386_NUM          43
76 
77 
78 /*  Keep this the last entry.  */
79 #define R_X86_64_NUM             39
80 #endif /* _WIN32 */
81 
82 /* Relocation types for X86_64 */
83 static const char *reloc_type_names_386[] = {
84 "R_386_NONE",
85 "R_386_32",
86 "R_386_PC32",
87 "R_386_GOT32",
88 "R_386_PLT32",
89 "R_386_COPY",        /* 5 */
90 "R_386_GLOB_DAT",
91 "R_386_JMP_SLOT",
92 "R_386_RELATIVE",
93 "R_386_GOTOFF",
94 "R_386_GOTPC",      /*  10 */
95 "R_386_32PLT",
96 "R_386_TLS_TPOFF",
97 "R_386_TLS_IE",
98 "R_386_TLS_GOTIE",
99 "R_386_TLS_LE",
100 "R_386_TLS_LDM",
101 "R_386_16",         /*  20 */
102 "R_386_PC16",
103 "R_386_8",
104 "R_386_PC8",
105 "R_386_TLS_GD_32",
106 "R_386_TLS_GD_PUSH", /* 25 */
107 "R_386_TLS_GD_CALL",
108 "R_386_TLS_GD_POP",
109 "R_386_TLS_LDM_32",
110 "R_386_TLS_LDM_PUSH",
111 "R_386_TLS_LDM_CALL", /* 30 */
112 "R_386_TLS_LDM_POP",
113 "R_386_TLS_LDO_32",
114 "R_386_TLS_IE_32",
115 "R_386_TLS_LE_32",
116 "R_386_TLS_DTPMOD32", /* 35 */
117 "R_386_TLS_DTPOFF32",
118 "R_386_TLS_TPOFF32",
119 "R_386_SIZE32",
120 "R_386_TLS_GOTDESC",
121 "R_386_TLS_DESC_CALL", /* 40 */
122 "R_386_TLS_DESC",
123 "R_386_IRELATIVE",   /* 42 */
124 };
125 #endif /* DWARF_RELOC_386_H */
126