Ben Cheng | 25b3c04 | 2013-11-20 14:45:36 -0800 | [diff] [blame] | 1 | /* List the relocation types for ppc. -*- C -*- |
| 2 | Copyright (C) 2005 Red Hat, Inc. |
| 3 | This file is part of Red Hat elfutils. |
| 4 | |
| 5 | Red Hat elfutils is free software; you can redistribute it and/or modify |
| 6 | it under the terms of the GNU General Public License as published by the |
| 7 | Free Software Foundation; version 2 of the License. |
| 8 | |
| 9 | Red Hat elfutils is distributed in the hope that it will be useful, but |
| 10 | WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 | General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License along |
| 15 | with Red Hat elfutils; if not, write to the Free Software Foundation, |
| 16 | Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. |
| 17 | |
| 18 | Red Hat elfutils is an included package of the Open Invention Network. |
| 19 | An included package of the Open Invention Network is a package for which |
| 20 | Open Invention Network licensees cross-license their patents. No patent |
| 21 | license is granted, either expressly or impliedly, by designation as an |
| 22 | included package. Should you wish to participate in the Open Invention |
| 23 | Network licensing program, please visit www.openinventionnetwork.com |
| 24 | <http://www.openinventionnetwork.com>. */ |
| 25 | |
| 26 | /* NAME, REL|EXEC|DYN */ |
| 27 | |
| 28 | RELOC_TYPE (NONE, 0) |
| 29 | RELOC_TYPE (ADDR32, REL|EXEC|DYN) |
| 30 | RELOC_TYPE (ADDR24, REL) |
| 31 | RELOC_TYPE (ADDR16, REL|EXEC|DYN) /* note 1 */ |
| 32 | RELOC_TYPE (ADDR16_LO, REL|EXEC|DYN) /* note 1 */ |
| 33 | RELOC_TYPE (ADDR16_HI, REL|EXEC|DYN) /* note 1 */ |
| 34 | RELOC_TYPE (ADDR16_HA, REL|EXEC|DYN) /* note 1 */ |
| 35 | RELOC_TYPE (ADDR14, REL|EXEC|DYN) /* note 1 */ |
| 36 | RELOC_TYPE (ADDR14_BRTAKEN, REL|EXEC|DYN) /* note 1 */ |
| 37 | RELOC_TYPE (ADDR14_BRNTAKEN, REL|EXEC|DYN) /* note 1 */ |
| 38 | RELOC_TYPE (REL24, REL|EXEC|DYN) /* note 1 */ |
| 39 | RELOC_TYPE (REL14, REL|EXEC|DYN) /* note 1 */ |
| 40 | RELOC_TYPE (REL14_BRTAKEN, REL|EXEC|DYN) /* note 1 */ |
| 41 | RELOC_TYPE (REL14_BRNTAKEN, REL|EXEC|DYN) /* note 1 */ |
| 42 | RELOC_TYPE (GOT16, REL) |
| 43 | RELOC_TYPE (GOT16_LO, REL) |
| 44 | RELOC_TYPE (GOT16_HI, REL) |
| 45 | RELOC_TYPE (GOT16_HA, REL) |
| 46 | RELOC_TYPE (PLTREL24, REL) |
| 47 | RELOC_TYPE (COPY, EXEC) |
| 48 | RELOC_TYPE (GLOB_DAT, EXEC|DYN) |
| 49 | RELOC_TYPE (JMP_SLOT, EXEC|DYN) |
| 50 | RELOC_TYPE (RELATIVE, EXEC|DYN) |
| 51 | RELOC_TYPE (LOCAL24PC, REL) |
| 52 | RELOC_TYPE (UADDR32, REL|EXEC|DYN) |
| 53 | RELOC_TYPE (UADDR16, REL) /* note 2 */ |
| 54 | RELOC_TYPE (REL32, REL|EXEC|DYN) |
| 55 | RELOC_TYPE (PLT32, REL) |
| 56 | RELOC_TYPE (PLTREL32, REL) |
| 57 | RELOC_TYPE (PLT16_LO, REL) |
| 58 | RELOC_TYPE (PLT16_HI, REL) |
| 59 | RELOC_TYPE (PLT16_HA, REL) |
| 60 | RELOC_TYPE (SDAREL16, REL) |
| 61 | RELOC_TYPE (SECTOFF, REL) |
| 62 | RELOC_TYPE (SECTOFF_LO, REL) |
| 63 | RELOC_TYPE (SECTOFF_HI, REL) |
| 64 | RELOC_TYPE (SECTOFF_HA, REL) |
| 65 | RELOC_TYPE (TLS, REL) |
| 66 | RELOC_TYPE (DTPMOD32, EXEC|DYN) /* note 2 */ |
| 67 | RELOC_TYPE (TPREL16, REL) /* note 2 */ |
| 68 | RELOC_TYPE (TPREL16_LO, REL) /* note 2 */ |
| 69 | RELOC_TYPE (TPREL16_HI, REL) /* note 2 */ |
| 70 | RELOC_TYPE (TPREL16_HA, REL) /* note 2 */ |
| 71 | RELOC_TYPE (TPREL32, EXEC|DYN) /* note 2 */ |
| 72 | RELOC_TYPE (DTPREL16, REL) |
| 73 | RELOC_TYPE (DTPREL16_LO, REL) |
| 74 | RELOC_TYPE (DTPREL16_HI, REL) |
| 75 | RELOC_TYPE (DTPREL16_HA, REL) |
| 76 | RELOC_TYPE (DTPREL32, EXEC|DYN) /* note 2 */ |
| 77 | RELOC_TYPE (GOT_TLSGD16, REL) |
| 78 | RELOC_TYPE (GOT_TLSGD16_LO, REL) |
| 79 | RELOC_TYPE (GOT_TLSGD16_HI, REL) |
| 80 | RELOC_TYPE (GOT_TLSGD16_HA, REL) |
| 81 | RELOC_TYPE (GOT_TLSLD16, REL) |
| 82 | RELOC_TYPE (GOT_TLSLD16_LO, REL) |
| 83 | RELOC_TYPE (GOT_TLSLD16_HI, REL) |
| 84 | RELOC_TYPE (GOT_TLSLD16_HA, REL) |
| 85 | RELOC_TYPE (GOT_TPREL16, REL) |
| 86 | RELOC_TYPE (GOT_TPREL16_LO, REL) |
| 87 | RELOC_TYPE (GOT_TPREL16_HI, REL) |
| 88 | RELOC_TYPE (GOT_TPREL16_HA, REL) |
| 89 | RELOC_TYPE (GOT_DTPREL16, REL) |
| 90 | RELOC_TYPE (GOT_DTPREL16_LO, REL) |
| 91 | RELOC_TYPE (GOT_DTPREL16_HI, REL) |
| 92 | RELOC_TYPE (GOT_DTPREL16_HA, REL) |
| 93 | RELOC_TYPE (EMB_NADDR32, REL) /* note 3 */ |
| 94 | RELOC_TYPE (EMB_NADDR16, REL) /* note 3 */ |
| 95 | RELOC_TYPE (EMB_NADDR16_LO, REL) /* note 3 */ |
| 96 | RELOC_TYPE (EMB_NADDR16_HI, REL) /* note 3 */ |
| 97 | RELOC_TYPE (EMB_NADDR16_HA, REL) /* note 3 */ |
| 98 | RELOC_TYPE (EMB_SDAI16, REL) /* note 3 */ |
| 99 | RELOC_TYPE (EMB_SDA2I16, REL) /* note 3 */ |
| 100 | RELOC_TYPE (EMB_SDA2REL, REL) /* note 3 */ |
| 101 | RELOC_TYPE (EMB_SDA21, REL) /* note 3 */ |
| 102 | RELOC_TYPE (EMB_MRKREF, REL) /* note 3 */ |
| 103 | RELOC_TYPE (EMB_RELSEC16, REL) /* note 3 */ |
| 104 | RELOC_TYPE (EMB_RELST_LO, REL) /* note 3 */ |
| 105 | RELOC_TYPE (EMB_RELST_HI, REL) /* note 3 */ |
| 106 | RELOC_TYPE (EMB_RELST_HA, REL) /* note 3 */ |
| 107 | RELOC_TYPE (EMB_BIT_FLD, REL) /* note 3 */ |
| 108 | RELOC_TYPE (EMB_RELSDA, REL) /* note 3 */ |
| 109 | RELOC_TYPE (DIAB_SDA21_LO, REL) /* note 3 */ |
| 110 | RELOC_TYPE (DIAB_SDA21_HI, REL) /* note 3 */ |
| 111 | RELOC_TYPE (DIAB_SDA21_HA, REL) /* note 3 */ |
| 112 | RELOC_TYPE (DIAB_RELSDA_LO, REL) /* note 3 */ |
| 113 | RELOC_TYPE (DIAB_RELSDA_HI, REL) /* note 3 */ |
| 114 | RELOC_TYPE (DIAB_RELSDA_HA, REL) /* note 3 */ |
| 115 | RELOC_TYPE (REL16, REL) /* note 2 */ |
| 116 | RELOC_TYPE (REL16_LO, REL) /* note 2 */ |
| 117 | RELOC_TYPE (REL16_HI, REL) /* note 2 */ |
| 118 | RELOC_TYPE (REL16_HA, REL) /* note 2 */ |
| 119 | RELOC_TYPE (TOC16, REL) /* note 2 */ |
| 120 | |
| 121 | /* Notes from Alan Modra: |
| 122 | |
| 123 | 1) These relocs should not really appear in EXEC or DYN, but they do, |
| 124 | primarily due to improper assembly or non-pic shared objects. They |
| 125 | will cause TEXTREL to be set. I marked them in the table, because |
| 126 | numerous people seem to think non-pic shared libs are a good idea. |
| 127 | |
| 128 | 2) As for (1), these relocs can appear anywhere with improper |
| 129 | assembler. I should probably make ld reject anything other than the |
| 130 | cases allowed in this table. Not seen in the wild, so I haven't |
| 131 | added the other cases. |
| 132 | |
| 133 | 3) Not used in SYSV4 |
| 134 | */ |