xref: /freebsd-src/sys/arm/include/reloc.h (revision 29363fb446372cb3f10bc98664e9767c53fbb457)
16fc729afSOlivier Houchard /*-
2*df57947fSPedro F. Giffuni  * SPDX-License-Identifier: BSD-4-Clause
3*df57947fSPedro F. Giffuni  *
46fc729afSOlivier Houchard  * Copyright (c) 1992, 1993
56fc729afSOlivier Houchard  *	The Regents of the University of California.  All rights reserved.
66fc729afSOlivier Houchard  *
76fc729afSOlivier Houchard  * Redistribution and use in source and binary forms, with or without
86fc729afSOlivier Houchard  * modification, are permitted provided that the following conditions
96fc729afSOlivier Houchard  * are met:
106fc729afSOlivier Houchard  * 1. Redistributions of source code must retain the above copyright
116fc729afSOlivier Houchard  *    notice, this list of conditions and the following disclaimer.
126fc729afSOlivier Houchard  * 2. Redistributions in binary form must reproduce the above copyright
136fc729afSOlivier Houchard  *    notice, this list of conditions and the following disclaimer in the
146fc729afSOlivier Houchard  *    documentation and/or other materials provided with the distribution.
156fc729afSOlivier Houchard  * 3. All advertising materials mentioning features or use of this software
166fc729afSOlivier Houchard  *    must display the following acknowledgement:
176fc729afSOlivier Houchard  *	This product includes software developed by the University of
186fc729afSOlivier Houchard  *	California, Berkeley and its contributors.
196fc729afSOlivier Houchard  * 4. Neither the name of the University nor the names of its contributors
206fc729afSOlivier Houchard  *    may be used to endorse or promote products derived from this software
216fc729afSOlivier Houchard  *    without specific prior written permission.
226fc729afSOlivier Houchard  *
236fc729afSOlivier Houchard  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
246fc729afSOlivier Houchard  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
256fc729afSOlivier Houchard  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
266fc729afSOlivier Houchard  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
276fc729afSOlivier Houchard  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
286fc729afSOlivier Houchard  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
296fc729afSOlivier Houchard  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
306fc729afSOlivier Houchard  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
316fc729afSOlivier Houchard  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
326fc729afSOlivier Houchard  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
336fc729afSOlivier Houchard  * SUCH DAMAGE.
346fc729afSOlivier Houchard  */
356fc729afSOlivier Houchard 
366fc729afSOlivier Houchard #ifndef _MACHINE_RELOC_H_
376fc729afSOlivier Houchard #define _MACHINE_RELOC_H_
386fc729afSOlivier Houchard 
396fc729afSOlivier Houchard /* Relocation format. */
406fc729afSOlivier Houchard struct relocation_info {
416fc729afSOlivier Houchard 	int r_address;			  /* offset in text or data segment */
426fc729afSOlivier Houchard 	unsigned int   r_symbolnum : 24,  /* ordinal number of add symbol */
436fc729afSOlivier Houchard 			   r_pcrel :  1,  /* 1 if value should be pc-relative */
446fc729afSOlivier Houchard 			  r_length :  2,  /* log base 2 of value's width */
456fc729afSOlivier Houchard 			  r_extern :  1,  /* 1 if need to add symbol to value */
466fc729afSOlivier Houchard 			 r_baserel :  1,  /* linkage table relative */
476fc729afSOlivier Houchard 			r_jmptable :  1,  /* relocate to jump table */
486fc729afSOlivier Houchard 			r_relative :  1,  /* load address relative */
496fc729afSOlivier Houchard 			    r_copy :  1;  /* run time copy */
506fc729afSOlivier Houchard };
516fc729afSOlivier Houchard 
526fc729afSOlivier Houchard #endif
53