16cda32c0SRodney W. Grimes /*- 2*51369649SPedro F. Giffuni * SPDX-License-Identifier: BSD-3-Clause 3*51369649SPedro F. Giffuni * 46cda32c0SRodney W. Grimes * Copyright (c) 1992, 1993 56cda32c0SRodney W. Grimes * The Regents of the University of California. All rights reserved. 66cda32c0SRodney W. Grimes * 76cda32c0SRodney W. Grimes * Redistribution and use in source and binary forms, with or without 86cda32c0SRodney W. Grimes * modification, are permitted provided that the following conditions 96cda32c0SRodney W. Grimes * are met: 106cda32c0SRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 116cda32c0SRodney W. Grimes * notice, this list of conditions and the following disclaimer. 126cda32c0SRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 136cda32c0SRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 146cda32c0SRodney W. Grimes * documentation and/or other materials provided with the distribution. 15fbbd9655SWarner Losh * 3. Neither the name of the University nor the names of its contributors 166cda32c0SRodney W. Grimes * may be used to endorse or promote products derived from this software 176cda32c0SRodney W. Grimes * without specific prior written permission. 186cda32c0SRodney W. Grimes * 196cda32c0SRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 206cda32c0SRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 216cda32c0SRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 226cda32c0SRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 236cda32c0SRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 246cda32c0SRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 256cda32c0SRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 266cda32c0SRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 276cda32c0SRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 286cda32c0SRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 296cda32c0SRodney W. Grimes * SUCH DAMAGE. 306cda32c0SRodney W. Grimes */ 316cda32c0SRodney W. Grimes 32836dc83bSPaul Richards #ifndef _I386_MACHINE_RELOC_H_ 33836dc83bSPaul Richards #define _I386_MACHINE_RELOC_H_ 34836dc83bSPaul Richards 356cda32c0SRodney W. Grimes /* Relocation format. */ 366cda32c0SRodney W. Grimes struct relocation_info { 376cda32c0SRodney W. Grimes int r_address; /* offset in text or data segment */ 386cda32c0SRodney W. Grimes unsigned int r_symbolnum : 24, /* ordinal number of add symbol */ 396cda32c0SRodney W. Grimes r_pcrel : 1, /* 1 if value should be pc-relative */ 406cda32c0SRodney W. Grimes r_length : 2, /* log base 2 of value's width */ 416cda32c0SRodney W. Grimes r_extern : 1, /* 1 if need to add symbol to value */ 4252cd4384SJordan K. Hubbard r_baserel : 1, /* linkage table relative */ 4352cd4384SJordan K. Hubbard r_jmptable : 1, /* relocate to jump table */ 4452cd4384SJordan K. Hubbard r_relative : 1, /* load address relative */ 4552cd4384SJordan K. Hubbard r_copy : 1; /* run time copy */ 466cda32c0SRodney W. Grimes }; 47836dc83bSPaul Richards 48836dc83bSPaul Richards #endif 49