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