xref: /dflybsd-src/sys/cpu/x86_64/include/reloc.h (revision 2c64e990ea2bb1213bd0758af732469466873ba6)
1b2b3ffcdSSimon Schubert /*-
2b2b3ffcdSSimon Schubert  * Copyright (c) 1992, 1993
3b2b3ffcdSSimon Schubert  *	The Regents of the University of California.  All rights reserved.
4b2b3ffcdSSimon Schubert  *
5b2b3ffcdSSimon Schubert  * Redistribution and use in source and binary forms, with or without
6b2b3ffcdSSimon Schubert  * modification, are permitted provided that the following conditions
7b2b3ffcdSSimon Schubert  * are met:
8b2b3ffcdSSimon Schubert  * 1. Redistributions of source code must retain the above copyright
9b2b3ffcdSSimon Schubert  *    notice, this list of conditions and the following disclaimer.
10b2b3ffcdSSimon Schubert  * 2. Redistributions in binary form must reproduce the above copyright
11b2b3ffcdSSimon Schubert  *    notice, this list of conditions and the following disclaimer in the
12b2b3ffcdSSimon Schubert  *    documentation and/or other materials provided with the distribution.
13*2c64e990Szrj  * 3. Neither the name of the University nor the names of its contributors
14b2b3ffcdSSimon Schubert  *    may be used to endorse or promote products derived from this software
15b2b3ffcdSSimon Schubert  *    without specific prior written permission.
16b2b3ffcdSSimon Schubert  *
17b2b3ffcdSSimon Schubert  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18b2b3ffcdSSimon Schubert  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19b2b3ffcdSSimon Schubert  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20b2b3ffcdSSimon Schubert  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21b2b3ffcdSSimon Schubert  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22b2b3ffcdSSimon Schubert  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23b2b3ffcdSSimon Schubert  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24b2b3ffcdSSimon Schubert  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25b2b3ffcdSSimon Schubert  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26b2b3ffcdSSimon Schubert  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27b2b3ffcdSSimon Schubert  * SUCH DAMAGE.
28b2b3ffcdSSimon Schubert  *
29b2b3ffcdSSimon Schubert  *	@(#)reloc.h	8.1 (Berkeley) 6/10/93
30b2b3ffcdSSimon Schubert  * $FreeBSD: src/sys/amd64/include/reloc.h,v 1.7 1999/08/28 00:44:23 peter Exp $
31b2b3ffcdSSimon Schubert  */
32b2b3ffcdSSimon Schubert 
33b2b3ffcdSSimon Schubert #ifndef _CPU_RELOC_H_
34b2b3ffcdSSimon Schubert #define _CPU_RELOC_H_
35b2b3ffcdSSimon Schubert 
36b2b3ffcdSSimon Schubert /* Relocation format. */
37b2b3ffcdSSimon Schubert struct relocation_info {
38b2b3ffcdSSimon Schubert 	int r_address;			  /* offset in text or data segment */
39b2b3ffcdSSimon Schubert 	unsigned int   r_symbolnum : 24,  /* ordinal number of add symbol */
40b2b3ffcdSSimon Schubert 			   r_pcrel :  1,  /* 1 if value should be pc-relative */
41b2b3ffcdSSimon Schubert 			  r_length :  2,  /* log base 2 of value's width */
42b2b3ffcdSSimon Schubert 			  r_extern :  1,  /* 1 if need to add symbol to value */
43b2b3ffcdSSimon Schubert 			 r_baserel :  1,  /* linkage table relative */
44b2b3ffcdSSimon Schubert 			r_jmptable :  1,  /* relocate to jump table */
45b2b3ffcdSSimon Schubert 			r_relative :  1,  /* load address relative */
46b2b3ffcdSSimon Schubert 			    r_copy :  1;  /* run time copy */
47b2b3ffcdSSimon Schubert };
48b2b3ffcdSSimon Schubert 
49b2b3ffcdSSimon Schubert #endif
50