reloc.h revision 1977
179727Sschweikh/*- 281588Sru * Copyright (c) 1992, 1993 379727Sschweikh * The Regents of the University of California. All rights reserved. 471088Sjasone * 571088Sjasone * Redistribution and use in source and binary forms, with or without 671088Sjasone * modification, are permitted provided that the following conditions 771088Sjasone * are met: 871088Sjasone * 1. Redistributions of source code must retain the above copyright 979727Sschweikh * notice, this list of conditions and the following disclaimer. 1071088Sjasone * 2. Redistributions in binary form must reproduce the above copyright 1171088Sjasone * notice, this list of conditions and the following disclaimer in the 1271088Sjasone * documentation and/or other materials provided with the distribution. 1371088Sjasone * 3. All advertising materials mentioning features or use of this software 1471088Sjasone * must display the following acknowledgement: 1571088Sjasone * This product includes software developed by the University of 1671088Sjasone * California, Berkeley and its contributors. 1771088Sjasone * 4. Neither the name of the University nor the names of its contributors 1871088Sjasone * may be used to endorse or promote products derived from this software 1971088Sjasone * without specific prior written permission. 2071088Sjasone * 2171088Sjasone * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2271088Sjasone * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2371088Sjasone * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2471088Sjasone * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2571088Sjasone * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2671088Sjasone * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2771088Sjasone * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2871088Sjasone * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29247812Sdavide * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3071088Sjasone * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3171088Sjasone * SUCH DAMAGE. 3271088Sjasone * 3371088Sjasone * @(#)reloc.h 8.1 (Berkeley) 6/10/93 3471088Sjasone * $Id: reloc.h,v 1.2 1994/08/02 07:38:59 davidg Exp $ 3571088Sjasone */ 3671088Sjasone 3771088Sjasone/* Relocation format. */ 38167373Sjhbstruct relocation_info { 3971088Sjasone int r_address; /* offset in text or data segment */ 40247812Sdavide unsigned int r_symbolnum : 24, /* ordinal number of add symbol */ 4171088Sjasone r_pcrel : 1, /* 1 if value should be pc-relative */ 42247812Sdavide r_length : 2, /* log base 2 of value's width */ 4371088Sjasone r_extern : 1, /* 1 if need to add symbol to value */ 4471088Sjasone r_baserel : 1, /* linkage table relative */ 45126814Sjhb r_jmptable : 1, /* relocate to jump table */ 4671088Sjasone r_relative : 1, /* load address relative */ 4771088Sjasone r_copy : 1; /* run time copy */ 4871088Sjasone}; 4988509Sdavidc