xref: /openbsd/sys/arch/amd64/include/reloc.h (revision 46b53b64)
1 /* $OpenBSD: reloc.h,v 1.4 2018/10/20 11:56:31 kettenis Exp $ */
2 
3 /*
4  * Copyright (c) 2002,2003 Dale Rahn
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  * 1. Redistributions of source code must retain the above copyright
10  *    notice, this list of conditions and the following disclaimer.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the distribution.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
16  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
19  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25  * SUCH DAMAGE.
26  */
27 #ifndef  _MACHINE_RELOC_H_
28 #define  _MACHINE_RELOC_H_
29 
30 #define R_TYPE(X)       __CONCAT(R_X86_64_,X)
31 
32 #define R_X86_64_NONE		0
33 #define R_X86_64_64		1
34 #define R_X86_64_PC32		2
35 #define R_X86_64_GOT32		3
36 #define R_X86_64_PLT32		4
37 #define R_X86_64_COPY		5
38 #define R_X86_64_GLOB_DAT	6
39 #define R_X86_64_JUMP_SLOT	7
40 #define R_X86_64_RELATIVE	8
41 #define R_X86_64_GOTPCREL	9
42 #define R_X86_64_32		10
43 #define R_X86_64_32S		11
44 #define R_X86_64_16		12
45 #define R_X86_64_PC16		13
46 #define R_X86_64_8		14
47 #define R_X86_64_PC8		15
48 #define R_X86_64_DTPMOD64	16
49 #define R_X86_64_DTPOFF64	17
50 #define R_X86_64_TPOFF64	18
51 #define R_X86_64_TLSGD		19
52 #define R_X86_64_TLSLD		20
53 #define R_X86_64_DTPOFF32	21
54 #define R_X86_64_GOTTPOFF	22
55 #define R_X86_64_TPOFF32	23
56 
57 #define R_386_NONE		0
58 #define R_386_32		1
59 #define R_386_PC32		2
60 #define R_386_GOT32		3
61 #define R_386_PLT32		4
62 #define R_386_COPY		5
63 #define R_386_GLOB_DAT		6
64 #define R_386_JMP_SLOT		7
65 #define R_386_RELATIVE		8
66 #define R_386_GOTOFF		9
67 #define R_386_GOTPC		10
68 
69 #endif /* _MACHINE_RELOC_H_ */
70