home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / include / mach-o / ppc / reloc.h next >
Encoding:
C/C++ Source or Header  |  2001-09-14  |  2.7 KB  |  57 lines

  1. /*
  2.  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  3.  *
  4.  * @APPLE_LICENSE_HEADER_START@
  5.  * 
  6.  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
  7.  * Reserved.  This file contains Original Code and/or Modifications of
  8.  * Original Code as defined in and that are subject to the Apple Public
  9.  * Source License Version 1.1 (the "License").  You may not use this file
  10.  * except in compliance with the License.  Please obtain a copy of the
  11.  * License at http://www.apple.com/publicsource and read it before using
  12.  * this file.
  13.  * 
  14.  * The Original Code and all software distributed under the License are
  15.  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  16.  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  17.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  18.  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
  19.  * License for the specific language governing rights and limitations
  20.  * under the License.
  21.  * 
  22.  * @APPLE_LICENSE_HEADER_END@
  23.  */
  24. /*
  25.  * Relocation types used in the ppc implementation.  Relocation entries for
  26.  * things other than instructions use the same generic relocation as discribed
  27.  * above and their r_type is RELOC_VANILLA.  The rest of the relocation types
  28.  * are for instructions.  Since they are for instructions the r_address field
  29.  * indicates the 32 bit instruction that the relocation is to be preformed on.
  30.  * The fields r_pcrel and r_length are ignored for non-RELOC_VANILLA r_types.
  31.  */
  32. enum reloc_type_ppc
  33. {
  34.     PPC_RELOC_VANILLA,    /* generic relocation as discribed above */
  35.     PPC_RELOC_PAIR,    /* the second relocation entry of a pair */
  36.     PPC_RELOC_BR14,    /* 14 bit branch displacement (to a word address) */
  37.     PPC_RELOC_BR24,    /* 24 bit branch displacement (to a word address) */
  38.     PPC_RELOC_HI16,    /* a PAIR follows with the low half */
  39.     PPC_RELOC_LO16,    /* a PAIR follows with the high half */
  40.     PPC_RELOC_HA16,    /* Same as the RELOC_HI16 except the low 16 bits and the
  41.              * high 16 bits are added together with the low 16 bits
  42.              * sign extened first.  This means if bit 15 of the low
  43.              * 16 bits is set the high 16 bits stored in the
  44.              * instruction will be adjusted.
  45.              */
  46.     PPC_RELOC_LO14,    /* Same as the LO16 except that the low 2 bits are not
  47.              * stored in the instruction and are always zero.  This
  48.              * is used for in double word load/store instructons.
  49.              */
  50.     PPC_RELOC_SECTDIFF,    /* a PAIR follows with subtract symbol value */
  51.     PPC_RELOC_PB_LA_PTR,/* prebound lazy pointer */
  52.     PPC_RELOC_HI16_SECTDIFF, /* section difference forms of above.  a PAIR */
  53.     PPC_RELOC_LO16_SECTDIFF, /* follows these with subtract symbol value */
  54.     PPC_RELOC_HA16_SECTDIFF,
  55.     PPC_RELOC_JBSR
  56. };
  57.