X86RelocationFunctions.h revision 22add6ff3426df1a85089fe6a6e1597ee3b6f300
1//===- X86RelocationFunction.h --------------------------------------------===//
2//
3//                     The MCLinker Project
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#define DECL_X86_APPLY_RELOC_FUNC(Name) \
11static X86RelocationFactory::Result Name    (Relocation& pEntry, \
12					     X86RelocationFactory& pParent);
13
14#define DECL_X86_APPLY_RELOC_FUNCS \
15DECL_X86_APPLY_RELOC_FUNC(none)             \
16DECL_X86_APPLY_RELOC_FUNC(abs)              \
17DECL_X86_APPLY_RELOC_FUNC(rel)              \
18DECL_X86_APPLY_RELOC_FUNC(plt32)            \
19DECL_X86_APPLY_RELOC_FUNC(got32)            \
20DECL_X86_APPLY_RELOC_FUNC(gotoff32)	        \
21DECL_X86_APPLY_RELOC_FUNC(gotpc32)          \
22DECL_X86_APPLY_RELOC_FUNC(tls_gd)           \
23DECL_X86_APPLY_RELOC_FUNC(tls_ie)           \
24DECL_X86_APPLY_RELOC_FUNC(tls_gotie)        \
25DECL_X86_APPLY_RELOC_FUNC(tls_le)           \
26DECL_X86_APPLY_RELOC_FUNC(tls_ldm)          \
27DECL_X86_APPLY_RELOC_FUNC(tls_ldo_32)       \
28DECL_X86_APPLY_RELOC_FUNC(unsupport)
29
30
31#define DECL_X86_APPLY_RELOC_FUNC_PTRS \
32  { &none,               0, "R_386_NONE"              },  \
33  { &abs,                1, "R_386_32"                },  \
34  { &rel,                2, "R_386_PC32"              },  \
35  { &got32,              3, "R_386_GOT32"             },  \
36  { &plt32,              4, "R_386_PLT32"             },  \
37  { &none,               5, "R_386_COPY"              },  \
38  { &none,               6, "R_386_GLOB_DAT"          },  \
39  { &none,               7, "R_386_JMP_SLOT"          },  \
40  { &none,               8, "R_386_RELATIVE"          },  \
41  { &gotoff32,           9, "R_386_GOTOFF"            },  \
42  { &gotpc32,           10, "R_386_GOTPC"             },  \
43  { &unsupport,         11, "R_386_32PLT"             },  \
44  { &unsupport,         12, ""                        },  \
45  { &unsupport,         13, ""                        },  \
46  { &unsupport,         14, "R_386_TLS_TPOFF"         },  \
47  { &tls_ie,            15, "R_386_TLS_IE"            },  \
48  { &tls_gotie,         16, "R_386_TLS_GOTIE"         },  \
49  { &tls_le,            17, "R_386_TLS_LE"            },  \
50  { &tls_gd,            18, "R_386_TLS_GD"            },  \
51  { &tls_ldm,           19, "R_386_TLS_LDM"           },  \
52  { &abs,               20, "R_386_16"                },  \
53  { &rel,               21, "R_386_PC16"              },  \
54  { &abs,               22, "R_386_8"                 },  \
55  { &rel,               23, "R_386_PC8"               },  \
56  { &unsupport,         24, "R_386_TLS_GD_32"         },  \
57  { &unsupport,         25, "R_386_TLS_GD_PUSH"       },  \
58  { &unsupport,         26, "R_386_TLS_GD_CALL"       },  \
59  { &unsupport,         27, "R_386_TLS_GD_POP"        },  \
60  { &unsupport,         28, "R_386_TLS_LDM_32"        },  \
61  { &unsupport,         29, "R_386_TLS_LDM_PUSH"      },  \
62  { &unsupport,         30, "R_386_TLS_LDM_CALL"      },  \
63  { &unsupport,         31, "R_386_TLS_LDM_POP"       },  \
64  { &tls_ldo_32,        32, "R_386_TLS_LDO_32"        },  \
65  { &unsupport,         33, "R_386_TLS_IE_32"         },  \
66  { &unsupport,         34, "R_386_TLS_LE_32"         },  \
67  { &unsupport,         35, "R_386_TLS_DTPMOD32"      },  \
68  { &unsupport,         36, "R_386_TLS_DTPOFF32"      },  \
69  { &unsupport,         37, "R_386_TLS_TPOFF32"       },  \
70  { &unsupport,         38, ""                        },  \
71  { &unsupport,         39, "R_386_TLS_GOTDESC"       },  \
72  { &unsupport,         40, "R_386_TLS_DESC_CALL"     },  \
73  { &unsupport,         41, "R_386_TLS_DESC"          },  \
74  { &unsupport,         42, "R_386_IRELATIVE"         },  \
75  { &unsupport,         43,  "R_386_NUM"              }
76