Add R_PPC_* entries.
[deliverable/binutils-gdb.git] / include / elf / ppc.h
1 /* PPC ELF support for BFD.
2 Copyright (C) 1995, 1998 Free Software Foundation, Inc.
3
4 By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
5 in the System V Application Binary Interface, PowerPC Processor Supplement
6 and the PowerPC Embedded Application Binary Interface (eabi).
7
8 This file is part of BFD, the Binary File Descriptor library.
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
23
24 /* This file holds definitions specific to the PPC ELF ABI. Note
25 that most of this is not actually implemented by BFD. */
26
27 #ifndef _ELF_PPC_H
28 #define _ELF_PPC_H
29
30 /* Relocations. */
31 #define R_PPC_NONE 0
32 #define R_PPC_ADDR32 1
33 #define R_PPC_ADDR24 2
34 #define R_PPC_ADDR16 3
35 #define R_PPC_ADDR16_LO 4
36 #define R_PPC_ADDR16_HI 5
37 #define R_PPC_ADDR16_HA 6
38 #define R_PPC_ADDR14 7
39 #define R_PPC_ADDR14_BRTAKEN 8
40 #define R_PPC_ADDR14_BRNTAKEN 9
41 #define R_PPC_REL24 10
42 #define R_PPC_REL14 11
43 #define R_PPC_REL14_BRTAKEN 12
44 #define R_PPC_REL14_BRNTAKEN 13
45 #define R_PPC_GOT16 14
46 #define R_PPC_GOT16_LO 15
47 #define R_PPC_GOT16_HI 16
48 #define R_PPC_GOT16_HA 17
49 #define R_PPC_PLTREL24 18
50 #define R_PPC_COPY 19
51 #define R_PPC_GLOB_DAT 20
52 #define R_PPC_JMP_SLOT 21
53 #define R_PPC_RELATIVE 22
54 #define R_PPC_LOCAL24PC 23
55 #define R_PPC_UADDR32 24
56 #define R_PPC_UADDR16 25
57 #define R_PPC_REL32 26
58 #define R_PPC_PLT32 27
59 #define R_PPC_PLTREL32 28
60 #define R_PPC_PLT16_LO 29
61 #define R_PPC_PLT16_HI 30
62 #define R_PPC_PLT16_HA 31
63 #define R_PPC_SDAREL16 32
64 #define R_PPC_SECTOFF 33
65 #define R_PPC_SECTOFF_LO 34
66 #define R_PPC_SECTOFF_HI 35
67 #define R_PPC_SECTOFF_HA 36
68
69 /* The remaining relocs are from the Embedded ELF ABI, and are not
70 in the SVR4 ELF ABI. */
71 #define R_PPC_EMB_NADDR32 101
72 #define R_PPC_EMB_NADDR16 102
73 #define R_PPC_EMB_NADDR16_LO 103
74 #define R_PPC_EMB_NADDR16_HI 104
75 #define R_PPC_EMB_NADDR16_HA 105
76 #define R_PPC_EMB_SDAI16 106
77 #define R_PPC_EMB_SDA2I16 107
78 #define R_PPC_EMB_SDA2REL 108
79 #define R_PPC_EMB_SDA21 109
80 #define R_PPC_EMB_MRKREF 110
81 #define R_PPC_EMB_RELSEC16 111
82 #define R_PPC_EMB_RELST_LO 112
83 #define R_PPC_EMB_RELST_HI 113
84 #define R_PPC_EMB_RELST_HA 114
85 #define R_PPC_EMB_BIT_FLD 115
86 #define R_PPC_EMB_RELSDA 116
87
88 /* This is a phony reloc to handle any old fashioned TOC16 references
89 that may still be in object files. */
90 #define R_PPC_TOC16 255
91
92
93 /* Processor specific flags for the ELF header e_flags field. */
94
95 #define EF_PPC_EMB 0x80000000 /* PowerPC embedded flag */
96
97 /* CYGNUS local bits below */
98 #define EF_PPC_RELOCATABLE 0x00010000 /* PowerPC -mrelocatable flag */
99 #define EF_PPC_RELOCATABLE_LIB 0x00008000 /* PowerPC -mrelocatable-lib flag */
100
101 /* Processor specific section headers, sh_type field */
102
103 #define SHT_ORDERED SHT_HIPROC /* Link editor is to sort the \
104 entries in this section \
105 based on the address \
106 specified in the associated \
107 symbol table entry. */
108
109 /* Processor specific section flags, sh_flags field */
110
111 #define SHF_EXCLUDE 0x80000000 /* Link editor is to exclude \
112 this section from executable \
113 and shared objects that it \
114 builds when those objects \
115 are not to be furhter \
116 relocated. */
117 #endif /* _ELF_PPC_H */
This page took 0.032234 seconds and 5 git commands to generate.