xref: /dragonfly/contrib/binutils-2.27/bfd/reloc.c (revision a9fa9459)
1*a9fa9459Szrj /* BFD support for handling relocation entries.
2*a9fa9459Szrj    Copyright (C) 1990-2016 Free Software Foundation, Inc.
3*a9fa9459Szrj    Written by Cygnus Support.
4*a9fa9459Szrj 
5*a9fa9459Szrj    This file is part of BFD, the Binary File Descriptor library.
6*a9fa9459Szrj 
7*a9fa9459Szrj    This program is free software; you can redistribute it and/or modify
8*a9fa9459Szrj    it under the terms of the GNU General Public License as published by
9*a9fa9459Szrj    the Free Software Foundation; either version 3 of the License, or
10*a9fa9459Szrj    (at your option) any later version.
11*a9fa9459Szrj 
12*a9fa9459Szrj    This program is distributed in the hope that it will be useful,
13*a9fa9459Szrj    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*a9fa9459Szrj    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*a9fa9459Szrj    GNU General Public License for more details.
16*a9fa9459Szrj 
17*a9fa9459Szrj    You should have received a copy of the GNU General Public License
18*a9fa9459Szrj    along with this program; if not, write to the Free Software
19*a9fa9459Szrj    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
20*a9fa9459Szrj    MA 02110-1301, USA.  */
21*a9fa9459Szrj 
22*a9fa9459Szrj /*
23*a9fa9459Szrj SECTION
24*a9fa9459Szrj 	Relocations
25*a9fa9459Szrj 
26*a9fa9459Szrj 	BFD maintains relocations in much the same way it maintains
27*a9fa9459Szrj 	symbols: they are left alone until required, then read in
28*a9fa9459Szrj 	en-masse and translated into an internal form.  A common
29*a9fa9459Szrj 	routine <<bfd_perform_relocation>> acts upon the
30*a9fa9459Szrj 	canonical form to do the fixup.
31*a9fa9459Szrj 
32*a9fa9459Szrj 	Relocations are maintained on a per section basis,
33*a9fa9459Szrj 	while symbols are maintained on a per BFD basis.
34*a9fa9459Szrj 
35*a9fa9459Szrj 	All that a back end has to do to fit the BFD interface is to create
36*a9fa9459Szrj 	a <<struct reloc_cache_entry>> for each relocation
37*a9fa9459Szrj 	in a particular section, and fill in the right bits of the structures.
38*a9fa9459Szrj 
39*a9fa9459Szrj @menu
40*a9fa9459Szrj @* typedef arelent::
41*a9fa9459Szrj @* howto manager::
42*a9fa9459Szrj @end menu
43*a9fa9459Szrj 
44*a9fa9459Szrj */
45*a9fa9459Szrj 
46*a9fa9459Szrj /* DO compile in the reloc_code name table from libbfd.h.  */
47*a9fa9459Szrj #define _BFD_MAKE_TABLE_bfd_reloc_code_real
48*a9fa9459Szrj 
49*a9fa9459Szrj #include "sysdep.h"
50*a9fa9459Szrj #include "bfd.h"
51*a9fa9459Szrj #include "bfdlink.h"
52*a9fa9459Szrj #include "libbfd.h"
53*a9fa9459Szrj /*
54*a9fa9459Szrj DOCDD
55*a9fa9459Szrj INODE
56*a9fa9459Szrj 	typedef arelent, howto manager, Relocations, Relocations
57*a9fa9459Szrj 
58*a9fa9459Szrj SUBSECTION
59*a9fa9459Szrj 	typedef arelent
60*a9fa9459Szrj 
61*a9fa9459Szrj 	This is the structure of a relocation entry:
62*a9fa9459Szrj 
63*a9fa9459Szrj CODE_FRAGMENT
64*a9fa9459Szrj .
65*a9fa9459Szrj .typedef enum bfd_reloc_status
66*a9fa9459Szrj .{
67*a9fa9459Szrj .  {* No errors detected.  *}
68*a9fa9459Szrj .  bfd_reloc_ok,
69*a9fa9459Szrj .
70*a9fa9459Szrj .  {* The relocation was performed, but there was an overflow.  *}
71*a9fa9459Szrj .  bfd_reloc_overflow,
72*a9fa9459Szrj .
73*a9fa9459Szrj .  {* The address to relocate was not within the section supplied.  *}
74*a9fa9459Szrj .  bfd_reloc_outofrange,
75*a9fa9459Szrj .
76*a9fa9459Szrj .  {* Used by special functions.  *}
77*a9fa9459Szrj .  bfd_reloc_continue,
78*a9fa9459Szrj .
79*a9fa9459Szrj .  {* Unsupported relocation size requested.  *}
80*a9fa9459Szrj .  bfd_reloc_notsupported,
81*a9fa9459Szrj .
82*a9fa9459Szrj .  {* Unused.  *}
83*a9fa9459Szrj .  bfd_reloc_other,
84*a9fa9459Szrj .
85*a9fa9459Szrj .  {* The symbol to relocate against was undefined.  *}
86*a9fa9459Szrj .  bfd_reloc_undefined,
87*a9fa9459Szrj .
88*a9fa9459Szrj .  {* The relocation was performed, but may not be ok - presently
89*a9fa9459Szrj .     generated only when linking i960 coff files with i960 b.out
90*a9fa9459Szrj .     symbols.  If this type is returned, the error_message argument
91*a9fa9459Szrj .     to bfd_perform_relocation will be set.  *}
92*a9fa9459Szrj .  bfd_reloc_dangerous
93*a9fa9459Szrj . }
94*a9fa9459Szrj . bfd_reloc_status_type;
95*a9fa9459Szrj .
96*a9fa9459Szrj .
97*a9fa9459Szrj .typedef struct reloc_cache_entry
98*a9fa9459Szrj .{
99*a9fa9459Szrj .  {* A pointer into the canonical table of pointers.  *}
100*a9fa9459Szrj .  struct bfd_symbol **sym_ptr_ptr;
101*a9fa9459Szrj .
102*a9fa9459Szrj .  {* offset in section.  *}
103*a9fa9459Szrj .  bfd_size_type address;
104*a9fa9459Szrj .
105*a9fa9459Szrj .  {* addend for relocation value.  *}
106*a9fa9459Szrj .  bfd_vma addend;
107*a9fa9459Szrj .
108*a9fa9459Szrj .  {* Pointer to how to perform the required relocation.  *}
109*a9fa9459Szrj .  reloc_howto_type *howto;
110*a9fa9459Szrj .
111*a9fa9459Szrj .}
112*a9fa9459Szrj .arelent;
113*a9fa9459Szrj .
114*a9fa9459Szrj */
115*a9fa9459Szrj 
116*a9fa9459Szrj /*
117*a9fa9459Szrj DESCRIPTION
118*a9fa9459Szrj 
119*a9fa9459Szrj         Here is a description of each of the fields within an <<arelent>>:
120*a9fa9459Szrj 
121*a9fa9459Szrj         o <<sym_ptr_ptr>>
122*a9fa9459Szrj 
123*a9fa9459Szrj         The symbol table pointer points to a pointer to the symbol
124*a9fa9459Szrj         associated with the relocation request.  It is the pointer
125*a9fa9459Szrj         into the table returned by the back end's
126*a9fa9459Szrj         <<canonicalize_symtab>> action. @xref{Symbols}. The symbol is
127*a9fa9459Szrj         referenced through a pointer to a pointer so that tools like
128*a9fa9459Szrj         the linker can fix up all the symbols of the same name by
129*a9fa9459Szrj         modifying only one pointer. The relocation routine looks in
130*a9fa9459Szrj         the symbol and uses the base of the section the symbol is
131*a9fa9459Szrj         attached to and the value of the symbol as the initial
132*a9fa9459Szrj         relocation offset. If the symbol pointer is zero, then the
133*a9fa9459Szrj         section provided is looked up.
134*a9fa9459Szrj 
135*a9fa9459Szrj         o <<address>>
136*a9fa9459Szrj 
137*a9fa9459Szrj         The <<address>> field gives the offset in bytes from the base of
138*a9fa9459Szrj         the section data which owns the relocation record to the first
139*a9fa9459Szrj         byte of relocatable information. The actual data relocated
140*a9fa9459Szrj         will be relative to this point; for example, a relocation
141*a9fa9459Szrj         type which modifies the bottom two bytes of a four byte word
142*a9fa9459Szrj         would not touch the first byte pointed to in a big endian
143*a9fa9459Szrj         world.
144*a9fa9459Szrj 
145*a9fa9459Szrj 	o <<addend>>
146*a9fa9459Szrj 
147*a9fa9459Szrj 	The <<addend>> is a value provided by the back end to be added (!)
148*a9fa9459Szrj 	to the relocation offset. Its interpretation is dependent upon
149*a9fa9459Szrj 	the howto. For example, on the 68k the code:
150*a9fa9459Szrj 
151*a9fa9459Szrj |        char foo[];
152*a9fa9459Szrj |        main()
153*a9fa9459Szrj |                {
154*a9fa9459Szrj |                return foo[0x12345678];
155*a9fa9459Szrj |                }
156*a9fa9459Szrj 
157*a9fa9459Szrj         Could be compiled into:
158*a9fa9459Szrj 
159*a9fa9459Szrj |        linkw fp,#-4
160*a9fa9459Szrj |        moveb @@#12345678,d0
161*a9fa9459Szrj |        extbl d0
162*a9fa9459Szrj |        unlk fp
163*a9fa9459Szrj |        rts
164*a9fa9459Szrj 
165*a9fa9459Szrj         This could create a reloc pointing to <<foo>>, but leave the
166*a9fa9459Szrj         offset in the data, something like:
167*a9fa9459Szrj 
168*a9fa9459Szrj |RELOCATION RECORDS FOR [.text]:
169*a9fa9459Szrj |offset   type      value
170*a9fa9459Szrj |00000006 32        _foo
171*a9fa9459Szrj |
172*a9fa9459Szrj |00000000 4e56 fffc          ; linkw fp,#-4
173*a9fa9459Szrj |00000004 1039 1234 5678     ; moveb @@#12345678,d0
174*a9fa9459Szrj |0000000a 49c0               ; extbl d0
175*a9fa9459Szrj |0000000c 4e5e               ; unlk fp
176*a9fa9459Szrj |0000000e 4e75               ; rts
177*a9fa9459Szrj 
178*a9fa9459Szrj         Using coff and an 88k, some instructions don't have enough
179*a9fa9459Szrj         space in them to represent the full address range, and
180*a9fa9459Szrj         pointers have to be loaded in two parts. So you'd get something like:
181*a9fa9459Szrj 
182*a9fa9459Szrj |        or.u     r13,r0,hi16(_foo+0x12345678)
183*a9fa9459Szrj |        ld.b     r2,r13,lo16(_foo+0x12345678)
184*a9fa9459Szrj |        jmp      r1
185*a9fa9459Szrj 
186*a9fa9459Szrj         This should create two relocs, both pointing to <<_foo>>, and with
187*a9fa9459Szrj         0x12340000 in their addend field. The data would consist of:
188*a9fa9459Szrj 
189*a9fa9459Szrj |RELOCATION RECORDS FOR [.text]:
190*a9fa9459Szrj |offset   type      value
191*a9fa9459Szrj |00000002 HVRT16    _foo+0x12340000
192*a9fa9459Szrj |00000006 LVRT16    _foo+0x12340000
193*a9fa9459Szrj |
194*a9fa9459Szrj |00000000 5da05678           ; or.u r13,r0,0x5678
195*a9fa9459Szrj |00000004 1c4d5678           ; ld.b r2,r13,0x5678
196*a9fa9459Szrj |00000008 f400c001           ; jmp r1
197*a9fa9459Szrj 
198*a9fa9459Szrj         The relocation routine digs out the value from the data, adds
199*a9fa9459Szrj         it to the addend to get the original offset, and then adds the
200*a9fa9459Szrj         value of <<_foo>>. Note that all 32 bits have to be kept around
201*a9fa9459Szrj         somewhere, to cope with carry from bit 15 to bit 16.
202*a9fa9459Szrj 
203*a9fa9459Szrj         One further example is the sparc and the a.out format. The
204*a9fa9459Szrj         sparc has a similar problem to the 88k, in that some
205*a9fa9459Szrj         instructions don't have room for an entire offset, but on the
206*a9fa9459Szrj         sparc the parts are created in odd sized lumps. The designers of
207*a9fa9459Szrj         the a.out format chose to not use the data within the section
208*a9fa9459Szrj         for storing part of the offset; all the offset is kept within
209*a9fa9459Szrj         the reloc. Anything in the data should be ignored.
210*a9fa9459Szrj 
211*a9fa9459Szrj |        save %sp,-112,%sp
212*a9fa9459Szrj |        sethi %hi(_foo+0x12345678),%g2
213*a9fa9459Szrj |        ldsb [%g2+%lo(_foo+0x12345678)],%i0
214*a9fa9459Szrj |        ret
215*a9fa9459Szrj |        restore
216*a9fa9459Szrj 
217*a9fa9459Szrj         Both relocs contain a pointer to <<foo>>, and the offsets
218*a9fa9459Szrj         contain junk.
219*a9fa9459Szrj 
220*a9fa9459Szrj |RELOCATION RECORDS FOR [.text]:
221*a9fa9459Szrj |offset   type      value
222*a9fa9459Szrj |00000004 HI22      _foo+0x12345678
223*a9fa9459Szrj |00000008 LO10      _foo+0x12345678
224*a9fa9459Szrj |
225*a9fa9459Szrj |00000000 9de3bf90     ; save %sp,-112,%sp
226*a9fa9459Szrj |00000004 05000000     ; sethi %hi(_foo+0),%g2
227*a9fa9459Szrj |00000008 f048a000     ; ldsb [%g2+%lo(_foo+0)],%i0
228*a9fa9459Szrj |0000000c 81c7e008     ; ret
229*a9fa9459Szrj |00000010 81e80000     ; restore
230*a9fa9459Szrj 
231*a9fa9459Szrj         o <<howto>>
232*a9fa9459Szrj 
233*a9fa9459Szrj         The <<howto>> field can be imagined as a
234*a9fa9459Szrj         relocation instruction. It is a pointer to a structure which
235*a9fa9459Szrj         contains information on what to do with all of the other
236*a9fa9459Szrj         information in the reloc record and data section. A back end
237*a9fa9459Szrj         would normally have a relocation instruction set and turn
238*a9fa9459Szrj         relocations into pointers to the correct structure on input -
239*a9fa9459Szrj         but it would be possible to create each howto field on demand.
240*a9fa9459Szrj 
241*a9fa9459Szrj */
242*a9fa9459Szrj 
243*a9fa9459Szrj /*
244*a9fa9459Szrj SUBSUBSECTION
245*a9fa9459Szrj 	<<enum complain_overflow>>
246*a9fa9459Szrj 
247*a9fa9459Szrj 	Indicates what sort of overflow checking should be done when
248*a9fa9459Szrj 	performing a relocation.
249*a9fa9459Szrj 
250*a9fa9459Szrj CODE_FRAGMENT
251*a9fa9459Szrj .
252*a9fa9459Szrj .enum complain_overflow
253*a9fa9459Szrj .{
254*a9fa9459Szrj .  {* Do not complain on overflow.  *}
255*a9fa9459Szrj .  complain_overflow_dont,
256*a9fa9459Szrj .
257*a9fa9459Szrj .  {* Complain if the value overflows when considered as a signed
258*a9fa9459Szrj .     number one bit larger than the field.  ie. A bitfield of N bits
259*a9fa9459Szrj .     is allowed to represent -2**n to 2**n-1.  *}
260*a9fa9459Szrj .  complain_overflow_bitfield,
261*a9fa9459Szrj .
262*a9fa9459Szrj .  {* Complain if the value overflows when considered as a signed
263*a9fa9459Szrj .     number.  *}
264*a9fa9459Szrj .  complain_overflow_signed,
265*a9fa9459Szrj .
266*a9fa9459Szrj .  {* Complain if the value overflows when considered as an
267*a9fa9459Szrj .     unsigned number.  *}
268*a9fa9459Szrj .  complain_overflow_unsigned
269*a9fa9459Szrj .};
270*a9fa9459Szrj 
271*a9fa9459Szrj */
272*a9fa9459Szrj 
273*a9fa9459Szrj /*
274*a9fa9459Szrj SUBSUBSECTION
275*a9fa9459Szrj         <<reloc_howto_type>>
276*a9fa9459Szrj 
277*a9fa9459Szrj         The <<reloc_howto_type>> is a structure which contains all the
278*a9fa9459Szrj         information that libbfd needs to know to tie up a back end's data.
279*a9fa9459Szrj 
280*a9fa9459Szrj CODE_FRAGMENT
281*a9fa9459Szrj .struct bfd_symbol;		{* Forward declaration.  *}
282*a9fa9459Szrj .
283*a9fa9459Szrj .struct reloc_howto_struct
284*a9fa9459Szrj .{
285*a9fa9459Szrj .  {*  The type field has mainly a documentary use - the back end can
286*a9fa9459Szrj .      do what it wants with it, though normally the back end's
287*a9fa9459Szrj .      external idea of what a reloc number is stored
288*a9fa9459Szrj .      in this field.  For example, a PC relative word relocation
289*a9fa9459Szrj .      in a coff environment has the type 023 - because that's
290*a9fa9459Szrj .      what the outside world calls a R_PCRWORD reloc.  *}
291*a9fa9459Szrj .  unsigned int type;
292*a9fa9459Szrj .
293*a9fa9459Szrj .  {*  The value the final relocation is shifted right by.  This drops
294*a9fa9459Szrj .      unwanted data from the relocation.  *}
295*a9fa9459Szrj .  unsigned int rightshift;
296*a9fa9459Szrj .
297*a9fa9459Szrj .  {*  The size of the item to be relocated.  This is *not* a
298*a9fa9459Szrj .      power-of-two measure.  To get the number of bytes operated
299*a9fa9459Szrj .      on by a type of relocation, use bfd_get_reloc_size.  *}
300*a9fa9459Szrj .  int size;
301*a9fa9459Szrj .
302*a9fa9459Szrj .  {*  The number of bits in the item to be relocated.  This is used
303*a9fa9459Szrj .      when doing overflow checking.  *}
304*a9fa9459Szrj .  unsigned int bitsize;
305*a9fa9459Szrj .
306*a9fa9459Szrj .  {*  The relocation is relative to the field being relocated.  *}
307*a9fa9459Szrj .  bfd_boolean pc_relative;
308*a9fa9459Szrj .
309*a9fa9459Szrj .  {*  The bit position of the reloc value in the destination.
310*a9fa9459Szrj .      The relocated value is left shifted by this amount.  *}
311*a9fa9459Szrj .  unsigned int bitpos;
312*a9fa9459Szrj .
313*a9fa9459Szrj .  {* What type of overflow error should be checked for when
314*a9fa9459Szrj .     relocating.  *}
315*a9fa9459Szrj .  enum complain_overflow complain_on_overflow;
316*a9fa9459Szrj .
317*a9fa9459Szrj .  {* If this field is non null, then the supplied function is
318*a9fa9459Szrj .     called rather than the normal function.  This allows really
319*a9fa9459Szrj .     strange relocation methods to be accommodated (e.g., i960 callj
320*a9fa9459Szrj .     instructions).  *}
321*a9fa9459Szrj .  bfd_reloc_status_type (*special_function)
322*a9fa9459Szrj .    (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
323*a9fa9459Szrj .     bfd *, char **);
324*a9fa9459Szrj .
325*a9fa9459Szrj .  {* The textual name of the relocation type.  *}
326*a9fa9459Szrj .  char *name;
327*a9fa9459Szrj .
328*a9fa9459Szrj .  {* Some formats record a relocation addend in the section contents
329*a9fa9459Szrj .     rather than with the relocation.  For ELF formats this is the
330*a9fa9459Szrj .     distinction between USE_REL and USE_RELA (though the code checks
331*a9fa9459Szrj .     for USE_REL == 1/0).  The value of this field is TRUE if the
332*a9fa9459Szrj .     addend is recorded with the section contents; when performing a
333*a9fa9459Szrj .     partial link (ld -r) the section contents (the data) will be
334*a9fa9459Szrj .     modified.  The value of this field is FALSE if addends are
335*a9fa9459Szrj .     recorded with the relocation (in arelent.addend); when performing
336*a9fa9459Szrj .     a partial link the relocation will be modified.
337*a9fa9459Szrj .     All relocations for all ELF USE_RELA targets should set this field
338*a9fa9459Szrj .     to FALSE (values of TRUE should be looked on with suspicion).
339*a9fa9459Szrj .     However, the converse is not true: not all relocations of all ELF
340*a9fa9459Szrj .     USE_REL targets set this field to TRUE.  Why this is so is peculiar
341*a9fa9459Szrj .     to each particular target.  For relocs that aren't used in partial
342*a9fa9459Szrj .     links (e.g. GOT stuff) it doesn't matter what this is set to.  *}
343*a9fa9459Szrj .  bfd_boolean partial_inplace;
344*a9fa9459Szrj .
345*a9fa9459Szrj .  {* src_mask selects the part of the instruction (or data) to be used
346*a9fa9459Szrj .     in the relocation sum.  If the target relocations don't have an
347*a9fa9459Szrj .     addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
348*a9fa9459Szrj .     dst_mask to extract the addend from the section contents.  If
349*a9fa9459Szrj .     relocations do have an addend in the reloc, eg. ELF USE_RELA, this
350*a9fa9459Szrj .     field should be zero.  Non-zero values for ELF USE_RELA targets are
351*a9fa9459Szrj .     bogus as in those cases the value in the dst_mask part of the
352*a9fa9459Szrj .     section contents should be treated as garbage.  *}
353*a9fa9459Szrj .  bfd_vma src_mask;
354*a9fa9459Szrj .
355*a9fa9459Szrj .  {* dst_mask selects which parts of the instruction (or data) are
356*a9fa9459Szrj .     replaced with a relocated value.  *}
357*a9fa9459Szrj .  bfd_vma dst_mask;
358*a9fa9459Szrj .
359*a9fa9459Szrj .  {* When some formats create PC relative instructions, they leave
360*a9fa9459Szrj .     the value of the pc of the place being relocated in the offset
361*a9fa9459Szrj .     slot of the instruction, so that a PC relative relocation can
362*a9fa9459Szrj .     be made just by adding in an ordinary offset (e.g., sun3 a.out).
363*a9fa9459Szrj .     Some formats leave the displacement part of an instruction
364*a9fa9459Szrj .     empty (e.g., m88k bcs); this flag signals the fact.  *}
365*a9fa9459Szrj .  bfd_boolean pcrel_offset;
366*a9fa9459Szrj .};
367*a9fa9459Szrj .
368*a9fa9459Szrj */
369*a9fa9459Szrj 
370*a9fa9459Szrj /*
371*a9fa9459Szrj FUNCTION
372*a9fa9459Szrj 	The HOWTO Macro
373*a9fa9459Szrj 
374*a9fa9459Szrj DESCRIPTION
375*a9fa9459Szrj 	The HOWTO define is horrible and will go away.
376*a9fa9459Szrj 
377*a9fa9459Szrj .#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
378*a9fa9459Szrj .  { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
379*a9fa9459Szrj 
380*a9fa9459Szrj DESCRIPTION
381*a9fa9459Szrj 	And will be replaced with the totally magic way. But for the
382*a9fa9459Szrj 	moment, we are compatible, so do it this way.
383*a9fa9459Szrj 
384*a9fa9459Szrj .#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
385*a9fa9459Szrj .  HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
386*a9fa9459Szrj .         NAME, FALSE, 0, 0, IN)
387*a9fa9459Szrj .
388*a9fa9459Szrj 
389*a9fa9459Szrj DESCRIPTION
390*a9fa9459Szrj 	This is used to fill in an empty howto entry in an array.
391*a9fa9459Szrj 
392*a9fa9459Szrj .#define EMPTY_HOWTO(C) \
393*a9fa9459Szrj .  HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
394*a9fa9459Szrj .         NULL, FALSE, 0, 0, FALSE)
395*a9fa9459Szrj .
396*a9fa9459Szrj 
397*a9fa9459Szrj DESCRIPTION
398*a9fa9459Szrj 	Helper routine to turn a symbol into a relocation value.
399*a9fa9459Szrj 
400*a9fa9459Szrj .#define HOWTO_PREPARE(relocation, symbol)               \
401*a9fa9459Szrj .  {                                                     \
402*a9fa9459Szrj .    if (symbol != NULL)                                 \
403*a9fa9459Szrj .      {                                                 \
404*a9fa9459Szrj .        if (bfd_is_com_section (symbol->section))       \
405*a9fa9459Szrj .          {                                             \
406*a9fa9459Szrj .            relocation = 0;                             \
407*a9fa9459Szrj .          }                                             \
408*a9fa9459Szrj .        else                                            \
409*a9fa9459Szrj .          {                                             \
410*a9fa9459Szrj .            relocation = symbol->value;                 \
411*a9fa9459Szrj .          }                                             \
412*a9fa9459Szrj .      }                                                 \
413*a9fa9459Szrj .  }
414*a9fa9459Szrj .
415*a9fa9459Szrj */
416*a9fa9459Szrj 
417*a9fa9459Szrj /*
418*a9fa9459Szrj FUNCTION
419*a9fa9459Szrj 	bfd_get_reloc_size
420*a9fa9459Szrj 
421*a9fa9459Szrj SYNOPSIS
422*a9fa9459Szrj 	unsigned int bfd_get_reloc_size (reloc_howto_type *);
423*a9fa9459Szrj 
424*a9fa9459Szrj DESCRIPTION
425*a9fa9459Szrj 	For a reloc_howto_type that operates on a fixed number of bytes,
426*a9fa9459Szrj 	this returns the number of bytes operated on.
427*a9fa9459Szrj  */
428*a9fa9459Szrj 
429*a9fa9459Szrj unsigned int
bfd_get_reloc_size(reloc_howto_type * howto)430*a9fa9459Szrj bfd_get_reloc_size (reloc_howto_type *howto)
431*a9fa9459Szrj {
432*a9fa9459Szrj   switch (howto->size)
433*a9fa9459Szrj     {
434*a9fa9459Szrj     case 0: return 1;
435*a9fa9459Szrj     case 1: return 2;
436*a9fa9459Szrj     case 2: return 4;
437*a9fa9459Szrj     case 3: return 0;
438*a9fa9459Szrj     case 4: return 8;
439*a9fa9459Szrj     case 8: return 16;
440*a9fa9459Szrj     case -1: return 2;
441*a9fa9459Szrj     case -2: return 4;
442*a9fa9459Szrj     default: abort ();
443*a9fa9459Szrj     }
444*a9fa9459Szrj }
445*a9fa9459Szrj 
446*a9fa9459Szrj /*
447*a9fa9459Szrj TYPEDEF
448*a9fa9459Szrj 	arelent_chain
449*a9fa9459Szrj 
450*a9fa9459Szrj DESCRIPTION
451*a9fa9459Szrj 
452*a9fa9459Szrj 	How relocs are tied together in an <<asection>>:
453*a9fa9459Szrj 
454*a9fa9459Szrj .typedef struct relent_chain
455*a9fa9459Szrj .{
456*a9fa9459Szrj .  arelent relent;
457*a9fa9459Szrj .  struct relent_chain *next;
458*a9fa9459Szrj .}
459*a9fa9459Szrj .arelent_chain;
460*a9fa9459Szrj .
461*a9fa9459Szrj */
462*a9fa9459Szrj 
463*a9fa9459Szrj /* N_ONES produces N one bits, without overflowing machine arithmetic.  */
464*a9fa9459Szrj #define N_ONES(n) (((((bfd_vma) 1 << ((n) - 1)) - 1) << 1) | 1)
465*a9fa9459Szrj 
466*a9fa9459Szrj /*
467*a9fa9459Szrj FUNCTION
468*a9fa9459Szrj 	bfd_check_overflow
469*a9fa9459Szrj 
470*a9fa9459Szrj SYNOPSIS
471*a9fa9459Szrj 	bfd_reloc_status_type bfd_check_overflow
472*a9fa9459Szrj 	  (enum complain_overflow how,
473*a9fa9459Szrj 	   unsigned int bitsize,
474*a9fa9459Szrj 	   unsigned int rightshift,
475*a9fa9459Szrj 	   unsigned int addrsize,
476*a9fa9459Szrj 	   bfd_vma relocation);
477*a9fa9459Szrj 
478*a9fa9459Szrj DESCRIPTION
479*a9fa9459Szrj 	Perform overflow checking on @var{relocation} which has
480*a9fa9459Szrj 	@var{bitsize} significant bits and will be shifted right by
481*a9fa9459Szrj 	@var{rightshift} bits, on a machine with addresses containing
482*a9fa9459Szrj 	@var{addrsize} significant bits.  The result is either of
483*a9fa9459Szrj 	@code{bfd_reloc_ok} or @code{bfd_reloc_overflow}.
484*a9fa9459Szrj 
485*a9fa9459Szrj */
486*a9fa9459Szrj 
487*a9fa9459Szrj bfd_reloc_status_type
bfd_check_overflow(enum complain_overflow how,unsigned int bitsize,unsigned int rightshift,unsigned int addrsize,bfd_vma relocation)488*a9fa9459Szrj bfd_check_overflow (enum complain_overflow how,
489*a9fa9459Szrj 		    unsigned int bitsize,
490*a9fa9459Szrj 		    unsigned int rightshift,
491*a9fa9459Szrj 		    unsigned int addrsize,
492*a9fa9459Szrj 		    bfd_vma relocation)
493*a9fa9459Szrj {
494*a9fa9459Szrj   bfd_vma fieldmask, addrmask, signmask, ss, a;
495*a9fa9459Szrj   bfd_reloc_status_type flag = bfd_reloc_ok;
496*a9fa9459Szrj 
497*a9fa9459Szrj   /* Note: BITSIZE should always be <= ADDRSIZE, but in case it's not,
498*a9fa9459Szrj      we'll be permissive: extra bits in the field mask will
499*a9fa9459Szrj      automatically extend the address mask for purposes of the
500*a9fa9459Szrj      overflow check.  */
501*a9fa9459Szrj   fieldmask = N_ONES (bitsize);
502*a9fa9459Szrj   signmask = ~fieldmask;
503*a9fa9459Szrj   addrmask = N_ONES (addrsize) | (fieldmask << rightshift);
504*a9fa9459Szrj   a = (relocation & addrmask) >> rightshift;
505*a9fa9459Szrj 
506*a9fa9459Szrj   switch (how)
507*a9fa9459Szrj     {
508*a9fa9459Szrj     case complain_overflow_dont:
509*a9fa9459Szrj       break;
510*a9fa9459Szrj 
511*a9fa9459Szrj     case complain_overflow_signed:
512*a9fa9459Szrj       /* If any sign bits are set, all sign bits must be set.  That
513*a9fa9459Szrj          is, A must be a valid negative address after shifting.  */
514*a9fa9459Szrj       signmask = ~ (fieldmask >> 1);
515*a9fa9459Szrj       /* Fall thru */
516*a9fa9459Szrj 
517*a9fa9459Szrj     case complain_overflow_bitfield:
518*a9fa9459Szrj       /* Bitfields are sometimes signed, sometimes unsigned.  We
519*a9fa9459Szrj 	 explicitly allow an address wrap too, which means a bitfield
520*a9fa9459Szrj 	 of n bits is allowed to store -2**n to 2**n-1.  Thus overflow
521*a9fa9459Szrj 	 if the value has some, but not all, bits set outside the
522*a9fa9459Szrj 	 field.  */
523*a9fa9459Szrj       ss = a & signmask;
524*a9fa9459Szrj       if (ss != 0 && ss != ((addrmask >> rightshift) & signmask))
525*a9fa9459Szrj 	flag = bfd_reloc_overflow;
526*a9fa9459Szrj       break;
527*a9fa9459Szrj 
528*a9fa9459Szrj     case complain_overflow_unsigned:
529*a9fa9459Szrj       /* We have an overflow if the address does not fit in the field.  */
530*a9fa9459Szrj       if ((a & signmask) != 0)
531*a9fa9459Szrj 	flag = bfd_reloc_overflow;
532*a9fa9459Szrj       break;
533*a9fa9459Szrj 
534*a9fa9459Szrj     default:
535*a9fa9459Szrj       abort ();
536*a9fa9459Szrj     }
537*a9fa9459Szrj 
538*a9fa9459Szrj   return flag;
539*a9fa9459Szrj }
540*a9fa9459Szrj 
541*a9fa9459Szrj /*
542*a9fa9459Szrj FUNCTION
543*a9fa9459Szrj 	bfd_perform_relocation
544*a9fa9459Szrj 
545*a9fa9459Szrj SYNOPSIS
546*a9fa9459Szrj 	bfd_reloc_status_type bfd_perform_relocation
547*a9fa9459Szrj           (bfd *abfd,
548*a9fa9459Szrj            arelent *reloc_entry,
549*a9fa9459Szrj            void *data,
550*a9fa9459Szrj            asection *input_section,
551*a9fa9459Szrj            bfd *output_bfd,
552*a9fa9459Szrj 	   char **error_message);
553*a9fa9459Szrj 
554*a9fa9459Szrj DESCRIPTION
555*a9fa9459Szrj 	If @var{output_bfd} is supplied to this function, the
556*a9fa9459Szrj 	generated image will be relocatable; the relocations are
557*a9fa9459Szrj 	copied to the output file after they have been changed to
558*a9fa9459Szrj 	reflect the new state of the world. There are two ways of
559*a9fa9459Szrj 	reflecting the results of partial linkage in an output file:
560*a9fa9459Szrj 	by modifying the output data in place, and by modifying the
561*a9fa9459Szrj 	relocation record.  Some native formats (e.g., basic a.out and
562*a9fa9459Szrj 	basic coff) have no way of specifying an addend in the
563*a9fa9459Szrj 	relocation type, so the addend has to go in the output data.
564*a9fa9459Szrj 	This is no big deal since in these formats the output data
565*a9fa9459Szrj 	slot will always be big enough for the addend. Complex reloc
566*a9fa9459Szrj 	types with addends were invented to solve just this problem.
567*a9fa9459Szrj 	The @var{error_message} argument is set to an error message if
568*a9fa9459Szrj 	this return @code{bfd_reloc_dangerous}.
569*a9fa9459Szrj 
570*a9fa9459Szrj */
571*a9fa9459Szrj 
572*a9fa9459Szrj bfd_reloc_status_type
bfd_perform_relocation(bfd * abfd,arelent * reloc_entry,void * data,asection * input_section,bfd * output_bfd,char ** error_message)573*a9fa9459Szrj bfd_perform_relocation (bfd *abfd,
574*a9fa9459Szrj 			arelent *reloc_entry,
575*a9fa9459Szrj 			void *data,
576*a9fa9459Szrj 			asection *input_section,
577*a9fa9459Szrj 			bfd *output_bfd,
578*a9fa9459Szrj 			char **error_message)
579*a9fa9459Szrj {
580*a9fa9459Szrj   bfd_vma relocation;
581*a9fa9459Szrj   bfd_reloc_status_type flag = bfd_reloc_ok;
582*a9fa9459Szrj   bfd_size_type octets;
583*a9fa9459Szrj   bfd_vma output_base = 0;
584*a9fa9459Szrj   reloc_howto_type *howto = reloc_entry->howto;
585*a9fa9459Szrj   asection *reloc_target_output_section;
586*a9fa9459Szrj   asymbol *symbol;
587*a9fa9459Szrj 
588*a9fa9459Szrj   symbol = *(reloc_entry->sym_ptr_ptr);
589*a9fa9459Szrj   if (bfd_is_abs_section (symbol->section)
590*a9fa9459Szrj       && output_bfd != NULL)
591*a9fa9459Szrj     {
592*a9fa9459Szrj       reloc_entry->address += input_section->output_offset;
593*a9fa9459Szrj       return bfd_reloc_ok;
594*a9fa9459Szrj     }
595*a9fa9459Szrj 
596*a9fa9459Szrj   /* PR 17512: file: 0f67f69d.  */
597*a9fa9459Szrj   if (howto == NULL)
598*a9fa9459Szrj     return bfd_reloc_undefined;
599*a9fa9459Szrj 
600*a9fa9459Szrj   /* If we are not producing relocatable output, return an error if
601*a9fa9459Szrj      the symbol is not defined.  An undefined weak symbol is
602*a9fa9459Szrj      considered to have a value of zero (SVR4 ABI, p. 4-27).  */
603*a9fa9459Szrj   if (bfd_is_und_section (symbol->section)
604*a9fa9459Szrj       && (symbol->flags & BSF_WEAK) == 0
605*a9fa9459Szrj       && output_bfd == NULL)
606*a9fa9459Szrj     flag = bfd_reloc_undefined;
607*a9fa9459Szrj 
608*a9fa9459Szrj   /* If there is a function supplied to handle this relocation type,
609*a9fa9459Szrj      call it.  It'll return `bfd_reloc_continue' if further processing
610*a9fa9459Szrj      can be done.  */
611*a9fa9459Szrj   if (howto->special_function)
612*a9fa9459Szrj     {
613*a9fa9459Szrj       bfd_reloc_status_type cont;
614*a9fa9459Szrj       cont = howto->special_function (abfd, reloc_entry, symbol, data,
615*a9fa9459Szrj 				      input_section, output_bfd,
616*a9fa9459Szrj 				      error_message);
617*a9fa9459Szrj       if (cont != bfd_reloc_continue)
618*a9fa9459Szrj 	return cont;
619*a9fa9459Szrj     }
620*a9fa9459Szrj 
621*a9fa9459Szrj   /* Is the address of the relocation really within the section?
622*a9fa9459Szrj      Include the size of the reloc in the test for out of range addresses.
623*a9fa9459Szrj      PR 17512: file: c146ab8b, 46dff27f, 38e53ebf.  */
624*a9fa9459Szrj   octets = reloc_entry->address * bfd_octets_per_byte (abfd);
625*a9fa9459Szrj   if (octets + bfd_get_reloc_size (howto)
626*a9fa9459Szrj       > bfd_get_section_limit_octets (abfd, input_section))
627*a9fa9459Szrj     return bfd_reloc_outofrange;
628*a9fa9459Szrj 
629*a9fa9459Szrj   /* Work out which section the relocation is targeted at and the
630*a9fa9459Szrj      initial relocation command value.  */
631*a9fa9459Szrj 
632*a9fa9459Szrj   /* Get symbol value.  (Common symbols are special.)  */
633*a9fa9459Szrj   if (bfd_is_com_section (symbol->section))
634*a9fa9459Szrj     relocation = 0;
635*a9fa9459Szrj   else
636*a9fa9459Szrj     relocation = symbol->value;
637*a9fa9459Szrj 
638*a9fa9459Szrj   reloc_target_output_section = symbol->section->output_section;
639*a9fa9459Szrj 
640*a9fa9459Szrj   /* Convert input-section-relative symbol value to absolute.  */
641*a9fa9459Szrj   if ((output_bfd && ! howto->partial_inplace)
642*a9fa9459Szrj       || reloc_target_output_section == NULL)
643*a9fa9459Szrj     output_base = 0;
644*a9fa9459Szrj   else
645*a9fa9459Szrj     output_base = reloc_target_output_section->vma;
646*a9fa9459Szrj 
647*a9fa9459Szrj   relocation += output_base + symbol->section->output_offset;
648*a9fa9459Szrj 
649*a9fa9459Szrj   /* Add in supplied addend.  */
650*a9fa9459Szrj   relocation += reloc_entry->addend;
651*a9fa9459Szrj 
652*a9fa9459Szrj   /* Here the variable relocation holds the final address of the
653*a9fa9459Szrj      symbol we are relocating against, plus any addend.  */
654*a9fa9459Szrj 
655*a9fa9459Szrj   if (howto->pc_relative)
656*a9fa9459Szrj     {
657*a9fa9459Szrj       /* This is a PC relative relocation.  We want to set RELOCATION
658*a9fa9459Szrj 	 to the distance between the address of the symbol and the
659*a9fa9459Szrj 	 location.  RELOCATION is already the address of the symbol.
660*a9fa9459Szrj 
661*a9fa9459Szrj 	 We start by subtracting the address of the section containing
662*a9fa9459Szrj 	 the location.
663*a9fa9459Szrj 
664*a9fa9459Szrj 	 If pcrel_offset is set, we must further subtract the position
665*a9fa9459Szrj 	 of the location within the section.  Some targets arrange for
666*a9fa9459Szrj 	 the addend to be the negative of the position of the location
667*a9fa9459Szrj 	 within the section; for example, i386-aout does this.  For
668*a9fa9459Szrj 	 i386-aout, pcrel_offset is FALSE.  Some other targets do not
669*a9fa9459Szrj 	 include the position of the location; for example, m88kbcs,
670*a9fa9459Szrj 	 or ELF.  For those targets, pcrel_offset is TRUE.
671*a9fa9459Szrj 
672*a9fa9459Szrj 	 If we are producing relocatable output, then we must ensure
673*a9fa9459Szrj 	 that this reloc will be correctly computed when the final
674*a9fa9459Szrj 	 relocation is done.  If pcrel_offset is FALSE we want to wind
675*a9fa9459Szrj 	 up with the negative of the location within the section,
676*a9fa9459Szrj 	 which means we must adjust the existing addend by the change
677*a9fa9459Szrj 	 in the location within the section.  If pcrel_offset is TRUE
678*a9fa9459Szrj 	 we do not want to adjust the existing addend at all.
679*a9fa9459Szrj 
680*a9fa9459Szrj 	 FIXME: This seems logical to me, but for the case of
681*a9fa9459Szrj 	 producing relocatable output it is not what the code
682*a9fa9459Szrj 	 actually does.  I don't want to change it, because it seems
683*a9fa9459Szrj 	 far too likely that something will break.  */
684*a9fa9459Szrj 
685*a9fa9459Szrj       relocation -=
686*a9fa9459Szrj 	input_section->output_section->vma + input_section->output_offset;
687*a9fa9459Szrj 
688*a9fa9459Szrj       if (howto->pcrel_offset)
689*a9fa9459Szrj 	relocation -= reloc_entry->address;
690*a9fa9459Szrj     }
691*a9fa9459Szrj 
692*a9fa9459Szrj   if (output_bfd != NULL)
693*a9fa9459Szrj     {
694*a9fa9459Szrj       if (! howto->partial_inplace)
695*a9fa9459Szrj 	{
696*a9fa9459Szrj 	  /* This is a partial relocation, and we want to apply the relocation
697*a9fa9459Szrj 	     to the reloc entry rather than the raw data. Modify the reloc
698*a9fa9459Szrj 	     inplace to reflect what we now know.  */
699*a9fa9459Szrj 	  reloc_entry->addend = relocation;
700*a9fa9459Szrj 	  reloc_entry->address += input_section->output_offset;
701*a9fa9459Szrj 	  return flag;
702*a9fa9459Szrj 	}
703*a9fa9459Szrj       else
704*a9fa9459Szrj 	{
705*a9fa9459Szrj 	  /* This is a partial relocation, but inplace, so modify the
706*a9fa9459Szrj 	     reloc record a bit.
707*a9fa9459Szrj 
708*a9fa9459Szrj 	     If we've relocated with a symbol with a section, change
709*a9fa9459Szrj 	     into a ref to the section belonging to the symbol.  */
710*a9fa9459Szrj 
711*a9fa9459Szrj 	  reloc_entry->address += input_section->output_offset;
712*a9fa9459Szrj 
713*a9fa9459Szrj 	  /* WTF?? */
714*a9fa9459Szrj 	  if (abfd->xvec->flavour == bfd_target_coff_flavour
715*a9fa9459Szrj 	      && strcmp (abfd->xvec->name, "coff-Intel-little") != 0
716*a9fa9459Szrj 	      && strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
717*a9fa9459Szrj 	    {
718*a9fa9459Szrj 	      /* For m68k-coff, the addend was being subtracted twice during
719*a9fa9459Szrj 		 relocation with -r.  Removing the line below this comment
720*a9fa9459Szrj 		 fixes that problem; see PR 2953.
721*a9fa9459Szrj 
722*a9fa9459Szrj However, Ian wrote the following, regarding removing the line below,
723*a9fa9459Szrj which explains why it is still enabled:  --djm
724*a9fa9459Szrj 
725*a9fa9459Szrj If you put a patch like that into BFD you need to check all the COFF
726*a9fa9459Szrj linkers.  I am fairly certain that patch will break coff-i386 (e.g.,
727*a9fa9459Szrj SCO); see coff_i386_reloc in coff-i386.c where I worked around the
728*a9fa9459Szrj problem in a different way.  There may very well be a reason that the
729*a9fa9459Szrj code works as it does.
730*a9fa9459Szrj 
731*a9fa9459Szrj Hmmm.  The first obvious point is that bfd_perform_relocation should
732*a9fa9459Szrj not have any tests that depend upon the flavour.  It's seem like
733*a9fa9459Szrj entirely the wrong place for such a thing.  The second obvious point
734*a9fa9459Szrj is that the current code ignores the reloc addend when producing
735*a9fa9459Szrj relocatable output for COFF.  That's peculiar.  In fact, I really
736*a9fa9459Szrj have no idea what the point of the line you want to remove is.
737*a9fa9459Szrj 
738*a9fa9459Szrj A typical COFF reloc subtracts the old value of the symbol and adds in
739*a9fa9459Szrj the new value to the location in the object file (if it's a pc
740*a9fa9459Szrj relative reloc it adds the difference between the symbol value and the
741*a9fa9459Szrj location).  When relocating we need to preserve that property.
742*a9fa9459Szrj 
743*a9fa9459Szrj BFD handles this by setting the addend to the negative of the old
744*a9fa9459Szrj value of the symbol.  Unfortunately it handles common symbols in a
745*a9fa9459Szrj non-standard way (it doesn't subtract the old value) but that's a
746*a9fa9459Szrj different story (we can't change it without losing backward
747*a9fa9459Szrj compatibility with old object files) (coff-i386 does subtract the old
748*a9fa9459Szrj value, to be compatible with existing coff-i386 targets, like SCO).
749*a9fa9459Szrj 
750*a9fa9459Szrj So everything works fine when not producing relocatable output.  When
751*a9fa9459Szrj we are producing relocatable output, logically we should do exactly
752*a9fa9459Szrj what we do when not producing relocatable output.  Therefore, your
753*a9fa9459Szrj patch is correct.  In fact, it should probably always just set
754*a9fa9459Szrj reloc_entry->addend to 0 for all cases, since it is, in fact, going to
755*a9fa9459Szrj add the value into the object file.  This won't hurt the COFF code,
756*a9fa9459Szrj which doesn't use the addend; I'm not sure what it will do to other
757*a9fa9459Szrj formats (the thing to check for would be whether any formats both use
758*a9fa9459Szrj the addend and set partial_inplace).
759*a9fa9459Szrj 
760*a9fa9459Szrj When I wanted to make coff-i386 produce relocatable output, I ran
761*a9fa9459Szrj into the problem that you are running into: I wanted to remove that
762*a9fa9459Szrj line.  Rather than risk it, I made the coff-i386 relocs use a special
763*a9fa9459Szrj function; it's coff_i386_reloc in coff-i386.c.  The function
764*a9fa9459Szrj specifically adds the addend field into the object file, knowing that
765*a9fa9459Szrj bfd_perform_relocation is not going to.  If you remove that line, then
766*a9fa9459Szrj coff-i386.c will wind up adding the addend field in twice.  It's
767*a9fa9459Szrj trivial to fix; it just needs to be done.
768*a9fa9459Szrj 
769*a9fa9459Szrj The problem with removing the line is just that it may break some
770*a9fa9459Szrj working code.  With BFD it's hard to be sure of anything.  The right
771*a9fa9459Szrj way to deal with this is simply to build and test at least all the
772*a9fa9459Szrj supported COFF targets.  It should be straightforward if time and disk
773*a9fa9459Szrj space consuming.  For each target:
774*a9fa9459Szrj     1) build the linker
775*a9fa9459Szrj     2) generate some executable, and link it using -r (I would
776*a9fa9459Szrj        probably use paranoia.o and link against newlib/libc.a, which
777*a9fa9459Szrj        for all the supported targets would be available in
778*a9fa9459Szrj        /usr/cygnus/progressive/H-host/target/lib/libc.a).
779*a9fa9459Szrj     3) make the change to reloc.c
780*a9fa9459Szrj     4) rebuild the linker
781*a9fa9459Szrj     5) repeat step 2
782*a9fa9459Szrj     6) if the resulting object files are the same, you have at least
783*a9fa9459Szrj        made it no worse
784*a9fa9459Szrj     7) if they are different you have to figure out which version is
785*a9fa9459Szrj        right
786*a9fa9459Szrj */
787*a9fa9459Szrj 	      relocation -= reloc_entry->addend;
788*a9fa9459Szrj 	      reloc_entry->addend = 0;
789*a9fa9459Szrj 	    }
790*a9fa9459Szrj 	  else
791*a9fa9459Szrj 	    {
792*a9fa9459Szrj 	      reloc_entry->addend = relocation;
793*a9fa9459Szrj 	    }
794*a9fa9459Szrj 	}
795*a9fa9459Szrj     }
796*a9fa9459Szrj 
797*a9fa9459Szrj   /* FIXME: This overflow checking is incomplete, because the value
798*a9fa9459Szrj      might have overflowed before we get here.  For a correct check we
799*a9fa9459Szrj      need to compute the value in a size larger than bitsize, but we
800*a9fa9459Szrj      can't reasonably do that for a reloc the same size as a host
801*a9fa9459Szrj      machine word.
802*a9fa9459Szrj      FIXME: We should also do overflow checking on the result after
803*a9fa9459Szrj      adding in the value contained in the object file.  */
804*a9fa9459Szrj   if (howto->complain_on_overflow != complain_overflow_dont
805*a9fa9459Szrj       && flag == bfd_reloc_ok)
806*a9fa9459Szrj     flag = bfd_check_overflow (howto->complain_on_overflow,
807*a9fa9459Szrj 			       howto->bitsize,
808*a9fa9459Szrj 			       howto->rightshift,
809*a9fa9459Szrj 			       bfd_arch_bits_per_address (abfd),
810*a9fa9459Szrj 			       relocation);
811*a9fa9459Szrj 
812*a9fa9459Szrj   /* Either we are relocating all the way, or we don't want to apply
813*a9fa9459Szrj      the relocation to the reloc entry (probably because there isn't
814*a9fa9459Szrj      any room in the output format to describe addends to relocs).  */
815*a9fa9459Szrj 
816*a9fa9459Szrj   /* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
817*a9fa9459Szrj      (OSF version 1.3, compiler version 3.11).  It miscompiles the
818*a9fa9459Szrj      following program:
819*a9fa9459Szrj 
820*a9fa9459Szrj      struct str
821*a9fa9459Szrj      {
822*a9fa9459Szrj        unsigned int i0;
823*a9fa9459Szrj      } s = { 0 };
824*a9fa9459Szrj 
825*a9fa9459Szrj      int
826*a9fa9459Szrj      main ()
827*a9fa9459Szrj      {
828*a9fa9459Szrj        unsigned long x;
829*a9fa9459Szrj 
830*a9fa9459Szrj        x = 0x100000000;
831*a9fa9459Szrj        x <<= (unsigned long) s.i0;
832*a9fa9459Szrj        if (x == 0)
833*a9fa9459Szrj 	 printf ("failed\n");
834*a9fa9459Szrj        else
835*a9fa9459Szrj 	 printf ("succeeded (%lx)\n", x);
836*a9fa9459Szrj      }
837*a9fa9459Szrj      */
838*a9fa9459Szrj 
839*a9fa9459Szrj   relocation >>= (bfd_vma) howto->rightshift;
840*a9fa9459Szrj 
841*a9fa9459Szrj   /* Shift everything up to where it's going to be used.  */
842*a9fa9459Szrj   relocation <<= (bfd_vma) howto->bitpos;
843*a9fa9459Szrj 
844*a9fa9459Szrj   /* Wait for the day when all have the mask in them.  */
845*a9fa9459Szrj 
846*a9fa9459Szrj   /* What we do:
847*a9fa9459Szrj      i instruction to be left alone
848*a9fa9459Szrj      o offset within instruction
849*a9fa9459Szrj      r relocation offset to apply
850*a9fa9459Szrj      S src mask
851*a9fa9459Szrj      D dst mask
852*a9fa9459Szrj      N ~dst mask
853*a9fa9459Szrj      A part 1
854*a9fa9459Szrj      B part 2
855*a9fa9459Szrj      R result
856*a9fa9459Szrj 
857*a9fa9459Szrj      Do this:
858*a9fa9459Szrj      ((  i i i i i o o o o o  from bfd_get<size>
859*a9fa9459Szrj      and           S S S S S) to get the size offset we want
860*a9fa9459Szrj      +   r r r r r r r r r r) to get the final value to place
861*a9fa9459Szrj      and           D D D D D  to chop to right size
862*a9fa9459Szrj      -----------------------
863*a9fa9459Szrj      =             A A A A A
864*a9fa9459Szrj      And this:
865*a9fa9459Szrj      (   i i i i i o o o o o  from bfd_get<size>
866*a9fa9459Szrj      and N N N N N          ) get instruction
867*a9fa9459Szrj      -----------------------
868*a9fa9459Szrj      =   B B B B B
869*a9fa9459Szrj 
870*a9fa9459Szrj      And then:
871*a9fa9459Szrj      (   B B B B B
872*a9fa9459Szrj      or            A A A A A)
873*a9fa9459Szrj      -----------------------
874*a9fa9459Szrj      =   R R R R R R R R R R  put into bfd_put<size>
875*a9fa9459Szrj      */
876*a9fa9459Szrj 
877*a9fa9459Szrj #define DOIT(x) \
878*a9fa9459Szrj   x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) +  relocation) & howto->dst_mask))
879*a9fa9459Szrj 
880*a9fa9459Szrj   switch (howto->size)
881*a9fa9459Szrj     {
882*a9fa9459Szrj     case 0:
883*a9fa9459Szrj       {
884*a9fa9459Szrj 	char x = bfd_get_8 (abfd, (char *) data + octets);
885*a9fa9459Szrj 	DOIT (x);
886*a9fa9459Szrj 	bfd_put_8 (abfd, x, (unsigned char *) data + octets);
887*a9fa9459Szrj       }
888*a9fa9459Szrj       break;
889*a9fa9459Szrj 
890*a9fa9459Szrj     case 1:
891*a9fa9459Szrj       {
892*a9fa9459Szrj 	short x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
893*a9fa9459Szrj 	DOIT (x);
894*a9fa9459Szrj 	bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data + octets);
895*a9fa9459Szrj       }
896*a9fa9459Szrj       break;
897*a9fa9459Szrj     case 2:
898*a9fa9459Szrj       {
899*a9fa9459Szrj 	long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
900*a9fa9459Szrj 	DOIT (x);
901*a9fa9459Szrj 	bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
902*a9fa9459Szrj       }
903*a9fa9459Szrj       break;
904*a9fa9459Szrj     case -2:
905*a9fa9459Szrj       {
906*a9fa9459Szrj 	long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
907*a9fa9459Szrj 	relocation = -relocation;
908*a9fa9459Szrj 	DOIT (x);
909*a9fa9459Szrj 	bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
910*a9fa9459Szrj       }
911*a9fa9459Szrj       break;
912*a9fa9459Szrj 
913*a9fa9459Szrj     case -1:
914*a9fa9459Szrj       {
915*a9fa9459Szrj 	long x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
916*a9fa9459Szrj 	relocation = -relocation;
917*a9fa9459Szrj 	DOIT (x);
918*a9fa9459Szrj 	bfd_put_16 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
919*a9fa9459Szrj       }
920*a9fa9459Szrj       break;
921*a9fa9459Szrj 
922*a9fa9459Szrj     case 3:
923*a9fa9459Szrj       /* Do nothing */
924*a9fa9459Szrj       break;
925*a9fa9459Szrj 
926*a9fa9459Szrj     case 4:
927*a9fa9459Szrj #ifdef BFD64
928*a9fa9459Szrj       {
929*a9fa9459Szrj 	bfd_vma x = bfd_get_64 (abfd, (bfd_byte *) data + octets);
930*a9fa9459Szrj 	DOIT (x);
931*a9fa9459Szrj 	bfd_put_64 (abfd, x, (bfd_byte *) data + octets);
932*a9fa9459Szrj       }
933*a9fa9459Szrj #else
934*a9fa9459Szrj       abort ();
935*a9fa9459Szrj #endif
936*a9fa9459Szrj       break;
937*a9fa9459Szrj     default:
938*a9fa9459Szrj       return bfd_reloc_other;
939*a9fa9459Szrj     }
940*a9fa9459Szrj 
941*a9fa9459Szrj   return flag;
942*a9fa9459Szrj }
943*a9fa9459Szrj 
944*a9fa9459Szrj /*
945*a9fa9459Szrj FUNCTION
946*a9fa9459Szrj 	bfd_install_relocation
947*a9fa9459Szrj 
948*a9fa9459Szrj SYNOPSIS
949*a9fa9459Szrj 	bfd_reloc_status_type bfd_install_relocation
950*a9fa9459Szrj           (bfd *abfd,
951*a9fa9459Szrj            arelent *reloc_entry,
952*a9fa9459Szrj            void *data, bfd_vma data_start,
953*a9fa9459Szrj            asection *input_section,
954*a9fa9459Szrj 	   char **error_message);
955*a9fa9459Szrj 
956*a9fa9459Szrj DESCRIPTION
957*a9fa9459Szrj 	This looks remarkably like <<bfd_perform_relocation>>, except it
958*a9fa9459Szrj 	does not expect that the section contents have been filled in.
959*a9fa9459Szrj 	I.e., it's suitable for use when creating, rather than applying
960*a9fa9459Szrj 	a relocation.
961*a9fa9459Szrj 
962*a9fa9459Szrj 	For now, this function should be considered reserved for the
963*a9fa9459Szrj 	assembler.
964*a9fa9459Szrj */
965*a9fa9459Szrj 
966*a9fa9459Szrj bfd_reloc_status_type
bfd_install_relocation(bfd * abfd,arelent * reloc_entry,void * data_start,bfd_vma data_start_offset,asection * input_section,char ** error_message)967*a9fa9459Szrj bfd_install_relocation (bfd *abfd,
968*a9fa9459Szrj 			arelent *reloc_entry,
969*a9fa9459Szrj 			void *data_start,
970*a9fa9459Szrj 			bfd_vma data_start_offset,
971*a9fa9459Szrj 			asection *input_section,
972*a9fa9459Szrj 			char **error_message)
973*a9fa9459Szrj {
974*a9fa9459Szrj   bfd_vma relocation;
975*a9fa9459Szrj   bfd_reloc_status_type flag = bfd_reloc_ok;
976*a9fa9459Szrj   bfd_size_type octets;
977*a9fa9459Szrj   bfd_vma output_base = 0;
978*a9fa9459Szrj   reloc_howto_type *howto = reloc_entry->howto;
979*a9fa9459Szrj   asection *reloc_target_output_section;
980*a9fa9459Szrj   asymbol *symbol;
981*a9fa9459Szrj   bfd_byte *data;
982*a9fa9459Szrj 
983*a9fa9459Szrj   symbol = *(reloc_entry->sym_ptr_ptr);
984*a9fa9459Szrj   if (bfd_is_abs_section (symbol->section))
985*a9fa9459Szrj     {
986*a9fa9459Szrj       reloc_entry->address += input_section->output_offset;
987*a9fa9459Szrj       return bfd_reloc_ok;
988*a9fa9459Szrj     }
989*a9fa9459Szrj 
990*a9fa9459Szrj   /* If there is a function supplied to handle this relocation type,
991*a9fa9459Szrj      call it.  It'll return `bfd_reloc_continue' if further processing
992*a9fa9459Szrj      can be done.  */
993*a9fa9459Szrj   if (howto->special_function)
994*a9fa9459Szrj     {
995*a9fa9459Szrj       bfd_reloc_status_type cont;
996*a9fa9459Szrj 
997*a9fa9459Szrj       /* XXX - The special_function calls haven't been fixed up to deal
998*a9fa9459Szrj 	 with creating new relocations and section contents.  */
999*a9fa9459Szrj       cont = howto->special_function (abfd, reloc_entry, symbol,
1000*a9fa9459Szrj 				      /* XXX - Non-portable! */
1001*a9fa9459Szrj 				      ((bfd_byte *) data_start
1002*a9fa9459Szrj 				       - data_start_offset),
1003*a9fa9459Szrj 				      input_section, abfd, error_message);
1004*a9fa9459Szrj       if (cont != bfd_reloc_continue)
1005*a9fa9459Szrj 	return cont;
1006*a9fa9459Szrj     }
1007*a9fa9459Szrj 
1008*a9fa9459Szrj   /* Is the address of the relocation really within the section?  */
1009*a9fa9459Szrj   octets = reloc_entry->address * bfd_octets_per_byte (abfd);
1010*a9fa9459Szrj   if (octets + bfd_get_reloc_size (howto)
1011*a9fa9459Szrj       > bfd_get_section_limit_octets (abfd, input_section))
1012*a9fa9459Szrj     return bfd_reloc_outofrange;
1013*a9fa9459Szrj 
1014*a9fa9459Szrj   /* Work out which section the relocation is targeted at and the
1015*a9fa9459Szrj      initial relocation command value.  */
1016*a9fa9459Szrj 
1017*a9fa9459Szrj   /* Get symbol value.  (Common symbols are special.)  */
1018*a9fa9459Szrj   if (bfd_is_com_section (symbol->section))
1019*a9fa9459Szrj     relocation = 0;
1020*a9fa9459Szrj   else
1021*a9fa9459Szrj     relocation = symbol->value;
1022*a9fa9459Szrj 
1023*a9fa9459Szrj   reloc_target_output_section = symbol->section->output_section;
1024*a9fa9459Szrj 
1025*a9fa9459Szrj   /* Convert input-section-relative symbol value to absolute.  */
1026*a9fa9459Szrj   if (! howto->partial_inplace)
1027*a9fa9459Szrj     output_base = 0;
1028*a9fa9459Szrj   else
1029*a9fa9459Szrj     output_base = reloc_target_output_section->vma;
1030*a9fa9459Szrj 
1031*a9fa9459Szrj   relocation += output_base + symbol->section->output_offset;
1032*a9fa9459Szrj 
1033*a9fa9459Szrj   /* Add in supplied addend.  */
1034*a9fa9459Szrj   relocation += reloc_entry->addend;
1035*a9fa9459Szrj 
1036*a9fa9459Szrj   /* Here the variable relocation holds the final address of the
1037*a9fa9459Szrj      symbol we are relocating against, plus any addend.  */
1038*a9fa9459Szrj 
1039*a9fa9459Szrj   if (howto->pc_relative)
1040*a9fa9459Szrj     {
1041*a9fa9459Szrj       /* This is a PC relative relocation.  We want to set RELOCATION
1042*a9fa9459Szrj 	 to the distance between the address of the symbol and the
1043*a9fa9459Szrj 	 location.  RELOCATION is already the address of the symbol.
1044*a9fa9459Szrj 
1045*a9fa9459Szrj 	 We start by subtracting the address of the section containing
1046*a9fa9459Szrj 	 the location.
1047*a9fa9459Szrj 
1048*a9fa9459Szrj 	 If pcrel_offset is set, we must further subtract the position
1049*a9fa9459Szrj 	 of the location within the section.  Some targets arrange for
1050*a9fa9459Szrj 	 the addend to be the negative of the position of the location
1051*a9fa9459Szrj 	 within the section; for example, i386-aout does this.  For
1052*a9fa9459Szrj 	 i386-aout, pcrel_offset is FALSE.  Some other targets do not
1053*a9fa9459Szrj 	 include the position of the location; for example, m88kbcs,
1054*a9fa9459Szrj 	 or ELF.  For those targets, pcrel_offset is TRUE.
1055*a9fa9459Szrj 
1056*a9fa9459Szrj 	 If we are producing relocatable output, then we must ensure
1057*a9fa9459Szrj 	 that this reloc will be correctly computed when the final
1058*a9fa9459Szrj 	 relocation is done.  If pcrel_offset is FALSE we want to wind
1059*a9fa9459Szrj 	 up with the negative of the location within the section,
1060*a9fa9459Szrj 	 which means we must adjust the existing addend by the change
1061*a9fa9459Szrj 	 in the location within the section.  If pcrel_offset is TRUE
1062*a9fa9459Szrj 	 we do not want to adjust the existing addend at all.
1063*a9fa9459Szrj 
1064*a9fa9459Szrj 	 FIXME: This seems logical to me, but for the case of
1065*a9fa9459Szrj 	 producing relocatable output it is not what the code
1066*a9fa9459Szrj 	 actually does.  I don't want to change it, because it seems
1067*a9fa9459Szrj 	 far too likely that something will break.  */
1068*a9fa9459Szrj 
1069*a9fa9459Szrj       relocation -=
1070*a9fa9459Szrj 	input_section->output_section->vma + input_section->output_offset;
1071*a9fa9459Szrj 
1072*a9fa9459Szrj       if (howto->pcrel_offset && howto->partial_inplace)
1073*a9fa9459Szrj 	relocation -= reloc_entry->address;
1074*a9fa9459Szrj     }
1075*a9fa9459Szrj 
1076*a9fa9459Szrj   if (! howto->partial_inplace)
1077*a9fa9459Szrj     {
1078*a9fa9459Szrj       /* This is a partial relocation, and we want to apply the relocation
1079*a9fa9459Szrj 	 to the reloc entry rather than the raw data. Modify the reloc
1080*a9fa9459Szrj 	 inplace to reflect what we now know.  */
1081*a9fa9459Szrj       reloc_entry->addend = relocation;
1082*a9fa9459Szrj       reloc_entry->address += input_section->output_offset;
1083*a9fa9459Szrj       return flag;
1084*a9fa9459Szrj     }
1085*a9fa9459Szrj   else
1086*a9fa9459Szrj     {
1087*a9fa9459Szrj       /* This is a partial relocation, but inplace, so modify the
1088*a9fa9459Szrj 	 reloc record a bit.
1089*a9fa9459Szrj 
1090*a9fa9459Szrj 	 If we've relocated with a symbol with a section, change
1091*a9fa9459Szrj 	 into a ref to the section belonging to the symbol.  */
1092*a9fa9459Szrj       reloc_entry->address += input_section->output_offset;
1093*a9fa9459Szrj 
1094*a9fa9459Szrj       /* WTF?? */
1095*a9fa9459Szrj       if (abfd->xvec->flavour == bfd_target_coff_flavour
1096*a9fa9459Szrj 	  && strcmp (abfd->xvec->name, "coff-Intel-little") != 0
1097*a9fa9459Szrj 	  && strcmp (abfd->xvec->name, "coff-Intel-big") != 0)
1098*a9fa9459Szrj 	{
1099*a9fa9459Szrj 
1100*a9fa9459Szrj 	  /* For m68k-coff, the addend was being subtracted twice during
1101*a9fa9459Szrj 	     relocation with -r.  Removing the line below this comment
1102*a9fa9459Szrj 	     fixes that problem; see PR 2953.
1103*a9fa9459Szrj 
1104*a9fa9459Szrj However, Ian wrote the following, regarding removing the line below,
1105*a9fa9459Szrj which explains why it is still enabled:  --djm
1106*a9fa9459Szrj 
1107*a9fa9459Szrj If you put a patch like that into BFD you need to check all the COFF
1108*a9fa9459Szrj linkers.  I am fairly certain that patch will break coff-i386 (e.g.,
1109*a9fa9459Szrj SCO); see coff_i386_reloc in coff-i386.c where I worked around the
1110*a9fa9459Szrj problem in a different way.  There may very well be a reason that the
1111*a9fa9459Szrj code works as it does.
1112*a9fa9459Szrj 
1113*a9fa9459Szrj Hmmm.  The first obvious point is that bfd_install_relocation should
1114*a9fa9459Szrj not have any tests that depend upon the flavour.  It's seem like
1115*a9fa9459Szrj entirely the wrong place for such a thing.  The second obvious point
1116*a9fa9459Szrj is that the current code ignores the reloc addend when producing
1117*a9fa9459Szrj relocatable output for COFF.  That's peculiar.  In fact, I really
1118*a9fa9459Szrj have no idea what the point of the line you want to remove is.
1119*a9fa9459Szrj 
1120*a9fa9459Szrj A typical COFF reloc subtracts the old value of the symbol and adds in
1121*a9fa9459Szrj the new value to the location in the object file (if it's a pc
1122*a9fa9459Szrj relative reloc it adds the difference between the symbol value and the
1123*a9fa9459Szrj location).  When relocating we need to preserve that property.
1124*a9fa9459Szrj 
1125*a9fa9459Szrj BFD handles this by setting the addend to the negative of the old
1126*a9fa9459Szrj value of the symbol.  Unfortunately it handles common symbols in a
1127*a9fa9459Szrj non-standard way (it doesn't subtract the old value) but that's a
1128*a9fa9459Szrj different story (we can't change it without losing backward
1129*a9fa9459Szrj compatibility with old object files) (coff-i386 does subtract the old
1130*a9fa9459Szrj value, to be compatible with existing coff-i386 targets, like SCO).
1131*a9fa9459Szrj 
1132*a9fa9459Szrj So everything works fine when not producing relocatable output.  When
1133*a9fa9459Szrj we are producing relocatable output, logically we should do exactly
1134*a9fa9459Szrj what we do when not producing relocatable output.  Therefore, your
1135*a9fa9459Szrj patch is correct.  In fact, it should probably always just set
1136*a9fa9459Szrj reloc_entry->addend to 0 for all cases, since it is, in fact, going to
1137*a9fa9459Szrj add the value into the object file.  This won't hurt the COFF code,
1138*a9fa9459Szrj which doesn't use the addend; I'm not sure what it will do to other
1139*a9fa9459Szrj formats (the thing to check for would be whether any formats both use
1140*a9fa9459Szrj the addend and set partial_inplace).
1141*a9fa9459Szrj 
1142*a9fa9459Szrj When I wanted to make coff-i386 produce relocatable output, I ran
1143*a9fa9459Szrj into the problem that you are running into: I wanted to remove that
1144*a9fa9459Szrj line.  Rather than risk it, I made the coff-i386 relocs use a special
1145*a9fa9459Szrj function; it's coff_i386_reloc in coff-i386.c.  The function
1146*a9fa9459Szrj specifically adds the addend field into the object file, knowing that
1147*a9fa9459Szrj bfd_install_relocation is not going to.  If you remove that line, then
1148*a9fa9459Szrj coff-i386.c will wind up adding the addend field in twice.  It's
1149*a9fa9459Szrj trivial to fix; it just needs to be done.
1150*a9fa9459Szrj 
1151*a9fa9459Szrj The problem with removing the line is just that it may break some
1152*a9fa9459Szrj working code.  With BFD it's hard to be sure of anything.  The right
1153*a9fa9459Szrj way to deal with this is simply to build and test at least all the
1154*a9fa9459Szrj supported COFF targets.  It should be straightforward if time and disk
1155*a9fa9459Szrj space consuming.  For each target:
1156*a9fa9459Szrj     1) build the linker
1157*a9fa9459Szrj     2) generate some executable, and link it using -r (I would
1158*a9fa9459Szrj        probably use paranoia.o and link against newlib/libc.a, which
1159*a9fa9459Szrj        for all the supported targets would be available in
1160*a9fa9459Szrj        /usr/cygnus/progressive/H-host/target/lib/libc.a).
1161*a9fa9459Szrj     3) make the change to reloc.c
1162*a9fa9459Szrj     4) rebuild the linker
1163*a9fa9459Szrj     5) repeat step 2
1164*a9fa9459Szrj     6) if the resulting object files are the same, you have at least
1165*a9fa9459Szrj        made it no worse
1166*a9fa9459Szrj     7) if they are different you have to figure out which version is
1167*a9fa9459Szrj        right.  */
1168*a9fa9459Szrj 	  relocation -= reloc_entry->addend;
1169*a9fa9459Szrj 	  /* FIXME: There should be no target specific code here...  */
1170*a9fa9459Szrj 	  if (strcmp (abfd->xvec->name, "coff-z8k") != 0)
1171*a9fa9459Szrj 	    reloc_entry->addend = 0;
1172*a9fa9459Szrj 	}
1173*a9fa9459Szrj       else
1174*a9fa9459Szrj 	{
1175*a9fa9459Szrj 	  reloc_entry->addend = relocation;
1176*a9fa9459Szrj 	}
1177*a9fa9459Szrj     }
1178*a9fa9459Szrj 
1179*a9fa9459Szrj   /* FIXME: This overflow checking is incomplete, because the value
1180*a9fa9459Szrj      might have overflowed before we get here.  For a correct check we
1181*a9fa9459Szrj      need to compute the value in a size larger than bitsize, but we
1182*a9fa9459Szrj      can't reasonably do that for a reloc the same size as a host
1183*a9fa9459Szrj      machine word.
1184*a9fa9459Szrj      FIXME: We should also do overflow checking on the result after
1185*a9fa9459Szrj      adding in the value contained in the object file.  */
1186*a9fa9459Szrj   if (howto->complain_on_overflow != complain_overflow_dont)
1187*a9fa9459Szrj     flag = bfd_check_overflow (howto->complain_on_overflow,
1188*a9fa9459Szrj 			       howto->bitsize,
1189*a9fa9459Szrj 			       howto->rightshift,
1190*a9fa9459Szrj 			       bfd_arch_bits_per_address (abfd),
1191*a9fa9459Szrj 			       relocation);
1192*a9fa9459Szrj 
1193*a9fa9459Szrj   /* Either we are relocating all the way, or we don't want to apply
1194*a9fa9459Szrj      the relocation to the reloc entry (probably because there isn't
1195*a9fa9459Szrj      any room in the output format to describe addends to relocs).  */
1196*a9fa9459Szrj 
1197*a9fa9459Szrj   /* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler
1198*a9fa9459Szrj      (OSF version 1.3, compiler version 3.11).  It miscompiles the
1199*a9fa9459Szrj      following program:
1200*a9fa9459Szrj 
1201*a9fa9459Szrj      struct str
1202*a9fa9459Szrj      {
1203*a9fa9459Szrj        unsigned int i0;
1204*a9fa9459Szrj      } s = { 0 };
1205*a9fa9459Szrj 
1206*a9fa9459Szrj      int
1207*a9fa9459Szrj      main ()
1208*a9fa9459Szrj      {
1209*a9fa9459Szrj        unsigned long x;
1210*a9fa9459Szrj 
1211*a9fa9459Szrj        x = 0x100000000;
1212*a9fa9459Szrj        x <<= (unsigned long) s.i0;
1213*a9fa9459Szrj        if (x == 0)
1214*a9fa9459Szrj 	 printf ("failed\n");
1215*a9fa9459Szrj        else
1216*a9fa9459Szrj 	 printf ("succeeded (%lx)\n", x);
1217*a9fa9459Szrj      }
1218*a9fa9459Szrj      */
1219*a9fa9459Szrj 
1220*a9fa9459Szrj   relocation >>= (bfd_vma) howto->rightshift;
1221*a9fa9459Szrj 
1222*a9fa9459Szrj   /* Shift everything up to where it's going to be used.  */
1223*a9fa9459Szrj   relocation <<= (bfd_vma) howto->bitpos;
1224*a9fa9459Szrj 
1225*a9fa9459Szrj   /* Wait for the day when all have the mask in them.  */
1226*a9fa9459Szrj 
1227*a9fa9459Szrj   /* What we do:
1228*a9fa9459Szrj      i instruction to be left alone
1229*a9fa9459Szrj      o offset within instruction
1230*a9fa9459Szrj      r relocation offset to apply
1231*a9fa9459Szrj      S src mask
1232*a9fa9459Szrj      D dst mask
1233*a9fa9459Szrj      N ~dst mask
1234*a9fa9459Szrj      A part 1
1235*a9fa9459Szrj      B part 2
1236*a9fa9459Szrj      R result
1237*a9fa9459Szrj 
1238*a9fa9459Szrj      Do this:
1239*a9fa9459Szrj      ((  i i i i i o o o o o  from bfd_get<size>
1240*a9fa9459Szrj      and           S S S S S) to get the size offset we want
1241*a9fa9459Szrj      +   r r r r r r r r r r) to get the final value to place
1242*a9fa9459Szrj      and           D D D D D  to chop to right size
1243*a9fa9459Szrj      -----------------------
1244*a9fa9459Szrj      =             A A A A A
1245*a9fa9459Szrj      And this:
1246*a9fa9459Szrj      (   i i i i i o o o o o  from bfd_get<size>
1247*a9fa9459Szrj      and N N N N N          ) get instruction
1248*a9fa9459Szrj      -----------------------
1249*a9fa9459Szrj      =   B B B B B
1250*a9fa9459Szrj 
1251*a9fa9459Szrj      And then:
1252*a9fa9459Szrj      (   B B B B B
1253*a9fa9459Szrj      or            A A A A A)
1254*a9fa9459Szrj      -----------------------
1255*a9fa9459Szrj      =   R R R R R R R R R R  put into bfd_put<size>
1256*a9fa9459Szrj      */
1257*a9fa9459Szrj 
1258*a9fa9459Szrj #define DOIT(x) \
1259*a9fa9459Szrj   x = ( (x & ~howto->dst_mask) | (((x & howto->src_mask) +  relocation) & howto->dst_mask))
1260*a9fa9459Szrj 
1261*a9fa9459Szrj   data = (bfd_byte *) data_start + (octets - data_start_offset);
1262*a9fa9459Szrj 
1263*a9fa9459Szrj   switch (howto->size)
1264*a9fa9459Szrj     {
1265*a9fa9459Szrj     case 0:
1266*a9fa9459Szrj       {
1267*a9fa9459Szrj 	char x = bfd_get_8 (abfd, data);
1268*a9fa9459Szrj 	DOIT (x);
1269*a9fa9459Szrj 	bfd_put_8 (abfd, x, data);
1270*a9fa9459Szrj       }
1271*a9fa9459Szrj       break;
1272*a9fa9459Szrj 
1273*a9fa9459Szrj     case 1:
1274*a9fa9459Szrj       {
1275*a9fa9459Szrj 	short x = bfd_get_16 (abfd, data);
1276*a9fa9459Szrj 	DOIT (x);
1277*a9fa9459Szrj 	bfd_put_16 (abfd, (bfd_vma) x, data);
1278*a9fa9459Szrj       }
1279*a9fa9459Szrj       break;
1280*a9fa9459Szrj     case 2:
1281*a9fa9459Szrj       {
1282*a9fa9459Szrj 	long x = bfd_get_32 (abfd, data);
1283*a9fa9459Szrj 	DOIT (x);
1284*a9fa9459Szrj 	bfd_put_32 (abfd, (bfd_vma) x, data);
1285*a9fa9459Szrj       }
1286*a9fa9459Szrj       break;
1287*a9fa9459Szrj     case -2:
1288*a9fa9459Szrj       {
1289*a9fa9459Szrj 	long x = bfd_get_32 (abfd, data);
1290*a9fa9459Szrj 	relocation = -relocation;
1291*a9fa9459Szrj 	DOIT (x);
1292*a9fa9459Szrj 	bfd_put_32 (abfd, (bfd_vma) x, data);
1293*a9fa9459Szrj       }
1294*a9fa9459Szrj       break;
1295*a9fa9459Szrj 
1296*a9fa9459Szrj     case 3:
1297*a9fa9459Szrj       /* Do nothing */
1298*a9fa9459Szrj       break;
1299*a9fa9459Szrj 
1300*a9fa9459Szrj     case 4:
1301*a9fa9459Szrj       {
1302*a9fa9459Szrj 	bfd_vma x = bfd_get_64 (abfd, data);
1303*a9fa9459Szrj 	DOIT (x);
1304*a9fa9459Szrj 	bfd_put_64 (abfd, x, data);
1305*a9fa9459Szrj       }
1306*a9fa9459Szrj       break;
1307*a9fa9459Szrj     default:
1308*a9fa9459Szrj       return bfd_reloc_other;
1309*a9fa9459Szrj     }
1310*a9fa9459Szrj 
1311*a9fa9459Szrj   return flag;
1312*a9fa9459Szrj }
1313*a9fa9459Szrj 
1314*a9fa9459Szrj /* This relocation routine is used by some of the backend linkers.
1315*a9fa9459Szrj    They do not construct asymbol or arelent structures, so there is no
1316*a9fa9459Szrj    reason for them to use bfd_perform_relocation.  Also,
1317*a9fa9459Szrj    bfd_perform_relocation is so hacked up it is easier to write a new
1318*a9fa9459Szrj    function than to try to deal with it.
1319*a9fa9459Szrj 
1320*a9fa9459Szrj    This routine does a final relocation.  Whether it is useful for a
1321*a9fa9459Szrj    relocatable link depends upon how the object format defines
1322*a9fa9459Szrj    relocations.
1323*a9fa9459Szrj 
1324*a9fa9459Szrj    FIXME: This routine ignores any special_function in the HOWTO,
1325*a9fa9459Szrj    since the existing special_function values have been written for
1326*a9fa9459Szrj    bfd_perform_relocation.
1327*a9fa9459Szrj 
1328*a9fa9459Szrj    HOWTO is the reloc howto information.
1329*a9fa9459Szrj    INPUT_BFD is the BFD which the reloc applies to.
1330*a9fa9459Szrj    INPUT_SECTION is the section which the reloc applies to.
1331*a9fa9459Szrj    CONTENTS is the contents of the section.
1332*a9fa9459Szrj    ADDRESS is the address of the reloc within INPUT_SECTION.
1333*a9fa9459Szrj    VALUE is the value of the symbol the reloc refers to.
1334*a9fa9459Szrj    ADDEND is the addend of the reloc.  */
1335*a9fa9459Szrj 
1336*a9fa9459Szrj bfd_reloc_status_type
_bfd_final_link_relocate(reloc_howto_type * howto,bfd * input_bfd,asection * input_section,bfd_byte * contents,bfd_vma address,bfd_vma value,bfd_vma addend)1337*a9fa9459Szrj _bfd_final_link_relocate (reloc_howto_type *howto,
1338*a9fa9459Szrj 			  bfd *input_bfd,
1339*a9fa9459Szrj 			  asection *input_section,
1340*a9fa9459Szrj 			  bfd_byte *contents,
1341*a9fa9459Szrj 			  bfd_vma address,
1342*a9fa9459Szrj 			  bfd_vma value,
1343*a9fa9459Szrj 			  bfd_vma addend)
1344*a9fa9459Szrj {
1345*a9fa9459Szrj   bfd_vma relocation;
1346*a9fa9459Szrj   bfd_size_type octets = address * bfd_octets_per_byte (input_bfd);
1347*a9fa9459Szrj 
1348*a9fa9459Szrj   /* Sanity check the address.  */
1349*a9fa9459Szrj   if (octets + bfd_get_reloc_size (howto)
1350*a9fa9459Szrj       > bfd_get_section_limit_octets (input_bfd, input_section))
1351*a9fa9459Szrj     return bfd_reloc_outofrange;
1352*a9fa9459Szrj 
1353*a9fa9459Szrj   /* This function assumes that we are dealing with a basic relocation
1354*a9fa9459Szrj      against a symbol.  We want to compute the value of the symbol to
1355*a9fa9459Szrj      relocate to.  This is just VALUE, the value of the symbol, plus
1356*a9fa9459Szrj      ADDEND, any addend associated with the reloc.  */
1357*a9fa9459Szrj   relocation = value + addend;
1358*a9fa9459Szrj 
1359*a9fa9459Szrj   /* If the relocation is PC relative, we want to set RELOCATION to
1360*a9fa9459Szrj      the distance between the symbol (currently in RELOCATION) and the
1361*a9fa9459Szrj      location we are relocating.  Some targets (e.g., i386-aout)
1362*a9fa9459Szrj      arrange for the contents of the section to be the negative of the
1363*a9fa9459Szrj      offset of the location within the section; for such targets
1364*a9fa9459Szrj      pcrel_offset is FALSE.  Other targets (e.g., m88kbcs or ELF)
1365*a9fa9459Szrj      simply leave the contents of the section as zero; for such
1366*a9fa9459Szrj      targets pcrel_offset is TRUE.  If pcrel_offset is FALSE we do not
1367*a9fa9459Szrj      need to subtract out the offset of the location within the
1368*a9fa9459Szrj      section (which is just ADDRESS).  */
1369*a9fa9459Szrj   if (howto->pc_relative)
1370*a9fa9459Szrj     {
1371*a9fa9459Szrj       relocation -= (input_section->output_section->vma
1372*a9fa9459Szrj 		     + input_section->output_offset);
1373*a9fa9459Szrj       if (howto->pcrel_offset)
1374*a9fa9459Szrj 	relocation -= address;
1375*a9fa9459Szrj     }
1376*a9fa9459Szrj 
1377*a9fa9459Szrj   return _bfd_relocate_contents (howto, input_bfd, relocation,
1378*a9fa9459Szrj 				 contents
1379*a9fa9459Szrj 				 + address * bfd_octets_per_byte (input_bfd));
1380*a9fa9459Szrj }
1381*a9fa9459Szrj 
1382*a9fa9459Szrj /* Relocate a given location using a given value and howto.  */
1383*a9fa9459Szrj 
1384*a9fa9459Szrj bfd_reloc_status_type
_bfd_relocate_contents(reloc_howto_type * howto,bfd * input_bfd,bfd_vma relocation,bfd_byte * location)1385*a9fa9459Szrj _bfd_relocate_contents (reloc_howto_type *howto,
1386*a9fa9459Szrj 			bfd *input_bfd,
1387*a9fa9459Szrj 			bfd_vma relocation,
1388*a9fa9459Szrj 			bfd_byte *location)
1389*a9fa9459Szrj {
1390*a9fa9459Szrj   int size;
1391*a9fa9459Szrj   bfd_vma x = 0;
1392*a9fa9459Szrj   bfd_reloc_status_type flag;
1393*a9fa9459Szrj   unsigned int rightshift = howto->rightshift;
1394*a9fa9459Szrj   unsigned int bitpos = howto->bitpos;
1395*a9fa9459Szrj 
1396*a9fa9459Szrj   /* If the size is negative, negate RELOCATION.  This isn't very
1397*a9fa9459Szrj      general.  */
1398*a9fa9459Szrj   if (howto->size < 0)
1399*a9fa9459Szrj     relocation = -relocation;
1400*a9fa9459Szrj 
1401*a9fa9459Szrj   /* Get the value we are going to relocate.  */
1402*a9fa9459Szrj   size = bfd_get_reloc_size (howto);
1403*a9fa9459Szrj   switch (size)
1404*a9fa9459Szrj     {
1405*a9fa9459Szrj     default:
1406*a9fa9459Szrj       abort ();
1407*a9fa9459Szrj     case 0:
1408*a9fa9459Szrj       return bfd_reloc_ok;
1409*a9fa9459Szrj     case 1:
1410*a9fa9459Szrj       x = bfd_get_8 (input_bfd, location);
1411*a9fa9459Szrj       break;
1412*a9fa9459Szrj     case 2:
1413*a9fa9459Szrj       x = bfd_get_16 (input_bfd, location);
1414*a9fa9459Szrj       break;
1415*a9fa9459Szrj     case 4:
1416*a9fa9459Szrj       x = bfd_get_32 (input_bfd, location);
1417*a9fa9459Szrj       break;
1418*a9fa9459Szrj     case 8:
1419*a9fa9459Szrj #ifdef BFD64
1420*a9fa9459Szrj       x = bfd_get_64 (input_bfd, location);
1421*a9fa9459Szrj #else
1422*a9fa9459Szrj       abort ();
1423*a9fa9459Szrj #endif
1424*a9fa9459Szrj       break;
1425*a9fa9459Szrj     }
1426*a9fa9459Szrj 
1427*a9fa9459Szrj   /* Check for overflow.  FIXME: We may drop bits during the addition
1428*a9fa9459Szrj      which we don't check for.  We must either check at every single
1429*a9fa9459Szrj      operation, which would be tedious, or we must do the computations
1430*a9fa9459Szrj      in a type larger than bfd_vma, which would be inefficient.  */
1431*a9fa9459Szrj   flag = bfd_reloc_ok;
1432*a9fa9459Szrj   if (howto->complain_on_overflow != complain_overflow_dont)
1433*a9fa9459Szrj     {
1434*a9fa9459Szrj       bfd_vma addrmask, fieldmask, signmask, ss;
1435*a9fa9459Szrj       bfd_vma a, b, sum;
1436*a9fa9459Szrj 
1437*a9fa9459Szrj       /* Get the values to be added together.  For signed and unsigned
1438*a9fa9459Szrj          relocations, we assume that all values should be truncated to
1439*a9fa9459Szrj          the size of an address.  For bitfields, all the bits matter.
1440*a9fa9459Szrj          See also bfd_check_overflow.  */
1441*a9fa9459Szrj       fieldmask = N_ONES (howto->bitsize);
1442*a9fa9459Szrj       signmask = ~fieldmask;
1443*a9fa9459Szrj       addrmask = (N_ONES (bfd_arch_bits_per_address (input_bfd))
1444*a9fa9459Szrj 		  | (fieldmask << rightshift));
1445*a9fa9459Szrj       a = (relocation & addrmask) >> rightshift;
1446*a9fa9459Szrj       b = (x & howto->src_mask & addrmask) >> bitpos;
1447*a9fa9459Szrj       addrmask >>= rightshift;
1448*a9fa9459Szrj 
1449*a9fa9459Szrj       switch (howto->complain_on_overflow)
1450*a9fa9459Szrj 	{
1451*a9fa9459Szrj 	case complain_overflow_signed:
1452*a9fa9459Szrj 	  /* If any sign bits are set, all sign bits must be set.
1453*a9fa9459Szrj 	     That is, A must be a valid negative address after
1454*a9fa9459Szrj 	     shifting.  */
1455*a9fa9459Szrj 	  signmask = ~(fieldmask >> 1);
1456*a9fa9459Szrj 	  /* Fall thru */
1457*a9fa9459Szrj 
1458*a9fa9459Szrj 	case complain_overflow_bitfield:
1459*a9fa9459Szrj 	  /* Much like the signed check, but for a field one bit
1460*a9fa9459Szrj 	     wider.  We allow a bitfield to represent numbers in the
1461*a9fa9459Szrj 	     range -2**n to 2**n-1, where n is the number of bits in the
1462*a9fa9459Szrj 	     field.  Note that when bfd_vma is 32 bits, a 32-bit reloc
1463*a9fa9459Szrj 	     can't overflow, which is exactly what we want.  */
1464*a9fa9459Szrj 	  ss = a & signmask;
1465*a9fa9459Szrj 	  if (ss != 0 && ss != (addrmask & signmask))
1466*a9fa9459Szrj 	    flag = bfd_reloc_overflow;
1467*a9fa9459Szrj 
1468*a9fa9459Szrj 	  /* We only need this next bit of code if the sign bit of B
1469*a9fa9459Szrj              is below the sign bit of A.  This would only happen if
1470*a9fa9459Szrj              SRC_MASK had fewer bits than BITSIZE.  Note that if
1471*a9fa9459Szrj              SRC_MASK has more bits than BITSIZE, we can get into
1472*a9fa9459Szrj              trouble; we would need to verify that B is in range, as
1473*a9fa9459Szrj              we do for A above.  */
1474*a9fa9459Szrj 	  ss = ((~howto->src_mask) >> 1) & howto->src_mask;
1475*a9fa9459Szrj 	  ss >>= bitpos;
1476*a9fa9459Szrj 
1477*a9fa9459Szrj 	  /* Set all the bits above the sign bit.  */
1478*a9fa9459Szrj 	  b = (b ^ ss) - ss;
1479*a9fa9459Szrj 
1480*a9fa9459Szrj 	  /* Now we can do the addition.  */
1481*a9fa9459Szrj 	  sum = a + b;
1482*a9fa9459Szrj 
1483*a9fa9459Szrj 	  /* See if the result has the correct sign.  Bits above the
1484*a9fa9459Szrj              sign bit are junk now; ignore them.  If the sum is
1485*a9fa9459Szrj              positive, make sure we did not have all negative inputs;
1486*a9fa9459Szrj              if the sum is negative, make sure we did not have all
1487*a9fa9459Szrj              positive inputs.  The test below looks only at the sign
1488*a9fa9459Szrj              bits, and it really just
1489*a9fa9459Szrj 	         SIGN (A) == SIGN (B) && SIGN (A) != SIGN (SUM)
1490*a9fa9459Szrj 
1491*a9fa9459Szrj 	     We mask with addrmask here to explicitly allow an address
1492*a9fa9459Szrj 	     wrap-around.  The Linux kernel relies on it, and it is
1493*a9fa9459Szrj 	     the only way to write assembler code which can run when
1494*a9fa9459Szrj 	     loaded at a location 0x80000000 away from the location at
1495*a9fa9459Szrj 	     which it is linked.  */
1496*a9fa9459Szrj 	  if (((~(a ^ b)) & (a ^ sum)) & signmask & addrmask)
1497*a9fa9459Szrj 	    flag = bfd_reloc_overflow;
1498*a9fa9459Szrj 	  break;
1499*a9fa9459Szrj 
1500*a9fa9459Szrj 	case complain_overflow_unsigned:
1501*a9fa9459Szrj 	  /* Checking for an unsigned overflow is relatively easy:
1502*a9fa9459Szrj              trim the addresses and add, and trim the result as well.
1503*a9fa9459Szrj              Overflow is normally indicated when the result does not
1504*a9fa9459Szrj              fit in the field.  However, we also need to consider the
1505*a9fa9459Szrj              case when, e.g., fieldmask is 0x7fffffff or smaller, an
1506*a9fa9459Szrj              input is 0x80000000, and bfd_vma is only 32 bits; then we
1507*a9fa9459Szrj              will get sum == 0, but there is an overflow, since the
1508*a9fa9459Szrj              inputs did not fit in the field.  Instead of doing a
1509*a9fa9459Szrj              separate test, we can check for this by or-ing in the
1510*a9fa9459Szrj              operands when testing for the sum overflowing its final
1511*a9fa9459Szrj              field.  */
1512*a9fa9459Szrj 	  sum = (a + b) & addrmask;
1513*a9fa9459Szrj 	  if ((a | b | sum) & signmask)
1514*a9fa9459Szrj 	    flag = bfd_reloc_overflow;
1515*a9fa9459Szrj 	  break;
1516*a9fa9459Szrj 
1517*a9fa9459Szrj 	default:
1518*a9fa9459Szrj 	  abort ();
1519*a9fa9459Szrj 	}
1520*a9fa9459Szrj     }
1521*a9fa9459Szrj 
1522*a9fa9459Szrj   /* Put RELOCATION in the right bits.  */
1523*a9fa9459Szrj   relocation >>= (bfd_vma) rightshift;
1524*a9fa9459Szrj   relocation <<= (bfd_vma) bitpos;
1525*a9fa9459Szrj 
1526*a9fa9459Szrj   /* Add RELOCATION to the right bits of X.  */
1527*a9fa9459Szrj   x = ((x & ~howto->dst_mask)
1528*a9fa9459Szrj        | (((x & howto->src_mask) + relocation) & howto->dst_mask));
1529*a9fa9459Szrj 
1530*a9fa9459Szrj   /* Put the relocated value back in the object file.  */
1531*a9fa9459Szrj   switch (size)
1532*a9fa9459Szrj     {
1533*a9fa9459Szrj     default:
1534*a9fa9459Szrj       abort ();
1535*a9fa9459Szrj     case 1:
1536*a9fa9459Szrj       bfd_put_8 (input_bfd, x, location);
1537*a9fa9459Szrj       break;
1538*a9fa9459Szrj     case 2:
1539*a9fa9459Szrj       bfd_put_16 (input_bfd, x, location);
1540*a9fa9459Szrj       break;
1541*a9fa9459Szrj     case 4:
1542*a9fa9459Szrj       bfd_put_32 (input_bfd, x, location);
1543*a9fa9459Szrj       break;
1544*a9fa9459Szrj     case 8:
1545*a9fa9459Szrj #ifdef BFD64
1546*a9fa9459Szrj       bfd_put_64 (input_bfd, x, location);
1547*a9fa9459Szrj #else
1548*a9fa9459Szrj       abort ();
1549*a9fa9459Szrj #endif
1550*a9fa9459Szrj       break;
1551*a9fa9459Szrj     }
1552*a9fa9459Szrj 
1553*a9fa9459Szrj   return flag;
1554*a9fa9459Szrj }
1555*a9fa9459Szrj 
1556*a9fa9459Szrj /* Clear a given location using a given howto, by applying a fixed relocation
1557*a9fa9459Szrj    value and discarding any in-place addend.  This is used for fixed-up
1558*a9fa9459Szrj    relocations against discarded symbols, to make ignorable debug or unwind
1559*a9fa9459Szrj    information more obvious.  */
1560*a9fa9459Szrj 
1561*a9fa9459Szrj void
_bfd_clear_contents(reloc_howto_type * howto,bfd * input_bfd,asection * input_section,bfd_byte * location)1562*a9fa9459Szrj _bfd_clear_contents (reloc_howto_type *howto,
1563*a9fa9459Szrj 		     bfd *input_bfd,
1564*a9fa9459Szrj 		     asection *input_section,
1565*a9fa9459Szrj 		     bfd_byte *location)
1566*a9fa9459Szrj {
1567*a9fa9459Szrj   int size;
1568*a9fa9459Szrj   bfd_vma x = 0;
1569*a9fa9459Szrj 
1570*a9fa9459Szrj   /* Get the value we are going to relocate.  */
1571*a9fa9459Szrj   size = bfd_get_reloc_size (howto);
1572*a9fa9459Szrj   switch (size)
1573*a9fa9459Szrj     {
1574*a9fa9459Szrj     default:
1575*a9fa9459Szrj       abort ();
1576*a9fa9459Szrj     case 0:
1577*a9fa9459Szrj       return;
1578*a9fa9459Szrj     case 1:
1579*a9fa9459Szrj       x = bfd_get_8 (input_bfd, location);
1580*a9fa9459Szrj       break;
1581*a9fa9459Szrj     case 2:
1582*a9fa9459Szrj       x = bfd_get_16 (input_bfd, location);
1583*a9fa9459Szrj       break;
1584*a9fa9459Szrj     case 4:
1585*a9fa9459Szrj       x = bfd_get_32 (input_bfd, location);
1586*a9fa9459Szrj       break;
1587*a9fa9459Szrj     case 8:
1588*a9fa9459Szrj #ifdef BFD64
1589*a9fa9459Szrj       x = bfd_get_64 (input_bfd, location);
1590*a9fa9459Szrj #else
1591*a9fa9459Szrj       abort ();
1592*a9fa9459Szrj #endif
1593*a9fa9459Szrj       break;
1594*a9fa9459Szrj     }
1595*a9fa9459Szrj 
1596*a9fa9459Szrj   /* Zero out the unwanted bits of X.  */
1597*a9fa9459Szrj   x &= ~howto->dst_mask;
1598*a9fa9459Szrj 
1599*a9fa9459Szrj   /* For a range list, use 1 instead of 0 as placeholder.  0
1600*a9fa9459Szrj      would terminate the list, hiding any later entries.  */
1601*a9fa9459Szrj   if (strcmp (bfd_get_section_name (input_bfd, input_section),
1602*a9fa9459Szrj 	      ".debug_ranges") == 0
1603*a9fa9459Szrj       && (howto->dst_mask & 1) != 0)
1604*a9fa9459Szrj     x |= 1;
1605*a9fa9459Szrj 
1606*a9fa9459Szrj   /* Put the relocated value back in the object file.  */
1607*a9fa9459Szrj   switch (size)
1608*a9fa9459Szrj     {
1609*a9fa9459Szrj     default:
1610*a9fa9459Szrj     case 0:
1611*a9fa9459Szrj       abort ();
1612*a9fa9459Szrj     case 1:
1613*a9fa9459Szrj       bfd_put_8 (input_bfd, x, location);
1614*a9fa9459Szrj       break;
1615*a9fa9459Szrj     case 2:
1616*a9fa9459Szrj       bfd_put_16 (input_bfd, x, location);
1617*a9fa9459Szrj       break;
1618*a9fa9459Szrj     case 4:
1619*a9fa9459Szrj       bfd_put_32 (input_bfd, x, location);
1620*a9fa9459Szrj       break;
1621*a9fa9459Szrj     case 8:
1622*a9fa9459Szrj #ifdef BFD64
1623*a9fa9459Szrj       bfd_put_64 (input_bfd, x, location);
1624*a9fa9459Szrj #else
1625*a9fa9459Szrj       abort ();
1626*a9fa9459Szrj #endif
1627*a9fa9459Szrj       break;
1628*a9fa9459Szrj     }
1629*a9fa9459Szrj }
1630*a9fa9459Szrj 
1631*a9fa9459Szrj /*
1632*a9fa9459Szrj DOCDD
1633*a9fa9459Szrj INODE
1634*a9fa9459Szrj 	howto manager,  , typedef arelent, Relocations
1635*a9fa9459Szrj 
1636*a9fa9459Szrj SUBSECTION
1637*a9fa9459Szrj 	The howto manager
1638*a9fa9459Szrj 
1639*a9fa9459Szrj 	When an application wants to create a relocation, but doesn't
1640*a9fa9459Szrj 	know what the target machine might call it, it can find out by
1641*a9fa9459Szrj 	using this bit of code.
1642*a9fa9459Szrj 
1643*a9fa9459Szrj */
1644*a9fa9459Szrj 
1645*a9fa9459Szrj /*
1646*a9fa9459Szrj TYPEDEF
1647*a9fa9459Szrj 	bfd_reloc_code_type
1648*a9fa9459Szrj 
1649*a9fa9459Szrj DESCRIPTION
1650*a9fa9459Szrj 	The insides of a reloc code.  The idea is that, eventually, there
1651*a9fa9459Szrj 	will be one enumerator for every type of relocation we ever do.
1652*a9fa9459Szrj 	Pass one of these values to <<bfd_reloc_type_lookup>>, and it'll
1653*a9fa9459Szrj 	return a howto pointer.
1654*a9fa9459Szrj 
1655*a9fa9459Szrj 	This does mean that the application must determine the correct
1656*a9fa9459Szrj 	enumerator value; you can't get a howto pointer from a random set
1657*a9fa9459Szrj 	of attributes.
1658*a9fa9459Szrj 
1659*a9fa9459Szrj SENUM
1660*a9fa9459Szrj    bfd_reloc_code_real
1661*a9fa9459Szrj 
1662*a9fa9459Szrj ENUM
1663*a9fa9459Szrj   BFD_RELOC_64
1664*a9fa9459Szrj ENUMX
1665*a9fa9459Szrj   BFD_RELOC_32
1666*a9fa9459Szrj ENUMX
1667*a9fa9459Szrj   BFD_RELOC_26
1668*a9fa9459Szrj ENUMX
1669*a9fa9459Szrj   BFD_RELOC_24
1670*a9fa9459Szrj ENUMX
1671*a9fa9459Szrj   BFD_RELOC_16
1672*a9fa9459Szrj ENUMX
1673*a9fa9459Szrj   BFD_RELOC_14
1674*a9fa9459Szrj ENUMX
1675*a9fa9459Szrj   BFD_RELOC_8
1676*a9fa9459Szrj ENUMDOC
1677*a9fa9459Szrj   Basic absolute relocations of N bits.
1678*a9fa9459Szrj 
1679*a9fa9459Szrj ENUM
1680*a9fa9459Szrj   BFD_RELOC_64_PCREL
1681*a9fa9459Szrj ENUMX
1682*a9fa9459Szrj   BFD_RELOC_32_PCREL
1683*a9fa9459Szrj ENUMX
1684*a9fa9459Szrj   BFD_RELOC_24_PCREL
1685*a9fa9459Szrj ENUMX
1686*a9fa9459Szrj   BFD_RELOC_16_PCREL
1687*a9fa9459Szrj ENUMX
1688*a9fa9459Szrj   BFD_RELOC_12_PCREL
1689*a9fa9459Szrj ENUMX
1690*a9fa9459Szrj   BFD_RELOC_8_PCREL
1691*a9fa9459Szrj ENUMDOC
1692*a9fa9459Szrj   PC-relative relocations.  Sometimes these are relative to the address
1693*a9fa9459Szrj of the relocation itself; sometimes they are relative to the start of
1694*a9fa9459Szrj the section containing the relocation.  It depends on the specific target.
1695*a9fa9459Szrj 
1696*a9fa9459Szrj The 24-bit relocation is used in some Intel 960 configurations.
1697*a9fa9459Szrj 
1698*a9fa9459Szrj ENUM
1699*a9fa9459Szrj   BFD_RELOC_32_SECREL
1700*a9fa9459Szrj ENUMDOC
1701*a9fa9459Szrj   Section relative relocations.  Some targets need this for DWARF2.
1702*a9fa9459Szrj 
1703*a9fa9459Szrj ENUM
1704*a9fa9459Szrj   BFD_RELOC_32_GOT_PCREL
1705*a9fa9459Szrj ENUMX
1706*a9fa9459Szrj   BFD_RELOC_16_GOT_PCREL
1707*a9fa9459Szrj ENUMX
1708*a9fa9459Szrj   BFD_RELOC_8_GOT_PCREL
1709*a9fa9459Szrj ENUMX
1710*a9fa9459Szrj   BFD_RELOC_32_GOTOFF
1711*a9fa9459Szrj ENUMX
1712*a9fa9459Szrj   BFD_RELOC_16_GOTOFF
1713*a9fa9459Szrj ENUMX
1714*a9fa9459Szrj   BFD_RELOC_LO16_GOTOFF
1715*a9fa9459Szrj ENUMX
1716*a9fa9459Szrj   BFD_RELOC_HI16_GOTOFF
1717*a9fa9459Szrj ENUMX
1718*a9fa9459Szrj   BFD_RELOC_HI16_S_GOTOFF
1719*a9fa9459Szrj ENUMX
1720*a9fa9459Szrj   BFD_RELOC_8_GOTOFF
1721*a9fa9459Szrj ENUMX
1722*a9fa9459Szrj   BFD_RELOC_64_PLT_PCREL
1723*a9fa9459Szrj ENUMX
1724*a9fa9459Szrj   BFD_RELOC_32_PLT_PCREL
1725*a9fa9459Szrj ENUMX
1726*a9fa9459Szrj   BFD_RELOC_24_PLT_PCREL
1727*a9fa9459Szrj ENUMX
1728*a9fa9459Szrj   BFD_RELOC_16_PLT_PCREL
1729*a9fa9459Szrj ENUMX
1730*a9fa9459Szrj   BFD_RELOC_8_PLT_PCREL
1731*a9fa9459Szrj ENUMX
1732*a9fa9459Szrj   BFD_RELOC_64_PLTOFF
1733*a9fa9459Szrj ENUMX
1734*a9fa9459Szrj   BFD_RELOC_32_PLTOFF
1735*a9fa9459Szrj ENUMX
1736*a9fa9459Szrj   BFD_RELOC_16_PLTOFF
1737*a9fa9459Szrj ENUMX
1738*a9fa9459Szrj   BFD_RELOC_LO16_PLTOFF
1739*a9fa9459Szrj ENUMX
1740*a9fa9459Szrj   BFD_RELOC_HI16_PLTOFF
1741*a9fa9459Szrj ENUMX
1742*a9fa9459Szrj   BFD_RELOC_HI16_S_PLTOFF
1743*a9fa9459Szrj ENUMX
1744*a9fa9459Szrj   BFD_RELOC_8_PLTOFF
1745*a9fa9459Szrj ENUMDOC
1746*a9fa9459Szrj   For ELF.
1747*a9fa9459Szrj 
1748*a9fa9459Szrj ENUM
1749*a9fa9459Szrj   BFD_RELOC_SIZE32
1750*a9fa9459Szrj ENUMX
1751*a9fa9459Szrj   BFD_RELOC_SIZE64
1752*a9fa9459Szrj ENUMDOC
1753*a9fa9459Szrj   Size relocations.
1754*a9fa9459Szrj 
1755*a9fa9459Szrj ENUM
1756*a9fa9459Szrj   BFD_RELOC_68K_GLOB_DAT
1757*a9fa9459Szrj ENUMX
1758*a9fa9459Szrj   BFD_RELOC_68K_JMP_SLOT
1759*a9fa9459Szrj ENUMX
1760*a9fa9459Szrj   BFD_RELOC_68K_RELATIVE
1761*a9fa9459Szrj ENUMX
1762*a9fa9459Szrj   BFD_RELOC_68K_TLS_GD32
1763*a9fa9459Szrj ENUMX
1764*a9fa9459Szrj   BFD_RELOC_68K_TLS_GD16
1765*a9fa9459Szrj ENUMX
1766*a9fa9459Szrj   BFD_RELOC_68K_TLS_GD8
1767*a9fa9459Szrj ENUMX
1768*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDM32
1769*a9fa9459Szrj ENUMX
1770*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDM16
1771*a9fa9459Szrj ENUMX
1772*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDM8
1773*a9fa9459Szrj ENUMX
1774*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDO32
1775*a9fa9459Szrj ENUMX
1776*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDO16
1777*a9fa9459Szrj ENUMX
1778*a9fa9459Szrj   BFD_RELOC_68K_TLS_LDO8
1779*a9fa9459Szrj ENUMX
1780*a9fa9459Szrj   BFD_RELOC_68K_TLS_IE32
1781*a9fa9459Szrj ENUMX
1782*a9fa9459Szrj   BFD_RELOC_68K_TLS_IE16
1783*a9fa9459Szrj ENUMX
1784*a9fa9459Szrj   BFD_RELOC_68K_TLS_IE8
1785*a9fa9459Szrj ENUMX
1786*a9fa9459Szrj   BFD_RELOC_68K_TLS_LE32
1787*a9fa9459Szrj ENUMX
1788*a9fa9459Szrj   BFD_RELOC_68K_TLS_LE16
1789*a9fa9459Szrj ENUMX
1790*a9fa9459Szrj   BFD_RELOC_68K_TLS_LE8
1791*a9fa9459Szrj ENUMDOC
1792*a9fa9459Szrj   Relocations used by 68K ELF.
1793*a9fa9459Szrj 
1794*a9fa9459Szrj ENUM
1795*a9fa9459Szrj   BFD_RELOC_32_BASEREL
1796*a9fa9459Szrj ENUMX
1797*a9fa9459Szrj   BFD_RELOC_16_BASEREL
1798*a9fa9459Szrj ENUMX
1799*a9fa9459Szrj   BFD_RELOC_LO16_BASEREL
1800*a9fa9459Szrj ENUMX
1801*a9fa9459Szrj   BFD_RELOC_HI16_BASEREL
1802*a9fa9459Szrj ENUMX
1803*a9fa9459Szrj   BFD_RELOC_HI16_S_BASEREL
1804*a9fa9459Szrj ENUMX
1805*a9fa9459Szrj   BFD_RELOC_8_BASEREL
1806*a9fa9459Szrj ENUMX
1807*a9fa9459Szrj   BFD_RELOC_RVA
1808*a9fa9459Szrj ENUMDOC
1809*a9fa9459Szrj   Linkage-table relative.
1810*a9fa9459Szrj 
1811*a9fa9459Szrj ENUM
1812*a9fa9459Szrj   BFD_RELOC_8_FFnn
1813*a9fa9459Szrj ENUMDOC
1814*a9fa9459Szrj   Absolute 8-bit relocation, but used to form an address like 0xFFnn.
1815*a9fa9459Szrj 
1816*a9fa9459Szrj ENUM
1817*a9fa9459Szrj   BFD_RELOC_32_PCREL_S2
1818*a9fa9459Szrj ENUMX
1819*a9fa9459Szrj   BFD_RELOC_16_PCREL_S2
1820*a9fa9459Szrj ENUMX
1821*a9fa9459Szrj   BFD_RELOC_23_PCREL_S2
1822*a9fa9459Szrj ENUMDOC
1823*a9fa9459Szrj   These PC-relative relocations are stored as word displacements --
1824*a9fa9459Szrj i.e., byte displacements shifted right two bits.  The 30-bit word
1825*a9fa9459Szrj displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
1826*a9fa9459Szrj SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
1827*a9fa9459Szrj signed 16-bit displacement is used on the MIPS, and the 23-bit
1828*a9fa9459Szrj displacement is used on the Alpha.
1829*a9fa9459Szrj 
1830*a9fa9459Szrj ENUM
1831*a9fa9459Szrj   BFD_RELOC_HI22
1832*a9fa9459Szrj ENUMX
1833*a9fa9459Szrj   BFD_RELOC_LO10
1834*a9fa9459Szrj ENUMDOC
1835*a9fa9459Szrj   High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
1836*a9fa9459Szrj the target word.  These are used on the SPARC.
1837*a9fa9459Szrj 
1838*a9fa9459Szrj ENUM
1839*a9fa9459Szrj   BFD_RELOC_GPREL16
1840*a9fa9459Szrj ENUMX
1841*a9fa9459Szrj   BFD_RELOC_GPREL32
1842*a9fa9459Szrj ENUMDOC
1843*a9fa9459Szrj   For systems that allocate a Global Pointer register, these are
1844*a9fa9459Szrj displacements off that register.  These relocation types are
1845*a9fa9459Szrj handled specially, because the value the register will have is
1846*a9fa9459Szrj decided relatively late.
1847*a9fa9459Szrj 
1848*a9fa9459Szrj ENUM
1849*a9fa9459Szrj   BFD_RELOC_I960_CALLJ
1850*a9fa9459Szrj ENUMDOC
1851*a9fa9459Szrj   Reloc types used for i960/b.out.
1852*a9fa9459Szrj 
1853*a9fa9459Szrj ENUM
1854*a9fa9459Szrj   BFD_RELOC_NONE
1855*a9fa9459Szrj ENUMX
1856*a9fa9459Szrj   BFD_RELOC_SPARC_WDISP22
1857*a9fa9459Szrj ENUMX
1858*a9fa9459Szrj   BFD_RELOC_SPARC22
1859*a9fa9459Szrj ENUMX
1860*a9fa9459Szrj   BFD_RELOC_SPARC13
1861*a9fa9459Szrj ENUMX
1862*a9fa9459Szrj   BFD_RELOC_SPARC_GOT10
1863*a9fa9459Szrj ENUMX
1864*a9fa9459Szrj   BFD_RELOC_SPARC_GOT13
1865*a9fa9459Szrj ENUMX
1866*a9fa9459Szrj   BFD_RELOC_SPARC_GOT22
1867*a9fa9459Szrj ENUMX
1868*a9fa9459Szrj   BFD_RELOC_SPARC_PC10
1869*a9fa9459Szrj ENUMX
1870*a9fa9459Szrj   BFD_RELOC_SPARC_PC22
1871*a9fa9459Szrj ENUMX
1872*a9fa9459Szrj   BFD_RELOC_SPARC_WPLT30
1873*a9fa9459Szrj ENUMX
1874*a9fa9459Szrj   BFD_RELOC_SPARC_COPY
1875*a9fa9459Szrj ENUMX
1876*a9fa9459Szrj   BFD_RELOC_SPARC_GLOB_DAT
1877*a9fa9459Szrj ENUMX
1878*a9fa9459Szrj   BFD_RELOC_SPARC_JMP_SLOT
1879*a9fa9459Szrj ENUMX
1880*a9fa9459Szrj   BFD_RELOC_SPARC_RELATIVE
1881*a9fa9459Szrj ENUMX
1882*a9fa9459Szrj   BFD_RELOC_SPARC_UA16
1883*a9fa9459Szrj ENUMX
1884*a9fa9459Szrj   BFD_RELOC_SPARC_UA32
1885*a9fa9459Szrj ENUMX
1886*a9fa9459Szrj   BFD_RELOC_SPARC_UA64
1887*a9fa9459Szrj ENUMX
1888*a9fa9459Szrj   BFD_RELOC_SPARC_GOTDATA_HIX22
1889*a9fa9459Szrj ENUMX
1890*a9fa9459Szrj   BFD_RELOC_SPARC_GOTDATA_LOX10
1891*a9fa9459Szrj ENUMX
1892*a9fa9459Szrj   BFD_RELOC_SPARC_GOTDATA_OP_HIX22
1893*a9fa9459Szrj ENUMX
1894*a9fa9459Szrj   BFD_RELOC_SPARC_GOTDATA_OP_LOX10
1895*a9fa9459Szrj ENUMX
1896*a9fa9459Szrj   BFD_RELOC_SPARC_GOTDATA_OP
1897*a9fa9459Szrj ENUMX
1898*a9fa9459Szrj   BFD_RELOC_SPARC_JMP_IREL
1899*a9fa9459Szrj ENUMX
1900*a9fa9459Szrj   BFD_RELOC_SPARC_IRELATIVE
1901*a9fa9459Szrj ENUMDOC
1902*a9fa9459Szrj   SPARC ELF relocations.  There is probably some overlap with other
1903*a9fa9459Szrj   relocation types already defined.
1904*a9fa9459Szrj 
1905*a9fa9459Szrj ENUM
1906*a9fa9459Szrj   BFD_RELOC_SPARC_BASE13
1907*a9fa9459Szrj ENUMX
1908*a9fa9459Szrj   BFD_RELOC_SPARC_BASE22
1909*a9fa9459Szrj ENUMDOC
1910*a9fa9459Szrj   I think these are specific to SPARC a.out (e.g., Sun 4).
1911*a9fa9459Szrj 
1912*a9fa9459Szrj ENUMEQ
1913*a9fa9459Szrj   BFD_RELOC_SPARC_64
1914*a9fa9459Szrj   BFD_RELOC_64
1915*a9fa9459Szrj ENUMX
1916*a9fa9459Szrj   BFD_RELOC_SPARC_10
1917*a9fa9459Szrj ENUMX
1918*a9fa9459Szrj   BFD_RELOC_SPARC_11
1919*a9fa9459Szrj ENUMX
1920*a9fa9459Szrj   BFD_RELOC_SPARC_OLO10
1921*a9fa9459Szrj ENUMX
1922*a9fa9459Szrj   BFD_RELOC_SPARC_HH22
1923*a9fa9459Szrj ENUMX
1924*a9fa9459Szrj   BFD_RELOC_SPARC_HM10
1925*a9fa9459Szrj ENUMX
1926*a9fa9459Szrj   BFD_RELOC_SPARC_LM22
1927*a9fa9459Szrj ENUMX
1928*a9fa9459Szrj   BFD_RELOC_SPARC_PC_HH22
1929*a9fa9459Szrj ENUMX
1930*a9fa9459Szrj   BFD_RELOC_SPARC_PC_HM10
1931*a9fa9459Szrj ENUMX
1932*a9fa9459Szrj   BFD_RELOC_SPARC_PC_LM22
1933*a9fa9459Szrj ENUMX
1934*a9fa9459Szrj   BFD_RELOC_SPARC_WDISP16
1935*a9fa9459Szrj ENUMX
1936*a9fa9459Szrj   BFD_RELOC_SPARC_WDISP19
1937*a9fa9459Szrj ENUMX
1938*a9fa9459Szrj   BFD_RELOC_SPARC_7
1939*a9fa9459Szrj ENUMX
1940*a9fa9459Szrj   BFD_RELOC_SPARC_6
1941*a9fa9459Szrj ENUMX
1942*a9fa9459Szrj   BFD_RELOC_SPARC_5
1943*a9fa9459Szrj ENUMEQX
1944*a9fa9459Szrj   BFD_RELOC_SPARC_DISP64
1945*a9fa9459Szrj   BFD_RELOC_64_PCREL
1946*a9fa9459Szrj ENUMX
1947*a9fa9459Szrj   BFD_RELOC_SPARC_PLT32
1948*a9fa9459Szrj ENUMX
1949*a9fa9459Szrj   BFD_RELOC_SPARC_PLT64
1950*a9fa9459Szrj ENUMX
1951*a9fa9459Szrj   BFD_RELOC_SPARC_HIX22
1952*a9fa9459Szrj ENUMX
1953*a9fa9459Szrj   BFD_RELOC_SPARC_LOX10
1954*a9fa9459Szrj ENUMX
1955*a9fa9459Szrj   BFD_RELOC_SPARC_H44
1956*a9fa9459Szrj ENUMX
1957*a9fa9459Szrj   BFD_RELOC_SPARC_M44
1958*a9fa9459Szrj ENUMX
1959*a9fa9459Szrj   BFD_RELOC_SPARC_L44
1960*a9fa9459Szrj ENUMX
1961*a9fa9459Szrj   BFD_RELOC_SPARC_REGISTER
1962*a9fa9459Szrj ENUMX
1963*a9fa9459Szrj   BFD_RELOC_SPARC_H34
1964*a9fa9459Szrj ENUMX
1965*a9fa9459Szrj   BFD_RELOC_SPARC_SIZE32
1966*a9fa9459Szrj ENUMX
1967*a9fa9459Szrj   BFD_RELOC_SPARC_SIZE64
1968*a9fa9459Szrj ENUMX
1969*a9fa9459Szrj   BFD_RELOC_SPARC_WDISP10
1970*a9fa9459Szrj ENUMDOC
1971*a9fa9459Szrj   SPARC64 relocations
1972*a9fa9459Szrj 
1973*a9fa9459Szrj ENUM
1974*a9fa9459Szrj   BFD_RELOC_SPARC_REV32
1975*a9fa9459Szrj ENUMDOC
1976*a9fa9459Szrj   SPARC little endian relocation
1977*a9fa9459Szrj ENUM
1978*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_GD_HI22
1979*a9fa9459Szrj ENUMX
1980*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_GD_LO10
1981*a9fa9459Szrj ENUMX
1982*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_GD_ADD
1983*a9fa9459Szrj ENUMX
1984*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_GD_CALL
1985*a9fa9459Szrj ENUMX
1986*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDM_HI22
1987*a9fa9459Szrj ENUMX
1988*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDM_LO10
1989*a9fa9459Szrj ENUMX
1990*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDM_ADD
1991*a9fa9459Szrj ENUMX
1992*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDM_CALL
1993*a9fa9459Szrj ENUMX
1994*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDO_HIX22
1995*a9fa9459Szrj ENUMX
1996*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDO_LOX10
1997*a9fa9459Szrj ENUMX
1998*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LDO_ADD
1999*a9fa9459Szrj ENUMX
2000*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_IE_HI22
2001*a9fa9459Szrj ENUMX
2002*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_IE_LO10
2003*a9fa9459Szrj ENUMX
2004*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_IE_LD
2005*a9fa9459Szrj ENUMX
2006*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_IE_LDX
2007*a9fa9459Szrj ENUMX
2008*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_IE_ADD
2009*a9fa9459Szrj ENUMX
2010*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LE_HIX22
2011*a9fa9459Szrj ENUMX
2012*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_LE_LOX10
2013*a9fa9459Szrj ENUMX
2014*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_DTPMOD32
2015*a9fa9459Szrj ENUMX
2016*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_DTPMOD64
2017*a9fa9459Szrj ENUMX
2018*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_DTPOFF32
2019*a9fa9459Szrj ENUMX
2020*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_DTPOFF64
2021*a9fa9459Szrj ENUMX
2022*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_TPOFF32
2023*a9fa9459Szrj ENUMX
2024*a9fa9459Szrj   BFD_RELOC_SPARC_TLS_TPOFF64
2025*a9fa9459Szrj ENUMDOC
2026*a9fa9459Szrj   SPARC TLS relocations
2027*a9fa9459Szrj 
2028*a9fa9459Szrj ENUM
2029*a9fa9459Szrj   BFD_RELOC_SPU_IMM7
2030*a9fa9459Szrj ENUMX
2031*a9fa9459Szrj   BFD_RELOC_SPU_IMM8
2032*a9fa9459Szrj ENUMX
2033*a9fa9459Szrj   BFD_RELOC_SPU_IMM10
2034*a9fa9459Szrj ENUMX
2035*a9fa9459Szrj   BFD_RELOC_SPU_IMM10W
2036*a9fa9459Szrj ENUMX
2037*a9fa9459Szrj   BFD_RELOC_SPU_IMM16
2038*a9fa9459Szrj ENUMX
2039*a9fa9459Szrj   BFD_RELOC_SPU_IMM16W
2040*a9fa9459Szrj ENUMX
2041*a9fa9459Szrj   BFD_RELOC_SPU_IMM18
2042*a9fa9459Szrj ENUMX
2043*a9fa9459Szrj   BFD_RELOC_SPU_PCREL9a
2044*a9fa9459Szrj ENUMX
2045*a9fa9459Szrj   BFD_RELOC_SPU_PCREL9b
2046*a9fa9459Szrj ENUMX
2047*a9fa9459Szrj   BFD_RELOC_SPU_PCREL16
2048*a9fa9459Szrj ENUMX
2049*a9fa9459Szrj   BFD_RELOC_SPU_LO16
2050*a9fa9459Szrj ENUMX
2051*a9fa9459Szrj   BFD_RELOC_SPU_HI16
2052*a9fa9459Szrj ENUMX
2053*a9fa9459Szrj   BFD_RELOC_SPU_PPU32
2054*a9fa9459Szrj ENUMX
2055*a9fa9459Szrj   BFD_RELOC_SPU_PPU64
2056*a9fa9459Szrj ENUMX
2057*a9fa9459Szrj   BFD_RELOC_SPU_ADD_PIC
2058*a9fa9459Szrj ENUMDOC
2059*a9fa9459Szrj   SPU Relocations.
2060*a9fa9459Szrj 
2061*a9fa9459Szrj ENUM
2062*a9fa9459Szrj   BFD_RELOC_ALPHA_GPDISP_HI16
2063*a9fa9459Szrj ENUMDOC
2064*a9fa9459Szrj   Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
2065*a9fa9459Szrj      "addend" in some special way.
2066*a9fa9459Szrj   For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
2067*a9fa9459Szrj      writing; when reading, it will be the absolute section symbol.  The
2068*a9fa9459Szrj      addend is the displacement in bytes of the "lda" instruction from
2069*a9fa9459Szrj      the "ldah" instruction (which is at the address of this reloc).
2070*a9fa9459Szrj ENUM
2071*a9fa9459Szrj   BFD_RELOC_ALPHA_GPDISP_LO16
2072*a9fa9459Szrj ENUMDOC
2073*a9fa9459Szrj   For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
2074*a9fa9459Szrj      with GPDISP_HI16 relocs.  The addend is ignored when writing the
2075*a9fa9459Szrj      relocations out, and is filled in with the file's GP value on
2076*a9fa9459Szrj      reading, for convenience.
2077*a9fa9459Szrj 
2078*a9fa9459Szrj ENUM
2079*a9fa9459Szrj   BFD_RELOC_ALPHA_GPDISP
2080*a9fa9459Szrj ENUMDOC
2081*a9fa9459Szrj   The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
2082*a9fa9459Szrj      relocation except that there is no accompanying GPDISP_LO16
2083*a9fa9459Szrj      relocation.
2084*a9fa9459Szrj 
2085*a9fa9459Szrj ENUM
2086*a9fa9459Szrj   BFD_RELOC_ALPHA_LITERAL
2087*a9fa9459Szrj ENUMX
2088*a9fa9459Szrj   BFD_RELOC_ALPHA_ELF_LITERAL
2089*a9fa9459Szrj ENUMX
2090*a9fa9459Szrj   BFD_RELOC_ALPHA_LITUSE
2091*a9fa9459Szrj ENUMDOC
2092*a9fa9459Szrj   The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
2093*a9fa9459Szrj      the assembler turns it into a LDQ instruction to load the address of
2094*a9fa9459Szrj      the symbol, and then fills in a register in the real instruction.
2095*a9fa9459Szrj 
2096*a9fa9459Szrj      The LITERAL reloc, at the LDQ instruction, refers to the .lita
2097*a9fa9459Szrj      section symbol.  The addend is ignored when writing, but is filled
2098*a9fa9459Szrj      in with the file's GP value on reading, for convenience, as with the
2099*a9fa9459Szrj      GPDISP_LO16 reloc.
2100*a9fa9459Szrj 
2101*a9fa9459Szrj      The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
2102*a9fa9459Szrj      It should refer to the symbol to be referenced, as with 16_GOTOFF,
2103*a9fa9459Szrj      but it generates output not based on the position within the .got
2104*a9fa9459Szrj      section, but relative to the GP value chosen for the file during the
2105*a9fa9459Szrj      final link stage.
2106*a9fa9459Szrj 
2107*a9fa9459Szrj      The LITUSE reloc, on the instruction using the loaded address, gives
2108*a9fa9459Szrj      information to the linker that it might be able to use to optimize
2109*a9fa9459Szrj      away some literal section references.  The symbol is ignored (read
2110*a9fa9459Szrj      as the absolute section symbol), and the "addend" indicates the type
2111*a9fa9459Szrj      of instruction using the register:
2112*a9fa9459Szrj               1 - "memory" fmt insn
2113*a9fa9459Szrj               2 - byte-manipulation (byte offset reg)
2114*a9fa9459Szrj               3 - jsr (target of branch)
2115*a9fa9459Szrj 
2116*a9fa9459Szrj ENUM
2117*a9fa9459Szrj   BFD_RELOC_ALPHA_HINT
2118*a9fa9459Szrj ENUMDOC
2119*a9fa9459Szrj   The HINT relocation indicates a value that should be filled into the
2120*a9fa9459Szrj      "hint" field of a jmp/jsr/ret instruction, for possible branch-
2121*a9fa9459Szrj      prediction logic which may be provided on some processors.
2122*a9fa9459Szrj 
2123*a9fa9459Szrj ENUM
2124*a9fa9459Szrj   BFD_RELOC_ALPHA_LINKAGE
2125*a9fa9459Szrj ENUMDOC
2126*a9fa9459Szrj   The LINKAGE relocation outputs a linkage pair in the object file,
2127*a9fa9459Szrj      which is filled by the linker.
2128*a9fa9459Szrj 
2129*a9fa9459Szrj ENUM
2130*a9fa9459Szrj   BFD_RELOC_ALPHA_CODEADDR
2131*a9fa9459Szrj ENUMDOC
2132*a9fa9459Szrj   The CODEADDR relocation outputs a STO_CA in the object file,
2133*a9fa9459Szrj      which is filled by the linker.
2134*a9fa9459Szrj 
2135*a9fa9459Szrj ENUM
2136*a9fa9459Szrj   BFD_RELOC_ALPHA_GPREL_HI16
2137*a9fa9459Szrj ENUMX
2138*a9fa9459Szrj   BFD_RELOC_ALPHA_GPREL_LO16
2139*a9fa9459Szrj ENUMDOC
2140*a9fa9459Szrj   The GPREL_HI/LO relocations together form a 32-bit offset from the
2141*a9fa9459Szrj      GP register.
2142*a9fa9459Szrj 
2143*a9fa9459Szrj ENUM
2144*a9fa9459Szrj   BFD_RELOC_ALPHA_BRSGP
2145*a9fa9459Szrj ENUMDOC
2146*a9fa9459Szrj   Like BFD_RELOC_23_PCREL_S2, except that the source and target must
2147*a9fa9459Szrj   share a common GP, and the target address is adjusted for
2148*a9fa9459Szrj   STO_ALPHA_STD_GPLOAD.
2149*a9fa9459Szrj 
2150*a9fa9459Szrj ENUM
2151*a9fa9459Szrj   BFD_RELOC_ALPHA_NOP
2152*a9fa9459Szrj ENUMDOC
2153*a9fa9459Szrj   The NOP relocation outputs a NOP if the longword displacement
2154*a9fa9459Szrj      between two procedure entry points is < 2^21.
2155*a9fa9459Szrj 
2156*a9fa9459Szrj ENUM
2157*a9fa9459Szrj   BFD_RELOC_ALPHA_BSR
2158*a9fa9459Szrj ENUMDOC
2159*a9fa9459Szrj   The BSR relocation outputs a BSR if the longword displacement
2160*a9fa9459Szrj      between two procedure entry points is < 2^21.
2161*a9fa9459Szrj 
2162*a9fa9459Szrj ENUM
2163*a9fa9459Szrj   BFD_RELOC_ALPHA_LDA
2164*a9fa9459Szrj ENUMDOC
2165*a9fa9459Szrj   The LDA relocation outputs a LDA if the longword displacement
2166*a9fa9459Szrj      between two procedure entry points is < 2^16.
2167*a9fa9459Szrj 
2168*a9fa9459Szrj ENUM
2169*a9fa9459Szrj   BFD_RELOC_ALPHA_BOH
2170*a9fa9459Szrj ENUMDOC
2171*a9fa9459Szrj   The BOH relocation outputs a BSR if the longword displacement
2172*a9fa9459Szrj      between two procedure entry points is < 2^21, or else a hint.
2173*a9fa9459Szrj 
2174*a9fa9459Szrj ENUM
2175*a9fa9459Szrj   BFD_RELOC_ALPHA_TLSGD
2176*a9fa9459Szrj ENUMX
2177*a9fa9459Szrj   BFD_RELOC_ALPHA_TLSLDM
2178*a9fa9459Szrj ENUMX
2179*a9fa9459Szrj   BFD_RELOC_ALPHA_DTPMOD64
2180*a9fa9459Szrj ENUMX
2181*a9fa9459Szrj   BFD_RELOC_ALPHA_GOTDTPREL16
2182*a9fa9459Szrj ENUMX
2183*a9fa9459Szrj   BFD_RELOC_ALPHA_DTPREL64
2184*a9fa9459Szrj ENUMX
2185*a9fa9459Szrj   BFD_RELOC_ALPHA_DTPREL_HI16
2186*a9fa9459Szrj ENUMX
2187*a9fa9459Szrj   BFD_RELOC_ALPHA_DTPREL_LO16
2188*a9fa9459Szrj ENUMX
2189*a9fa9459Szrj   BFD_RELOC_ALPHA_DTPREL16
2190*a9fa9459Szrj ENUMX
2191*a9fa9459Szrj   BFD_RELOC_ALPHA_GOTTPREL16
2192*a9fa9459Szrj ENUMX
2193*a9fa9459Szrj   BFD_RELOC_ALPHA_TPREL64
2194*a9fa9459Szrj ENUMX
2195*a9fa9459Szrj   BFD_RELOC_ALPHA_TPREL_HI16
2196*a9fa9459Szrj ENUMX
2197*a9fa9459Szrj   BFD_RELOC_ALPHA_TPREL_LO16
2198*a9fa9459Szrj ENUMX
2199*a9fa9459Szrj   BFD_RELOC_ALPHA_TPREL16
2200*a9fa9459Szrj ENUMDOC
2201*a9fa9459Szrj   Alpha thread-local storage relocations.
2202*a9fa9459Szrj 
2203*a9fa9459Szrj ENUM
2204*a9fa9459Szrj   BFD_RELOC_MIPS_JMP
2205*a9fa9459Szrj ENUMX
2206*a9fa9459Szrj   BFD_RELOC_MICROMIPS_JMP
2207*a9fa9459Szrj ENUMDOC
2208*a9fa9459Szrj   The MIPS jump instruction.
2209*a9fa9459Szrj 
2210*a9fa9459Szrj ENUM
2211*a9fa9459Szrj   BFD_RELOC_MIPS16_JMP
2212*a9fa9459Szrj ENUMDOC
2213*a9fa9459Szrj   The MIPS16 jump instruction.
2214*a9fa9459Szrj 
2215*a9fa9459Szrj ENUM
2216*a9fa9459Szrj   BFD_RELOC_MIPS16_GPREL
2217*a9fa9459Szrj ENUMDOC
2218*a9fa9459Szrj   MIPS16 GP relative reloc.
2219*a9fa9459Szrj 
2220*a9fa9459Szrj ENUM
2221*a9fa9459Szrj   BFD_RELOC_HI16
2222*a9fa9459Szrj ENUMDOC
2223*a9fa9459Szrj   High 16 bits of 32-bit value; simple reloc.
2224*a9fa9459Szrj 
2225*a9fa9459Szrj ENUM
2226*a9fa9459Szrj   BFD_RELOC_HI16_S
2227*a9fa9459Szrj ENUMDOC
2228*a9fa9459Szrj   High 16 bits of 32-bit value but the low 16 bits will be sign
2229*a9fa9459Szrj      extended and added to form the final result.  If the low 16
2230*a9fa9459Szrj      bits form a negative number, we need to add one to the high value
2231*a9fa9459Szrj      to compensate for the borrow when the low bits are added.
2232*a9fa9459Szrj 
2233*a9fa9459Szrj ENUM
2234*a9fa9459Szrj   BFD_RELOC_LO16
2235*a9fa9459Szrj ENUMDOC
2236*a9fa9459Szrj   Low 16 bits.
2237*a9fa9459Szrj 
2238*a9fa9459Szrj ENUM
2239*a9fa9459Szrj   BFD_RELOC_HI16_PCREL
2240*a9fa9459Szrj ENUMDOC
2241*a9fa9459Szrj   High 16 bits of 32-bit pc-relative value
2242*a9fa9459Szrj ENUM
2243*a9fa9459Szrj   BFD_RELOC_HI16_S_PCREL
2244*a9fa9459Szrj ENUMDOC
2245*a9fa9459Szrj   High 16 bits of 32-bit pc-relative value, adjusted
2246*a9fa9459Szrj ENUM
2247*a9fa9459Szrj   BFD_RELOC_LO16_PCREL
2248*a9fa9459Szrj ENUMDOC
2249*a9fa9459Szrj   Low 16 bits of pc-relative value
2250*a9fa9459Szrj 
2251*a9fa9459Szrj ENUM
2252*a9fa9459Szrj   BFD_RELOC_MIPS16_GOT16
2253*a9fa9459Szrj ENUMX
2254*a9fa9459Szrj   BFD_RELOC_MIPS16_CALL16
2255*a9fa9459Szrj ENUMDOC
2256*a9fa9459Szrj   Equivalent of BFD_RELOC_MIPS_*, but with the MIPS16 layout of
2257*a9fa9459Szrj      16-bit immediate fields
2258*a9fa9459Szrj ENUM
2259*a9fa9459Szrj   BFD_RELOC_MIPS16_HI16
2260*a9fa9459Szrj ENUMDOC
2261*a9fa9459Szrj   MIPS16 high 16 bits of 32-bit value.
2262*a9fa9459Szrj ENUM
2263*a9fa9459Szrj   BFD_RELOC_MIPS16_HI16_S
2264*a9fa9459Szrj ENUMDOC
2265*a9fa9459Szrj   MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
2266*a9fa9459Szrj      extended and added to form the final result.  If the low 16
2267*a9fa9459Szrj      bits form a negative number, we need to add one to the high value
2268*a9fa9459Szrj      to compensate for the borrow when the low bits are added.
2269*a9fa9459Szrj ENUM
2270*a9fa9459Szrj   BFD_RELOC_MIPS16_LO16
2271*a9fa9459Szrj ENUMDOC
2272*a9fa9459Szrj   MIPS16 low 16 bits.
2273*a9fa9459Szrj 
2274*a9fa9459Szrj ENUM
2275*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_GD
2276*a9fa9459Szrj ENUMX
2277*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_LDM
2278*a9fa9459Szrj ENUMX
2279*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_DTPREL_HI16
2280*a9fa9459Szrj ENUMX
2281*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_DTPREL_LO16
2282*a9fa9459Szrj ENUMX
2283*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_GOTTPREL
2284*a9fa9459Szrj ENUMX
2285*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_TPREL_HI16
2286*a9fa9459Szrj ENUMX
2287*a9fa9459Szrj   BFD_RELOC_MIPS16_TLS_TPREL_LO16
2288*a9fa9459Szrj ENUMDOC
2289*a9fa9459Szrj   MIPS16 TLS relocations
2290*a9fa9459Szrj 
2291*a9fa9459Szrj ENUM
2292*a9fa9459Szrj   BFD_RELOC_MIPS_LITERAL
2293*a9fa9459Szrj ENUMX
2294*a9fa9459Szrj   BFD_RELOC_MICROMIPS_LITERAL
2295*a9fa9459Szrj ENUMDOC
2296*a9fa9459Szrj   Relocation against a MIPS literal section.
2297*a9fa9459Szrj 
2298*a9fa9459Szrj ENUM
2299*a9fa9459Szrj   BFD_RELOC_MICROMIPS_7_PCREL_S1
2300*a9fa9459Szrj ENUMX
2301*a9fa9459Szrj   BFD_RELOC_MICROMIPS_10_PCREL_S1
2302*a9fa9459Szrj ENUMX
2303*a9fa9459Szrj   BFD_RELOC_MICROMIPS_16_PCREL_S1
2304*a9fa9459Szrj ENUMDOC
2305*a9fa9459Szrj   microMIPS PC-relative relocations.
2306*a9fa9459Szrj 
2307*a9fa9459Szrj ENUM
2308*a9fa9459Szrj   BFD_RELOC_MIPS16_16_PCREL_S1
2309*a9fa9459Szrj ENUMDOC
2310*a9fa9459Szrj   MIPS16 PC-relative relocation.
2311*a9fa9459Szrj 
2312*a9fa9459Szrj ENUM
2313*a9fa9459Szrj   BFD_RELOC_MIPS_21_PCREL_S2
2314*a9fa9459Szrj ENUMX
2315*a9fa9459Szrj   BFD_RELOC_MIPS_26_PCREL_S2
2316*a9fa9459Szrj ENUMX
2317*a9fa9459Szrj   BFD_RELOC_MIPS_18_PCREL_S3
2318*a9fa9459Szrj ENUMX
2319*a9fa9459Szrj   BFD_RELOC_MIPS_19_PCREL_S2
2320*a9fa9459Szrj ENUMDOC
2321*a9fa9459Szrj   MIPS PC-relative relocations.
2322*a9fa9459Szrj 
2323*a9fa9459Szrj ENUM
2324*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GPREL16
2325*a9fa9459Szrj ENUMX
2326*a9fa9459Szrj   BFD_RELOC_MICROMIPS_HI16
2327*a9fa9459Szrj ENUMX
2328*a9fa9459Szrj   BFD_RELOC_MICROMIPS_HI16_S
2329*a9fa9459Szrj ENUMX
2330*a9fa9459Szrj   BFD_RELOC_MICROMIPS_LO16
2331*a9fa9459Szrj ENUMDOC
2332*a9fa9459Szrj   microMIPS versions of generic BFD relocs.
2333*a9fa9459Szrj 
2334*a9fa9459Szrj ENUM
2335*a9fa9459Szrj   BFD_RELOC_MIPS_GOT16
2336*a9fa9459Szrj ENUMX
2337*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT16
2338*a9fa9459Szrj ENUMX
2339*a9fa9459Szrj   BFD_RELOC_MIPS_CALL16
2340*a9fa9459Szrj ENUMX
2341*a9fa9459Szrj   BFD_RELOC_MICROMIPS_CALL16
2342*a9fa9459Szrj ENUMX
2343*a9fa9459Szrj   BFD_RELOC_MIPS_GOT_HI16
2344*a9fa9459Szrj ENUMX
2345*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT_HI16
2346*a9fa9459Szrj ENUMX
2347*a9fa9459Szrj   BFD_RELOC_MIPS_GOT_LO16
2348*a9fa9459Szrj ENUMX
2349*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT_LO16
2350*a9fa9459Szrj ENUMX
2351*a9fa9459Szrj   BFD_RELOC_MIPS_CALL_HI16
2352*a9fa9459Szrj ENUMX
2353*a9fa9459Szrj   BFD_RELOC_MICROMIPS_CALL_HI16
2354*a9fa9459Szrj ENUMX
2355*a9fa9459Szrj   BFD_RELOC_MIPS_CALL_LO16
2356*a9fa9459Szrj ENUMX
2357*a9fa9459Szrj   BFD_RELOC_MICROMIPS_CALL_LO16
2358*a9fa9459Szrj ENUMX
2359*a9fa9459Szrj   BFD_RELOC_MIPS_SUB
2360*a9fa9459Szrj ENUMX
2361*a9fa9459Szrj   BFD_RELOC_MICROMIPS_SUB
2362*a9fa9459Szrj ENUMX
2363*a9fa9459Szrj   BFD_RELOC_MIPS_GOT_PAGE
2364*a9fa9459Szrj ENUMX
2365*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT_PAGE
2366*a9fa9459Szrj ENUMX
2367*a9fa9459Szrj   BFD_RELOC_MIPS_GOT_OFST
2368*a9fa9459Szrj ENUMX
2369*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT_OFST
2370*a9fa9459Szrj ENUMX
2371*a9fa9459Szrj   BFD_RELOC_MIPS_GOT_DISP
2372*a9fa9459Szrj ENUMX
2373*a9fa9459Szrj   BFD_RELOC_MICROMIPS_GOT_DISP
2374*a9fa9459Szrj ENUMX
2375*a9fa9459Szrj   BFD_RELOC_MIPS_SHIFT5
2376*a9fa9459Szrj ENUMX
2377*a9fa9459Szrj   BFD_RELOC_MIPS_SHIFT6
2378*a9fa9459Szrj ENUMX
2379*a9fa9459Szrj   BFD_RELOC_MIPS_INSERT_A
2380*a9fa9459Szrj ENUMX
2381*a9fa9459Szrj   BFD_RELOC_MIPS_INSERT_B
2382*a9fa9459Szrj ENUMX
2383*a9fa9459Szrj   BFD_RELOC_MIPS_DELETE
2384*a9fa9459Szrj ENUMX
2385*a9fa9459Szrj   BFD_RELOC_MIPS_HIGHEST
2386*a9fa9459Szrj ENUMX
2387*a9fa9459Szrj   BFD_RELOC_MICROMIPS_HIGHEST
2388*a9fa9459Szrj ENUMX
2389*a9fa9459Szrj   BFD_RELOC_MIPS_HIGHER
2390*a9fa9459Szrj ENUMX
2391*a9fa9459Szrj   BFD_RELOC_MICROMIPS_HIGHER
2392*a9fa9459Szrj ENUMX
2393*a9fa9459Szrj   BFD_RELOC_MIPS_SCN_DISP
2394*a9fa9459Szrj ENUMX
2395*a9fa9459Szrj   BFD_RELOC_MICROMIPS_SCN_DISP
2396*a9fa9459Szrj ENUMX
2397*a9fa9459Szrj   BFD_RELOC_MIPS_REL16
2398*a9fa9459Szrj ENUMX
2399*a9fa9459Szrj   BFD_RELOC_MIPS_RELGOT
2400*a9fa9459Szrj ENUMX
2401*a9fa9459Szrj   BFD_RELOC_MIPS_JALR
2402*a9fa9459Szrj ENUMX
2403*a9fa9459Szrj   BFD_RELOC_MICROMIPS_JALR
2404*a9fa9459Szrj ENUMX
2405*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPMOD32
2406*a9fa9459Szrj ENUMX
2407*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPREL32
2408*a9fa9459Szrj ENUMX
2409*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPMOD64
2410*a9fa9459Szrj ENUMX
2411*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPREL64
2412*a9fa9459Szrj ENUMX
2413*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_GD
2414*a9fa9459Szrj ENUMX
2415*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_GD
2416*a9fa9459Szrj ENUMX
2417*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_LDM
2418*a9fa9459Szrj ENUMX
2419*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_LDM
2420*a9fa9459Szrj ENUMX
2421*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPREL_HI16
2422*a9fa9459Szrj ENUMX
2423*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16
2424*a9fa9459Szrj ENUMX
2425*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_DTPREL_LO16
2426*a9fa9459Szrj ENUMX
2427*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16
2428*a9fa9459Szrj ENUMX
2429*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_GOTTPREL
2430*a9fa9459Szrj ENUMX
2431*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_GOTTPREL
2432*a9fa9459Szrj ENUMX
2433*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_TPREL32
2434*a9fa9459Szrj ENUMX
2435*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_TPREL64
2436*a9fa9459Szrj ENUMX
2437*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_TPREL_HI16
2438*a9fa9459Szrj ENUMX
2439*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_TPREL_HI16
2440*a9fa9459Szrj ENUMX
2441*a9fa9459Szrj   BFD_RELOC_MIPS_TLS_TPREL_LO16
2442*a9fa9459Szrj ENUMX
2443*a9fa9459Szrj   BFD_RELOC_MICROMIPS_TLS_TPREL_LO16
2444*a9fa9459Szrj ENUMX
2445*a9fa9459Szrj   BFD_RELOC_MIPS_EH
2446*a9fa9459Szrj ENUMDOC
2447*a9fa9459Szrj   MIPS ELF relocations.
2448*a9fa9459Szrj COMMENT
2449*a9fa9459Szrj 
2450*a9fa9459Szrj ENUM
2451*a9fa9459Szrj   BFD_RELOC_MIPS_COPY
2452*a9fa9459Szrj ENUMX
2453*a9fa9459Szrj   BFD_RELOC_MIPS_JUMP_SLOT
2454*a9fa9459Szrj ENUMDOC
2455*a9fa9459Szrj   MIPS ELF relocations (VxWorks and PLT extensions).
2456*a9fa9459Szrj COMMENT
2457*a9fa9459Szrj 
2458*a9fa9459Szrj ENUM
2459*a9fa9459Szrj   BFD_RELOC_MOXIE_10_PCREL
2460*a9fa9459Szrj ENUMDOC
2461*a9fa9459Szrj   Moxie ELF relocations.
2462*a9fa9459Szrj COMMENT
2463*a9fa9459Szrj 
2464*a9fa9459Szrj ENUM
2465*a9fa9459Szrj   BFD_RELOC_FT32_10
2466*a9fa9459Szrj ENUMX
2467*a9fa9459Szrj   BFD_RELOC_FT32_20
2468*a9fa9459Szrj ENUMX
2469*a9fa9459Szrj   BFD_RELOC_FT32_17
2470*a9fa9459Szrj ENUMX
2471*a9fa9459Szrj   BFD_RELOC_FT32_18
2472*a9fa9459Szrj ENUMDOC
2473*a9fa9459Szrj   FT32 ELF relocations.
2474*a9fa9459Szrj COMMENT
2475*a9fa9459Szrj 
2476*a9fa9459Szrj ENUM
2477*a9fa9459Szrj   BFD_RELOC_FRV_LABEL16
2478*a9fa9459Szrj ENUMX
2479*a9fa9459Szrj   BFD_RELOC_FRV_LABEL24
2480*a9fa9459Szrj ENUMX
2481*a9fa9459Szrj   BFD_RELOC_FRV_LO16
2482*a9fa9459Szrj ENUMX
2483*a9fa9459Szrj   BFD_RELOC_FRV_HI16
2484*a9fa9459Szrj ENUMX
2485*a9fa9459Szrj   BFD_RELOC_FRV_GPREL12
2486*a9fa9459Szrj ENUMX
2487*a9fa9459Szrj   BFD_RELOC_FRV_GPRELU12
2488*a9fa9459Szrj ENUMX
2489*a9fa9459Szrj   BFD_RELOC_FRV_GPREL32
2490*a9fa9459Szrj ENUMX
2491*a9fa9459Szrj   BFD_RELOC_FRV_GPRELHI
2492*a9fa9459Szrj ENUMX
2493*a9fa9459Szrj   BFD_RELOC_FRV_GPRELLO
2494*a9fa9459Szrj ENUMX
2495*a9fa9459Szrj   BFD_RELOC_FRV_GOT12
2496*a9fa9459Szrj ENUMX
2497*a9fa9459Szrj   BFD_RELOC_FRV_GOTHI
2498*a9fa9459Szrj ENUMX
2499*a9fa9459Szrj   BFD_RELOC_FRV_GOTLO
2500*a9fa9459Szrj ENUMX
2501*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC
2502*a9fa9459Szrj ENUMX
2503*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOT12
2504*a9fa9459Szrj ENUMX
2505*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOTHI
2506*a9fa9459Szrj ENUMX
2507*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOTLO
2508*a9fa9459Szrj ENUMX
2509*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_VALUE
2510*a9fa9459Szrj ENUMX
2511*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOTOFF12
2512*a9fa9459Szrj ENUMX
2513*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOTOFFHI
2514*a9fa9459Szrj ENUMX
2515*a9fa9459Szrj   BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
2516*a9fa9459Szrj ENUMX
2517*a9fa9459Szrj   BFD_RELOC_FRV_GOTOFF12
2518*a9fa9459Szrj ENUMX
2519*a9fa9459Szrj   BFD_RELOC_FRV_GOTOFFHI
2520*a9fa9459Szrj ENUMX
2521*a9fa9459Szrj   BFD_RELOC_FRV_GOTOFFLO
2522*a9fa9459Szrj ENUMX
2523*a9fa9459Szrj   BFD_RELOC_FRV_GETTLSOFF
2524*a9fa9459Szrj ENUMX
2525*a9fa9459Szrj   BFD_RELOC_FRV_TLSDESC_VALUE
2526*a9fa9459Szrj ENUMX
2527*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSDESC12
2528*a9fa9459Szrj ENUMX
2529*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSDESCHI
2530*a9fa9459Szrj ENUMX
2531*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSDESCLO
2532*a9fa9459Szrj ENUMX
2533*a9fa9459Szrj   BFD_RELOC_FRV_TLSMOFF12
2534*a9fa9459Szrj ENUMX
2535*a9fa9459Szrj   BFD_RELOC_FRV_TLSMOFFHI
2536*a9fa9459Szrj ENUMX
2537*a9fa9459Szrj   BFD_RELOC_FRV_TLSMOFFLO
2538*a9fa9459Szrj ENUMX
2539*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSOFF12
2540*a9fa9459Szrj ENUMX
2541*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSOFFHI
2542*a9fa9459Szrj ENUMX
2543*a9fa9459Szrj   BFD_RELOC_FRV_GOTTLSOFFLO
2544*a9fa9459Szrj ENUMX
2545*a9fa9459Szrj   BFD_RELOC_FRV_TLSOFF
2546*a9fa9459Szrj ENUMX
2547*a9fa9459Szrj   BFD_RELOC_FRV_TLSDESC_RELAX
2548*a9fa9459Szrj ENUMX
2549*a9fa9459Szrj   BFD_RELOC_FRV_GETTLSOFF_RELAX
2550*a9fa9459Szrj ENUMX
2551*a9fa9459Szrj   BFD_RELOC_FRV_TLSOFF_RELAX
2552*a9fa9459Szrj ENUMX
2553*a9fa9459Szrj   BFD_RELOC_FRV_TLSMOFF
2554*a9fa9459Szrj ENUMDOC
2555*a9fa9459Szrj   Fujitsu Frv Relocations.
2556*a9fa9459Szrj COMMENT
2557*a9fa9459Szrj 
2558*a9fa9459Szrj ENUM
2559*a9fa9459Szrj   BFD_RELOC_MN10300_GOTOFF24
2560*a9fa9459Szrj ENUMDOC
2561*a9fa9459Szrj   This is a 24bit GOT-relative reloc for the mn10300.
2562*a9fa9459Szrj ENUM
2563*a9fa9459Szrj   BFD_RELOC_MN10300_GOT32
2564*a9fa9459Szrj ENUMDOC
2565*a9fa9459Szrj   This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
2566*a9fa9459Szrj   in the instruction.
2567*a9fa9459Szrj ENUM
2568*a9fa9459Szrj   BFD_RELOC_MN10300_GOT24
2569*a9fa9459Szrj ENUMDOC
2570*a9fa9459Szrj   This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
2571*a9fa9459Szrj   in the instruction.
2572*a9fa9459Szrj ENUM
2573*a9fa9459Szrj   BFD_RELOC_MN10300_GOT16
2574*a9fa9459Szrj ENUMDOC
2575*a9fa9459Szrj   This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
2576*a9fa9459Szrj   in the instruction.
2577*a9fa9459Szrj ENUM
2578*a9fa9459Szrj   BFD_RELOC_MN10300_COPY
2579*a9fa9459Szrj ENUMDOC
2580*a9fa9459Szrj   Copy symbol at runtime.
2581*a9fa9459Szrj ENUM
2582*a9fa9459Szrj   BFD_RELOC_MN10300_GLOB_DAT
2583*a9fa9459Szrj ENUMDOC
2584*a9fa9459Szrj   Create GOT entry.
2585*a9fa9459Szrj ENUM
2586*a9fa9459Szrj   BFD_RELOC_MN10300_JMP_SLOT
2587*a9fa9459Szrj ENUMDOC
2588*a9fa9459Szrj   Create PLT entry.
2589*a9fa9459Szrj ENUM
2590*a9fa9459Szrj   BFD_RELOC_MN10300_RELATIVE
2591*a9fa9459Szrj ENUMDOC
2592*a9fa9459Szrj   Adjust by program base.
2593*a9fa9459Szrj ENUM
2594*a9fa9459Szrj   BFD_RELOC_MN10300_SYM_DIFF
2595*a9fa9459Szrj ENUMDOC
2596*a9fa9459Szrj   Together with another reloc targeted at the same location,
2597*a9fa9459Szrj   allows for a value that is the difference of two symbols
2598*a9fa9459Szrj   in the same section.
2599*a9fa9459Szrj ENUM
2600*a9fa9459Szrj   BFD_RELOC_MN10300_ALIGN
2601*a9fa9459Szrj ENUMDOC
2602*a9fa9459Szrj   The addend of this reloc is an alignment power that must
2603*a9fa9459Szrj   be honoured at the offset's location, regardless of linker
2604*a9fa9459Szrj   relaxation.
2605*a9fa9459Szrj ENUM
2606*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_GD
2607*a9fa9459Szrj ENUMX
2608*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_LD
2609*a9fa9459Szrj ENUMX
2610*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_LDO
2611*a9fa9459Szrj ENUMX
2612*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_GOTIE
2613*a9fa9459Szrj ENUMX
2614*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_IE
2615*a9fa9459Szrj ENUMX
2616*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_LE
2617*a9fa9459Szrj ENUMX
2618*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_DTPMOD
2619*a9fa9459Szrj ENUMX
2620*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_DTPOFF
2621*a9fa9459Szrj ENUMX
2622*a9fa9459Szrj   BFD_RELOC_MN10300_TLS_TPOFF
2623*a9fa9459Szrj ENUMDOC
2624*a9fa9459Szrj   Various TLS-related relocations.
2625*a9fa9459Szrj ENUM
2626*a9fa9459Szrj   BFD_RELOC_MN10300_32_PCREL
2627*a9fa9459Szrj ENUMDOC
2628*a9fa9459Szrj   This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
2629*a9fa9459Szrj   instruction.
2630*a9fa9459Szrj ENUM
2631*a9fa9459Szrj   BFD_RELOC_MN10300_16_PCREL
2632*a9fa9459Szrj ENUMDOC
2633*a9fa9459Szrj   This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
2634*a9fa9459Szrj   instruction.
2635*a9fa9459Szrj COMMENT
2636*a9fa9459Szrj 
2637*a9fa9459Szrj ENUM
2638*a9fa9459Szrj   BFD_RELOC_386_GOT32
2639*a9fa9459Szrj ENUMX
2640*a9fa9459Szrj   BFD_RELOC_386_PLT32
2641*a9fa9459Szrj ENUMX
2642*a9fa9459Szrj   BFD_RELOC_386_COPY
2643*a9fa9459Szrj ENUMX
2644*a9fa9459Szrj   BFD_RELOC_386_GLOB_DAT
2645*a9fa9459Szrj ENUMX
2646*a9fa9459Szrj   BFD_RELOC_386_JUMP_SLOT
2647*a9fa9459Szrj ENUMX
2648*a9fa9459Szrj   BFD_RELOC_386_RELATIVE
2649*a9fa9459Szrj ENUMX
2650*a9fa9459Szrj   BFD_RELOC_386_GOTOFF
2651*a9fa9459Szrj ENUMX
2652*a9fa9459Szrj   BFD_RELOC_386_GOTPC
2653*a9fa9459Szrj ENUMX
2654*a9fa9459Szrj   BFD_RELOC_386_TLS_TPOFF
2655*a9fa9459Szrj ENUMX
2656*a9fa9459Szrj   BFD_RELOC_386_TLS_IE
2657*a9fa9459Szrj ENUMX
2658*a9fa9459Szrj   BFD_RELOC_386_TLS_GOTIE
2659*a9fa9459Szrj ENUMX
2660*a9fa9459Szrj   BFD_RELOC_386_TLS_LE
2661*a9fa9459Szrj ENUMX
2662*a9fa9459Szrj   BFD_RELOC_386_TLS_GD
2663*a9fa9459Szrj ENUMX
2664*a9fa9459Szrj   BFD_RELOC_386_TLS_LDM
2665*a9fa9459Szrj ENUMX
2666*a9fa9459Szrj   BFD_RELOC_386_TLS_LDO_32
2667*a9fa9459Szrj ENUMX
2668*a9fa9459Szrj   BFD_RELOC_386_TLS_IE_32
2669*a9fa9459Szrj ENUMX
2670*a9fa9459Szrj   BFD_RELOC_386_TLS_LE_32
2671*a9fa9459Szrj ENUMX
2672*a9fa9459Szrj   BFD_RELOC_386_TLS_DTPMOD32
2673*a9fa9459Szrj ENUMX
2674*a9fa9459Szrj   BFD_RELOC_386_TLS_DTPOFF32
2675*a9fa9459Szrj ENUMX
2676*a9fa9459Szrj   BFD_RELOC_386_TLS_TPOFF32
2677*a9fa9459Szrj ENUMX
2678*a9fa9459Szrj   BFD_RELOC_386_TLS_GOTDESC
2679*a9fa9459Szrj ENUMX
2680*a9fa9459Szrj   BFD_RELOC_386_TLS_DESC_CALL
2681*a9fa9459Szrj ENUMX
2682*a9fa9459Szrj   BFD_RELOC_386_TLS_DESC
2683*a9fa9459Szrj ENUMX
2684*a9fa9459Szrj   BFD_RELOC_386_IRELATIVE
2685*a9fa9459Szrj ENUMX
2686*a9fa9459Szrj   BFD_RELOC_386_GOT32X
2687*a9fa9459Szrj ENUMDOC
2688*a9fa9459Szrj   i386/elf relocations
2689*a9fa9459Szrj 
2690*a9fa9459Szrj ENUM
2691*a9fa9459Szrj   BFD_RELOC_X86_64_GOT32
2692*a9fa9459Szrj ENUMX
2693*a9fa9459Szrj   BFD_RELOC_X86_64_PLT32
2694*a9fa9459Szrj ENUMX
2695*a9fa9459Szrj   BFD_RELOC_X86_64_COPY
2696*a9fa9459Szrj ENUMX
2697*a9fa9459Szrj   BFD_RELOC_X86_64_GLOB_DAT
2698*a9fa9459Szrj ENUMX
2699*a9fa9459Szrj   BFD_RELOC_X86_64_JUMP_SLOT
2700*a9fa9459Szrj ENUMX
2701*a9fa9459Szrj   BFD_RELOC_X86_64_RELATIVE
2702*a9fa9459Szrj ENUMX
2703*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPCREL
2704*a9fa9459Szrj ENUMX
2705*a9fa9459Szrj   BFD_RELOC_X86_64_32S
2706*a9fa9459Szrj ENUMX
2707*a9fa9459Szrj   BFD_RELOC_X86_64_DTPMOD64
2708*a9fa9459Szrj ENUMX
2709*a9fa9459Szrj   BFD_RELOC_X86_64_DTPOFF64
2710*a9fa9459Szrj ENUMX
2711*a9fa9459Szrj   BFD_RELOC_X86_64_TPOFF64
2712*a9fa9459Szrj ENUMX
2713*a9fa9459Szrj   BFD_RELOC_X86_64_TLSGD
2714*a9fa9459Szrj ENUMX
2715*a9fa9459Szrj   BFD_RELOC_X86_64_TLSLD
2716*a9fa9459Szrj ENUMX
2717*a9fa9459Szrj   BFD_RELOC_X86_64_DTPOFF32
2718*a9fa9459Szrj ENUMX
2719*a9fa9459Szrj   BFD_RELOC_X86_64_GOTTPOFF
2720*a9fa9459Szrj ENUMX
2721*a9fa9459Szrj   BFD_RELOC_X86_64_TPOFF32
2722*a9fa9459Szrj ENUMX
2723*a9fa9459Szrj   BFD_RELOC_X86_64_GOTOFF64
2724*a9fa9459Szrj ENUMX
2725*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPC32
2726*a9fa9459Szrj ENUMX
2727*a9fa9459Szrj   BFD_RELOC_X86_64_GOT64
2728*a9fa9459Szrj ENUMX
2729*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPCREL64
2730*a9fa9459Szrj ENUMX
2731*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPC64
2732*a9fa9459Szrj ENUMX
2733*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPLT64
2734*a9fa9459Szrj ENUMX
2735*a9fa9459Szrj   BFD_RELOC_X86_64_PLTOFF64
2736*a9fa9459Szrj ENUMX
2737*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPC32_TLSDESC
2738*a9fa9459Szrj ENUMX
2739*a9fa9459Szrj   BFD_RELOC_X86_64_TLSDESC_CALL
2740*a9fa9459Szrj ENUMX
2741*a9fa9459Szrj   BFD_RELOC_X86_64_TLSDESC
2742*a9fa9459Szrj ENUMX
2743*a9fa9459Szrj   BFD_RELOC_X86_64_IRELATIVE
2744*a9fa9459Szrj ENUMX
2745*a9fa9459Szrj   BFD_RELOC_X86_64_PC32_BND
2746*a9fa9459Szrj ENUMX
2747*a9fa9459Szrj   BFD_RELOC_X86_64_PLT32_BND
2748*a9fa9459Szrj ENUMX
2749*a9fa9459Szrj   BFD_RELOC_X86_64_GOTPCRELX
2750*a9fa9459Szrj ENUMX
2751*a9fa9459Szrj   BFD_RELOC_X86_64_REX_GOTPCRELX
2752*a9fa9459Szrj ENUMDOC
2753*a9fa9459Szrj   x86-64/elf relocations
2754*a9fa9459Szrj 
2755*a9fa9459Szrj ENUM
2756*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_8
2757*a9fa9459Szrj ENUMX
2758*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_16
2759*a9fa9459Szrj ENUMX
2760*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_32
2761*a9fa9459Szrj ENUMX
2762*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_8_PCREL
2763*a9fa9459Szrj ENUMX
2764*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_16_PCREL
2765*a9fa9459Szrj ENUMX
2766*a9fa9459Szrj   BFD_RELOC_NS32K_IMM_32_PCREL
2767*a9fa9459Szrj ENUMX
2768*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_8
2769*a9fa9459Szrj ENUMX
2770*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_16
2771*a9fa9459Szrj ENUMX
2772*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_32
2773*a9fa9459Szrj ENUMX
2774*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_8_PCREL
2775*a9fa9459Szrj ENUMX
2776*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_16_PCREL
2777*a9fa9459Szrj ENUMX
2778*a9fa9459Szrj   BFD_RELOC_NS32K_DISP_32_PCREL
2779*a9fa9459Szrj ENUMDOC
2780*a9fa9459Szrj   ns32k relocations
2781*a9fa9459Szrj 
2782*a9fa9459Szrj ENUM
2783*a9fa9459Szrj   BFD_RELOC_PDP11_DISP_8_PCREL
2784*a9fa9459Szrj ENUMX
2785*a9fa9459Szrj   BFD_RELOC_PDP11_DISP_6_PCREL
2786*a9fa9459Szrj ENUMDOC
2787*a9fa9459Szrj   PDP11 relocations
2788*a9fa9459Szrj 
2789*a9fa9459Szrj ENUM
2790*a9fa9459Szrj   BFD_RELOC_PJ_CODE_HI16
2791*a9fa9459Szrj ENUMX
2792*a9fa9459Szrj   BFD_RELOC_PJ_CODE_LO16
2793*a9fa9459Szrj ENUMX
2794*a9fa9459Szrj   BFD_RELOC_PJ_CODE_DIR16
2795*a9fa9459Szrj ENUMX
2796*a9fa9459Szrj   BFD_RELOC_PJ_CODE_DIR32
2797*a9fa9459Szrj ENUMX
2798*a9fa9459Szrj   BFD_RELOC_PJ_CODE_REL16
2799*a9fa9459Szrj ENUMX
2800*a9fa9459Szrj   BFD_RELOC_PJ_CODE_REL32
2801*a9fa9459Szrj ENUMDOC
2802*a9fa9459Szrj   Picojava relocs.  Not all of these appear in object files.
2803*a9fa9459Szrj 
2804*a9fa9459Szrj ENUM
2805*a9fa9459Szrj   BFD_RELOC_PPC_B26
2806*a9fa9459Szrj ENUMX
2807*a9fa9459Szrj   BFD_RELOC_PPC_BA26
2808*a9fa9459Szrj ENUMX
2809*a9fa9459Szrj   BFD_RELOC_PPC_TOC16
2810*a9fa9459Szrj ENUMX
2811*a9fa9459Szrj   BFD_RELOC_PPC_B16
2812*a9fa9459Szrj ENUMX
2813*a9fa9459Szrj   BFD_RELOC_PPC_B16_BRTAKEN
2814*a9fa9459Szrj ENUMX
2815*a9fa9459Szrj   BFD_RELOC_PPC_B16_BRNTAKEN
2816*a9fa9459Szrj ENUMX
2817*a9fa9459Szrj   BFD_RELOC_PPC_BA16
2818*a9fa9459Szrj ENUMX
2819*a9fa9459Szrj   BFD_RELOC_PPC_BA16_BRTAKEN
2820*a9fa9459Szrj ENUMX
2821*a9fa9459Szrj   BFD_RELOC_PPC_BA16_BRNTAKEN
2822*a9fa9459Szrj ENUMX
2823*a9fa9459Szrj   BFD_RELOC_PPC_COPY
2824*a9fa9459Szrj ENUMX
2825*a9fa9459Szrj   BFD_RELOC_PPC_GLOB_DAT
2826*a9fa9459Szrj ENUMX
2827*a9fa9459Szrj   BFD_RELOC_PPC_JMP_SLOT
2828*a9fa9459Szrj ENUMX
2829*a9fa9459Szrj   BFD_RELOC_PPC_RELATIVE
2830*a9fa9459Szrj ENUMX
2831*a9fa9459Szrj   BFD_RELOC_PPC_LOCAL24PC
2832*a9fa9459Szrj ENUMX
2833*a9fa9459Szrj   BFD_RELOC_PPC_EMB_NADDR32
2834*a9fa9459Szrj ENUMX
2835*a9fa9459Szrj   BFD_RELOC_PPC_EMB_NADDR16
2836*a9fa9459Szrj ENUMX
2837*a9fa9459Szrj   BFD_RELOC_PPC_EMB_NADDR16_LO
2838*a9fa9459Szrj ENUMX
2839*a9fa9459Szrj   BFD_RELOC_PPC_EMB_NADDR16_HI
2840*a9fa9459Szrj ENUMX
2841*a9fa9459Szrj   BFD_RELOC_PPC_EMB_NADDR16_HA
2842*a9fa9459Szrj ENUMX
2843*a9fa9459Szrj   BFD_RELOC_PPC_EMB_SDAI16
2844*a9fa9459Szrj ENUMX
2845*a9fa9459Szrj   BFD_RELOC_PPC_EMB_SDA2I16
2846*a9fa9459Szrj ENUMX
2847*a9fa9459Szrj   BFD_RELOC_PPC_EMB_SDA2REL
2848*a9fa9459Szrj ENUMX
2849*a9fa9459Szrj   BFD_RELOC_PPC_EMB_SDA21
2850*a9fa9459Szrj ENUMX
2851*a9fa9459Szrj   BFD_RELOC_PPC_EMB_MRKREF
2852*a9fa9459Szrj ENUMX
2853*a9fa9459Szrj   BFD_RELOC_PPC_EMB_RELSEC16
2854*a9fa9459Szrj ENUMX
2855*a9fa9459Szrj   BFD_RELOC_PPC_EMB_RELST_LO
2856*a9fa9459Szrj ENUMX
2857*a9fa9459Szrj   BFD_RELOC_PPC_EMB_RELST_HI
2858*a9fa9459Szrj ENUMX
2859*a9fa9459Szrj   BFD_RELOC_PPC_EMB_RELST_HA
2860*a9fa9459Szrj ENUMX
2861*a9fa9459Szrj   BFD_RELOC_PPC_EMB_BIT_FLD
2862*a9fa9459Szrj ENUMX
2863*a9fa9459Szrj   BFD_RELOC_PPC_EMB_RELSDA
2864*a9fa9459Szrj ENUMX
2865*a9fa9459Szrj   BFD_RELOC_PPC_VLE_REL8
2866*a9fa9459Szrj ENUMX
2867*a9fa9459Szrj   BFD_RELOC_PPC_VLE_REL15
2868*a9fa9459Szrj ENUMX
2869*a9fa9459Szrj   BFD_RELOC_PPC_VLE_REL24
2870*a9fa9459Szrj ENUMX
2871*a9fa9459Szrj   BFD_RELOC_PPC_VLE_LO16A
2872*a9fa9459Szrj ENUMX
2873*a9fa9459Szrj   BFD_RELOC_PPC_VLE_LO16D
2874*a9fa9459Szrj ENUMX
2875*a9fa9459Szrj   BFD_RELOC_PPC_VLE_HI16A
2876*a9fa9459Szrj ENUMX
2877*a9fa9459Szrj   BFD_RELOC_PPC_VLE_HI16D
2878*a9fa9459Szrj ENUMX
2879*a9fa9459Szrj   BFD_RELOC_PPC_VLE_HA16A
2880*a9fa9459Szrj ENUMX
2881*a9fa9459Szrj   BFD_RELOC_PPC_VLE_HA16D
2882*a9fa9459Szrj ENUMX
2883*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDA21
2884*a9fa9459Szrj ENUMX
2885*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDA21_LO
2886*a9fa9459Szrj ENUMX
2887*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_LO16A
2888*a9fa9459Szrj ENUMX
2889*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_LO16D
2890*a9fa9459Szrj ENUMX
2891*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_HI16A
2892*a9fa9459Szrj ENUMX
2893*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_HI16D
2894*a9fa9459Szrj ENUMX
2895*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_HA16A
2896*a9fa9459Szrj ENUMX
2897*a9fa9459Szrj   BFD_RELOC_PPC_VLE_SDAREL_HA16D
2898*a9fa9459Szrj ENUMX
2899*a9fa9459Szrj   BFD_RELOC_PPC_REL16DX_HA
2900*a9fa9459Szrj ENUMX
2901*a9fa9459Szrj   BFD_RELOC_PPC64_HIGHER
2902*a9fa9459Szrj ENUMX
2903*a9fa9459Szrj   BFD_RELOC_PPC64_HIGHER_S
2904*a9fa9459Szrj ENUMX
2905*a9fa9459Szrj   BFD_RELOC_PPC64_HIGHEST
2906*a9fa9459Szrj ENUMX
2907*a9fa9459Szrj   BFD_RELOC_PPC64_HIGHEST_S
2908*a9fa9459Szrj ENUMX
2909*a9fa9459Szrj   BFD_RELOC_PPC64_TOC16_LO
2910*a9fa9459Szrj ENUMX
2911*a9fa9459Szrj   BFD_RELOC_PPC64_TOC16_HI
2912*a9fa9459Szrj ENUMX
2913*a9fa9459Szrj   BFD_RELOC_PPC64_TOC16_HA
2914*a9fa9459Szrj ENUMX
2915*a9fa9459Szrj   BFD_RELOC_PPC64_TOC
2916*a9fa9459Szrj ENUMX
2917*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16
2918*a9fa9459Szrj ENUMX
2919*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16_LO
2920*a9fa9459Szrj ENUMX
2921*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16_HI
2922*a9fa9459Szrj ENUMX
2923*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16_HA
2924*a9fa9459Szrj ENUMX
2925*a9fa9459Szrj   BFD_RELOC_PPC64_ADDR16_DS
2926*a9fa9459Szrj ENUMX
2927*a9fa9459Szrj   BFD_RELOC_PPC64_ADDR16_LO_DS
2928*a9fa9459Szrj ENUMX
2929*a9fa9459Szrj   BFD_RELOC_PPC64_GOT16_DS
2930*a9fa9459Szrj ENUMX
2931*a9fa9459Szrj   BFD_RELOC_PPC64_GOT16_LO_DS
2932*a9fa9459Szrj ENUMX
2933*a9fa9459Szrj   BFD_RELOC_PPC64_PLT16_LO_DS
2934*a9fa9459Szrj ENUMX
2935*a9fa9459Szrj   BFD_RELOC_PPC64_SECTOFF_DS
2936*a9fa9459Szrj ENUMX
2937*a9fa9459Szrj   BFD_RELOC_PPC64_SECTOFF_LO_DS
2938*a9fa9459Szrj ENUMX
2939*a9fa9459Szrj   BFD_RELOC_PPC64_TOC16_DS
2940*a9fa9459Szrj ENUMX
2941*a9fa9459Szrj   BFD_RELOC_PPC64_TOC16_LO_DS
2942*a9fa9459Szrj ENUMX
2943*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16_DS
2944*a9fa9459Szrj ENUMX
2945*a9fa9459Szrj   BFD_RELOC_PPC64_PLTGOT16_LO_DS
2946*a9fa9459Szrj ENUMX
2947*a9fa9459Szrj   BFD_RELOC_PPC64_ADDR16_HIGH
2948*a9fa9459Szrj ENUMX
2949*a9fa9459Szrj   BFD_RELOC_PPC64_ADDR16_HIGHA
2950*a9fa9459Szrj ENUMX
2951*a9fa9459Szrj   BFD_RELOC_PPC64_ADDR64_LOCAL
2952*a9fa9459Szrj ENUMX
2953*a9fa9459Szrj   BFD_RELOC_PPC64_ENTRY
2954*a9fa9459Szrj ENUMDOC
2955*a9fa9459Szrj   Power(rs6000) and PowerPC relocations.
2956*a9fa9459Szrj 
2957*a9fa9459Szrj ENUM
2958*a9fa9459Szrj   BFD_RELOC_PPC_TLS
2959*a9fa9459Szrj ENUMX
2960*a9fa9459Szrj   BFD_RELOC_PPC_TLSGD
2961*a9fa9459Szrj ENUMX
2962*a9fa9459Szrj   BFD_RELOC_PPC_TLSLD
2963*a9fa9459Szrj ENUMX
2964*a9fa9459Szrj   BFD_RELOC_PPC_DTPMOD
2965*a9fa9459Szrj ENUMX
2966*a9fa9459Szrj   BFD_RELOC_PPC_TPREL16
2967*a9fa9459Szrj ENUMX
2968*a9fa9459Szrj   BFD_RELOC_PPC_TPREL16_LO
2969*a9fa9459Szrj ENUMX
2970*a9fa9459Szrj   BFD_RELOC_PPC_TPREL16_HI
2971*a9fa9459Szrj ENUMX
2972*a9fa9459Szrj   BFD_RELOC_PPC_TPREL16_HA
2973*a9fa9459Szrj ENUMX
2974*a9fa9459Szrj   BFD_RELOC_PPC_TPREL
2975*a9fa9459Szrj ENUMX
2976*a9fa9459Szrj   BFD_RELOC_PPC_DTPREL16
2977*a9fa9459Szrj ENUMX
2978*a9fa9459Szrj   BFD_RELOC_PPC_DTPREL16_LO
2979*a9fa9459Szrj ENUMX
2980*a9fa9459Szrj   BFD_RELOC_PPC_DTPREL16_HI
2981*a9fa9459Szrj ENUMX
2982*a9fa9459Szrj   BFD_RELOC_PPC_DTPREL16_HA
2983*a9fa9459Szrj ENUMX
2984*a9fa9459Szrj   BFD_RELOC_PPC_DTPREL
2985*a9fa9459Szrj ENUMX
2986*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSGD16
2987*a9fa9459Szrj ENUMX
2988*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSGD16_LO
2989*a9fa9459Szrj ENUMX
2990*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSGD16_HI
2991*a9fa9459Szrj ENUMX
2992*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSGD16_HA
2993*a9fa9459Szrj ENUMX
2994*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSLD16
2995*a9fa9459Szrj ENUMX
2996*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSLD16_LO
2997*a9fa9459Szrj ENUMX
2998*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSLD16_HI
2999*a9fa9459Szrj ENUMX
3000*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TLSLD16_HA
3001*a9fa9459Szrj ENUMX
3002*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TPREL16
3003*a9fa9459Szrj ENUMX
3004*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TPREL16_LO
3005*a9fa9459Szrj ENUMX
3006*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TPREL16_HI
3007*a9fa9459Szrj ENUMX
3008*a9fa9459Szrj   BFD_RELOC_PPC_GOT_TPREL16_HA
3009*a9fa9459Szrj ENUMX
3010*a9fa9459Szrj   BFD_RELOC_PPC_GOT_DTPREL16
3011*a9fa9459Szrj ENUMX
3012*a9fa9459Szrj   BFD_RELOC_PPC_GOT_DTPREL16_LO
3013*a9fa9459Szrj ENUMX
3014*a9fa9459Szrj   BFD_RELOC_PPC_GOT_DTPREL16_HI
3015*a9fa9459Szrj ENUMX
3016*a9fa9459Szrj   BFD_RELOC_PPC_GOT_DTPREL16_HA
3017*a9fa9459Szrj ENUMX
3018*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_DS
3019*a9fa9459Szrj ENUMX
3020*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_LO_DS
3021*a9fa9459Szrj ENUMX
3022*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGHER
3023*a9fa9459Szrj ENUMX
3024*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGHERA
3025*a9fa9459Szrj ENUMX
3026*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGHEST
3027*a9fa9459Szrj ENUMX
3028*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGHESTA
3029*a9fa9459Szrj ENUMX
3030*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_DS
3031*a9fa9459Szrj ENUMX
3032*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_LO_DS
3033*a9fa9459Szrj ENUMX
3034*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGHER
3035*a9fa9459Szrj ENUMX
3036*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGHERA
3037*a9fa9459Szrj ENUMX
3038*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGHEST
3039*a9fa9459Szrj ENUMX
3040*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGHESTA
3041*a9fa9459Szrj ENUMX
3042*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGH
3043*a9fa9459Szrj ENUMX
3044*a9fa9459Szrj   BFD_RELOC_PPC64_TPREL16_HIGHA
3045*a9fa9459Szrj ENUMX
3046*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGH
3047*a9fa9459Szrj ENUMX
3048*a9fa9459Szrj   BFD_RELOC_PPC64_DTPREL16_HIGHA
3049*a9fa9459Szrj ENUMDOC
3050*a9fa9459Szrj   PowerPC and PowerPC64 thread-local storage relocations.
3051*a9fa9459Szrj 
3052*a9fa9459Szrj ENUM
3053*a9fa9459Szrj   BFD_RELOC_I370_D12
3054*a9fa9459Szrj ENUMDOC
3055*a9fa9459Szrj   IBM 370/390 relocations
3056*a9fa9459Szrj 
3057*a9fa9459Szrj ENUM
3058*a9fa9459Szrj   BFD_RELOC_CTOR
3059*a9fa9459Szrj ENUMDOC
3060*a9fa9459Szrj   The type of reloc used to build a constructor table - at the moment
3061*a9fa9459Szrj   probably a 32 bit wide absolute relocation, but the target can choose.
3062*a9fa9459Szrj   It generally does map to one of the other relocation types.
3063*a9fa9459Szrj 
3064*a9fa9459Szrj ENUM
3065*a9fa9459Szrj   BFD_RELOC_ARM_PCREL_BRANCH
3066*a9fa9459Szrj ENUMDOC
3067*a9fa9459Szrj   ARM 26 bit pc-relative branch.  The lowest two bits must be zero and are
3068*a9fa9459Szrj   not stored in the instruction.
3069*a9fa9459Szrj ENUM
3070*a9fa9459Szrj   BFD_RELOC_ARM_PCREL_BLX
3071*a9fa9459Szrj ENUMDOC
3072*a9fa9459Szrj   ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
3073*a9fa9459Szrj   not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
3074*a9fa9459Szrj   field in the instruction.
3075*a9fa9459Szrj ENUM
3076*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BLX
3077*a9fa9459Szrj ENUMDOC
3078*a9fa9459Szrj   Thumb 22 bit pc-relative branch.  The lowest bit must be zero and is
3079*a9fa9459Szrj   not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
3080*a9fa9459Szrj   field in the instruction.
3081*a9fa9459Szrj ENUM
3082*a9fa9459Szrj   BFD_RELOC_ARM_PCREL_CALL
3083*a9fa9459Szrj ENUMDOC
3084*a9fa9459Szrj   ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction.
3085*a9fa9459Szrj ENUM
3086*a9fa9459Szrj   BFD_RELOC_ARM_PCREL_JUMP
3087*a9fa9459Szrj ENUMDOC
3088*a9fa9459Szrj   ARM 26-bit pc-relative branch for B or conditional BL instruction.
3089*a9fa9459Szrj 
3090*a9fa9459Szrj ENUM
3091*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH7
3092*a9fa9459Szrj ENUMX
3093*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH9
3094*a9fa9459Szrj ENUMX
3095*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH12
3096*a9fa9459Szrj ENUMX
3097*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH20
3098*a9fa9459Szrj ENUMX
3099*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH23
3100*a9fa9459Szrj ENUMX
3101*a9fa9459Szrj   BFD_RELOC_THUMB_PCREL_BRANCH25
3102*a9fa9459Szrj ENUMDOC
3103*a9fa9459Szrj   Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
3104*a9fa9459Szrj   The lowest bit must be zero and is not stored in the instruction.
3105*a9fa9459Szrj   Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
3106*a9fa9459Szrj   "nn" one smaller in all cases.  Note further that BRANCH23
3107*a9fa9459Szrj   corresponds to R_ARM_THM_CALL.
3108*a9fa9459Szrj 
3109*a9fa9459Szrj ENUM
3110*a9fa9459Szrj   BFD_RELOC_ARM_OFFSET_IMM
3111*a9fa9459Szrj ENUMDOC
3112*a9fa9459Szrj   12-bit immediate offset, used in ARM-format ldr and str instructions.
3113*a9fa9459Szrj 
3114*a9fa9459Szrj ENUM
3115*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_OFFSET
3116*a9fa9459Szrj ENUMDOC
3117*a9fa9459Szrj   5-bit immediate offset, used in Thumb-format ldr and str instructions.
3118*a9fa9459Szrj 
3119*a9fa9459Szrj ENUM
3120*a9fa9459Szrj   BFD_RELOC_ARM_TARGET1
3121*a9fa9459Szrj ENUMDOC
3122*a9fa9459Szrj   Pc-relative or absolute relocation depending on target.  Used for
3123*a9fa9459Szrj   entries in .init_array sections.
3124*a9fa9459Szrj ENUM
3125*a9fa9459Szrj   BFD_RELOC_ARM_ROSEGREL32
3126*a9fa9459Szrj ENUMDOC
3127*a9fa9459Szrj   Read-only segment base relative address.
3128*a9fa9459Szrj ENUM
3129*a9fa9459Szrj   BFD_RELOC_ARM_SBREL32
3130*a9fa9459Szrj ENUMDOC
3131*a9fa9459Szrj   Data segment base relative address.
3132*a9fa9459Szrj ENUM
3133*a9fa9459Szrj   BFD_RELOC_ARM_TARGET2
3134*a9fa9459Szrj ENUMDOC
3135*a9fa9459Szrj   This reloc is used for references to RTTI data from exception handling
3136*a9fa9459Szrj   tables.  The actual definition depends on the target.  It may be a
3137*a9fa9459Szrj   pc-relative or some form of GOT-indirect relocation.
3138*a9fa9459Szrj ENUM
3139*a9fa9459Szrj   BFD_RELOC_ARM_PREL31
3140*a9fa9459Szrj ENUMDOC
3141*a9fa9459Szrj   31-bit PC relative address.
3142*a9fa9459Szrj ENUM
3143*a9fa9459Szrj   BFD_RELOC_ARM_MOVW
3144*a9fa9459Szrj ENUMX
3145*a9fa9459Szrj   BFD_RELOC_ARM_MOVT
3146*a9fa9459Szrj ENUMX
3147*a9fa9459Szrj   BFD_RELOC_ARM_MOVW_PCREL
3148*a9fa9459Szrj ENUMX
3149*a9fa9459Szrj   BFD_RELOC_ARM_MOVT_PCREL
3150*a9fa9459Szrj ENUMX
3151*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_MOVW
3152*a9fa9459Szrj ENUMX
3153*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_MOVT
3154*a9fa9459Szrj ENUMX
3155*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_MOVW_PCREL
3156*a9fa9459Szrj ENUMX
3157*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_MOVT_PCREL
3158*a9fa9459Szrj ENUMDOC
3159*a9fa9459Szrj   Low and High halfword relocations for MOVW and MOVT instructions.
3160*a9fa9459Szrj 
3161*a9fa9459Szrj ENUM
3162*a9fa9459Szrj   BFD_RELOC_ARM_JUMP_SLOT
3163*a9fa9459Szrj ENUMX
3164*a9fa9459Szrj   BFD_RELOC_ARM_GLOB_DAT
3165*a9fa9459Szrj ENUMX
3166*a9fa9459Szrj   BFD_RELOC_ARM_GOT32
3167*a9fa9459Szrj ENUMX
3168*a9fa9459Szrj   BFD_RELOC_ARM_PLT32
3169*a9fa9459Szrj ENUMX
3170*a9fa9459Szrj   BFD_RELOC_ARM_RELATIVE
3171*a9fa9459Szrj ENUMX
3172*a9fa9459Szrj   BFD_RELOC_ARM_GOTOFF
3173*a9fa9459Szrj ENUMX
3174*a9fa9459Szrj   BFD_RELOC_ARM_GOTPC
3175*a9fa9459Szrj ENUMX
3176*a9fa9459Szrj   BFD_RELOC_ARM_GOT_PREL
3177*a9fa9459Szrj ENUMDOC
3178*a9fa9459Szrj   Relocations for setting up GOTs and PLTs for shared libraries.
3179*a9fa9459Szrj 
3180*a9fa9459Szrj ENUM
3181*a9fa9459Szrj   BFD_RELOC_ARM_TLS_GD32
3182*a9fa9459Szrj ENUMX
3183*a9fa9459Szrj   BFD_RELOC_ARM_TLS_LDO32
3184*a9fa9459Szrj ENUMX
3185*a9fa9459Szrj   BFD_RELOC_ARM_TLS_LDM32
3186*a9fa9459Szrj ENUMX
3187*a9fa9459Szrj   BFD_RELOC_ARM_TLS_DTPOFF32
3188*a9fa9459Szrj ENUMX
3189*a9fa9459Szrj   BFD_RELOC_ARM_TLS_DTPMOD32
3190*a9fa9459Szrj ENUMX
3191*a9fa9459Szrj   BFD_RELOC_ARM_TLS_TPOFF32
3192*a9fa9459Szrj ENUMX
3193*a9fa9459Szrj   BFD_RELOC_ARM_TLS_IE32
3194*a9fa9459Szrj ENUMX
3195*a9fa9459Szrj   BFD_RELOC_ARM_TLS_LE32
3196*a9fa9459Szrj ENUMX
3197*a9fa9459Szrj   BFD_RELOC_ARM_TLS_GOTDESC
3198*a9fa9459Szrj ENUMX
3199*a9fa9459Szrj   BFD_RELOC_ARM_TLS_CALL
3200*a9fa9459Szrj ENUMX
3201*a9fa9459Szrj   BFD_RELOC_ARM_THM_TLS_CALL
3202*a9fa9459Szrj ENUMX
3203*a9fa9459Szrj   BFD_RELOC_ARM_TLS_DESCSEQ
3204*a9fa9459Szrj ENUMX
3205*a9fa9459Szrj   BFD_RELOC_ARM_THM_TLS_DESCSEQ
3206*a9fa9459Szrj ENUMX
3207*a9fa9459Szrj   BFD_RELOC_ARM_TLS_DESC
3208*a9fa9459Szrj ENUMDOC
3209*a9fa9459Szrj   ARM thread-local storage relocations.
3210*a9fa9459Szrj 
3211*a9fa9459Szrj ENUM
3212*a9fa9459Szrj   BFD_RELOC_ARM_ALU_PC_G0_NC
3213*a9fa9459Szrj ENUMX
3214*a9fa9459Szrj   BFD_RELOC_ARM_ALU_PC_G0
3215*a9fa9459Szrj ENUMX
3216*a9fa9459Szrj   BFD_RELOC_ARM_ALU_PC_G1_NC
3217*a9fa9459Szrj ENUMX
3218*a9fa9459Szrj   BFD_RELOC_ARM_ALU_PC_G1
3219*a9fa9459Szrj ENUMX
3220*a9fa9459Szrj   BFD_RELOC_ARM_ALU_PC_G2
3221*a9fa9459Szrj ENUMX
3222*a9fa9459Szrj   BFD_RELOC_ARM_LDR_PC_G0
3223*a9fa9459Szrj ENUMX
3224*a9fa9459Szrj   BFD_RELOC_ARM_LDR_PC_G1
3225*a9fa9459Szrj ENUMX
3226*a9fa9459Szrj   BFD_RELOC_ARM_LDR_PC_G2
3227*a9fa9459Szrj ENUMX
3228*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_PC_G0
3229*a9fa9459Szrj ENUMX
3230*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_PC_G1
3231*a9fa9459Szrj ENUMX
3232*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_PC_G2
3233*a9fa9459Szrj ENUMX
3234*a9fa9459Szrj   BFD_RELOC_ARM_LDC_PC_G0
3235*a9fa9459Szrj ENUMX
3236*a9fa9459Szrj   BFD_RELOC_ARM_LDC_PC_G1
3237*a9fa9459Szrj ENUMX
3238*a9fa9459Szrj   BFD_RELOC_ARM_LDC_PC_G2
3239*a9fa9459Szrj ENUMX
3240*a9fa9459Szrj   BFD_RELOC_ARM_ALU_SB_G0_NC
3241*a9fa9459Szrj ENUMX
3242*a9fa9459Szrj   BFD_RELOC_ARM_ALU_SB_G0
3243*a9fa9459Szrj ENUMX
3244*a9fa9459Szrj   BFD_RELOC_ARM_ALU_SB_G1_NC
3245*a9fa9459Szrj ENUMX
3246*a9fa9459Szrj   BFD_RELOC_ARM_ALU_SB_G1
3247*a9fa9459Szrj ENUMX
3248*a9fa9459Szrj   BFD_RELOC_ARM_ALU_SB_G2
3249*a9fa9459Szrj ENUMX
3250*a9fa9459Szrj   BFD_RELOC_ARM_LDR_SB_G0
3251*a9fa9459Szrj ENUMX
3252*a9fa9459Szrj   BFD_RELOC_ARM_LDR_SB_G1
3253*a9fa9459Szrj ENUMX
3254*a9fa9459Szrj   BFD_RELOC_ARM_LDR_SB_G2
3255*a9fa9459Szrj ENUMX
3256*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_SB_G0
3257*a9fa9459Szrj ENUMX
3258*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_SB_G1
3259*a9fa9459Szrj ENUMX
3260*a9fa9459Szrj   BFD_RELOC_ARM_LDRS_SB_G2
3261*a9fa9459Szrj ENUMX
3262*a9fa9459Szrj   BFD_RELOC_ARM_LDC_SB_G0
3263*a9fa9459Szrj ENUMX
3264*a9fa9459Szrj   BFD_RELOC_ARM_LDC_SB_G1
3265*a9fa9459Szrj ENUMX
3266*a9fa9459Szrj   BFD_RELOC_ARM_LDC_SB_G2
3267*a9fa9459Szrj ENUMDOC
3268*a9fa9459Szrj   ARM group relocations.
3269*a9fa9459Szrj 
3270*a9fa9459Szrj ENUM
3271*a9fa9459Szrj   BFD_RELOC_ARM_V4BX
3272*a9fa9459Szrj ENUMDOC
3273*a9fa9459Szrj   Annotation of BX instructions.
3274*a9fa9459Szrj 
3275*a9fa9459Szrj ENUM
3276*a9fa9459Szrj   BFD_RELOC_ARM_IRELATIVE
3277*a9fa9459Szrj ENUMDOC
3278*a9fa9459Szrj   ARM support for STT_GNU_IFUNC.
3279*a9fa9459Szrj 
3280*a9fa9459Szrj ENUM
3281*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_ALU_ABS_G0_NC
3282*a9fa9459Szrj ENUMX
3283*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_ALU_ABS_G1_NC
3284*a9fa9459Szrj ENUMX
3285*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_ALU_ABS_G2_NC
3286*a9fa9459Szrj ENUMX
3287*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_ALU_ABS_G3_NC
3288*a9fa9459Szrj ENUMDOC
3289*a9fa9459Szrj   Thumb1 relocations to support execute-only code.
3290*a9fa9459Szrj 
3291*a9fa9459Szrj ENUM
3292*a9fa9459Szrj   BFD_RELOC_ARM_IMMEDIATE
3293*a9fa9459Szrj ENUMX
3294*a9fa9459Szrj   BFD_RELOC_ARM_ADRL_IMMEDIATE
3295*a9fa9459Szrj ENUMX
3296*a9fa9459Szrj   BFD_RELOC_ARM_T32_IMMEDIATE
3297*a9fa9459Szrj ENUMX
3298*a9fa9459Szrj   BFD_RELOC_ARM_T32_ADD_IMM
3299*a9fa9459Szrj ENUMX
3300*a9fa9459Szrj   BFD_RELOC_ARM_T32_IMM12
3301*a9fa9459Szrj ENUMX
3302*a9fa9459Szrj   BFD_RELOC_ARM_T32_ADD_PC12
3303*a9fa9459Szrj ENUMX
3304*a9fa9459Szrj   BFD_RELOC_ARM_SHIFT_IMM
3305*a9fa9459Szrj ENUMX
3306*a9fa9459Szrj   BFD_RELOC_ARM_SMC
3307*a9fa9459Szrj ENUMX
3308*a9fa9459Szrj   BFD_RELOC_ARM_HVC
3309*a9fa9459Szrj ENUMX
3310*a9fa9459Szrj   BFD_RELOC_ARM_SWI
3311*a9fa9459Szrj ENUMX
3312*a9fa9459Szrj   BFD_RELOC_ARM_MULTI
3313*a9fa9459Szrj ENUMX
3314*a9fa9459Szrj   BFD_RELOC_ARM_CP_OFF_IMM
3315*a9fa9459Szrj ENUMX
3316*a9fa9459Szrj   BFD_RELOC_ARM_CP_OFF_IMM_S2
3317*a9fa9459Szrj ENUMX
3318*a9fa9459Szrj   BFD_RELOC_ARM_T32_CP_OFF_IMM
3319*a9fa9459Szrj ENUMX
3320*a9fa9459Szrj   BFD_RELOC_ARM_T32_CP_OFF_IMM_S2
3321*a9fa9459Szrj ENUMX
3322*a9fa9459Szrj   BFD_RELOC_ARM_ADR_IMM
3323*a9fa9459Szrj ENUMX
3324*a9fa9459Szrj   BFD_RELOC_ARM_LDR_IMM
3325*a9fa9459Szrj ENUMX
3326*a9fa9459Szrj   BFD_RELOC_ARM_LITERAL
3327*a9fa9459Szrj ENUMX
3328*a9fa9459Szrj   BFD_RELOC_ARM_IN_POOL
3329*a9fa9459Szrj ENUMX
3330*a9fa9459Szrj   BFD_RELOC_ARM_OFFSET_IMM8
3331*a9fa9459Szrj ENUMX
3332*a9fa9459Szrj   BFD_RELOC_ARM_T32_OFFSET_U8
3333*a9fa9459Szrj ENUMX
3334*a9fa9459Szrj   BFD_RELOC_ARM_T32_OFFSET_IMM
3335*a9fa9459Szrj ENUMX
3336*a9fa9459Szrj   BFD_RELOC_ARM_HWLITERAL
3337*a9fa9459Szrj ENUMX
3338*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_ADD
3339*a9fa9459Szrj ENUMX
3340*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_IMM
3341*a9fa9459Szrj ENUMX
3342*a9fa9459Szrj   BFD_RELOC_ARM_THUMB_SHIFT
3343*a9fa9459Szrj ENUMDOC
3344*a9fa9459Szrj   These relocs are only used within the ARM assembler.  They are not
3345*a9fa9459Szrj   (at present) written to any object files.
3346*a9fa9459Szrj 
3347*a9fa9459Szrj ENUM
3348*a9fa9459Szrj   BFD_RELOC_SH_PCDISP8BY2
3349*a9fa9459Szrj ENUMX
3350*a9fa9459Szrj   BFD_RELOC_SH_PCDISP12BY2
3351*a9fa9459Szrj ENUMX
3352*a9fa9459Szrj   BFD_RELOC_SH_IMM3
3353*a9fa9459Szrj ENUMX
3354*a9fa9459Szrj   BFD_RELOC_SH_IMM3U
3355*a9fa9459Szrj ENUMX
3356*a9fa9459Szrj   BFD_RELOC_SH_DISP12
3357*a9fa9459Szrj ENUMX
3358*a9fa9459Szrj   BFD_RELOC_SH_DISP12BY2
3359*a9fa9459Szrj ENUMX
3360*a9fa9459Szrj   BFD_RELOC_SH_DISP12BY4
3361*a9fa9459Szrj ENUMX
3362*a9fa9459Szrj   BFD_RELOC_SH_DISP12BY8
3363*a9fa9459Szrj ENUMX
3364*a9fa9459Szrj   BFD_RELOC_SH_DISP20
3365*a9fa9459Szrj ENUMX
3366*a9fa9459Szrj   BFD_RELOC_SH_DISP20BY8
3367*a9fa9459Szrj ENUMX
3368*a9fa9459Szrj   BFD_RELOC_SH_IMM4
3369*a9fa9459Szrj ENUMX
3370*a9fa9459Szrj   BFD_RELOC_SH_IMM4BY2
3371*a9fa9459Szrj ENUMX
3372*a9fa9459Szrj   BFD_RELOC_SH_IMM4BY4
3373*a9fa9459Szrj ENUMX
3374*a9fa9459Szrj   BFD_RELOC_SH_IMM8
3375*a9fa9459Szrj ENUMX
3376*a9fa9459Szrj   BFD_RELOC_SH_IMM8BY2
3377*a9fa9459Szrj ENUMX
3378*a9fa9459Szrj   BFD_RELOC_SH_IMM8BY4
3379*a9fa9459Szrj ENUMX
3380*a9fa9459Szrj   BFD_RELOC_SH_PCRELIMM8BY2
3381*a9fa9459Szrj ENUMX
3382*a9fa9459Szrj   BFD_RELOC_SH_PCRELIMM8BY4
3383*a9fa9459Szrj ENUMX
3384*a9fa9459Szrj   BFD_RELOC_SH_SWITCH16
3385*a9fa9459Szrj ENUMX
3386*a9fa9459Szrj   BFD_RELOC_SH_SWITCH32
3387*a9fa9459Szrj ENUMX
3388*a9fa9459Szrj   BFD_RELOC_SH_USES
3389*a9fa9459Szrj ENUMX
3390*a9fa9459Szrj   BFD_RELOC_SH_COUNT
3391*a9fa9459Szrj ENUMX
3392*a9fa9459Szrj   BFD_RELOC_SH_ALIGN
3393*a9fa9459Szrj ENUMX
3394*a9fa9459Szrj   BFD_RELOC_SH_CODE
3395*a9fa9459Szrj ENUMX
3396*a9fa9459Szrj   BFD_RELOC_SH_DATA
3397*a9fa9459Szrj ENUMX
3398*a9fa9459Szrj   BFD_RELOC_SH_LABEL
3399*a9fa9459Szrj ENUMX
3400*a9fa9459Szrj   BFD_RELOC_SH_LOOP_START
3401*a9fa9459Szrj ENUMX
3402*a9fa9459Szrj   BFD_RELOC_SH_LOOP_END
3403*a9fa9459Szrj ENUMX
3404*a9fa9459Szrj   BFD_RELOC_SH_COPY
3405*a9fa9459Szrj ENUMX
3406*a9fa9459Szrj   BFD_RELOC_SH_GLOB_DAT
3407*a9fa9459Szrj ENUMX
3408*a9fa9459Szrj   BFD_RELOC_SH_JMP_SLOT
3409*a9fa9459Szrj ENUMX
3410*a9fa9459Szrj   BFD_RELOC_SH_RELATIVE
3411*a9fa9459Szrj ENUMX
3412*a9fa9459Szrj   BFD_RELOC_SH_GOTPC
3413*a9fa9459Szrj ENUMX
3414*a9fa9459Szrj   BFD_RELOC_SH_GOT_LOW16
3415*a9fa9459Szrj ENUMX
3416*a9fa9459Szrj   BFD_RELOC_SH_GOT_MEDLOW16
3417*a9fa9459Szrj ENUMX
3418*a9fa9459Szrj   BFD_RELOC_SH_GOT_MEDHI16
3419*a9fa9459Szrj ENUMX
3420*a9fa9459Szrj   BFD_RELOC_SH_GOT_HI16
3421*a9fa9459Szrj ENUMX
3422*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT_LOW16
3423*a9fa9459Szrj ENUMX
3424*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT_MEDLOW16
3425*a9fa9459Szrj ENUMX
3426*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT_MEDHI16
3427*a9fa9459Szrj ENUMX
3428*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT_HI16
3429*a9fa9459Szrj ENUMX
3430*a9fa9459Szrj   BFD_RELOC_SH_PLT_LOW16
3431*a9fa9459Szrj ENUMX
3432*a9fa9459Szrj   BFD_RELOC_SH_PLT_MEDLOW16
3433*a9fa9459Szrj ENUMX
3434*a9fa9459Szrj   BFD_RELOC_SH_PLT_MEDHI16
3435*a9fa9459Szrj ENUMX
3436*a9fa9459Szrj   BFD_RELOC_SH_PLT_HI16
3437*a9fa9459Szrj ENUMX
3438*a9fa9459Szrj   BFD_RELOC_SH_GOTOFF_LOW16
3439*a9fa9459Szrj ENUMX
3440*a9fa9459Szrj   BFD_RELOC_SH_GOTOFF_MEDLOW16
3441*a9fa9459Szrj ENUMX
3442*a9fa9459Szrj   BFD_RELOC_SH_GOTOFF_MEDHI16
3443*a9fa9459Szrj ENUMX
3444*a9fa9459Szrj   BFD_RELOC_SH_GOTOFF_HI16
3445*a9fa9459Szrj ENUMX
3446*a9fa9459Szrj   BFD_RELOC_SH_GOTPC_LOW16
3447*a9fa9459Szrj ENUMX
3448*a9fa9459Szrj   BFD_RELOC_SH_GOTPC_MEDLOW16
3449*a9fa9459Szrj ENUMX
3450*a9fa9459Szrj   BFD_RELOC_SH_GOTPC_MEDHI16
3451*a9fa9459Szrj ENUMX
3452*a9fa9459Szrj   BFD_RELOC_SH_GOTPC_HI16
3453*a9fa9459Szrj ENUMX
3454*a9fa9459Szrj   BFD_RELOC_SH_COPY64
3455*a9fa9459Szrj ENUMX
3456*a9fa9459Szrj   BFD_RELOC_SH_GLOB_DAT64
3457*a9fa9459Szrj ENUMX
3458*a9fa9459Szrj   BFD_RELOC_SH_JMP_SLOT64
3459*a9fa9459Szrj ENUMX
3460*a9fa9459Szrj   BFD_RELOC_SH_RELATIVE64
3461*a9fa9459Szrj ENUMX
3462*a9fa9459Szrj   BFD_RELOC_SH_GOT10BY4
3463*a9fa9459Szrj ENUMX
3464*a9fa9459Szrj   BFD_RELOC_SH_GOT10BY8
3465*a9fa9459Szrj ENUMX
3466*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT10BY4
3467*a9fa9459Szrj ENUMX
3468*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT10BY8
3469*a9fa9459Szrj ENUMX
3470*a9fa9459Szrj   BFD_RELOC_SH_GOTPLT32
3471*a9fa9459Szrj ENUMX
3472*a9fa9459Szrj   BFD_RELOC_SH_SHMEDIA_CODE
3473*a9fa9459Szrj ENUMX
3474*a9fa9459Szrj   BFD_RELOC_SH_IMMU5
3475*a9fa9459Szrj ENUMX
3476*a9fa9459Szrj   BFD_RELOC_SH_IMMS6
3477*a9fa9459Szrj ENUMX
3478*a9fa9459Szrj   BFD_RELOC_SH_IMMS6BY32
3479*a9fa9459Szrj ENUMX
3480*a9fa9459Szrj   BFD_RELOC_SH_IMMU6
3481*a9fa9459Szrj ENUMX
3482*a9fa9459Szrj   BFD_RELOC_SH_IMMS10
3483*a9fa9459Szrj ENUMX
3484*a9fa9459Szrj   BFD_RELOC_SH_IMMS10BY2
3485*a9fa9459Szrj ENUMX
3486*a9fa9459Szrj   BFD_RELOC_SH_IMMS10BY4
3487*a9fa9459Szrj ENUMX
3488*a9fa9459Szrj   BFD_RELOC_SH_IMMS10BY8
3489*a9fa9459Szrj ENUMX
3490*a9fa9459Szrj   BFD_RELOC_SH_IMMS16
3491*a9fa9459Szrj ENUMX
3492*a9fa9459Szrj   BFD_RELOC_SH_IMMU16
3493*a9fa9459Szrj ENUMX
3494*a9fa9459Szrj   BFD_RELOC_SH_IMM_LOW16
3495*a9fa9459Szrj ENUMX
3496*a9fa9459Szrj   BFD_RELOC_SH_IMM_LOW16_PCREL
3497*a9fa9459Szrj ENUMX
3498*a9fa9459Szrj   BFD_RELOC_SH_IMM_MEDLOW16
3499*a9fa9459Szrj ENUMX
3500*a9fa9459Szrj   BFD_RELOC_SH_IMM_MEDLOW16_PCREL
3501*a9fa9459Szrj ENUMX
3502*a9fa9459Szrj   BFD_RELOC_SH_IMM_MEDHI16
3503*a9fa9459Szrj ENUMX
3504*a9fa9459Szrj   BFD_RELOC_SH_IMM_MEDHI16_PCREL
3505*a9fa9459Szrj ENUMX
3506*a9fa9459Szrj   BFD_RELOC_SH_IMM_HI16
3507*a9fa9459Szrj ENUMX
3508*a9fa9459Szrj   BFD_RELOC_SH_IMM_HI16_PCREL
3509*a9fa9459Szrj ENUMX
3510*a9fa9459Szrj   BFD_RELOC_SH_PT_16
3511*a9fa9459Szrj ENUMX
3512*a9fa9459Szrj   BFD_RELOC_SH_TLS_GD_32
3513*a9fa9459Szrj ENUMX
3514*a9fa9459Szrj   BFD_RELOC_SH_TLS_LD_32
3515*a9fa9459Szrj ENUMX
3516*a9fa9459Szrj   BFD_RELOC_SH_TLS_LDO_32
3517*a9fa9459Szrj ENUMX
3518*a9fa9459Szrj   BFD_RELOC_SH_TLS_IE_32
3519*a9fa9459Szrj ENUMX
3520*a9fa9459Szrj   BFD_RELOC_SH_TLS_LE_32
3521*a9fa9459Szrj ENUMX
3522*a9fa9459Szrj   BFD_RELOC_SH_TLS_DTPMOD32
3523*a9fa9459Szrj ENUMX
3524*a9fa9459Szrj   BFD_RELOC_SH_TLS_DTPOFF32
3525*a9fa9459Szrj ENUMX
3526*a9fa9459Szrj   BFD_RELOC_SH_TLS_TPOFF32
3527*a9fa9459Szrj ENUMX
3528*a9fa9459Szrj   BFD_RELOC_SH_GOT20
3529*a9fa9459Szrj ENUMX
3530*a9fa9459Szrj   BFD_RELOC_SH_GOTOFF20
3531*a9fa9459Szrj ENUMX
3532*a9fa9459Szrj   BFD_RELOC_SH_GOTFUNCDESC
3533*a9fa9459Szrj ENUMX
3534*a9fa9459Szrj   BFD_RELOC_SH_GOTFUNCDESC20
3535*a9fa9459Szrj ENUMX
3536*a9fa9459Szrj   BFD_RELOC_SH_GOTOFFFUNCDESC
3537*a9fa9459Szrj ENUMX
3538*a9fa9459Szrj   BFD_RELOC_SH_GOTOFFFUNCDESC20
3539*a9fa9459Szrj ENUMX
3540*a9fa9459Szrj   BFD_RELOC_SH_FUNCDESC
3541*a9fa9459Szrj ENUMDOC
3542*a9fa9459Szrj   Renesas / SuperH SH relocs.  Not all of these appear in object files.
3543*a9fa9459Szrj 
3544*a9fa9459Szrj ENUM
3545*a9fa9459Szrj   BFD_RELOC_ARC_NONE
3546*a9fa9459Szrj ENUMX
3547*a9fa9459Szrj   BFD_RELOC_ARC_8
3548*a9fa9459Szrj ENUMX
3549*a9fa9459Szrj   BFD_RELOC_ARC_16
3550*a9fa9459Szrj ENUMX
3551*a9fa9459Szrj   BFD_RELOC_ARC_24
3552*a9fa9459Szrj ENUMX
3553*a9fa9459Szrj   BFD_RELOC_ARC_32
3554*a9fa9459Szrj ENUMX
3555*a9fa9459Szrj   BFD_RELOC_ARC_N8
3556*a9fa9459Szrj ENUMX
3557*a9fa9459Szrj   BFD_RELOC_ARC_N16
3558*a9fa9459Szrj ENUMX
3559*a9fa9459Szrj   BFD_RELOC_ARC_N24
3560*a9fa9459Szrj ENUMX
3561*a9fa9459Szrj   BFD_RELOC_ARC_N32
3562*a9fa9459Szrj ENUMX
3563*a9fa9459Szrj   BFD_RELOC_ARC_SDA
3564*a9fa9459Szrj ENUMX
3565*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF
3566*a9fa9459Szrj ENUMX
3567*a9fa9459Szrj   BFD_RELOC_ARC_S21H_PCREL
3568*a9fa9459Szrj ENUMX
3569*a9fa9459Szrj   BFD_RELOC_ARC_S21W_PCREL
3570*a9fa9459Szrj ENUMX
3571*a9fa9459Szrj   BFD_RELOC_ARC_S25H_PCREL
3572*a9fa9459Szrj ENUMX
3573*a9fa9459Szrj   BFD_RELOC_ARC_S25W_PCREL
3574*a9fa9459Szrj ENUMX
3575*a9fa9459Szrj   BFD_RELOC_ARC_SDA32
3576*a9fa9459Szrj ENUMX
3577*a9fa9459Szrj   BFD_RELOC_ARC_SDA_LDST
3578*a9fa9459Szrj ENUMX
3579*a9fa9459Szrj   BFD_RELOC_ARC_SDA_LDST1
3580*a9fa9459Szrj ENUMX
3581*a9fa9459Szrj   BFD_RELOC_ARC_SDA_LDST2
3582*a9fa9459Szrj ENUMX
3583*a9fa9459Szrj   BFD_RELOC_ARC_SDA16_LD
3584*a9fa9459Szrj ENUMX
3585*a9fa9459Szrj   BFD_RELOC_ARC_SDA16_LD1
3586*a9fa9459Szrj ENUMX
3587*a9fa9459Szrj   BFD_RELOC_ARC_SDA16_LD2
3588*a9fa9459Szrj ENUMX
3589*a9fa9459Szrj   BFD_RELOC_ARC_S13_PCREL
3590*a9fa9459Szrj ENUMX
3591*a9fa9459Szrj   BFD_RELOC_ARC_W
3592*a9fa9459Szrj ENUMX
3593*a9fa9459Szrj   BFD_RELOC_ARC_32_ME
3594*a9fa9459Szrj ENUMX
3595*a9fa9459Szrj   BFD_RELOC_ARC_32_ME_S
3596*a9fa9459Szrj ENUMX
3597*a9fa9459Szrj   BFD_RELOC_ARC_N32_ME
3598*a9fa9459Szrj ENUMX
3599*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF_ME
3600*a9fa9459Szrj ENUMX
3601*a9fa9459Szrj   BFD_RELOC_ARC_SDA32_ME
3602*a9fa9459Szrj ENUMX
3603*a9fa9459Szrj   BFD_RELOC_ARC_W_ME
3604*a9fa9459Szrj ENUMX
3605*a9fa9459Szrj   BFD_RELOC_AC_SECTOFF_U8
3606*a9fa9459Szrj ENUMX
3607*a9fa9459Szrj   BFD_RELOC_AC_SECTOFF_U8_1
3608*a9fa9459Szrj ENUMX
3609*a9fa9459Szrj   BFD_RELOC_AC_SECTOFF_U8_2
3610*a9fa9459Szrj ENUMX
3611*a9fa9459Szrj   BFD_RELOC_AC_SECTFOFF_S9
3612*a9fa9459Szrj ENUMX
3613*a9fa9459Szrj   BFD_RELOC_AC_SECTFOFF_S9_1
3614*a9fa9459Szrj ENUMX
3615*a9fa9459Szrj   BFD_RELOC_AC_SECTFOFF_S9_2
3616*a9fa9459Szrj ENUMX
3617*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF_ME_1
3618*a9fa9459Szrj ENUMX
3619*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF_ME_2
3620*a9fa9459Szrj ENUMX
3621*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF_1
3622*a9fa9459Szrj ENUMX
3623*a9fa9459Szrj   BFD_RELOC_ARC_SECTOFF_2
3624*a9fa9459Szrj ENUMX
3625*a9fa9459Szrj   BFD_RELOC_ARC_SDA16_ST2
3626*a9fa9459Szrj ENUMX
3627*a9fa9459Szrj   BFD_RELOC_ARC_32_PCREL
3628*a9fa9459Szrj ENUMX
3629*a9fa9459Szrj   BFD_RELOC_ARC_PC32
3630*a9fa9459Szrj ENUMX
3631*a9fa9459Szrj   BFD_RELOC_ARC_GOT32
3632*a9fa9459Szrj ENUMX
3633*a9fa9459Szrj   BFD_RELOC_ARC_GOTPC32
3634*a9fa9459Szrj ENUMX
3635*a9fa9459Szrj   BFD_RELOC_ARC_PLT32
3636*a9fa9459Szrj ENUMX
3637*a9fa9459Szrj   BFD_RELOC_ARC_COPY
3638*a9fa9459Szrj ENUMX
3639*a9fa9459Szrj   BFD_RELOC_ARC_GLOB_DAT
3640*a9fa9459Szrj ENUMX
3641*a9fa9459Szrj   BFD_RELOC_ARC_JMP_SLOT
3642*a9fa9459Szrj ENUMX
3643*a9fa9459Szrj   BFD_RELOC_ARC_RELATIVE
3644*a9fa9459Szrj ENUMX
3645*a9fa9459Szrj   BFD_RELOC_ARC_GOTOFF
3646*a9fa9459Szrj ENUMX
3647*a9fa9459Szrj   BFD_RELOC_ARC_GOTPC
3648*a9fa9459Szrj ENUMX
3649*a9fa9459Szrj   BFD_RELOC_ARC_S21W_PCREL_PLT
3650*a9fa9459Szrj ENUMX
3651*a9fa9459Szrj   BFD_RELOC_ARC_S25H_PCREL_PLT
3652*a9fa9459Szrj ENUMX
3653*a9fa9459Szrj   BFD_RELOC_ARC_TLS_DTPMOD
3654*a9fa9459Szrj ENUMX
3655*a9fa9459Szrj   BFD_RELOC_ARC_TLS_TPOFF
3656*a9fa9459Szrj ENUMX
3657*a9fa9459Szrj   BFD_RELOC_ARC_TLS_GD_GOT
3658*a9fa9459Szrj ENUMX
3659*a9fa9459Szrj   BFD_RELOC_ARC_TLS_GD_LD
3660*a9fa9459Szrj ENUMX
3661*a9fa9459Szrj   BFD_RELOC_ARC_TLS_GD_CALL
3662*a9fa9459Szrj ENUMX
3663*a9fa9459Szrj   BFD_RELOC_ARC_TLS_IE_GOT
3664*a9fa9459Szrj ENUMX
3665*a9fa9459Szrj   BFD_RELOC_ARC_TLS_DTPOFF
3666*a9fa9459Szrj ENUMX
3667*a9fa9459Szrj   BFD_RELOC_ARC_TLS_DTPOFF_S9
3668*a9fa9459Szrj ENUMX
3669*a9fa9459Szrj   BFD_RELOC_ARC_TLS_LE_S9
3670*a9fa9459Szrj ENUMX
3671*a9fa9459Szrj   BFD_RELOC_ARC_TLS_LE_32
3672*a9fa9459Szrj ENUMX
3673*a9fa9459Szrj   BFD_RELOC_ARC_S25W_PCREL_PLT
3674*a9fa9459Szrj ENUMX
3675*a9fa9459Szrj   BFD_RELOC_ARC_S21H_PCREL_PLT
3676*a9fa9459Szrj ENUMX
3677*a9fa9459Szrj   BFD_RELOC_ARC_NPS_CMEM16
3678*a9fa9459Szrj ENUMDOC
3679*a9fa9459Szrj   ARC relocs.
3680*a9fa9459Szrj 
3681*a9fa9459Szrj ENUM
3682*a9fa9459Szrj   BFD_RELOC_BFIN_16_IMM
3683*a9fa9459Szrj ENUMDOC
3684*a9fa9459Szrj   ADI Blackfin 16 bit immediate absolute reloc.
3685*a9fa9459Szrj ENUM
3686*a9fa9459Szrj   BFD_RELOC_BFIN_16_HIGH
3687*a9fa9459Szrj ENUMDOC
3688*a9fa9459Szrj   ADI Blackfin 16 bit immediate absolute reloc higher 16 bits.
3689*a9fa9459Szrj ENUM
3690*a9fa9459Szrj   BFD_RELOC_BFIN_4_PCREL
3691*a9fa9459Szrj ENUMDOC
3692*a9fa9459Szrj   ADI Blackfin 'a' part of LSETUP.
3693*a9fa9459Szrj ENUM
3694*a9fa9459Szrj   BFD_RELOC_BFIN_5_PCREL
3695*a9fa9459Szrj ENUMDOC
3696*a9fa9459Szrj   ADI Blackfin.
3697*a9fa9459Szrj ENUM
3698*a9fa9459Szrj   BFD_RELOC_BFIN_16_LOW
3699*a9fa9459Szrj ENUMDOC
3700*a9fa9459Szrj   ADI Blackfin 16 bit immediate absolute reloc lower 16 bits.
3701*a9fa9459Szrj ENUM
3702*a9fa9459Szrj   BFD_RELOC_BFIN_10_PCREL
3703*a9fa9459Szrj ENUMDOC
3704*a9fa9459Szrj   ADI Blackfin.
3705*a9fa9459Szrj ENUM
3706*a9fa9459Szrj   BFD_RELOC_BFIN_11_PCREL
3707*a9fa9459Szrj ENUMDOC
3708*a9fa9459Szrj   ADI Blackfin 'b' part of LSETUP.
3709*a9fa9459Szrj ENUM
3710*a9fa9459Szrj   BFD_RELOC_BFIN_12_PCREL_JUMP
3711*a9fa9459Szrj ENUMDOC
3712*a9fa9459Szrj   ADI Blackfin.
3713*a9fa9459Szrj ENUM
3714*a9fa9459Szrj   BFD_RELOC_BFIN_12_PCREL_JUMP_S
3715*a9fa9459Szrj ENUMDOC
3716*a9fa9459Szrj   ADI Blackfin Short jump, pcrel.
3717*a9fa9459Szrj ENUM
3718*a9fa9459Szrj   BFD_RELOC_BFIN_24_PCREL_CALL_X
3719*a9fa9459Szrj ENUMDOC
3720*a9fa9459Szrj   ADI Blackfin Call.x not implemented.
3721*a9fa9459Szrj ENUM
3722*a9fa9459Szrj   BFD_RELOC_BFIN_24_PCREL_JUMP_L
3723*a9fa9459Szrj ENUMDOC
3724*a9fa9459Szrj   ADI Blackfin Long Jump pcrel.
3725*a9fa9459Szrj ENUM
3726*a9fa9459Szrj   BFD_RELOC_BFIN_GOT17M4
3727*a9fa9459Szrj ENUMX
3728*a9fa9459Szrj   BFD_RELOC_BFIN_GOTHI
3729*a9fa9459Szrj ENUMX
3730*a9fa9459Szrj   BFD_RELOC_BFIN_GOTLO
3731*a9fa9459Szrj ENUMX
3732*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC
3733*a9fa9459Szrj ENUMX
3734*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOT17M4
3735*a9fa9459Szrj ENUMX
3736*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOTHI
3737*a9fa9459Szrj ENUMX
3738*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOTLO
3739*a9fa9459Szrj ENUMX
3740*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_VALUE
3741*a9fa9459Szrj ENUMX
3742*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4
3743*a9fa9459Szrj ENUMX
3744*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI
3745*a9fa9459Szrj ENUMX
3746*a9fa9459Szrj   BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO
3747*a9fa9459Szrj ENUMX
3748*a9fa9459Szrj   BFD_RELOC_BFIN_GOTOFF17M4
3749*a9fa9459Szrj ENUMX
3750*a9fa9459Szrj   BFD_RELOC_BFIN_GOTOFFHI
3751*a9fa9459Szrj ENUMX
3752*a9fa9459Szrj   BFD_RELOC_BFIN_GOTOFFLO
3753*a9fa9459Szrj ENUMDOC
3754*a9fa9459Szrj   ADI Blackfin FD-PIC relocations.
3755*a9fa9459Szrj ENUM
3756*a9fa9459Szrj   BFD_RELOC_BFIN_GOT
3757*a9fa9459Szrj ENUMDOC
3758*a9fa9459Szrj   ADI Blackfin GOT relocation.
3759*a9fa9459Szrj ENUM
3760*a9fa9459Szrj   BFD_RELOC_BFIN_PLTPC
3761*a9fa9459Szrj ENUMDOC
3762*a9fa9459Szrj   ADI Blackfin PLTPC relocation.
3763*a9fa9459Szrj ENUM
3764*a9fa9459Szrj   BFD_ARELOC_BFIN_PUSH
3765*a9fa9459Szrj ENUMDOC
3766*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3767*a9fa9459Szrj ENUM
3768*a9fa9459Szrj   BFD_ARELOC_BFIN_CONST
3769*a9fa9459Szrj ENUMDOC
3770*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3771*a9fa9459Szrj ENUM
3772*a9fa9459Szrj   BFD_ARELOC_BFIN_ADD
3773*a9fa9459Szrj ENUMDOC
3774*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3775*a9fa9459Szrj ENUM
3776*a9fa9459Szrj   BFD_ARELOC_BFIN_SUB
3777*a9fa9459Szrj ENUMDOC
3778*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3779*a9fa9459Szrj ENUM
3780*a9fa9459Szrj   BFD_ARELOC_BFIN_MULT
3781*a9fa9459Szrj ENUMDOC
3782*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3783*a9fa9459Szrj ENUM
3784*a9fa9459Szrj   BFD_ARELOC_BFIN_DIV
3785*a9fa9459Szrj ENUMDOC
3786*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3787*a9fa9459Szrj ENUM
3788*a9fa9459Szrj   BFD_ARELOC_BFIN_MOD
3789*a9fa9459Szrj ENUMDOC
3790*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3791*a9fa9459Szrj ENUM
3792*a9fa9459Szrj   BFD_ARELOC_BFIN_LSHIFT
3793*a9fa9459Szrj ENUMDOC
3794*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3795*a9fa9459Szrj ENUM
3796*a9fa9459Szrj   BFD_ARELOC_BFIN_RSHIFT
3797*a9fa9459Szrj ENUMDOC
3798*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3799*a9fa9459Szrj ENUM
3800*a9fa9459Szrj   BFD_ARELOC_BFIN_AND
3801*a9fa9459Szrj ENUMDOC
3802*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3803*a9fa9459Szrj ENUM
3804*a9fa9459Szrj   BFD_ARELOC_BFIN_OR
3805*a9fa9459Szrj ENUMDOC
3806*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3807*a9fa9459Szrj ENUM
3808*a9fa9459Szrj   BFD_ARELOC_BFIN_XOR
3809*a9fa9459Szrj ENUMDOC
3810*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3811*a9fa9459Szrj ENUM
3812*a9fa9459Szrj   BFD_ARELOC_BFIN_LAND
3813*a9fa9459Szrj ENUMDOC
3814*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3815*a9fa9459Szrj ENUM
3816*a9fa9459Szrj   BFD_ARELOC_BFIN_LOR
3817*a9fa9459Szrj ENUMDOC
3818*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3819*a9fa9459Szrj ENUM
3820*a9fa9459Szrj   BFD_ARELOC_BFIN_LEN
3821*a9fa9459Szrj ENUMDOC
3822*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3823*a9fa9459Szrj ENUM
3824*a9fa9459Szrj   BFD_ARELOC_BFIN_NEG
3825*a9fa9459Szrj ENUMDOC
3826*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3827*a9fa9459Szrj ENUM
3828*a9fa9459Szrj   BFD_ARELOC_BFIN_COMP
3829*a9fa9459Szrj ENUMDOC
3830*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3831*a9fa9459Szrj ENUM
3832*a9fa9459Szrj   BFD_ARELOC_BFIN_PAGE
3833*a9fa9459Szrj ENUMDOC
3834*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3835*a9fa9459Szrj ENUM
3836*a9fa9459Szrj   BFD_ARELOC_BFIN_HWPAGE
3837*a9fa9459Szrj ENUMDOC
3838*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3839*a9fa9459Szrj ENUM
3840*a9fa9459Szrj   BFD_ARELOC_BFIN_ADDR
3841*a9fa9459Szrj ENUMDOC
3842*a9fa9459Szrj   ADI Blackfin arithmetic relocation.
3843*a9fa9459Szrj 
3844*a9fa9459Szrj ENUM
3845*a9fa9459Szrj   BFD_RELOC_D10V_10_PCREL_R
3846*a9fa9459Szrj ENUMDOC
3847*a9fa9459Szrj   Mitsubishi D10V relocs.
3848*a9fa9459Szrj   This is a 10-bit reloc with the right 2 bits
3849*a9fa9459Szrj   assumed to be 0.
3850*a9fa9459Szrj ENUM
3851*a9fa9459Szrj   BFD_RELOC_D10V_10_PCREL_L
3852*a9fa9459Szrj ENUMDOC
3853*a9fa9459Szrj   Mitsubishi D10V relocs.
3854*a9fa9459Szrj   This is a 10-bit reloc with the right 2 bits
3855*a9fa9459Szrj   assumed to be 0.  This is the same as the previous reloc
3856*a9fa9459Szrj   except it is in the left container, i.e.,
3857*a9fa9459Szrj   shifted left 15 bits.
3858*a9fa9459Szrj ENUM
3859*a9fa9459Szrj   BFD_RELOC_D10V_18
3860*a9fa9459Szrj ENUMDOC
3861*a9fa9459Szrj   This is an 18-bit reloc with the right 2 bits
3862*a9fa9459Szrj   assumed to be 0.
3863*a9fa9459Szrj ENUM
3864*a9fa9459Szrj   BFD_RELOC_D10V_18_PCREL
3865*a9fa9459Szrj ENUMDOC
3866*a9fa9459Szrj   This is an 18-bit reloc with the right 2 bits
3867*a9fa9459Szrj   assumed to be 0.
3868*a9fa9459Szrj 
3869*a9fa9459Szrj ENUM
3870*a9fa9459Szrj   BFD_RELOC_D30V_6
3871*a9fa9459Szrj ENUMDOC
3872*a9fa9459Szrj   Mitsubishi D30V relocs.
3873*a9fa9459Szrj   This is a 6-bit absolute reloc.
3874*a9fa9459Szrj ENUM
3875*a9fa9459Szrj   BFD_RELOC_D30V_9_PCREL
3876*a9fa9459Szrj ENUMDOC
3877*a9fa9459Szrj   This is a 6-bit pc-relative reloc with
3878*a9fa9459Szrj   the right 3 bits assumed to be 0.
3879*a9fa9459Szrj ENUM
3880*a9fa9459Szrj   BFD_RELOC_D30V_9_PCREL_R
3881*a9fa9459Szrj ENUMDOC
3882*a9fa9459Szrj   This is a 6-bit pc-relative reloc with
3883*a9fa9459Szrj   the right 3 bits assumed to be 0. Same
3884*a9fa9459Szrj   as the previous reloc but on the right side
3885*a9fa9459Szrj   of the container.
3886*a9fa9459Szrj ENUM
3887*a9fa9459Szrj   BFD_RELOC_D30V_15
3888*a9fa9459Szrj ENUMDOC
3889*a9fa9459Szrj   This is a 12-bit absolute reloc with the
3890*a9fa9459Szrj   right 3 bitsassumed to be 0.
3891*a9fa9459Szrj ENUM
3892*a9fa9459Szrj   BFD_RELOC_D30V_15_PCREL
3893*a9fa9459Szrj ENUMDOC
3894*a9fa9459Szrj   This is a 12-bit pc-relative reloc with
3895*a9fa9459Szrj   the right 3 bits assumed to be 0.
3896*a9fa9459Szrj ENUM
3897*a9fa9459Szrj   BFD_RELOC_D30V_15_PCREL_R
3898*a9fa9459Szrj ENUMDOC
3899*a9fa9459Szrj   This is a 12-bit pc-relative reloc with
3900*a9fa9459Szrj   the right 3 bits assumed to be 0. Same
3901*a9fa9459Szrj   as the previous reloc but on the right side
3902*a9fa9459Szrj   of the container.
3903*a9fa9459Szrj ENUM
3904*a9fa9459Szrj   BFD_RELOC_D30V_21
3905*a9fa9459Szrj ENUMDOC
3906*a9fa9459Szrj   This is an 18-bit absolute reloc with
3907*a9fa9459Szrj   the right 3 bits assumed to be 0.
3908*a9fa9459Szrj ENUM
3909*a9fa9459Szrj   BFD_RELOC_D30V_21_PCREL
3910*a9fa9459Szrj ENUMDOC
3911*a9fa9459Szrj   This is an 18-bit pc-relative reloc with
3912*a9fa9459Szrj   the right 3 bits assumed to be 0.
3913*a9fa9459Szrj ENUM
3914*a9fa9459Szrj   BFD_RELOC_D30V_21_PCREL_R
3915*a9fa9459Szrj ENUMDOC
3916*a9fa9459Szrj   This is an 18-bit pc-relative reloc with
3917*a9fa9459Szrj   the right 3 bits assumed to be 0. Same
3918*a9fa9459Szrj   as the previous reloc but on the right side
3919*a9fa9459Szrj   of the container.
3920*a9fa9459Szrj ENUM
3921*a9fa9459Szrj   BFD_RELOC_D30V_32
3922*a9fa9459Szrj ENUMDOC
3923*a9fa9459Szrj   This is a 32-bit absolute reloc.
3924*a9fa9459Szrj ENUM
3925*a9fa9459Szrj   BFD_RELOC_D30V_32_PCREL
3926*a9fa9459Szrj ENUMDOC
3927*a9fa9459Szrj   This is a 32-bit pc-relative reloc.
3928*a9fa9459Szrj 
3929*a9fa9459Szrj ENUM
3930*a9fa9459Szrj   BFD_RELOC_DLX_HI16_S
3931*a9fa9459Szrj ENUMDOC
3932*a9fa9459Szrj   DLX relocs
3933*a9fa9459Szrj ENUM
3934*a9fa9459Szrj   BFD_RELOC_DLX_LO16
3935*a9fa9459Szrj ENUMDOC
3936*a9fa9459Szrj   DLX relocs
3937*a9fa9459Szrj ENUM
3938*a9fa9459Szrj   BFD_RELOC_DLX_JMP26
3939*a9fa9459Szrj ENUMDOC
3940*a9fa9459Szrj   DLX relocs
3941*a9fa9459Szrj 
3942*a9fa9459Szrj ENUM
3943*a9fa9459Szrj   BFD_RELOC_M32C_HI8
3944*a9fa9459Szrj ENUMX
3945*a9fa9459Szrj   BFD_RELOC_M32C_RL_JUMP
3946*a9fa9459Szrj ENUMX
3947*a9fa9459Szrj   BFD_RELOC_M32C_RL_1ADDR
3948*a9fa9459Szrj ENUMX
3949*a9fa9459Szrj   BFD_RELOC_M32C_RL_2ADDR
3950*a9fa9459Szrj ENUMDOC
3951*a9fa9459Szrj   Renesas M16C/M32C Relocations.
3952*a9fa9459Szrj 
3953*a9fa9459Szrj ENUM
3954*a9fa9459Szrj   BFD_RELOC_M32R_24
3955*a9fa9459Szrj ENUMDOC
3956*a9fa9459Szrj   Renesas M32R (formerly Mitsubishi M32R) relocs.
3957*a9fa9459Szrj   This is a 24 bit absolute address.
3958*a9fa9459Szrj ENUM
3959*a9fa9459Szrj   BFD_RELOC_M32R_10_PCREL
3960*a9fa9459Szrj ENUMDOC
3961*a9fa9459Szrj   This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0.
3962*a9fa9459Szrj ENUM
3963*a9fa9459Szrj   BFD_RELOC_M32R_18_PCREL
3964*a9fa9459Szrj ENUMDOC
3965*a9fa9459Szrj   This is an 18-bit reloc with the right 2 bits assumed to be 0.
3966*a9fa9459Szrj ENUM
3967*a9fa9459Szrj   BFD_RELOC_M32R_26_PCREL
3968*a9fa9459Szrj ENUMDOC
3969*a9fa9459Szrj   This is a 26-bit reloc with the right 2 bits assumed to be 0.
3970*a9fa9459Szrj ENUM
3971*a9fa9459Szrj   BFD_RELOC_M32R_HI16_ULO
3972*a9fa9459Szrj ENUMDOC
3973*a9fa9459Szrj   This is a 16-bit reloc containing the high 16 bits of an address
3974*a9fa9459Szrj   used when the lower 16 bits are treated as unsigned.
3975*a9fa9459Szrj ENUM
3976*a9fa9459Szrj   BFD_RELOC_M32R_HI16_SLO
3977*a9fa9459Szrj ENUMDOC
3978*a9fa9459Szrj   This is a 16-bit reloc containing the high 16 bits of an address
3979*a9fa9459Szrj   used when the lower 16 bits are treated as signed.
3980*a9fa9459Szrj ENUM
3981*a9fa9459Szrj   BFD_RELOC_M32R_LO16
3982*a9fa9459Szrj ENUMDOC
3983*a9fa9459Szrj   This is a 16-bit reloc containing the lower 16 bits of an address.
3984*a9fa9459Szrj ENUM
3985*a9fa9459Szrj   BFD_RELOC_M32R_SDA16
3986*a9fa9459Szrj ENUMDOC
3987*a9fa9459Szrj   This is a 16-bit reloc containing the small data area offset for use in
3988*a9fa9459Szrj   add3, load, and store instructions.
3989*a9fa9459Szrj ENUM
3990*a9fa9459Szrj   BFD_RELOC_M32R_GOT24
3991*a9fa9459Szrj ENUMX
3992*a9fa9459Szrj   BFD_RELOC_M32R_26_PLTREL
3993*a9fa9459Szrj ENUMX
3994*a9fa9459Szrj   BFD_RELOC_M32R_COPY
3995*a9fa9459Szrj ENUMX
3996*a9fa9459Szrj   BFD_RELOC_M32R_GLOB_DAT
3997*a9fa9459Szrj ENUMX
3998*a9fa9459Szrj   BFD_RELOC_M32R_JMP_SLOT
3999*a9fa9459Szrj ENUMX
4000*a9fa9459Szrj   BFD_RELOC_M32R_RELATIVE
4001*a9fa9459Szrj ENUMX
4002*a9fa9459Szrj   BFD_RELOC_M32R_GOTOFF
4003*a9fa9459Szrj ENUMX
4004*a9fa9459Szrj   BFD_RELOC_M32R_GOTOFF_HI_ULO
4005*a9fa9459Szrj ENUMX
4006*a9fa9459Szrj   BFD_RELOC_M32R_GOTOFF_HI_SLO
4007*a9fa9459Szrj ENUMX
4008*a9fa9459Szrj   BFD_RELOC_M32R_GOTOFF_LO
4009*a9fa9459Szrj ENUMX
4010*a9fa9459Szrj   BFD_RELOC_M32R_GOTPC24
4011*a9fa9459Szrj ENUMX
4012*a9fa9459Szrj   BFD_RELOC_M32R_GOT16_HI_ULO
4013*a9fa9459Szrj ENUMX
4014*a9fa9459Szrj   BFD_RELOC_M32R_GOT16_HI_SLO
4015*a9fa9459Szrj ENUMX
4016*a9fa9459Szrj   BFD_RELOC_M32R_GOT16_LO
4017*a9fa9459Szrj ENUMX
4018*a9fa9459Szrj   BFD_RELOC_M32R_GOTPC_HI_ULO
4019*a9fa9459Szrj ENUMX
4020*a9fa9459Szrj   BFD_RELOC_M32R_GOTPC_HI_SLO
4021*a9fa9459Szrj ENUMX
4022*a9fa9459Szrj   BFD_RELOC_M32R_GOTPC_LO
4023*a9fa9459Szrj ENUMDOC
4024*a9fa9459Szrj   For PIC.
4025*a9fa9459Szrj 
4026*a9fa9459Szrj 
4027*a9fa9459Szrj ENUM
4028*a9fa9459Szrj   BFD_RELOC_NDS32_20
4029*a9fa9459Szrj ENUMDOC
4030*a9fa9459Szrj   NDS32 relocs.
4031*a9fa9459Szrj   This is a 20 bit absolute address.
4032*a9fa9459Szrj ENUM
4033*a9fa9459Szrj   BFD_RELOC_NDS32_9_PCREL
4034*a9fa9459Szrj ENUMDOC
4035*a9fa9459Szrj   This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0.
4036*a9fa9459Szrj ENUM
4037*a9fa9459Szrj   BFD_RELOC_NDS32_WORD_9_PCREL
4038*a9fa9459Szrj ENUMDOC
4039*a9fa9459Szrj   This is a 9-bit pc-relative reloc with the right 1 bit assumed to be 0.
4040*a9fa9459Szrj ENUM
4041*a9fa9459Szrj   BFD_RELOC_NDS32_15_PCREL
4042*a9fa9459Szrj ENUMDOC
4043*a9fa9459Szrj   This is an 15-bit reloc with the right 1 bit assumed to be 0.
4044*a9fa9459Szrj ENUM
4045*a9fa9459Szrj   BFD_RELOC_NDS32_17_PCREL
4046*a9fa9459Szrj ENUMDOC
4047*a9fa9459Szrj   This is an 17-bit reloc with the right 1 bit assumed to be 0.
4048*a9fa9459Szrj ENUM
4049*a9fa9459Szrj   BFD_RELOC_NDS32_25_PCREL
4050*a9fa9459Szrj ENUMDOC
4051*a9fa9459Szrj   This is a 25-bit reloc with the right 1 bit assumed to be 0.
4052*a9fa9459Szrj ENUM
4053*a9fa9459Szrj   BFD_RELOC_NDS32_HI20
4054*a9fa9459Szrj ENUMDOC
4055*a9fa9459Szrj   This is a 20-bit reloc containing the high 20 bits of an address
4056*a9fa9459Szrj   used with the lower 12 bits
4057*a9fa9459Szrj ENUM
4058*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S3
4059*a9fa9459Szrj ENUMDOC
4060*a9fa9459Szrj   This is a 12-bit reloc containing the lower 12 bits of an address
4061*a9fa9459Szrj   then shift right by 3. This is used with ldi,sdi...
4062*a9fa9459Szrj ENUM
4063*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S2
4064*a9fa9459Szrj ENUMDOC
4065*a9fa9459Szrj   This is a 12-bit reloc containing the lower 12 bits of an address
4066*a9fa9459Szrj   then shift left by 2. This is used with lwi,swi...
4067*a9fa9459Szrj ENUM
4068*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S1
4069*a9fa9459Szrj ENUMDOC
4070*a9fa9459Szrj   This is a 12-bit reloc containing the lower 12 bits of an address
4071*a9fa9459Szrj   then shift left by 1. This is used with lhi,shi...
4072*a9fa9459Szrj ENUM
4073*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S0
4074*a9fa9459Szrj ENUMDOC
4075*a9fa9459Szrj   This is a 12-bit reloc containing the lower 12 bits of an address
4076*a9fa9459Szrj   then shift left by 0. This is used with lbisbi...
4077*a9fa9459Szrj ENUM
4078*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S0_ORI
4079*a9fa9459Szrj ENUMDOC
4080*a9fa9459Szrj   This is a 12-bit reloc containing the lower 12 bits of an address
4081*a9fa9459Szrj   then shift left by 0. This is only used with branch relaxations
4082*a9fa9459Szrj ENUM
4083*a9fa9459Szrj   BFD_RELOC_NDS32_SDA15S3
4084*a9fa9459Szrj ENUMDOC
4085*a9fa9459Szrj   This is a 15-bit reloc containing the small data area 18-bit signed offset
4086*a9fa9459Szrj   and shift left by 3 for use in ldi, sdi...
4087*a9fa9459Szrj ENUM
4088*a9fa9459Szrj   BFD_RELOC_NDS32_SDA15S2
4089*a9fa9459Szrj ENUMDOC
4090*a9fa9459Szrj   This is a 15-bit reloc containing the small data area 17-bit signed offset
4091*a9fa9459Szrj   and shift left by 2 for use in lwi, swi...
4092*a9fa9459Szrj ENUM
4093*a9fa9459Szrj   BFD_RELOC_NDS32_SDA15S1
4094*a9fa9459Szrj ENUMDOC
4095*a9fa9459Szrj   This is a 15-bit reloc containing the small data area 16-bit signed offset
4096*a9fa9459Szrj   and shift left by 1 for use in lhi, shi...
4097*a9fa9459Szrj ENUM
4098*a9fa9459Szrj   BFD_RELOC_NDS32_SDA15S0
4099*a9fa9459Szrj ENUMDOC
4100*a9fa9459Szrj   This is a 15-bit reloc containing the small data area 15-bit signed offset
4101*a9fa9459Szrj   and shift left by 0 for use in lbi, sbi...
4102*a9fa9459Szrj ENUM
4103*a9fa9459Szrj   BFD_RELOC_NDS32_SDA16S3
4104*a9fa9459Szrj ENUMDOC
4105*a9fa9459Szrj   This is a 16-bit reloc containing the small data area 16-bit signed offset
4106*a9fa9459Szrj   and shift left by 3
4107*a9fa9459Szrj ENUM
4108*a9fa9459Szrj   BFD_RELOC_NDS32_SDA17S2
4109*a9fa9459Szrj ENUMDOC
4110*a9fa9459Szrj   This is a 17-bit reloc containing the small data area 17-bit signed offset
4111*a9fa9459Szrj   and shift left by 2 for use in lwi.gp, swi.gp...
4112*a9fa9459Szrj ENUM
4113*a9fa9459Szrj   BFD_RELOC_NDS32_SDA18S1
4114*a9fa9459Szrj ENUMDOC
4115*a9fa9459Szrj   This is a 18-bit reloc containing the small data area 18-bit signed offset
4116*a9fa9459Szrj   and shift left by 1 for use in lhi.gp, shi.gp...
4117*a9fa9459Szrj ENUM
4118*a9fa9459Szrj   BFD_RELOC_NDS32_SDA19S0
4119*a9fa9459Szrj ENUMDOC
4120*a9fa9459Szrj   This is a 19-bit reloc containing the small data area 19-bit signed offset
4121*a9fa9459Szrj   and shift left by 0 for use in lbi.gp, sbi.gp...
4122*a9fa9459Szrj ENUM
4123*a9fa9459Szrj   BFD_RELOC_NDS32_GOT20
4124*a9fa9459Szrj ENUMX
4125*a9fa9459Szrj   BFD_RELOC_NDS32_9_PLTREL
4126*a9fa9459Szrj ENUMX
4127*a9fa9459Szrj   BFD_RELOC_NDS32_25_PLTREL
4128*a9fa9459Szrj ENUMX
4129*a9fa9459Szrj   BFD_RELOC_NDS32_COPY
4130*a9fa9459Szrj ENUMX
4131*a9fa9459Szrj   BFD_RELOC_NDS32_GLOB_DAT
4132*a9fa9459Szrj ENUMX
4133*a9fa9459Szrj   BFD_RELOC_NDS32_JMP_SLOT
4134*a9fa9459Szrj ENUMX
4135*a9fa9459Szrj   BFD_RELOC_NDS32_RELATIVE
4136*a9fa9459Szrj ENUMX
4137*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF
4138*a9fa9459Szrj ENUMX
4139*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF_HI20
4140*a9fa9459Szrj ENUMX
4141*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF_LO12
4142*a9fa9459Szrj ENUMX
4143*a9fa9459Szrj   BFD_RELOC_NDS32_GOTPC20
4144*a9fa9459Szrj ENUMX
4145*a9fa9459Szrj   BFD_RELOC_NDS32_GOT_HI20
4146*a9fa9459Szrj ENUMX
4147*a9fa9459Szrj   BFD_RELOC_NDS32_GOT_LO12
4148*a9fa9459Szrj ENUMX
4149*a9fa9459Szrj   BFD_RELOC_NDS32_GOTPC_HI20
4150*a9fa9459Szrj ENUMX
4151*a9fa9459Szrj   BFD_RELOC_NDS32_GOTPC_LO12
4152*a9fa9459Szrj ENUMDOC
4153*a9fa9459Szrj   for PIC
4154*a9fa9459Szrj ENUM
4155*a9fa9459Szrj   BFD_RELOC_NDS32_INSN16
4156*a9fa9459Szrj ENUMX
4157*a9fa9459Szrj   BFD_RELOC_NDS32_LABEL
4158*a9fa9459Szrj ENUMX
4159*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL1
4160*a9fa9459Szrj ENUMX
4161*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL2
4162*a9fa9459Szrj ENUMX
4163*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL3
4164*a9fa9459Szrj ENUMX
4165*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP1
4166*a9fa9459Szrj ENUMX
4167*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP2
4168*a9fa9459Szrj ENUMX
4169*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP3
4170*a9fa9459Szrj ENUMX
4171*a9fa9459Szrj   BFD_RELOC_NDS32_LOADSTORE
4172*a9fa9459Szrj ENUMX
4173*a9fa9459Szrj   BFD_RELOC_NDS32_9_FIXED
4174*a9fa9459Szrj ENUMX
4175*a9fa9459Szrj   BFD_RELOC_NDS32_15_FIXED
4176*a9fa9459Szrj ENUMX
4177*a9fa9459Szrj   BFD_RELOC_NDS32_17_FIXED
4178*a9fa9459Szrj ENUMX
4179*a9fa9459Szrj   BFD_RELOC_NDS32_25_FIXED
4180*a9fa9459Szrj ENUMX
4181*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL4
4182*a9fa9459Szrj ENUMX
4183*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL5
4184*a9fa9459Szrj ENUMX
4185*a9fa9459Szrj   BFD_RELOC_NDS32_LONGCALL6
4186*a9fa9459Szrj ENUMX
4187*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP4
4188*a9fa9459Szrj ENUMX
4189*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP5
4190*a9fa9459Szrj ENUMX
4191*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP6
4192*a9fa9459Szrj ENUMX
4193*a9fa9459Szrj   BFD_RELOC_NDS32_LONGJUMP7
4194*a9fa9459Szrj ENUMDOC
4195*a9fa9459Szrj   for relax
4196*a9fa9459Szrj ENUM
4197*a9fa9459Szrj   BFD_RELOC_NDS32_PLTREL_HI20
4198*a9fa9459Szrj ENUMX
4199*a9fa9459Szrj   BFD_RELOC_NDS32_PLTREL_LO12
4200*a9fa9459Szrj ENUMX
4201*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOTREL_HI20
4202*a9fa9459Szrj ENUMX
4203*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOTREL_LO12
4204*a9fa9459Szrj ENUMDOC
4205*a9fa9459Szrj   for PIC
4206*a9fa9459Szrj ENUM
4207*a9fa9459Szrj   BFD_RELOC_NDS32_SDA12S2_DP
4208*a9fa9459Szrj ENUMX
4209*a9fa9459Szrj   BFD_RELOC_NDS32_SDA12S2_SP
4210*a9fa9459Szrj ENUMX
4211*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S2_DP
4212*a9fa9459Szrj ENUMX
4213*a9fa9459Szrj   BFD_RELOC_NDS32_LO12S2_SP
4214*a9fa9459Szrj ENUMDOC
4215*a9fa9459Szrj   for floating point
4216*a9fa9459Szrj ENUM
4217*a9fa9459Szrj   BFD_RELOC_NDS32_DWARF2_OP1
4218*a9fa9459Szrj ENUMX
4219*a9fa9459Szrj   BFD_RELOC_NDS32_DWARF2_OP2
4220*a9fa9459Szrj ENUMX
4221*a9fa9459Szrj   BFD_RELOC_NDS32_DWARF2_LEB
4222*a9fa9459Szrj ENUMDOC
4223*a9fa9459Szrj   for dwarf2 debug_line.
4224*a9fa9459Szrj ENUM
4225*a9fa9459Szrj   BFD_RELOC_NDS32_UPDATE_TA
4226*a9fa9459Szrj ENUMDOC
4227*a9fa9459Szrj   for eliminate 16-bit instructions
4228*a9fa9459Szrj ENUM
4229*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOTREL_LO20
4230*a9fa9459Szrj ENUMX
4231*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOTREL_LO15
4232*a9fa9459Szrj ENUMX
4233*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOTREL_LO19
4234*a9fa9459Szrj ENUMX
4235*a9fa9459Szrj   BFD_RELOC_NDS32_GOT_LO15
4236*a9fa9459Szrj ENUMX
4237*a9fa9459Szrj   BFD_RELOC_NDS32_GOT_LO19
4238*a9fa9459Szrj ENUMX
4239*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF_LO15
4240*a9fa9459Szrj ENUMX
4241*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF_LO19
4242*a9fa9459Szrj ENUMX
4243*a9fa9459Szrj   BFD_RELOC_NDS32_GOT15S2
4244*a9fa9459Szrj ENUMX
4245*a9fa9459Szrj   BFD_RELOC_NDS32_GOT17S2
4246*a9fa9459Szrj ENUMDOC
4247*a9fa9459Szrj   for PIC object relaxation
4248*a9fa9459Szrj ENUM
4249*a9fa9459Szrj   BFD_RELOC_NDS32_5
4250*a9fa9459Szrj ENUMDOC
4251*a9fa9459Szrj   NDS32 relocs.
4252*a9fa9459Szrj   This is a 5 bit absolute address.
4253*a9fa9459Szrj ENUM
4254*a9fa9459Szrj   BFD_RELOC_NDS32_10_UPCREL
4255*a9fa9459Szrj ENUMDOC
4256*a9fa9459Szrj   This is a 10-bit unsigned pc-relative reloc with the right 1 bit assumed to be 0.
4257*a9fa9459Szrj ENUM
4258*a9fa9459Szrj   BFD_RELOC_NDS32_SDA_FP7U2_RELA
4259*a9fa9459Szrj ENUMDOC
4260*a9fa9459Szrj   If fp were omitted, fp can used as another gp.
4261*a9fa9459Szrj ENUM
4262*a9fa9459Szrj   BFD_RELOC_NDS32_RELAX_ENTRY
4263*a9fa9459Szrj ENUMX
4264*a9fa9459Szrj   BFD_RELOC_NDS32_GOT_SUFF
4265*a9fa9459Szrj ENUMX
4266*a9fa9459Szrj   BFD_RELOC_NDS32_GOTOFF_SUFF
4267*a9fa9459Szrj ENUMX
4268*a9fa9459Szrj   BFD_RELOC_NDS32_PLT_GOT_SUFF
4269*a9fa9459Szrj ENUMX
4270*a9fa9459Szrj   BFD_RELOC_NDS32_MULCALL_SUFF
4271*a9fa9459Szrj ENUMX
4272*a9fa9459Szrj   BFD_RELOC_NDS32_PTR
4273*a9fa9459Szrj ENUMX
4274*a9fa9459Szrj   BFD_RELOC_NDS32_PTR_COUNT
4275*a9fa9459Szrj ENUMX
4276*a9fa9459Szrj   BFD_RELOC_NDS32_PTR_RESOLVED
4277*a9fa9459Szrj ENUMX
4278*a9fa9459Szrj   BFD_RELOC_NDS32_PLTBLOCK
4279*a9fa9459Szrj ENUMX
4280*a9fa9459Szrj   BFD_RELOC_NDS32_RELAX_REGION_BEGIN
4281*a9fa9459Szrj ENUMX
4282*a9fa9459Szrj   BFD_RELOC_NDS32_RELAX_REGION_END
4283*a9fa9459Szrj ENUMX
4284*a9fa9459Szrj   BFD_RELOC_NDS32_MINUEND
4285*a9fa9459Szrj ENUMX
4286*a9fa9459Szrj   BFD_RELOC_NDS32_SUBTRAHEND
4287*a9fa9459Szrj ENUMX
4288*a9fa9459Szrj   BFD_RELOC_NDS32_DIFF8
4289*a9fa9459Szrj ENUMX
4290*a9fa9459Szrj   BFD_RELOC_NDS32_DIFF16
4291*a9fa9459Szrj ENUMX
4292*a9fa9459Szrj   BFD_RELOC_NDS32_DIFF32
4293*a9fa9459Szrj ENUMX
4294*a9fa9459Szrj   BFD_RELOC_NDS32_DIFF_ULEB128
4295*a9fa9459Szrj ENUMX
4296*a9fa9459Szrj   BFD_RELOC_NDS32_EMPTY
4297*a9fa9459Szrj ENUMDOC
4298*a9fa9459Szrj   relaxation relative relocation types
4299*a9fa9459Szrj ENUM
4300*a9fa9459Szrj   BFD_RELOC_NDS32_25_ABS
4301*a9fa9459Szrj ENUMDOC
4302*a9fa9459Szrj   This is a 25 bit absolute address.
4303*a9fa9459Szrj ENUM
4304*a9fa9459Szrj   BFD_RELOC_NDS32_DATA
4305*a9fa9459Szrj ENUMX
4306*a9fa9459Szrj   BFD_RELOC_NDS32_TRAN
4307*a9fa9459Szrj ENUMX
4308*a9fa9459Szrj   BFD_RELOC_NDS32_17IFC_PCREL
4309*a9fa9459Szrj ENUMX
4310*a9fa9459Szrj   BFD_RELOC_NDS32_10IFCU_PCREL
4311*a9fa9459Szrj ENUMDOC
4312*a9fa9459Szrj   For ex9 and ifc using.
4313*a9fa9459Szrj ENUM
4314*a9fa9459Szrj   BFD_RELOC_NDS32_TPOFF
4315*a9fa9459Szrj ENUMX
4316*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_HI20
4317*a9fa9459Szrj ENUMX
4318*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_LO12
4319*a9fa9459Szrj ENUMX
4320*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_ADD
4321*a9fa9459Szrj ENUMX
4322*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_LS
4323*a9fa9459Szrj ENUMX
4324*a9fa9459Szrj   BFD_RELOC_NDS32_GOTTPOFF
4325*a9fa9459Szrj ENUMX
4326*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_IE_HI20
4327*a9fa9459Szrj ENUMX
4328*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_IE_LO12S2
4329*a9fa9459Szrj ENUMX
4330*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_TPOFF
4331*a9fa9459Szrj ENUMX
4332*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_20
4333*a9fa9459Szrj ENUMX
4334*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_15S0
4335*a9fa9459Szrj ENUMX
4336*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_15S1
4337*a9fa9459Szrj ENUMX
4338*a9fa9459Szrj   BFD_RELOC_NDS32_TLS_LE_15S2
4339*a9fa9459Szrj ENUMDOC
4340*a9fa9459Szrj   For TLS.
4341*a9fa9459Szrj 
4342*a9fa9459Szrj 
4343*a9fa9459Szrj ENUM
4344*a9fa9459Szrj   BFD_RELOC_V850_9_PCREL
4345*a9fa9459Szrj ENUMDOC
4346*a9fa9459Szrj   This is a 9-bit reloc
4347*a9fa9459Szrj ENUM
4348*a9fa9459Szrj   BFD_RELOC_V850_22_PCREL
4349*a9fa9459Szrj ENUMDOC
4350*a9fa9459Szrj   This is a 22-bit reloc
4351*a9fa9459Szrj 
4352*a9fa9459Szrj ENUM
4353*a9fa9459Szrj   BFD_RELOC_V850_SDA_16_16_OFFSET
4354*a9fa9459Szrj ENUMDOC
4355*a9fa9459Szrj   This is a 16 bit offset from the short data area pointer.
4356*a9fa9459Szrj ENUM
4357*a9fa9459Szrj   BFD_RELOC_V850_SDA_15_16_OFFSET
4358*a9fa9459Szrj ENUMDOC
4359*a9fa9459Szrj   This is a 16 bit offset (of which only 15 bits are used) from the
4360*a9fa9459Szrj   short data area pointer.
4361*a9fa9459Szrj ENUM
4362*a9fa9459Szrj   BFD_RELOC_V850_ZDA_16_16_OFFSET
4363*a9fa9459Szrj ENUMDOC
4364*a9fa9459Szrj   This is a 16 bit offset from the zero data area pointer.
4365*a9fa9459Szrj ENUM
4366*a9fa9459Szrj   BFD_RELOC_V850_ZDA_15_16_OFFSET
4367*a9fa9459Szrj ENUMDOC
4368*a9fa9459Szrj   This is a 16 bit offset (of which only 15 bits are used) from the
4369*a9fa9459Szrj   zero data area pointer.
4370*a9fa9459Szrj ENUM
4371*a9fa9459Szrj   BFD_RELOC_V850_TDA_6_8_OFFSET
4372*a9fa9459Szrj ENUMDOC
4373*a9fa9459Szrj   This is an 8 bit offset (of which only 6 bits are used) from the
4374*a9fa9459Szrj   tiny data area pointer.
4375*a9fa9459Szrj ENUM
4376*a9fa9459Szrj   BFD_RELOC_V850_TDA_7_8_OFFSET
4377*a9fa9459Szrj ENUMDOC
4378*a9fa9459Szrj   This is an 8bit offset (of which only 7 bits are used) from the tiny
4379*a9fa9459Szrj   data area pointer.
4380*a9fa9459Szrj ENUM
4381*a9fa9459Szrj   BFD_RELOC_V850_TDA_7_7_OFFSET
4382*a9fa9459Szrj ENUMDOC
4383*a9fa9459Szrj   This is a 7 bit offset from the tiny data area pointer.
4384*a9fa9459Szrj ENUM
4385*a9fa9459Szrj   BFD_RELOC_V850_TDA_16_16_OFFSET
4386*a9fa9459Szrj ENUMDOC
4387*a9fa9459Szrj   This is a 16 bit offset from the tiny data area pointer.
4388*a9fa9459Szrj COMMENT
4389*a9fa9459Szrj ENUM
4390*a9fa9459Szrj   BFD_RELOC_V850_TDA_4_5_OFFSET
4391*a9fa9459Szrj ENUMDOC
4392*a9fa9459Szrj   This is a 5 bit offset (of which only 4 bits are used) from the tiny
4393*a9fa9459Szrj   data area pointer.
4394*a9fa9459Szrj ENUM
4395*a9fa9459Szrj   BFD_RELOC_V850_TDA_4_4_OFFSET
4396*a9fa9459Szrj ENUMDOC
4397*a9fa9459Szrj   This is a 4 bit offset from the tiny data area pointer.
4398*a9fa9459Szrj ENUM
4399*a9fa9459Szrj   BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
4400*a9fa9459Szrj ENUMDOC
4401*a9fa9459Szrj   This is a 16 bit offset from the short data area pointer, with the
4402*a9fa9459Szrj   bits placed non-contiguously in the instruction.
4403*a9fa9459Szrj ENUM
4404*a9fa9459Szrj   BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
4405*a9fa9459Szrj ENUMDOC
4406*a9fa9459Szrj   This is a 16 bit offset from the zero data area pointer, with the
4407*a9fa9459Szrj   bits placed non-contiguously in the instruction.
4408*a9fa9459Szrj ENUM
4409*a9fa9459Szrj   BFD_RELOC_V850_CALLT_6_7_OFFSET
4410*a9fa9459Szrj ENUMDOC
4411*a9fa9459Szrj   This is a 6 bit offset from the call table base pointer.
4412*a9fa9459Szrj ENUM
4413*a9fa9459Szrj   BFD_RELOC_V850_CALLT_16_16_OFFSET
4414*a9fa9459Szrj ENUMDOC
4415*a9fa9459Szrj   This is a 16 bit offset from the call table base pointer.
4416*a9fa9459Szrj ENUM
4417*a9fa9459Szrj   BFD_RELOC_V850_LONGCALL
4418*a9fa9459Szrj ENUMDOC
4419*a9fa9459Szrj   Used for relaxing indirect function calls.
4420*a9fa9459Szrj ENUM
4421*a9fa9459Szrj   BFD_RELOC_V850_LONGJUMP
4422*a9fa9459Szrj ENUMDOC
4423*a9fa9459Szrj   Used for relaxing indirect jumps.
4424*a9fa9459Szrj ENUM
4425*a9fa9459Szrj   BFD_RELOC_V850_ALIGN
4426*a9fa9459Szrj ENUMDOC
4427*a9fa9459Szrj   Used to maintain alignment whilst relaxing.
4428*a9fa9459Szrj ENUM
4429*a9fa9459Szrj   BFD_RELOC_V850_LO16_SPLIT_OFFSET
4430*a9fa9459Szrj ENUMDOC
4431*a9fa9459Szrj   This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
4432*a9fa9459Szrj   instructions.
4433*a9fa9459Szrj ENUM
4434*a9fa9459Szrj   BFD_RELOC_V850_16_PCREL
4435*a9fa9459Szrj ENUMDOC
4436*a9fa9459Szrj   This is a 16-bit reloc.
4437*a9fa9459Szrj ENUM
4438*a9fa9459Szrj   BFD_RELOC_V850_17_PCREL
4439*a9fa9459Szrj ENUMDOC
4440*a9fa9459Szrj   This is a 17-bit reloc.
4441*a9fa9459Szrj ENUM
4442*a9fa9459Szrj   BFD_RELOC_V850_23
4443*a9fa9459Szrj ENUMDOC
4444*a9fa9459Szrj   This is a 23-bit reloc.
4445*a9fa9459Szrj ENUM
4446*a9fa9459Szrj   BFD_RELOC_V850_32_PCREL
4447*a9fa9459Szrj ENUMDOC
4448*a9fa9459Szrj   This is a 32-bit reloc.
4449*a9fa9459Szrj ENUM
4450*a9fa9459Szrj   BFD_RELOC_V850_32_ABS
4451*a9fa9459Szrj ENUMDOC
4452*a9fa9459Szrj   This is a 32-bit reloc.
4453*a9fa9459Szrj ENUM
4454*a9fa9459Szrj   BFD_RELOC_V850_16_SPLIT_OFFSET
4455*a9fa9459Szrj ENUMDOC
4456*a9fa9459Szrj   This is a 16-bit reloc.
4457*a9fa9459Szrj ENUM
4458*a9fa9459Szrj   BFD_RELOC_V850_16_S1
4459*a9fa9459Szrj ENUMDOC
4460*a9fa9459Szrj   This is a 16-bit reloc.
4461*a9fa9459Szrj ENUM
4462*a9fa9459Szrj   BFD_RELOC_V850_LO16_S1
4463*a9fa9459Szrj ENUMDOC
4464*a9fa9459Szrj   Low 16 bits. 16 bit shifted by 1.
4465*a9fa9459Szrj ENUM
4466*a9fa9459Szrj   BFD_RELOC_V850_CALLT_15_16_OFFSET
4467*a9fa9459Szrj ENUMDOC
4468*a9fa9459Szrj   This is a 16 bit offset from the call table base pointer.
4469*a9fa9459Szrj ENUM
4470*a9fa9459Szrj   BFD_RELOC_V850_32_GOTPCREL
4471*a9fa9459Szrj ENUMDOC
4472*a9fa9459Szrj   DSO relocations.
4473*a9fa9459Szrj ENUM
4474*a9fa9459Szrj   BFD_RELOC_V850_16_GOT
4475*a9fa9459Szrj ENUMDOC
4476*a9fa9459Szrj   DSO relocations.
4477*a9fa9459Szrj ENUM
4478*a9fa9459Szrj   BFD_RELOC_V850_32_GOT
4479*a9fa9459Szrj ENUMDOC
4480*a9fa9459Szrj   DSO relocations.
4481*a9fa9459Szrj ENUM
4482*a9fa9459Szrj   BFD_RELOC_V850_22_PLT_PCREL
4483*a9fa9459Szrj ENUMDOC
4484*a9fa9459Szrj   DSO relocations.
4485*a9fa9459Szrj ENUM
4486*a9fa9459Szrj   BFD_RELOC_V850_32_PLT_PCREL
4487*a9fa9459Szrj ENUMDOC
4488*a9fa9459Szrj   DSO relocations.
4489*a9fa9459Szrj ENUM
4490*a9fa9459Szrj   BFD_RELOC_V850_COPY
4491*a9fa9459Szrj ENUMDOC
4492*a9fa9459Szrj   DSO relocations.
4493*a9fa9459Szrj ENUM
4494*a9fa9459Szrj   BFD_RELOC_V850_GLOB_DAT
4495*a9fa9459Szrj ENUMDOC
4496*a9fa9459Szrj   DSO relocations.
4497*a9fa9459Szrj ENUM
4498*a9fa9459Szrj   BFD_RELOC_V850_JMP_SLOT
4499*a9fa9459Szrj ENUMDOC
4500*a9fa9459Szrj   DSO relocations.
4501*a9fa9459Szrj ENUM
4502*a9fa9459Szrj   BFD_RELOC_V850_RELATIVE
4503*a9fa9459Szrj ENUMDOC
4504*a9fa9459Szrj   DSO relocations.
4505*a9fa9459Szrj ENUM
4506*a9fa9459Szrj   BFD_RELOC_V850_16_GOTOFF
4507*a9fa9459Szrj ENUMDOC
4508*a9fa9459Szrj   DSO relocations.
4509*a9fa9459Szrj ENUM
4510*a9fa9459Szrj   BFD_RELOC_V850_32_GOTOFF
4511*a9fa9459Szrj ENUMDOC
4512*a9fa9459Szrj   DSO relocations.
4513*a9fa9459Szrj ENUM
4514*a9fa9459Szrj   BFD_RELOC_V850_CODE
4515*a9fa9459Szrj ENUMDOC
4516*a9fa9459Szrj   start code.
4517*a9fa9459Szrj ENUM
4518*a9fa9459Szrj   BFD_RELOC_V850_DATA
4519*a9fa9459Szrj ENUMDOC
4520*a9fa9459Szrj   start data in text.
4521*a9fa9459Szrj 
4522*a9fa9459Szrj ENUM
4523*a9fa9459Szrj   BFD_RELOC_TIC30_LDP
4524*a9fa9459Szrj ENUMDOC
4525*a9fa9459Szrj   This is a 8bit DP reloc for the tms320c30, where the most
4526*a9fa9459Szrj   significant 8 bits of a 24 bit word are placed into the least
4527*a9fa9459Szrj   significant 8 bits of the opcode.
4528*a9fa9459Szrj 
4529*a9fa9459Szrj ENUM
4530*a9fa9459Szrj   BFD_RELOC_TIC54X_PARTLS7
4531*a9fa9459Szrj ENUMDOC
4532*a9fa9459Szrj   This is a 7bit reloc for the tms320c54x, where the least
4533*a9fa9459Szrj   significant 7 bits of a 16 bit word are placed into the least
4534*a9fa9459Szrj   significant 7 bits of the opcode.
4535*a9fa9459Szrj 
4536*a9fa9459Szrj ENUM
4537*a9fa9459Szrj   BFD_RELOC_TIC54X_PARTMS9
4538*a9fa9459Szrj ENUMDOC
4539*a9fa9459Szrj   This is a 9bit DP reloc for the tms320c54x, where the most
4540*a9fa9459Szrj   significant 9 bits of a 16 bit word are placed into the least
4541*a9fa9459Szrj   significant 9 bits of the opcode.
4542*a9fa9459Szrj 
4543*a9fa9459Szrj ENUM
4544*a9fa9459Szrj   BFD_RELOC_TIC54X_23
4545*a9fa9459Szrj ENUMDOC
4546*a9fa9459Szrj   This is an extended address 23-bit reloc for the tms320c54x.
4547*a9fa9459Szrj 
4548*a9fa9459Szrj ENUM
4549*a9fa9459Szrj   BFD_RELOC_TIC54X_16_OF_23
4550*a9fa9459Szrj ENUMDOC
4551*a9fa9459Szrj   This is a 16-bit reloc for the tms320c54x, where the least
4552*a9fa9459Szrj   significant 16 bits of a 23-bit extended address are placed into
4553*a9fa9459Szrj   the opcode.
4554*a9fa9459Szrj 
4555*a9fa9459Szrj ENUM
4556*a9fa9459Szrj   BFD_RELOC_TIC54X_MS7_OF_23
4557*a9fa9459Szrj ENUMDOC
4558*a9fa9459Szrj   This is a reloc for the tms320c54x, where the most
4559*a9fa9459Szrj   significant 7 bits of a 23-bit extended address are placed into
4560*a9fa9459Szrj   the opcode.
4561*a9fa9459Szrj 
4562*a9fa9459Szrj ENUM
4563*a9fa9459Szrj   BFD_RELOC_C6000_PCR_S21
4564*a9fa9459Szrj ENUMX
4565*a9fa9459Szrj   BFD_RELOC_C6000_PCR_S12
4566*a9fa9459Szrj ENUMX
4567*a9fa9459Szrj   BFD_RELOC_C6000_PCR_S10
4568*a9fa9459Szrj ENUMX
4569*a9fa9459Szrj   BFD_RELOC_C6000_PCR_S7
4570*a9fa9459Szrj ENUMX
4571*a9fa9459Szrj   BFD_RELOC_C6000_ABS_S16
4572*a9fa9459Szrj ENUMX
4573*a9fa9459Szrj   BFD_RELOC_C6000_ABS_L16
4574*a9fa9459Szrj ENUMX
4575*a9fa9459Szrj   BFD_RELOC_C6000_ABS_H16
4576*a9fa9459Szrj ENUMX
4577*a9fa9459Szrj   BFD_RELOC_C6000_SBR_U15_B
4578*a9fa9459Szrj ENUMX
4579*a9fa9459Szrj   BFD_RELOC_C6000_SBR_U15_H
4580*a9fa9459Szrj ENUMX
4581*a9fa9459Szrj   BFD_RELOC_C6000_SBR_U15_W
4582*a9fa9459Szrj ENUMX
4583*a9fa9459Szrj   BFD_RELOC_C6000_SBR_S16
4584*a9fa9459Szrj ENUMX
4585*a9fa9459Szrj   BFD_RELOC_C6000_SBR_L16_B
4586*a9fa9459Szrj ENUMX
4587*a9fa9459Szrj   BFD_RELOC_C6000_SBR_L16_H
4588*a9fa9459Szrj ENUMX
4589*a9fa9459Szrj   BFD_RELOC_C6000_SBR_L16_W
4590*a9fa9459Szrj ENUMX
4591*a9fa9459Szrj   BFD_RELOC_C6000_SBR_H16_B
4592*a9fa9459Szrj ENUMX
4593*a9fa9459Szrj   BFD_RELOC_C6000_SBR_H16_H
4594*a9fa9459Szrj ENUMX
4595*a9fa9459Szrj   BFD_RELOC_C6000_SBR_H16_W
4596*a9fa9459Szrj ENUMX
4597*a9fa9459Szrj   BFD_RELOC_C6000_SBR_GOT_U15_W
4598*a9fa9459Szrj ENUMX
4599*a9fa9459Szrj   BFD_RELOC_C6000_SBR_GOT_L16_W
4600*a9fa9459Szrj ENUMX
4601*a9fa9459Szrj   BFD_RELOC_C6000_SBR_GOT_H16_W
4602*a9fa9459Szrj ENUMX
4603*a9fa9459Szrj   BFD_RELOC_C6000_DSBT_INDEX
4604*a9fa9459Szrj ENUMX
4605*a9fa9459Szrj   BFD_RELOC_C6000_PREL31
4606*a9fa9459Szrj ENUMX
4607*a9fa9459Szrj   BFD_RELOC_C6000_COPY
4608*a9fa9459Szrj ENUMX
4609*a9fa9459Szrj   BFD_RELOC_C6000_JUMP_SLOT
4610*a9fa9459Szrj ENUMX
4611*a9fa9459Szrj   BFD_RELOC_C6000_EHTYPE
4612*a9fa9459Szrj ENUMX
4613*a9fa9459Szrj   BFD_RELOC_C6000_PCR_H16
4614*a9fa9459Szrj ENUMX
4615*a9fa9459Szrj   BFD_RELOC_C6000_PCR_L16
4616*a9fa9459Szrj ENUMX
4617*a9fa9459Szrj   BFD_RELOC_C6000_ALIGN
4618*a9fa9459Szrj ENUMX
4619*a9fa9459Szrj   BFD_RELOC_C6000_FPHEAD
4620*a9fa9459Szrj ENUMX
4621*a9fa9459Szrj   BFD_RELOC_C6000_NOCMP
4622*a9fa9459Szrj ENUMDOC
4623*a9fa9459Szrj   TMS320C6000 relocations.
4624*a9fa9459Szrj 
4625*a9fa9459Szrj ENUM
4626*a9fa9459Szrj   BFD_RELOC_FR30_48
4627*a9fa9459Szrj ENUMDOC
4628*a9fa9459Szrj   This is a 48 bit reloc for the FR30 that stores 32 bits.
4629*a9fa9459Szrj ENUM
4630*a9fa9459Szrj   BFD_RELOC_FR30_20
4631*a9fa9459Szrj ENUMDOC
4632*a9fa9459Szrj   This is a 32 bit reloc for the FR30 that stores 20 bits split up into
4633*a9fa9459Szrj   two sections.
4634*a9fa9459Szrj ENUM
4635*a9fa9459Szrj   BFD_RELOC_FR30_6_IN_4
4636*a9fa9459Szrj ENUMDOC
4637*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
4638*a9fa9459Szrj   4 bits.
4639*a9fa9459Szrj ENUM
4640*a9fa9459Szrj   BFD_RELOC_FR30_8_IN_8
4641*a9fa9459Szrj ENUMDOC
4642*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
4643*a9fa9459Szrj   into 8 bits.
4644*a9fa9459Szrj ENUM
4645*a9fa9459Szrj   BFD_RELOC_FR30_9_IN_8
4646*a9fa9459Szrj ENUMDOC
4647*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
4648*a9fa9459Szrj   into 8 bits.
4649*a9fa9459Szrj ENUM
4650*a9fa9459Szrj   BFD_RELOC_FR30_10_IN_8
4651*a9fa9459Szrj ENUMDOC
4652*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
4653*a9fa9459Szrj   into 8 bits.
4654*a9fa9459Szrj ENUM
4655*a9fa9459Szrj   BFD_RELOC_FR30_9_PCREL
4656*a9fa9459Szrj ENUMDOC
4657*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
4658*a9fa9459Szrj   short offset into 8 bits.
4659*a9fa9459Szrj ENUM
4660*a9fa9459Szrj   BFD_RELOC_FR30_12_PCREL
4661*a9fa9459Szrj ENUMDOC
4662*a9fa9459Szrj   This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
4663*a9fa9459Szrj   short offset into 11 bits.
4664*a9fa9459Szrj 
4665*a9fa9459Szrj ENUM
4666*a9fa9459Szrj   BFD_RELOC_MCORE_PCREL_IMM8BY4
4667*a9fa9459Szrj ENUMX
4668*a9fa9459Szrj   BFD_RELOC_MCORE_PCREL_IMM11BY2
4669*a9fa9459Szrj ENUMX
4670*a9fa9459Szrj   BFD_RELOC_MCORE_PCREL_IMM4BY2
4671*a9fa9459Szrj ENUMX
4672*a9fa9459Szrj   BFD_RELOC_MCORE_PCREL_32
4673*a9fa9459Szrj ENUMX
4674*a9fa9459Szrj   BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
4675*a9fa9459Szrj ENUMX
4676*a9fa9459Szrj   BFD_RELOC_MCORE_RVA
4677*a9fa9459Szrj ENUMDOC
4678*a9fa9459Szrj   Motorola Mcore relocations.
4679*a9fa9459Szrj 
4680*a9fa9459Szrj ENUM
4681*a9fa9459Szrj   BFD_RELOC_MEP_8
4682*a9fa9459Szrj ENUMX
4683*a9fa9459Szrj   BFD_RELOC_MEP_16
4684*a9fa9459Szrj ENUMX
4685*a9fa9459Szrj   BFD_RELOC_MEP_32
4686*a9fa9459Szrj ENUMX
4687*a9fa9459Szrj   BFD_RELOC_MEP_PCREL8A2
4688*a9fa9459Szrj ENUMX
4689*a9fa9459Szrj   BFD_RELOC_MEP_PCREL12A2
4690*a9fa9459Szrj ENUMX
4691*a9fa9459Szrj   BFD_RELOC_MEP_PCREL17A2
4692*a9fa9459Szrj ENUMX
4693*a9fa9459Szrj   BFD_RELOC_MEP_PCREL24A2
4694*a9fa9459Szrj ENUMX
4695*a9fa9459Szrj   BFD_RELOC_MEP_PCABS24A2
4696*a9fa9459Szrj ENUMX
4697*a9fa9459Szrj   BFD_RELOC_MEP_LOW16
4698*a9fa9459Szrj ENUMX
4699*a9fa9459Szrj   BFD_RELOC_MEP_HI16U
4700*a9fa9459Szrj ENUMX
4701*a9fa9459Szrj   BFD_RELOC_MEP_HI16S
4702*a9fa9459Szrj ENUMX
4703*a9fa9459Szrj   BFD_RELOC_MEP_GPREL
4704*a9fa9459Szrj ENUMX
4705*a9fa9459Szrj   BFD_RELOC_MEP_TPREL
4706*a9fa9459Szrj ENUMX
4707*a9fa9459Szrj   BFD_RELOC_MEP_TPREL7
4708*a9fa9459Szrj ENUMX
4709*a9fa9459Szrj   BFD_RELOC_MEP_TPREL7A2
4710*a9fa9459Szrj ENUMX
4711*a9fa9459Szrj   BFD_RELOC_MEP_TPREL7A4
4712*a9fa9459Szrj ENUMX
4713*a9fa9459Szrj   BFD_RELOC_MEP_UIMM24
4714*a9fa9459Szrj ENUMX
4715*a9fa9459Szrj   BFD_RELOC_MEP_ADDR24A4
4716*a9fa9459Szrj ENUMX
4717*a9fa9459Szrj   BFD_RELOC_MEP_GNU_VTINHERIT
4718*a9fa9459Szrj ENUMX
4719*a9fa9459Szrj   BFD_RELOC_MEP_GNU_VTENTRY
4720*a9fa9459Szrj ENUMDOC
4721*a9fa9459Szrj   Toshiba Media Processor Relocations.
4722*a9fa9459Szrj COMMENT
4723*a9fa9459Szrj 
4724*a9fa9459Szrj ENUM
4725*a9fa9459Szrj   BFD_RELOC_METAG_HIADDR16
4726*a9fa9459Szrj ENUMX
4727*a9fa9459Szrj   BFD_RELOC_METAG_LOADDR16
4728*a9fa9459Szrj ENUMX
4729*a9fa9459Szrj   BFD_RELOC_METAG_RELBRANCH
4730*a9fa9459Szrj ENUMX
4731*a9fa9459Szrj   BFD_RELOC_METAG_GETSETOFF
4732*a9fa9459Szrj ENUMX
4733*a9fa9459Szrj   BFD_RELOC_METAG_HIOG
4734*a9fa9459Szrj ENUMX
4735*a9fa9459Szrj   BFD_RELOC_METAG_LOOG
4736*a9fa9459Szrj ENUMX
4737*a9fa9459Szrj   BFD_RELOC_METAG_REL8
4738*a9fa9459Szrj ENUMX
4739*a9fa9459Szrj   BFD_RELOC_METAG_REL16
4740*a9fa9459Szrj ENUMX
4741*a9fa9459Szrj   BFD_RELOC_METAG_HI16_GOTOFF
4742*a9fa9459Szrj ENUMX
4743*a9fa9459Szrj   BFD_RELOC_METAG_LO16_GOTOFF
4744*a9fa9459Szrj ENUMX
4745*a9fa9459Szrj   BFD_RELOC_METAG_GETSET_GOTOFF
4746*a9fa9459Szrj ENUMX
4747*a9fa9459Szrj   BFD_RELOC_METAG_GETSET_GOT
4748*a9fa9459Szrj ENUMX
4749*a9fa9459Szrj   BFD_RELOC_METAG_HI16_GOTPC
4750*a9fa9459Szrj ENUMX
4751*a9fa9459Szrj   BFD_RELOC_METAG_LO16_GOTPC
4752*a9fa9459Szrj ENUMX
4753*a9fa9459Szrj   BFD_RELOC_METAG_HI16_PLT
4754*a9fa9459Szrj ENUMX
4755*a9fa9459Szrj   BFD_RELOC_METAG_LO16_PLT
4756*a9fa9459Szrj ENUMX
4757*a9fa9459Szrj   BFD_RELOC_METAG_RELBRANCH_PLT
4758*a9fa9459Szrj ENUMX
4759*a9fa9459Szrj   BFD_RELOC_METAG_GOTOFF
4760*a9fa9459Szrj ENUMX
4761*a9fa9459Szrj   BFD_RELOC_METAG_PLT
4762*a9fa9459Szrj ENUMX
4763*a9fa9459Szrj   BFD_RELOC_METAG_COPY
4764*a9fa9459Szrj ENUMX
4765*a9fa9459Szrj   BFD_RELOC_METAG_JMP_SLOT
4766*a9fa9459Szrj ENUMX
4767*a9fa9459Szrj   BFD_RELOC_METAG_RELATIVE
4768*a9fa9459Szrj ENUMX
4769*a9fa9459Szrj   BFD_RELOC_METAG_GLOB_DAT
4770*a9fa9459Szrj ENUMX
4771*a9fa9459Szrj   BFD_RELOC_METAG_TLS_GD
4772*a9fa9459Szrj ENUMX
4773*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LDM
4774*a9fa9459Szrj ENUMX
4775*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LDO_HI16
4776*a9fa9459Szrj ENUMX
4777*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LDO_LO16
4778*a9fa9459Szrj ENUMX
4779*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LDO
4780*a9fa9459Szrj ENUMX
4781*a9fa9459Szrj   BFD_RELOC_METAG_TLS_IE
4782*a9fa9459Szrj ENUMX
4783*a9fa9459Szrj   BFD_RELOC_METAG_TLS_IENONPIC
4784*a9fa9459Szrj ENUMX
4785*a9fa9459Szrj   BFD_RELOC_METAG_TLS_IENONPIC_HI16
4786*a9fa9459Szrj ENUMX
4787*a9fa9459Szrj   BFD_RELOC_METAG_TLS_IENONPIC_LO16
4788*a9fa9459Szrj ENUMX
4789*a9fa9459Szrj   BFD_RELOC_METAG_TLS_TPOFF
4790*a9fa9459Szrj ENUMX
4791*a9fa9459Szrj   BFD_RELOC_METAG_TLS_DTPMOD
4792*a9fa9459Szrj ENUMX
4793*a9fa9459Szrj   BFD_RELOC_METAG_TLS_DTPOFF
4794*a9fa9459Szrj ENUMX
4795*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LE
4796*a9fa9459Szrj ENUMX
4797*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LE_HI16
4798*a9fa9459Szrj ENUMX
4799*a9fa9459Szrj   BFD_RELOC_METAG_TLS_LE_LO16
4800*a9fa9459Szrj ENUMDOC
4801*a9fa9459Szrj   Imagination Technologies Meta relocations.
4802*a9fa9459Szrj 
4803*a9fa9459Szrj ENUM
4804*a9fa9459Szrj   BFD_RELOC_MMIX_GETA
4805*a9fa9459Szrj ENUMX
4806*a9fa9459Szrj   BFD_RELOC_MMIX_GETA_1
4807*a9fa9459Szrj ENUMX
4808*a9fa9459Szrj   BFD_RELOC_MMIX_GETA_2
4809*a9fa9459Szrj ENUMX
4810*a9fa9459Szrj   BFD_RELOC_MMIX_GETA_3
4811*a9fa9459Szrj ENUMDOC
4812*a9fa9459Szrj   These are relocations for the GETA instruction.
4813*a9fa9459Szrj ENUM
4814*a9fa9459Szrj   BFD_RELOC_MMIX_CBRANCH
4815*a9fa9459Szrj ENUMX
4816*a9fa9459Szrj   BFD_RELOC_MMIX_CBRANCH_J
4817*a9fa9459Szrj ENUMX
4818*a9fa9459Szrj   BFD_RELOC_MMIX_CBRANCH_1
4819*a9fa9459Szrj ENUMX
4820*a9fa9459Szrj   BFD_RELOC_MMIX_CBRANCH_2
4821*a9fa9459Szrj ENUMX
4822*a9fa9459Szrj   BFD_RELOC_MMIX_CBRANCH_3
4823*a9fa9459Szrj ENUMDOC
4824*a9fa9459Szrj   These are relocations for a conditional branch instruction.
4825*a9fa9459Szrj ENUM
4826*a9fa9459Szrj   BFD_RELOC_MMIX_PUSHJ
4827*a9fa9459Szrj ENUMX
4828*a9fa9459Szrj   BFD_RELOC_MMIX_PUSHJ_1
4829*a9fa9459Szrj ENUMX
4830*a9fa9459Szrj   BFD_RELOC_MMIX_PUSHJ_2
4831*a9fa9459Szrj ENUMX
4832*a9fa9459Szrj   BFD_RELOC_MMIX_PUSHJ_3
4833*a9fa9459Szrj ENUMX
4834*a9fa9459Szrj   BFD_RELOC_MMIX_PUSHJ_STUBBABLE
4835*a9fa9459Szrj ENUMDOC
4836*a9fa9459Szrj   These are relocations for the PUSHJ instruction.
4837*a9fa9459Szrj ENUM
4838*a9fa9459Szrj   BFD_RELOC_MMIX_JMP
4839*a9fa9459Szrj ENUMX
4840*a9fa9459Szrj   BFD_RELOC_MMIX_JMP_1
4841*a9fa9459Szrj ENUMX
4842*a9fa9459Szrj   BFD_RELOC_MMIX_JMP_2
4843*a9fa9459Szrj ENUMX
4844*a9fa9459Szrj   BFD_RELOC_MMIX_JMP_3
4845*a9fa9459Szrj ENUMDOC
4846*a9fa9459Szrj   These are relocations for the JMP instruction.
4847*a9fa9459Szrj ENUM
4848*a9fa9459Szrj   BFD_RELOC_MMIX_ADDR19
4849*a9fa9459Szrj ENUMDOC
4850*a9fa9459Szrj   This is a relocation for a relative address as in a GETA instruction or
4851*a9fa9459Szrj   a branch.
4852*a9fa9459Szrj ENUM
4853*a9fa9459Szrj   BFD_RELOC_MMIX_ADDR27
4854*a9fa9459Szrj ENUMDOC
4855*a9fa9459Szrj   This is a relocation for a relative address as in a JMP instruction.
4856*a9fa9459Szrj ENUM
4857*a9fa9459Szrj   BFD_RELOC_MMIX_REG_OR_BYTE
4858*a9fa9459Szrj ENUMDOC
4859*a9fa9459Szrj   This is a relocation for an instruction field that may be a general
4860*a9fa9459Szrj   register or a value 0..255.
4861*a9fa9459Szrj ENUM
4862*a9fa9459Szrj   BFD_RELOC_MMIX_REG
4863*a9fa9459Szrj ENUMDOC
4864*a9fa9459Szrj   This is a relocation for an instruction field that may be a general
4865*a9fa9459Szrj   register.
4866*a9fa9459Szrj ENUM
4867*a9fa9459Szrj   BFD_RELOC_MMIX_BASE_PLUS_OFFSET
4868*a9fa9459Szrj ENUMDOC
4869*a9fa9459Szrj   This is a relocation for two instruction fields holding a register and
4870*a9fa9459Szrj   an offset, the equivalent of the relocation.
4871*a9fa9459Szrj ENUM
4872*a9fa9459Szrj   BFD_RELOC_MMIX_LOCAL
4873*a9fa9459Szrj ENUMDOC
4874*a9fa9459Szrj   This relocation is an assertion that the expression is not allocated as
4875*a9fa9459Szrj   a global register.  It does not modify contents.
4876*a9fa9459Szrj 
4877*a9fa9459Szrj ENUM
4878*a9fa9459Szrj   BFD_RELOC_AVR_7_PCREL
4879*a9fa9459Szrj ENUMDOC
4880*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit pc relative
4881*a9fa9459Szrj   short offset into 7 bits.
4882*a9fa9459Szrj ENUM
4883*a9fa9459Szrj   BFD_RELOC_AVR_13_PCREL
4884*a9fa9459Szrj ENUMDOC
4885*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 13 bit pc relative
4886*a9fa9459Szrj   short offset into 12 bits.
4887*a9fa9459Szrj ENUM
4888*a9fa9459Szrj   BFD_RELOC_AVR_16_PM
4889*a9fa9459Szrj ENUMDOC
4890*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 17 bit value (usually
4891*a9fa9459Szrj   program memory address) into 16 bits.
4892*a9fa9459Szrj ENUM
4893*a9fa9459Szrj   BFD_RELOC_AVR_LO8_LDI
4894*a9fa9459Szrj ENUMDOC
4895*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4896*a9fa9459Szrj   data memory address) into 8 bit immediate value of LDI insn.
4897*a9fa9459Szrj ENUM
4898*a9fa9459Szrj   BFD_RELOC_AVR_HI8_LDI
4899*a9fa9459Szrj ENUMDOC
4900*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
4901*a9fa9459Szrj   of data memory address) into 8 bit immediate value of LDI insn.
4902*a9fa9459Szrj ENUM
4903*a9fa9459Szrj   BFD_RELOC_AVR_HH8_LDI
4904*a9fa9459Szrj ENUMDOC
4905*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
4906*a9fa9459Szrj   of program memory address) into 8 bit immediate value of LDI insn.
4907*a9fa9459Szrj ENUM
4908*a9fa9459Szrj   BFD_RELOC_AVR_MS8_LDI
4909*a9fa9459Szrj ENUMDOC
4910*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
4911*a9fa9459Szrj   of 32 bit value) into 8 bit immediate value of LDI insn.
4912*a9fa9459Szrj ENUM
4913*a9fa9459Szrj   BFD_RELOC_AVR_LO8_LDI_NEG
4914*a9fa9459Szrj ENUMDOC
4915*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4916*a9fa9459Szrj   (usually data memory address) into 8 bit immediate value of SUBI insn.
4917*a9fa9459Szrj ENUM
4918*a9fa9459Szrj   BFD_RELOC_AVR_HI8_LDI_NEG
4919*a9fa9459Szrj ENUMDOC
4920*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4921*a9fa9459Szrj   (high 8 bit of data memory address) into 8 bit immediate value of
4922*a9fa9459Szrj   SUBI insn.
4923*a9fa9459Szrj ENUM
4924*a9fa9459Szrj   BFD_RELOC_AVR_HH8_LDI_NEG
4925*a9fa9459Szrj ENUMDOC
4926*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4927*a9fa9459Szrj   (most high 8 bit of program memory address) into 8 bit immediate value
4928*a9fa9459Szrj   of LDI or SUBI insn.
4929*a9fa9459Szrj ENUM
4930*a9fa9459Szrj   BFD_RELOC_AVR_MS8_LDI_NEG
4931*a9fa9459Szrj ENUMDOC
4932*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
4933*a9fa9459Szrj   of 32 bit value) into 8 bit immediate value of LDI insn.
4934*a9fa9459Szrj ENUM
4935*a9fa9459Szrj   BFD_RELOC_AVR_LO8_LDI_PM
4936*a9fa9459Szrj ENUMDOC
4937*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4938*a9fa9459Szrj   command address) into 8 bit immediate value of LDI insn.
4939*a9fa9459Szrj ENUM
4940*a9fa9459Szrj   BFD_RELOC_AVR_LO8_LDI_GS
4941*a9fa9459Szrj ENUMDOC
4942*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value
4943*a9fa9459Szrj   (command address) into 8 bit immediate value of LDI insn. If the address
4944*a9fa9459Szrj   is beyond the 128k boundary, the linker inserts a jump stub for this reloc
4945*a9fa9459Szrj   in the lower 128k.
4946*a9fa9459Szrj ENUM
4947*a9fa9459Szrj   BFD_RELOC_AVR_HI8_LDI_PM
4948*a9fa9459Szrj ENUMDOC
4949*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
4950*a9fa9459Szrj   of command address) into 8 bit immediate value of LDI insn.
4951*a9fa9459Szrj ENUM
4952*a9fa9459Szrj   BFD_RELOC_AVR_HI8_LDI_GS
4953*a9fa9459Szrj ENUMDOC
4954*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
4955*a9fa9459Szrj   of command address) into 8 bit immediate value of LDI insn.  If the address
4956*a9fa9459Szrj   is beyond the 128k boundary, the linker inserts a jump stub for this reloc
4957*a9fa9459Szrj   below 128k.
4958*a9fa9459Szrj ENUM
4959*a9fa9459Szrj   BFD_RELOC_AVR_HH8_LDI_PM
4960*a9fa9459Szrj ENUMDOC
4961*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
4962*a9fa9459Szrj   of command address) into 8 bit immediate value of LDI insn.
4963*a9fa9459Szrj ENUM
4964*a9fa9459Szrj   BFD_RELOC_AVR_LO8_LDI_PM_NEG
4965*a9fa9459Szrj ENUMDOC
4966*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4967*a9fa9459Szrj   (usually command address) into 8 bit immediate value of SUBI insn.
4968*a9fa9459Szrj ENUM
4969*a9fa9459Szrj   BFD_RELOC_AVR_HI8_LDI_PM_NEG
4970*a9fa9459Szrj ENUMDOC
4971*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4972*a9fa9459Szrj   (high 8 bit of 16 bit command address) into 8 bit immediate value
4973*a9fa9459Szrj   of SUBI insn.
4974*a9fa9459Szrj ENUM
4975*a9fa9459Szrj   BFD_RELOC_AVR_HH8_LDI_PM_NEG
4976*a9fa9459Szrj ENUMDOC
4977*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores negated 8 bit value
4978*a9fa9459Szrj   (high 6 bit of 22 bit command address) into 8 bit immediate
4979*a9fa9459Szrj   value of SUBI insn.
4980*a9fa9459Szrj ENUM
4981*a9fa9459Szrj   BFD_RELOC_AVR_CALL
4982*a9fa9459Szrj ENUMDOC
4983*a9fa9459Szrj   This is a 32 bit reloc for the AVR that stores 23 bit value
4984*a9fa9459Szrj   into 22 bits.
4985*a9fa9459Szrj ENUM
4986*a9fa9459Szrj   BFD_RELOC_AVR_LDI
4987*a9fa9459Szrj ENUMDOC
4988*a9fa9459Szrj   This is a 16 bit reloc for the AVR that stores all needed bits
4989*a9fa9459Szrj   for absolute addressing with ldi with overflow check to linktime
4990*a9fa9459Szrj ENUM
4991*a9fa9459Szrj   BFD_RELOC_AVR_6
4992*a9fa9459Szrj ENUMDOC
4993*a9fa9459Szrj   This is a 6 bit reloc for the AVR that stores offset for ldd/std
4994*a9fa9459Szrj   instructions
4995*a9fa9459Szrj ENUM
4996*a9fa9459Szrj   BFD_RELOC_AVR_6_ADIW
4997*a9fa9459Szrj ENUMDOC
4998*a9fa9459Szrj   This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
4999*a9fa9459Szrj   instructions
5000*a9fa9459Szrj ENUM
5001*a9fa9459Szrj   BFD_RELOC_AVR_8_LO
5002*a9fa9459Szrj ENUMDOC
5003*a9fa9459Szrj   This is a 8 bit reloc for the AVR that stores bits 0..7 of a symbol
5004*a9fa9459Szrj   in .byte lo8(symbol)
5005*a9fa9459Szrj ENUM
5006*a9fa9459Szrj   BFD_RELOC_AVR_8_HI
5007*a9fa9459Szrj ENUMDOC
5008*a9fa9459Szrj   This is a 8 bit reloc for the AVR that stores bits 8..15 of a symbol
5009*a9fa9459Szrj   in .byte hi8(symbol)
5010*a9fa9459Szrj ENUM
5011*a9fa9459Szrj   BFD_RELOC_AVR_8_HLO
5012*a9fa9459Szrj ENUMDOC
5013*a9fa9459Szrj   This is a 8 bit reloc for the AVR that stores bits 16..23 of a symbol
5014*a9fa9459Szrj   in .byte hlo8(symbol)
5015*a9fa9459Szrj ENUM
5016*a9fa9459Szrj   BFD_RELOC_AVR_DIFF8
5017*a9fa9459Szrj ENUMX
5018*a9fa9459Szrj   BFD_RELOC_AVR_DIFF16
5019*a9fa9459Szrj ENUMX
5020*a9fa9459Szrj   BFD_RELOC_AVR_DIFF32
5021*a9fa9459Szrj ENUMDOC
5022*a9fa9459Szrj   AVR relocations to mark the difference of two local symbols.
5023*a9fa9459Szrj   These are only needed to support linker relaxation and can be ignored
5024*a9fa9459Szrj   when not relaxing.  The field is set to the value of the difference
5025*a9fa9459Szrj   assuming no relaxation.  The relocation encodes the position of the
5026*a9fa9459Szrj   second symbol so the linker can determine whether to adjust the field
5027*a9fa9459Szrj   value.
5028*a9fa9459Szrj ENUM
5029*a9fa9459Szrj   BFD_RELOC_AVR_LDS_STS_16
5030*a9fa9459Szrj ENUMDOC
5031*a9fa9459Szrj   This is a 7 bit reloc for the AVR that stores SRAM address for 16bit
5032*a9fa9459Szrj   lds and sts instructions supported only tiny core.
5033*a9fa9459Szrj ENUM
5034*a9fa9459Szrj   BFD_RELOC_AVR_PORT6
5035*a9fa9459Szrj ENUMDOC
5036*a9fa9459Szrj   This is a 6 bit reloc for the AVR that stores an I/O register
5037*a9fa9459Szrj   number for the IN and OUT instructions
5038*a9fa9459Szrj ENUM
5039*a9fa9459Szrj   BFD_RELOC_AVR_PORT5
5040*a9fa9459Szrj ENUMDOC
5041*a9fa9459Szrj   This is a 5 bit reloc for the AVR that stores an I/O register
5042*a9fa9459Szrj   number for the SBIC, SBIS, SBI and CBI instructions
5043*a9fa9459Szrj ENUM
5044*a9fa9459Szrj   BFD_RELOC_RL78_NEG8
5045*a9fa9459Szrj ENUMX
5046*a9fa9459Szrj   BFD_RELOC_RL78_NEG16
5047*a9fa9459Szrj ENUMX
5048*a9fa9459Szrj   BFD_RELOC_RL78_NEG24
5049*a9fa9459Szrj ENUMX
5050*a9fa9459Szrj   BFD_RELOC_RL78_NEG32
5051*a9fa9459Szrj ENUMX
5052*a9fa9459Szrj   BFD_RELOC_RL78_16_OP
5053*a9fa9459Szrj ENUMX
5054*a9fa9459Szrj   BFD_RELOC_RL78_24_OP
5055*a9fa9459Szrj ENUMX
5056*a9fa9459Szrj   BFD_RELOC_RL78_32_OP
5057*a9fa9459Szrj ENUMX
5058*a9fa9459Szrj   BFD_RELOC_RL78_8U
5059*a9fa9459Szrj ENUMX
5060*a9fa9459Szrj   BFD_RELOC_RL78_16U
5061*a9fa9459Szrj ENUMX
5062*a9fa9459Szrj   BFD_RELOC_RL78_24U
5063*a9fa9459Szrj ENUMX
5064*a9fa9459Szrj   BFD_RELOC_RL78_DIR3U_PCREL
5065*a9fa9459Szrj ENUMX
5066*a9fa9459Szrj   BFD_RELOC_RL78_DIFF
5067*a9fa9459Szrj ENUMX
5068*a9fa9459Szrj   BFD_RELOC_RL78_GPRELB
5069*a9fa9459Szrj ENUMX
5070*a9fa9459Szrj   BFD_RELOC_RL78_GPRELW
5071*a9fa9459Szrj ENUMX
5072*a9fa9459Szrj   BFD_RELOC_RL78_GPRELL
5073*a9fa9459Szrj ENUMX
5074*a9fa9459Szrj   BFD_RELOC_RL78_SYM
5075*a9fa9459Szrj ENUMX
5076*a9fa9459Szrj   BFD_RELOC_RL78_OP_SUBTRACT
5077*a9fa9459Szrj ENUMX
5078*a9fa9459Szrj   BFD_RELOC_RL78_OP_NEG
5079*a9fa9459Szrj ENUMX
5080*a9fa9459Szrj   BFD_RELOC_RL78_OP_AND
5081*a9fa9459Szrj ENUMX
5082*a9fa9459Szrj   BFD_RELOC_RL78_OP_SHRA
5083*a9fa9459Szrj ENUMX
5084*a9fa9459Szrj   BFD_RELOC_RL78_ABS8
5085*a9fa9459Szrj ENUMX
5086*a9fa9459Szrj   BFD_RELOC_RL78_ABS16
5087*a9fa9459Szrj ENUMX
5088*a9fa9459Szrj   BFD_RELOC_RL78_ABS16_REV
5089*a9fa9459Szrj ENUMX
5090*a9fa9459Szrj   BFD_RELOC_RL78_ABS32
5091*a9fa9459Szrj ENUMX
5092*a9fa9459Szrj   BFD_RELOC_RL78_ABS32_REV
5093*a9fa9459Szrj ENUMX
5094*a9fa9459Szrj   BFD_RELOC_RL78_ABS16U
5095*a9fa9459Szrj ENUMX
5096*a9fa9459Szrj   BFD_RELOC_RL78_ABS16UW
5097*a9fa9459Szrj ENUMX
5098*a9fa9459Szrj   BFD_RELOC_RL78_ABS16UL
5099*a9fa9459Szrj ENUMX
5100*a9fa9459Szrj   BFD_RELOC_RL78_RELAX
5101*a9fa9459Szrj ENUMX
5102*a9fa9459Szrj   BFD_RELOC_RL78_HI16
5103*a9fa9459Szrj ENUMX
5104*a9fa9459Szrj   BFD_RELOC_RL78_HI8
5105*a9fa9459Szrj ENUMX
5106*a9fa9459Szrj   BFD_RELOC_RL78_LO16
5107*a9fa9459Szrj ENUMX
5108*a9fa9459Szrj   BFD_RELOC_RL78_CODE
5109*a9fa9459Szrj ENUMX
5110*a9fa9459Szrj   BFD_RELOC_RL78_SADDR
5111*a9fa9459Szrj ENUMDOC
5112*a9fa9459Szrj   Renesas RL78 Relocations.
5113*a9fa9459Szrj 
5114*a9fa9459Szrj ENUM
5115*a9fa9459Szrj   BFD_RELOC_RX_NEG8
5116*a9fa9459Szrj ENUMX
5117*a9fa9459Szrj   BFD_RELOC_RX_NEG16
5118*a9fa9459Szrj ENUMX
5119*a9fa9459Szrj   BFD_RELOC_RX_NEG24
5120*a9fa9459Szrj ENUMX
5121*a9fa9459Szrj   BFD_RELOC_RX_NEG32
5122*a9fa9459Szrj ENUMX
5123*a9fa9459Szrj   BFD_RELOC_RX_16_OP
5124*a9fa9459Szrj ENUMX
5125*a9fa9459Szrj   BFD_RELOC_RX_24_OP
5126*a9fa9459Szrj ENUMX
5127*a9fa9459Szrj   BFD_RELOC_RX_32_OP
5128*a9fa9459Szrj ENUMX
5129*a9fa9459Szrj   BFD_RELOC_RX_8U
5130*a9fa9459Szrj ENUMX
5131*a9fa9459Szrj   BFD_RELOC_RX_16U
5132*a9fa9459Szrj ENUMX
5133*a9fa9459Szrj   BFD_RELOC_RX_24U
5134*a9fa9459Szrj ENUMX
5135*a9fa9459Szrj   BFD_RELOC_RX_DIR3U_PCREL
5136*a9fa9459Szrj ENUMX
5137*a9fa9459Szrj   BFD_RELOC_RX_DIFF
5138*a9fa9459Szrj ENUMX
5139*a9fa9459Szrj   BFD_RELOC_RX_GPRELB
5140*a9fa9459Szrj ENUMX
5141*a9fa9459Szrj   BFD_RELOC_RX_GPRELW
5142*a9fa9459Szrj ENUMX
5143*a9fa9459Szrj   BFD_RELOC_RX_GPRELL
5144*a9fa9459Szrj ENUMX
5145*a9fa9459Szrj   BFD_RELOC_RX_SYM
5146*a9fa9459Szrj ENUMX
5147*a9fa9459Szrj   BFD_RELOC_RX_OP_SUBTRACT
5148*a9fa9459Szrj ENUMX
5149*a9fa9459Szrj   BFD_RELOC_RX_OP_NEG
5150*a9fa9459Szrj ENUMX
5151*a9fa9459Szrj   BFD_RELOC_RX_ABS8
5152*a9fa9459Szrj ENUMX
5153*a9fa9459Szrj   BFD_RELOC_RX_ABS16
5154*a9fa9459Szrj ENUMX
5155*a9fa9459Szrj   BFD_RELOC_RX_ABS16_REV
5156*a9fa9459Szrj ENUMX
5157*a9fa9459Szrj   BFD_RELOC_RX_ABS32
5158*a9fa9459Szrj ENUMX
5159*a9fa9459Szrj   BFD_RELOC_RX_ABS32_REV
5160*a9fa9459Szrj ENUMX
5161*a9fa9459Szrj   BFD_RELOC_RX_ABS16U
5162*a9fa9459Szrj ENUMX
5163*a9fa9459Szrj   BFD_RELOC_RX_ABS16UW
5164*a9fa9459Szrj ENUMX
5165*a9fa9459Szrj   BFD_RELOC_RX_ABS16UL
5166*a9fa9459Szrj ENUMX
5167*a9fa9459Szrj   BFD_RELOC_RX_RELAX
5168*a9fa9459Szrj ENUMDOC
5169*a9fa9459Szrj   Renesas RX Relocations.
5170*a9fa9459Szrj 
5171*a9fa9459Szrj ENUM
5172*a9fa9459Szrj   BFD_RELOC_390_12
5173*a9fa9459Szrj ENUMDOC
5174*a9fa9459Szrj    Direct 12 bit.
5175*a9fa9459Szrj ENUM
5176*a9fa9459Szrj   BFD_RELOC_390_GOT12
5177*a9fa9459Szrj ENUMDOC
5178*a9fa9459Szrj   12 bit GOT offset.
5179*a9fa9459Szrj ENUM
5180*a9fa9459Szrj   BFD_RELOC_390_PLT32
5181*a9fa9459Szrj ENUMDOC
5182*a9fa9459Szrj   32 bit PC relative PLT address.
5183*a9fa9459Szrj ENUM
5184*a9fa9459Szrj   BFD_RELOC_390_COPY
5185*a9fa9459Szrj ENUMDOC
5186*a9fa9459Szrj   Copy symbol at runtime.
5187*a9fa9459Szrj ENUM
5188*a9fa9459Szrj   BFD_RELOC_390_GLOB_DAT
5189*a9fa9459Szrj ENUMDOC
5190*a9fa9459Szrj   Create GOT entry.
5191*a9fa9459Szrj ENUM
5192*a9fa9459Szrj   BFD_RELOC_390_JMP_SLOT
5193*a9fa9459Szrj ENUMDOC
5194*a9fa9459Szrj   Create PLT entry.
5195*a9fa9459Szrj ENUM
5196*a9fa9459Szrj   BFD_RELOC_390_RELATIVE
5197*a9fa9459Szrj ENUMDOC
5198*a9fa9459Szrj   Adjust by program base.
5199*a9fa9459Szrj ENUM
5200*a9fa9459Szrj   BFD_RELOC_390_GOTPC
5201*a9fa9459Szrj ENUMDOC
5202*a9fa9459Szrj   32 bit PC relative offset to GOT.
5203*a9fa9459Szrj ENUM
5204*a9fa9459Szrj   BFD_RELOC_390_GOT16
5205*a9fa9459Szrj ENUMDOC
5206*a9fa9459Szrj   16 bit GOT offset.
5207*a9fa9459Szrj ENUM
5208*a9fa9459Szrj   BFD_RELOC_390_PC12DBL
5209*a9fa9459Szrj ENUMDOC
5210*a9fa9459Szrj   PC relative 12 bit shifted by 1.
5211*a9fa9459Szrj ENUM
5212*a9fa9459Szrj   BFD_RELOC_390_PLT12DBL
5213*a9fa9459Szrj ENUMDOC
5214*a9fa9459Szrj   12 bit PC rel. PLT shifted by 1.
5215*a9fa9459Szrj ENUM
5216*a9fa9459Szrj   BFD_RELOC_390_PC16DBL
5217*a9fa9459Szrj ENUMDOC
5218*a9fa9459Szrj   PC relative 16 bit shifted by 1.
5219*a9fa9459Szrj ENUM
5220*a9fa9459Szrj   BFD_RELOC_390_PLT16DBL
5221*a9fa9459Szrj ENUMDOC
5222*a9fa9459Szrj   16 bit PC rel. PLT shifted by 1.
5223*a9fa9459Szrj ENUM
5224*a9fa9459Szrj   BFD_RELOC_390_PC24DBL
5225*a9fa9459Szrj ENUMDOC
5226*a9fa9459Szrj   PC relative 24 bit shifted by 1.
5227*a9fa9459Szrj ENUM
5228*a9fa9459Szrj   BFD_RELOC_390_PLT24DBL
5229*a9fa9459Szrj ENUMDOC
5230*a9fa9459Szrj   24 bit PC rel. PLT shifted by 1.
5231*a9fa9459Szrj ENUM
5232*a9fa9459Szrj   BFD_RELOC_390_PC32DBL
5233*a9fa9459Szrj ENUMDOC
5234*a9fa9459Szrj   PC relative 32 bit shifted by 1.
5235*a9fa9459Szrj ENUM
5236*a9fa9459Szrj   BFD_RELOC_390_PLT32DBL
5237*a9fa9459Szrj ENUMDOC
5238*a9fa9459Szrj   32 bit PC rel. PLT shifted by 1.
5239*a9fa9459Szrj ENUM
5240*a9fa9459Szrj   BFD_RELOC_390_GOTPCDBL
5241*a9fa9459Szrj ENUMDOC
5242*a9fa9459Szrj   32 bit PC rel. GOT shifted by 1.
5243*a9fa9459Szrj ENUM
5244*a9fa9459Szrj   BFD_RELOC_390_GOT64
5245*a9fa9459Szrj ENUMDOC
5246*a9fa9459Szrj   64 bit GOT offset.
5247*a9fa9459Szrj ENUM
5248*a9fa9459Szrj   BFD_RELOC_390_PLT64
5249*a9fa9459Szrj ENUMDOC
5250*a9fa9459Szrj   64 bit PC relative PLT address.
5251*a9fa9459Szrj ENUM
5252*a9fa9459Szrj   BFD_RELOC_390_GOTENT
5253*a9fa9459Szrj ENUMDOC
5254*a9fa9459Szrj   32 bit rel. offset to GOT entry.
5255*a9fa9459Szrj ENUM
5256*a9fa9459Szrj   BFD_RELOC_390_GOTOFF64
5257*a9fa9459Szrj ENUMDOC
5258*a9fa9459Szrj   64 bit offset to GOT.
5259*a9fa9459Szrj ENUM
5260*a9fa9459Szrj   BFD_RELOC_390_GOTPLT12
5261*a9fa9459Szrj ENUMDOC
5262*a9fa9459Szrj   12-bit offset to symbol-entry within GOT, with PLT handling.
5263*a9fa9459Szrj ENUM
5264*a9fa9459Szrj   BFD_RELOC_390_GOTPLT16
5265*a9fa9459Szrj ENUMDOC
5266*a9fa9459Szrj   16-bit offset to symbol-entry within GOT, with PLT handling.
5267*a9fa9459Szrj ENUM
5268*a9fa9459Szrj   BFD_RELOC_390_GOTPLT32
5269*a9fa9459Szrj ENUMDOC
5270*a9fa9459Szrj   32-bit offset to symbol-entry within GOT, with PLT handling.
5271*a9fa9459Szrj ENUM
5272*a9fa9459Szrj   BFD_RELOC_390_GOTPLT64
5273*a9fa9459Szrj ENUMDOC
5274*a9fa9459Szrj   64-bit offset to symbol-entry within GOT, with PLT handling.
5275*a9fa9459Szrj ENUM
5276*a9fa9459Szrj   BFD_RELOC_390_GOTPLTENT
5277*a9fa9459Szrj ENUMDOC
5278*a9fa9459Szrj   32-bit rel. offset to symbol-entry within GOT, with PLT handling.
5279*a9fa9459Szrj ENUM
5280*a9fa9459Szrj   BFD_RELOC_390_PLTOFF16
5281*a9fa9459Szrj ENUMDOC
5282*a9fa9459Szrj   16-bit rel. offset from the GOT to a PLT entry.
5283*a9fa9459Szrj ENUM
5284*a9fa9459Szrj   BFD_RELOC_390_PLTOFF32
5285*a9fa9459Szrj ENUMDOC
5286*a9fa9459Szrj   32-bit rel. offset from the GOT to a PLT entry.
5287*a9fa9459Szrj ENUM
5288*a9fa9459Szrj   BFD_RELOC_390_PLTOFF64
5289*a9fa9459Szrj ENUMDOC
5290*a9fa9459Szrj   64-bit rel. offset from the GOT to a PLT entry.
5291*a9fa9459Szrj 
5292*a9fa9459Szrj ENUM
5293*a9fa9459Szrj   BFD_RELOC_390_TLS_LOAD
5294*a9fa9459Szrj ENUMX
5295*a9fa9459Szrj   BFD_RELOC_390_TLS_GDCALL
5296*a9fa9459Szrj ENUMX
5297*a9fa9459Szrj   BFD_RELOC_390_TLS_LDCALL
5298*a9fa9459Szrj ENUMX
5299*a9fa9459Szrj   BFD_RELOC_390_TLS_GD32
5300*a9fa9459Szrj ENUMX
5301*a9fa9459Szrj   BFD_RELOC_390_TLS_GD64
5302*a9fa9459Szrj ENUMX
5303*a9fa9459Szrj   BFD_RELOC_390_TLS_GOTIE12
5304*a9fa9459Szrj ENUMX
5305*a9fa9459Szrj   BFD_RELOC_390_TLS_GOTIE32
5306*a9fa9459Szrj ENUMX
5307*a9fa9459Szrj   BFD_RELOC_390_TLS_GOTIE64
5308*a9fa9459Szrj ENUMX
5309*a9fa9459Szrj   BFD_RELOC_390_TLS_LDM32
5310*a9fa9459Szrj ENUMX
5311*a9fa9459Szrj   BFD_RELOC_390_TLS_LDM64
5312*a9fa9459Szrj ENUMX
5313*a9fa9459Szrj   BFD_RELOC_390_TLS_IE32
5314*a9fa9459Szrj ENUMX
5315*a9fa9459Szrj   BFD_RELOC_390_TLS_IE64
5316*a9fa9459Szrj ENUMX
5317*a9fa9459Szrj   BFD_RELOC_390_TLS_IEENT
5318*a9fa9459Szrj ENUMX
5319*a9fa9459Szrj   BFD_RELOC_390_TLS_LE32
5320*a9fa9459Szrj ENUMX
5321*a9fa9459Szrj   BFD_RELOC_390_TLS_LE64
5322*a9fa9459Szrj ENUMX
5323*a9fa9459Szrj   BFD_RELOC_390_TLS_LDO32
5324*a9fa9459Szrj ENUMX
5325*a9fa9459Szrj   BFD_RELOC_390_TLS_LDO64
5326*a9fa9459Szrj ENUMX
5327*a9fa9459Szrj   BFD_RELOC_390_TLS_DTPMOD
5328*a9fa9459Szrj ENUMX
5329*a9fa9459Szrj   BFD_RELOC_390_TLS_DTPOFF
5330*a9fa9459Szrj ENUMX
5331*a9fa9459Szrj   BFD_RELOC_390_TLS_TPOFF
5332*a9fa9459Szrj ENUMDOC
5333*a9fa9459Szrj   s390 tls relocations.
5334*a9fa9459Szrj 
5335*a9fa9459Szrj ENUM
5336*a9fa9459Szrj   BFD_RELOC_390_20
5337*a9fa9459Szrj ENUMX
5338*a9fa9459Szrj   BFD_RELOC_390_GOT20
5339*a9fa9459Szrj ENUMX
5340*a9fa9459Szrj   BFD_RELOC_390_GOTPLT20
5341*a9fa9459Szrj ENUMX
5342*a9fa9459Szrj   BFD_RELOC_390_TLS_GOTIE20
5343*a9fa9459Szrj ENUMDOC
5344*a9fa9459Szrj   Long displacement extension.
5345*a9fa9459Szrj 
5346*a9fa9459Szrj ENUM
5347*a9fa9459Szrj   BFD_RELOC_390_IRELATIVE
5348*a9fa9459Szrj ENUMDOC
5349*a9fa9459Szrj   STT_GNU_IFUNC relocation.
5350*a9fa9459Szrj 
5351*a9fa9459Szrj ENUM
5352*a9fa9459Szrj   BFD_RELOC_SCORE_GPREL15
5353*a9fa9459Szrj ENUMDOC
5354*a9fa9459Szrj   Score relocations
5355*a9fa9459Szrj   Low 16 bit for load/store
5356*a9fa9459Szrj ENUM
5357*a9fa9459Szrj   BFD_RELOC_SCORE_DUMMY2
5358*a9fa9459Szrj ENUMX
5359*a9fa9459Szrj   BFD_RELOC_SCORE_JMP
5360*a9fa9459Szrj ENUMDOC
5361*a9fa9459Szrj   This is a 24-bit reloc with the right 1 bit assumed to be 0
5362*a9fa9459Szrj ENUM
5363*a9fa9459Szrj   BFD_RELOC_SCORE_BRANCH
5364*a9fa9459Szrj ENUMDOC
5365*a9fa9459Szrj   This is a 19-bit reloc with the right 1 bit assumed to be 0
5366*a9fa9459Szrj ENUM
5367*a9fa9459Szrj   BFD_RELOC_SCORE_IMM30
5368*a9fa9459Szrj ENUMDOC
5369*a9fa9459Szrj   This is a 32-bit reloc for 48-bit instructions.
5370*a9fa9459Szrj ENUM
5371*a9fa9459Szrj   BFD_RELOC_SCORE_IMM32
5372*a9fa9459Szrj ENUMDOC
5373*a9fa9459Szrj   This is a 32-bit reloc for 48-bit instructions.
5374*a9fa9459Szrj ENUM
5375*a9fa9459Szrj   BFD_RELOC_SCORE16_JMP
5376*a9fa9459Szrj ENUMDOC
5377*a9fa9459Szrj   This is a 11-bit reloc with the right 1 bit assumed to be 0
5378*a9fa9459Szrj ENUM
5379*a9fa9459Szrj   BFD_RELOC_SCORE16_BRANCH
5380*a9fa9459Szrj ENUMDOC
5381*a9fa9459Szrj   This is a 8-bit reloc with the right 1 bit assumed to be 0
5382*a9fa9459Szrj ENUM
5383*a9fa9459Szrj   BFD_RELOC_SCORE_BCMP
5384*a9fa9459Szrj ENUMDOC
5385*a9fa9459Szrj    This is a 9-bit reloc with the right 1 bit assumed to be 0
5386*a9fa9459Szrj ENUM
5387*a9fa9459Szrj   BFD_RELOC_SCORE_GOT15
5388*a9fa9459Szrj ENUMX
5389*a9fa9459Szrj   BFD_RELOC_SCORE_GOT_LO16
5390*a9fa9459Szrj ENUMX
5391*a9fa9459Szrj   BFD_RELOC_SCORE_CALL15
5392*a9fa9459Szrj ENUMX
5393*a9fa9459Szrj   BFD_RELOC_SCORE_DUMMY_HI16
5394*a9fa9459Szrj ENUMDOC
5395*a9fa9459Szrj   Undocumented Score relocs
5396*a9fa9459Szrj 
5397*a9fa9459Szrj ENUM
5398*a9fa9459Szrj   BFD_RELOC_IP2K_FR9
5399*a9fa9459Szrj ENUMDOC
5400*a9fa9459Szrj   Scenix IP2K - 9-bit register number / data address
5401*a9fa9459Szrj ENUM
5402*a9fa9459Szrj   BFD_RELOC_IP2K_BANK
5403*a9fa9459Szrj ENUMDOC
5404*a9fa9459Szrj   Scenix IP2K - 4-bit register/data bank number
5405*a9fa9459Szrj ENUM
5406*a9fa9459Szrj   BFD_RELOC_IP2K_ADDR16CJP
5407*a9fa9459Szrj ENUMDOC
5408*a9fa9459Szrj   Scenix IP2K - low 13 bits of instruction word address
5409*a9fa9459Szrj ENUM
5410*a9fa9459Szrj   BFD_RELOC_IP2K_PAGE3
5411*a9fa9459Szrj ENUMDOC
5412*a9fa9459Szrj   Scenix IP2K - high 3 bits of instruction word address
5413*a9fa9459Szrj ENUM
5414*a9fa9459Szrj   BFD_RELOC_IP2K_LO8DATA
5415*a9fa9459Szrj ENUMX
5416*a9fa9459Szrj   BFD_RELOC_IP2K_HI8DATA
5417*a9fa9459Szrj ENUMX
5418*a9fa9459Szrj   BFD_RELOC_IP2K_EX8DATA
5419*a9fa9459Szrj ENUMDOC
5420*a9fa9459Szrj   Scenix IP2K - ext/low/high 8 bits of data address
5421*a9fa9459Szrj ENUM
5422*a9fa9459Szrj   BFD_RELOC_IP2K_LO8INSN
5423*a9fa9459Szrj ENUMX
5424*a9fa9459Szrj   BFD_RELOC_IP2K_HI8INSN
5425*a9fa9459Szrj ENUMDOC
5426*a9fa9459Szrj   Scenix IP2K - low/high 8 bits of instruction word address
5427*a9fa9459Szrj ENUM
5428*a9fa9459Szrj   BFD_RELOC_IP2K_PC_SKIP
5429*a9fa9459Szrj ENUMDOC
5430*a9fa9459Szrj   Scenix IP2K - even/odd PC modifier to modify snb pcl.0
5431*a9fa9459Szrj ENUM
5432*a9fa9459Szrj   BFD_RELOC_IP2K_TEXT
5433*a9fa9459Szrj ENUMDOC
5434*a9fa9459Szrj   Scenix IP2K - 16 bit word address in text section.
5435*a9fa9459Szrj ENUM
5436*a9fa9459Szrj   BFD_RELOC_IP2K_FR_OFFSET
5437*a9fa9459Szrj ENUMDOC
5438*a9fa9459Szrj   Scenix IP2K - 7-bit sp or dp offset
5439*a9fa9459Szrj ENUM
5440*a9fa9459Szrj   BFD_RELOC_VPE4KMATH_DATA
5441*a9fa9459Szrj ENUMX
5442*a9fa9459Szrj   BFD_RELOC_VPE4KMATH_INSN
5443*a9fa9459Szrj ENUMDOC
5444*a9fa9459Szrj   Scenix VPE4K coprocessor - data/insn-space addressing
5445*a9fa9459Szrj 
5446*a9fa9459Szrj ENUM
5447*a9fa9459Szrj   BFD_RELOC_VTABLE_INHERIT
5448*a9fa9459Szrj ENUMX
5449*a9fa9459Szrj   BFD_RELOC_VTABLE_ENTRY
5450*a9fa9459Szrj ENUMDOC
5451*a9fa9459Szrj   These two relocations are used by the linker to determine which of
5452*a9fa9459Szrj   the entries in a C++ virtual function table are actually used.  When
5453*a9fa9459Szrj   the --gc-sections option is given, the linker will zero out the entries
5454*a9fa9459Szrj   that are not used, so that the code for those functions need not be
5455*a9fa9459Szrj   included in the output.
5456*a9fa9459Szrj 
5457*a9fa9459Szrj   VTABLE_INHERIT is a zero-space relocation used to describe to the
5458*a9fa9459Szrj   linker the inheritance tree of a C++ virtual function table.  The
5459*a9fa9459Szrj   relocation's symbol should be the parent class' vtable, and the
5460*a9fa9459Szrj   relocation should be located at the child vtable.
5461*a9fa9459Szrj 
5462*a9fa9459Szrj   VTABLE_ENTRY is a zero-space relocation that describes the use of a
5463*a9fa9459Szrj   virtual function table entry.  The reloc's symbol should refer to the
5464*a9fa9459Szrj   table of the class mentioned in the code.  Off of that base, an offset
5465*a9fa9459Szrj   describes the entry that is being used.  For Rela hosts, this offset
5466*a9fa9459Szrj   is stored in the reloc's addend.  For Rel hosts, we are forced to put
5467*a9fa9459Szrj   this offset in the reloc's section offset.
5468*a9fa9459Szrj 
5469*a9fa9459Szrj ENUM
5470*a9fa9459Szrj   BFD_RELOC_IA64_IMM14
5471*a9fa9459Szrj ENUMX
5472*a9fa9459Szrj   BFD_RELOC_IA64_IMM22
5473*a9fa9459Szrj ENUMX
5474*a9fa9459Szrj   BFD_RELOC_IA64_IMM64
5475*a9fa9459Szrj ENUMX
5476*a9fa9459Szrj   BFD_RELOC_IA64_DIR32MSB
5477*a9fa9459Szrj ENUMX
5478*a9fa9459Szrj   BFD_RELOC_IA64_DIR32LSB
5479*a9fa9459Szrj ENUMX
5480*a9fa9459Szrj   BFD_RELOC_IA64_DIR64MSB
5481*a9fa9459Szrj ENUMX
5482*a9fa9459Szrj   BFD_RELOC_IA64_DIR64LSB
5483*a9fa9459Szrj ENUMX
5484*a9fa9459Szrj   BFD_RELOC_IA64_GPREL22
5485*a9fa9459Szrj ENUMX
5486*a9fa9459Szrj   BFD_RELOC_IA64_GPREL64I
5487*a9fa9459Szrj ENUMX
5488*a9fa9459Szrj   BFD_RELOC_IA64_GPREL32MSB
5489*a9fa9459Szrj ENUMX
5490*a9fa9459Szrj   BFD_RELOC_IA64_GPREL32LSB
5491*a9fa9459Szrj ENUMX
5492*a9fa9459Szrj   BFD_RELOC_IA64_GPREL64MSB
5493*a9fa9459Szrj ENUMX
5494*a9fa9459Szrj   BFD_RELOC_IA64_GPREL64LSB
5495*a9fa9459Szrj ENUMX
5496*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF22
5497*a9fa9459Szrj ENUMX
5498*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF64I
5499*a9fa9459Szrj ENUMX
5500*a9fa9459Szrj   BFD_RELOC_IA64_PLTOFF22
5501*a9fa9459Szrj ENUMX
5502*a9fa9459Szrj   BFD_RELOC_IA64_PLTOFF64I
5503*a9fa9459Szrj ENUMX
5504*a9fa9459Szrj   BFD_RELOC_IA64_PLTOFF64MSB
5505*a9fa9459Szrj ENUMX
5506*a9fa9459Szrj   BFD_RELOC_IA64_PLTOFF64LSB
5507*a9fa9459Szrj ENUMX
5508*a9fa9459Szrj   BFD_RELOC_IA64_FPTR64I
5509*a9fa9459Szrj ENUMX
5510*a9fa9459Szrj   BFD_RELOC_IA64_FPTR32MSB
5511*a9fa9459Szrj ENUMX
5512*a9fa9459Szrj   BFD_RELOC_IA64_FPTR32LSB
5513*a9fa9459Szrj ENUMX
5514*a9fa9459Szrj   BFD_RELOC_IA64_FPTR64MSB
5515*a9fa9459Szrj ENUMX
5516*a9fa9459Szrj   BFD_RELOC_IA64_FPTR64LSB
5517*a9fa9459Szrj ENUMX
5518*a9fa9459Szrj   BFD_RELOC_IA64_PCREL21B
5519*a9fa9459Szrj ENUMX
5520*a9fa9459Szrj   BFD_RELOC_IA64_PCREL21BI
5521*a9fa9459Szrj ENUMX
5522*a9fa9459Szrj   BFD_RELOC_IA64_PCREL21M
5523*a9fa9459Szrj ENUMX
5524*a9fa9459Szrj   BFD_RELOC_IA64_PCREL21F
5525*a9fa9459Szrj ENUMX
5526*a9fa9459Szrj   BFD_RELOC_IA64_PCREL22
5527*a9fa9459Szrj ENUMX
5528*a9fa9459Szrj   BFD_RELOC_IA64_PCREL60B
5529*a9fa9459Szrj ENUMX
5530*a9fa9459Szrj   BFD_RELOC_IA64_PCREL64I
5531*a9fa9459Szrj ENUMX
5532*a9fa9459Szrj   BFD_RELOC_IA64_PCREL32MSB
5533*a9fa9459Szrj ENUMX
5534*a9fa9459Szrj   BFD_RELOC_IA64_PCREL32LSB
5535*a9fa9459Szrj ENUMX
5536*a9fa9459Szrj   BFD_RELOC_IA64_PCREL64MSB
5537*a9fa9459Szrj ENUMX
5538*a9fa9459Szrj   BFD_RELOC_IA64_PCREL64LSB
5539*a9fa9459Szrj ENUMX
5540*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR22
5541*a9fa9459Szrj ENUMX
5542*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR64I
5543*a9fa9459Szrj ENUMX
5544*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR32MSB
5545*a9fa9459Szrj ENUMX
5546*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR32LSB
5547*a9fa9459Szrj ENUMX
5548*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR64MSB
5549*a9fa9459Szrj ENUMX
5550*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_FPTR64LSB
5551*a9fa9459Szrj ENUMX
5552*a9fa9459Szrj   BFD_RELOC_IA64_SEGREL32MSB
5553*a9fa9459Szrj ENUMX
5554*a9fa9459Szrj   BFD_RELOC_IA64_SEGREL32LSB
5555*a9fa9459Szrj ENUMX
5556*a9fa9459Szrj   BFD_RELOC_IA64_SEGREL64MSB
5557*a9fa9459Szrj ENUMX
5558*a9fa9459Szrj   BFD_RELOC_IA64_SEGREL64LSB
5559*a9fa9459Szrj ENUMX
5560*a9fa9459Szrj   BFD_RELOC_IA64_SECREL32MSB
5561*a9fa9459Szrj ENUMX
5562*a9fa9459Szrj   BFD_RELOC_IA64_SECREL32LSB
5563*a9fa9459Szrj ENUMX
5564*a9fa9459Szrj   BFD_RELOC_IA64_SECREL64MSB
5565*a9fa9459Szrj ENUMX
5566*a9fa9459Szrj   BFD_RELOC_IA64_SECREL64LSB
5567*a9fa9459Szrj ENUMX
5568*a9fa9459Szrj   BFD_RELOC_IA64_REL32MSB
5569*a9fa9459Szrj ENUMX
5570*a9fa9459Szrj   BFD_RELOC_IA64_REL32LSB
5571*a9fa9459Szrj ENUMX
5572*a9fa9459Szrj   BFD_RELOC_IA64_REL64MSB
5573*a9fa9459Szrj ENUMX
5574*a9fa9459Szrj   BFD_RELOC_IA64_REL64LSB
5575*a9fa9459Szrj ENUMX
5576*a9fa9459Szrj   BFD_RELOC_IA64_LTV32MSB
5577*a9fa9459Szrj ENUMX
5578*a9fa9459Szrj   BFD_RELOC_IA64_LTV32LSB
5579*a9fa9459Szrj ENUMX
5580*a9fa9459Szrj   BFD_RELOC_IA64_LTV64MSB
5581*a9fa9459Szrj ENUMX
5582*a9fa9459Szrj   BFD_RELOC_IA64_LTV64LSB
5583*a9fa9459Szrj ENUMX
5584*a9fa9459Szrj   BFD_RELOC_IA64_IPLTMSB
5585*a9fa9459Szrj ENUMX
5586*a9fa9459Szrj   BFD_RELOC_IA64_IPLTLSB
5587*a9fa9459Szrj ENUMX
5588*a9fa9459Szrj   BFD_RELOC_IA64_COPY
5589*a9fa9459Szrj ENUMX
5590*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF22X
5591*a9fa9459Szrj ENUMX
5592*a9fa9459Szrj   BFD_RELOC_IA64_LDXMOV
5593*a9fa9459Szrj ENUMX
5594*a9fa9459Szrj   BFD_RELOC_IA64_TPREL14
5595*a9fa9459Szrj ENUMX
5596*a9fa9459Szrj   BFD_RELOC_IA64_TPREL22
5597*a9fa9459Szrj ENUMX
5598*a9fa9459Szrj   BFD_RELOC_IA64_TPREL64I
5599*a9fa9459Szrj ENUMX
5600*a9fa9459Szrj   BFD_RELOC_IA64_TPREL64MSB
5601*a9fa9459Szrj ENUMX
5602*a9fa9459Szrj   BFD_RELOC_IA64_TPREL64LSB
5603*a9fa9459Szrj ENUMX
5604*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_TPREL22
5605*a9fa9459Szrj ENUMX
5606*a9fa9459Szrj   BFD_RELOC_IA64_DTPMOD64MSB
5607*a9fa9459Szrj ENUMX
5608*a9fa9459Szrj   BFD_RELOC_IA64_DTPMOD64LSB
5609*a9fa9459Szrj ENUMX
5610*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_DTPMOD22
5611*a9fa9459Szrj ENUMX
5612*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL14
5613*a9fa9459Szrj ENUMX
5614*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL22
5615*a9fa9459Szrj ENUMX
5616*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL64I
5617*a9fa9459Szrj ENUMX
5618*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL32MSB
5619*a9fa9459Szrj ENUMX
5620*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL32LSB
5621*a9fa9459Szrj ENUMX
5622*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL64MSB
5623*a9fa9459Szrj ENUMX
5624*a9fa9459Szrj   BFD_RELOC_IA64_DTPREL64LSB
5625*a9fa9459Szrj ENUMX
5626*a9fa9459Szrj   BFD_RELOC_IA64_LTOFF_DTPREL22
5627*a9fa9459Szrj ENUMDOC
5628*a9fa9459Szrj   Intel IA64 Relocations.
5629*a9fa9459Szrj 
5630*a9fa9459Szrj ENUM
5631*a9fa9459Szrj   BFD_RELOC_M68HC11_HI8
5632*a9fa9459Szrj ENUMDOC
5633*a9fa9459Szrj   Motorola 68HC11 reloc.
5634*a9fa9459Szrj   This is the 8 bit high part of an absolute address.
5635*a9fa9459Szrj ENUM
5636*a9fa9459Szrj   BFD_RELOC_M68HC11_LO8
5637*a9fa9459Szrj ENUMDOC
5638*a9fa9459Szrj   Motorola 68HC11 reloc.
5639*a9fa9459Szrj   This is the 8 bit low part of an absolute address.
5640*a9fa9459Szrj ENUM
5641*a9fa9459Szrj   BFD_RELOC_M68HC11_3B
5642*a9fa9459Szrj ENUMDOC
5643*a9fa9459Szrj   Motorola 68HC11 reloc.
5644*a9fa9459Szrj   This is the 3 bit of a value.
5645*a9fa9459Szrj ENUM
5646*a9fa9459Szrj   BFD_RELOC_M68HC11_RL_JUMP
5647*a9fa9459Szrj ENUMDOC
5648*a9fa9459Szrj   Motorola 68HC11 reloc.
5649*a9fa9459Szrj   This reloc marks the beginning of a jump/call instruction.
5650*a9fa9459Szrj   It is used for linker relaxation to correctly identify beginning
5651*a9fa9459Szrj   of instruction and change some branches to use PC-relative
5652*a9fa9459Szrj   addressing mode.
5653*a9fa9459Szrj ENUM
5654*a9fa9459Szrj   BFD_RELOC_M68HC11_RL_GROUP
5655*a9fa9459Szrj ENUMDOC
5656*a9fa9459Szrj   Motorola 68HC11 reloc.
5657*a9fa9459Szrj   This reloc marks a group of several instructions that gcc generates
5658*a9fa9459Szrj   and for which the linker relaxation pass can modify and/or remove
5659*a9fa9459Szrj   some of them.
5660*a9fa9459Szrj ENUM
5661*a9fa9459Szrj   BFD_RELOC_M68HC11_LO16
5662*a9fa9459Szrj ENUMDOC
5663*a9fa9459Szrj   Motorola 68HC11 reloc.
5664*a9fa9459Szrj   This is the 16-bit lower part of an address.  It is used for 'call'
5665*a9fa9459Szrj   instruction to specify the symbol address without any special
5666*a9fa9459Szrj   transformation (due to memory bank window).
5667*a9fa9459Szrj ENUM
5668*a9fa9459Szrj   BFD_RELOC_M68HC11_PAGE
5669*a9fa9459Szrj ENUMDOC
5670*a9fa9459Szrj   Motorola 68HC11 reloc.
5671*a9fa9459Szrj   This is a 8-bit reloc that specifies the page number of an address.
5672*a9fa9459Szrj   It is used by 'call' instruction to specify the page number of
5673*a9fa9459Szrj   the symbol.
5674*a9fa9459Szrj ENUM
5675*a9fa9459Szrj   BFD_RELOC_M68HC11_24
5676*a9fa9459Szrj ENUMDOC
5677*a9fa9459Szrj   Motorola 68HC11 reloc.
5678*a9fa9459Szrj   This is a 24-bit reloc that represents the address with a 16-bit
5679*a9fa9459Szrj   value and a 8-bit page number.  The symbol address is transformed
5680*a9fa9459Szrj   to follow the 16K memory bank of 68HC12 (seen as mapped in the window).
5681*a9fa9459Szrj ENUM
5682*a9fa9459Szrj   BFD_RELOC_M68HC12_5B
5683*a9fa9459Szrj ENUMDOC
5684*a9fa9459Szrj   Motorola 68HC12 reloc.
5685*a9fa9459Szrj   This is the 5 bits of a value.
5686*a9fa9459Szrj ENUM
5687*a9fa9459Szrj   BFD_RELOC_XGATE_RL_JUMP
5688*a9fa9459Szrj ENUMDOC
5689*a9fa9459Szrj   Freescale XGATE reloc.
5690*a9fa9459Szrj   This reloc marks the beginning of a bra/jal instruction.
5691*a9fa9459Szrj ENUM
5692*a9fa9459Szrj   BFD_RELOC_XGATE_RL_GROUP
5693*a9fa9459Szrj ENUMDOC
5694*a9fa9459Szrj   Freescale XGATE reloc.
5695*a9fa9459Szrj   This reloc marks a group of several instructions that gcc generates
5696*a9fa9459Szrj   and for which the linker relaxation pass can modify and/or remove
5697*a9fa9459Szrj   some of them.
5698*a9fa9459Szrj ENUM
5699*a9fa9459Szrj   BFD_RELOC_XGATE_LO16
5700*a9fa9459Szrj ENUMDOC
5701*a9fa9459Szrj   Freescale XGATE reloc.
5702*a9fa9459Szrj   This is the 16-bit lower part of an address.  It is used for the '16-bit'
5703*a9fa9459Szrj   instructions.
5704*a9fa9459Szrj ENUM
5705*a9fa9459Szrj   BFD_RELOC_XGATE_GPAGE
5706*a9fa9459Szrj ENUMDOC
5707*a9fa9459Szrj   Freescale XGATE reloc.
5708*a9fa9459Szrj ENUM
5709*a9fa9459Szrj   BFD_RELOC_XGATE_24
5710*a9fa9459Szrj ENUMDOC
5711*a9fa9459Szrj   Freescale XGATE reloc.
5712*a9fa9459Szrj ENUM
5713*a9fa9459Szrj   BFD_RELOC_XGATE_PCREL_9
5714*a9fa9459Szrj ENUMDOC
5715*a9fa9459Szrj   Freescale XGATE reloc.
5716*a9fa9459Szrj   This is a 9-bit pc-relative reloc.
5717*a9fa9459Szrj ENUM
5718*a9fa9459Szrj   BFD_RELOC_XGATE_PCREL_10
5719*a9fa9459Szrj ENUMDOC
5720*a9fa9459Szrj   Freescale XGATE reloc.
5721*a9fa9459Szrj   This is a 10-bit pc-relative reloc.
5722*a9fa9459Szrj ENUM
5723*a9fa9459Szrj   BFD_RELOC_XGATE_IMM8_LO
5724*a9fa9459Szrj ENUMDOC
5725*a9fa9459Szrj   Freescale XGATE reloc.
5726*a9fa9459Szrj   This is the 16-bit lower part of an address.  It is used for the '16-bit'
5727*a9fa9459Szrj   instructions.
5728*a9fa9459Szrj ENUM
5729*a9fa9459Szrj   BFD_RELOC_XGATE_IMM8_HI
5730*a9fa9459Szrj ENUMDOC
5731*a9fa9459Szrj   Freescale XGATE reloc.
5732*a9fa9459Szrj   This is the 16-bit higher part of an address.  It is used for the '16-bit'
5733*a9fa9459Szrj   instructions.
5734*a9fa9459Szrj ENUM
5735*a9fa9459Szrj   BFD_RELOC_XGATE_IMM3
5736*a9fa9459Szrj ENUMDOC
5737*a9fa9459Szrj   Freescale XGATE reloc.
5738*a9fa9459Szrj   This is a 3-bit pc-relative reloc.
5739*a9fa9459Szrj ENUM
5740*a9fa9459Szrj   BFD_RELOC_XGATE_IMM4
5741*a9fa9459Szrj ENUMDOC
5742*a9fa9459Szrj   Freescale XGATE reloc.
5743*a9fa9459Szrj   This is a 4-bit pc-relative reloc.
5744*a9fa9459Szrj ENUM
5745*a9fa9459Szrj   BFD_RELOC_XGATE_IMM5
5746*a9fa9459Szrj ENUMDOC
5747*a9fa9459Szrj   Freescale XGATE reloc.
5748*a9fa9459Szrj   This is a 5-bit pc-relative reloc.
5749*a9fa9459Szrj ENUM
5750*a9fa9459Szrj   BFD_RELOC_M68HC12_9B
5751*a9fa9459Szrj ENUMDOC
5752*a9fa9459Szrj   Motorola 68HC12 reloc.
5753*a9fa9459Szrj   This is the 9 bits of a value.
5754*a9fa9459Szrj ENUM
5755*a9fa9459Szrj   BFD_RELOC_M68HC12_16B
5756*a9fa9459Szrj ENUMDOC
5757*a9fa9459Szrj   Motorola 68HC12 reloc.
5758*a9fa9459Szrj   This is the 16 bits of a value.
5759*a9fa9459Szrj ENUM
5760*a9fa9459Szrj   BFD_RELOC_M68HC12_9_PCREL
5761*a9fa9459Szrj ENUMDOC
5762*a9fa9459Szrj   Motorola 68HC12/XGATE reloc.
5763*a9fa9459Szrj   This is a PCREL9 branch.
5764*a9fa9459Szrj ENUM
5765*a9fa9459Szrj   BFD_RELOC_M68HC12_10_PCREL
5766*a9fa9459Szrj ENUMDOC
5767*a9fa9459Szrj   Motorola 68HC12/XGATE reloc.
5768*a9fa9459Szrj   This is a PCREL10 branch.
5769*a9fa9459Szrj ENUM
5770*a9fa9459Szrj   BFD_RELOC_M68HC12_LO8XG
5771*a9fa9459Szrj ENUMDOC
5772*a9fa9459Szrj   Motorola 68HC12/XGATE reloc.
5773*a9fa9459Szrj   This is the 8 bit low part of an absolute address and immediately precedes
5774*a9fa9459Szrj   a matching HI8XG part.
5775*a9fa9459Szrj ENUM
5776*a9fa9459Szrj   BFD_RELOC_M68HC12_HI8XG
5777*a9fa9459Szrj ENUMDOC
5778*a9fa9459Szrj   Motorola 68HC12/XGATE reloc.
5779*a9fa9459Szrj   This is the 8 bit high part of an absolute address and immediately follows
5780*a9fa9459Szrj   a matching LO8XG part.
5781*a9fa9459Szrj ENUM
5782*a9fa9459Szrj   BFD_RELOC_16C_NUM08
5783*a9fa9459Szrj ENUMX
5784*a9fa9459Szrj   BFD_RELOC_16C_NUM08_C
5785*a9fa9459Szrj ENUMX
5786*a9fa9459Szrj   BFD_RELOC_16C_NUM16
5787*a9fa9459Szrj ENUMX
5788*a9fa9459Szrj   BFD_RELOC_16C_NUM16_C
5789*a9fa9459Szrj ENUMX
5790*a9fa9459Szrj   BFD_RELOC_16C_NUM32
5791*a9fa9459Szrj ENUMX
5792*a9fa9459Szrj   BFD_RELOC_16C_NUM32_C
5793*a9fa9459Szrj ENUMX
5794*a9fa9459Szrj   BFD_RELOC_16C_DISP04
5795*a9fa9459Szrj ENUMX
5796*a9fa9459Szrj   BFD_RELOC_16C_DISP04_C
5797*a9fa9459Szrj ENUMX
5798*a9fa9459Szrj   BFD_RELOC_16C_DISP08
5799*a9fa9459Szrj ENUMX
5800*a9fa9459Szrj   BFD_RELOC_16C_DISP08_C
5801*a9fa9459Szrj ENUMX
5802*a9fa9459Szrj   BFD_RELOC_16C_DISP16
5803*a9fa9459Szrj ENUMX
5804*a9fa9459Szrj   BFD_RELOC_16C_DISP16_C
5805*a9fa9459Szrj ENUMX
5806*a9fa9459Szrj   BFD_RELOC_16C_DISP24
5807*a9fa9459Szrj ENUMX
5808*a9fa9459Szrj   BFD_RELOC_16C_DISP24_C
5809*a9fa9459Szrj ENUMX
5810*a9fa9459Szrj   BFD_RELOC_16C_DISP24a
5811*a9fa9459Szrj ENUMX
5812*a9fa9459Szrj   BFD_RELOC_16C_DISP24a_C
5813*a9fa9459Szrj ENUMX
5814*a9fa9459Szrj   BFD_RELOC_16C_REG04
5815*a9fa9459Szrj ENUMX
5816*a9fa9459Szrj   BFD_RELOC_16C_REG04_C
5817*a9fa9459Szrj ENUMX
5818*a9fa9459Szrj   BFD_RELOC_16C_REG04a
5819*a9fa9459Szrj ENUMX
5820*a9fa9459Szrj   BFD_RELOC_16C_REG04a_C
5821*a9fa9459Szrj ENUMX
5822*a9fa9459Szrj   BFD_RELOC_16C_REG14
5823*a9fa9459Szrj ENUMX
5824*a9fa9459Szrj   BFD_RELOC_16C_REG14_C
5825*a9fa9459Szrj ENUMX
5826*a9fa9459Szrj   BFD_RELOC_16C_REG16
5827*a9fa9459Szrj ENUMX
5828*a9fa9459Szrj   BFD_RELOC_16C_REG16_C
5829*a9fa9459Szrj ENUMX
5830*a9fa9459Szrj   BFD_RELOC_16C_REG20
5831*a9fa9459Szrj ENUMX
5832*a9fa9459Szrj   BFD_RELOC_16C_REG20_C
5833*a9fa9459Szrj ENUMX
5834*a9fa9459Szrj   BFD_RELOC_16C_ABS20
5835*a9fa9459Szrj ENUMX
5836*a9fa9459Szrj   BFD_RELOC_16C_ABS20_C
5837*a9fa9459Szrj ENUMX
5838*a9fa9459Szrj   BFD_RELOC_16C_ABS24
5839*a9fa9459Szrj ENUMX
5840*a9fa9459Szrj   BFD_RELOC_16C_ABS24_C
5841*a9fa9459Szrj ENUMX
5842*a9fa9459Szrj   BFD_RELOC_16C_IMM04
5843*a9fa9459Szrj ENUMX
5844*a9fa9459Szrj   BFD_RELOC_16C_IMM04_C
5845*a9fa9459Szrj ENUMX
5846*a9fa9459Szrj   BFD_RELOC_16C_IMM16
5847*a9fa9459Szrj ENUMX
5848*a9fa9459Szrj   BFD_RELOC_16C_IMM16_C
5849*a9fa9459Szrj ENUMX
5850*a9fa9459Szrj   BFD_RELOC_16C_IMM20
5851*a9fa9459Szrj ENUMX
5852*a9fa9459Szrj   BFD_RELOC_16C_IMM20_C
5853*a9fa9459Szrj ENUMX
5854*a9fa9459Szrj   BFD_RELOC_16C_IMM24
5855*a9fa9459Szrj ENUMX
5856*a9fa9459Szrj   BFD_RELOC_16C_IMM24_C
5857*a9fa9459Szrj ENUMX
5858*a9fa9459Szrj   BFD_RELOC_16C_IMM32
5859*a9fa9459Szrj ENUMX
5860*a9fa9459Szrj   BFD_RELOC_16C_IMM32_C
5861*a9fa9459Szrj ENUMDOC
5862*a9fa9459Szrj   NS CR16C Relocations.
5863*a9fa9459Szrj 
5864*a9fa9459Szrj ENUM
5865*a9fa9459Szrj   BFD_RELOC_CR16_NUM8
5866*a9fa9459Szrj ENUMX
5867*a9fa9459Szrj   BFD_RELOC_CR16_NUM16
5868*a9fa9459Szrj ENUMX
5869*a9fa9459Szrj   BFD_RELOC_CR16_NUM32
5870*a9fa9459Szrj ENUMX
5871*a9fa9459Szrj   BFD_RELOC_CR16_NUM32a
5872*a9fa9459Szrj ENUMX
5873*a9fa9459Szrj   BFD_RELOC_CR16_REGREL0
5874*a9fa9459Szrj ENUMX
5875*a9fa9459Szrj   BFD_RELOC_CR16_REGREL4
5876*a9fa9459Szrj ENUMX
5877*a9fa9459Szrj   BFD_RELOC_CR16_REGREL4a
5878*a9fa9459Szrj ENUMX
5879*a9fa9459Szrj   BFD_RELOC_CR16_REGREL14
5880*a9fa9459Szrj ENUMX
5881*a9fa9459Szrj   BFD_RELOC_CR16_REGREL14a
5882*a9fa9459Szrj ENUMX
5883*a9fa9459Szrj   BFD_RELOC_CR16_REGREL16
5884*a9fa9459Szrj ENUMX
5885*a9fa9459Szrj   BFD_RELOC_CR16_REGREL20
5886*a9fa9459Szrj ENUMX
5887*a9fa9459Szrj   BFD_RELOC_CR16_REGREL20a
5888*a9fa9459Szrj ENUMX
5889*a9fa9459Szrj   BFD_RELOC_CR16_ABS20
5890*a9fa9459Szrj ENUMX
5891*a9fa9459Szrj   BFD_RELOC_CR16_ABS24
5892*a9fa9459Szrj ENUMX
5893*a9fa9459Szrj   BFD_RELOC_CR16_IMM4
5894*a9fa9459Szrj ENUMX
5895*a9fa9459Szrj   BFD_RELOC_CR16_IMM8
5896*a9fa9459Szrj ENUMX
5897*a9fa9459Szrj   BFD_RELOC_CR16_IMM16
5898*a9fa9459Szrj ENUMX
5899*a9fa9459Szrj   BFD_RELOC_CR16_IMM20
5900*a9fa9459Szrj ENUMX
5901*a9fa9459Szrj   BFD_RELOC_CR16_IMM24
5902*a9fa9459Szrj ENUMX
5903*a9fa9459Szrj   BFD_RELOC_CR16_IMM32
5904*a9fa9459Szrj ENUMX
5905*a9fa9459Szrj   BFD_RELOC_CR16_IMM32a
5906*a9fa9459Szrj ENUMX
5907*a9fa9459Szrj   BFD_RELOC_CR16_DISP4
5908*a9fa9459Szrj ENUMX
5909*a9fa9459Szrj   BFD_RELOC_CR16_DISP8
5910*a9fa9459Szrj ENUMX
5911*a9fa9459Szrj   BFD_RELOC_CR16_DISP16
5912*a9fa9459Szrj ENUMX
5913*a9fa9459Szrj   BFD_RELOC_CR16_DISP20
5914*a9fa9459Szrj ENUMX
5915*a9fa9459Szrj   BFD_RELOC_CR16_DISP24
5916*a9fa9459Szrj ENUMX
5917*a9fa9459Szrj   BFD_RELOC_CR16_DISP24a
5918*a9fa9459Szrj ENUMX
5919*a9fa9459Szrj   BFD_RELOC_CR16_SWITCH8
5920*a9fa9459Szrj ENUMX
5921*a9fa9459Szrj   BFD_RELOC_CR16_SWITCH16
5922*a9fa9459Szrj ENUMX
5923*a9fa9459Szrj   BFD_RELOC_CR16_SWITCH32
5924*a9fa9459Szrj ENUMX
5925*a9fa9459Szrj   BFD_RELOC_CR16_GOT_REGREL20
5926*a9fa9459Szrj ENUMX
5927*a9fa9459Szrj   BFD_RELOC_CR16_GOTC_REGREL20
5928*a9fa9459Szrj ENUMX
5929*a9fa9459Szrj   BFD_RELOC_CR16_GLOB_DAT
5930*a9fa9459Szrj ENUMDOC
5931*a9fa9459Szrj   NS CR16 Relocations.
5932*a9fa9459Szrj 
5933*a9fa9459Szrj ENUM
5934*a9fa9459Szrj   BFD_RELOC_CRX_REL4
5935*a9fa9459Szrj ENUMX
5936*a9fa9459Szrj   BFD_RELOC_CRX_REL8
5937*a9fa9459Szrj ENUMX
5938*a9fa9459Szrj   BFD_RELOC_CRX_REL8_CMP
5939*a9fa9459Szrj ENUMX
5940*a9fa9459Szrj   BFD_RELOC_CRX_REL16
5941*a9fa9459Szrj ENUMX
5942*a9fa9459Szrj   BFD_RELOC_CRX_REL24
5943*a9fa9459Szrj ENUMX
5944*a9fa9459Szrj   BFD_RELOC_CRX_REL32
5945*a9fa9459Szrj ENUMX
5946*a9fa9459Szrj   BFD_RELOC_CRX_REGREL12
5947*a9fa9459Szrj ENUMX
5948*a9fa9459Szrj   BFD_RELOC_CRX_REGREL22
5949*a9fa9459Szrj ENUMX
5950*a9fa9459Szrj   BFD_RELOC_CRX_REGREL28
5951*a9fa9459Szrj ENUMX
5952*a9fa9459Szrj   BFD_RELOC_CRX_REGREL32
5953*a9fa9459Szrj ENUMX
5954*a9fa9459Szrj   BFD_RELOC_CRX_ABS16
5955*a9fa9459Szrj ENUMX
5956*a9fa9459Szrj   BFD_RELOC_CRX_ABS32
5957*a9fa9459Szrj ENUMX
5958*a9fa9459Szrj   BFD_RELOC_CRX_NUM8
5959*a9fa9459Szrj ENUMX
5960*a9fa9459Szrj   BFD_RELOC_CRX_NUM16
5961*a9fa9459Szrj ENUMX
5962*a9fa9459Szrj   BFD_RELOC_CRX_NUM32
5963*a9fa9459Szrj ENUMX
5964*a9fa9459Szrj   BFD_RELOC_CRX_IMM16
5965*a9fa9459Szrj ENUMX
5966*a9fa9459Szrj   BFD_RELOC_CRX_IMM32
5967*a9fa9459Szrj ENUMX
5968*a9fa9459Szrj   BFD_RELOC_CRX_SWITCH8
5969*a9fa9459Szrj ENUMX
5970*a9fa9459Szrj   BFD_RELOC_CRX_SWITCH16
5971*a9fa9459Szrj ENUMX
5972*a9fa9459Szrj   BFD_RELOC_CRX_SWITCH32
5973*a9fa9459Szrj ENUMDOC
5974*a9fa9459Szrj   NS CRX Relocations.
5975*a9fa9459Szrj 
5976*a9fa9459Szrj ENUM
5977*a9fa9459Szrj   BFD_RELOC_CRIS_BDISP8
5978*a9fa9459Szrj ENUMX
5979*a9fa9459Szrj   BFD_RELOC_CRIS_UNSIGNED_5
5980*a9fa9459Szrj ENUMX
5981*a9fa9459Szrj   BFD_RELOC_CRIS_SIGNED_6
5982*a9fa9459Szrj ENUMX
5983*a9fa9459Szrj   BFD_RELOC_CRIS_UNSIGNED_6
5984*a9fa9459Szrj ENUMX
5985*a9fa9459Szrj   BFD_RELOC_CRIS_SIGNED_8
5986*a9fa9459Szrj ENUMX
5987*a9fa9459Szrj   BFD_RELOC_CRIS_UNSIGNED_8
5988*a9fa9459Szrj ENUMX
5989*a9fa9459Szrj   BFD_RELOC_CRIS_SIGNED_16
5990*a9fa9459Szrj ENUMX
5991*a9fa9459Szrj   BFD_RELOC_CRIS_UNSIGNED_16
5992*a9fa9459Szrj ENUMX
5993*a9fa9459Szrj   BFD_RELOC_CRIS_LAPCQ_OFFSET
5994*a9fa9459Szrj ENUMX
5995*a9fa9459Szrj   BFD_RELOC_CRIS_UNSIGNED_4
5996*a9fa9459Szrj ENUMDOC
5997*a9fa9459Szrj   These relocs are only used within the CRIS assembler.  They are not
5998*a9fa9459Szrj   (at present) written to any object files.
5999*a9fa9459Szrj ENUM
6000*a9fa9459Szrj   BFD_RELOC_CRIS_COPY
6001*a9fa9459Szrj ENUMX
6002*a9fa9459Szrj   BFD_RELOC_CRIS_GLOB_DAT
6003*a9fa9459Szrj ENUMX
6004*a9fa9459Szrj   BFD_RELOC_CRIS_JUMP_SLOT
6005*a9fa9459Szrj ENUMX
6006*a9fa9459Szrj   BFD_RELOC_CRIS_RELATIVE
6007*a9fa9459Szrj ENUMDOC
6008*a9fa9459Szrj   Relocs used in ELF shared libraries for CRIS.
6009*a9fa9459Szrj ENUM
6010*a9fa9459Szrj   BFD_RELOC_CRIS_32_GOT
6011*a9fa9459Szrj ENUMDOC
6012*a9fa9459Szrj   32-bit offset to symbol-entry within GOT.
6013*a9fa9459Szrj ENUM
6014*a9fa9459Szrj   BFD_RELOC_CRIS_16_GOT
6015*a9fa9459Szrj ENUMDOC
6016*a9fa9459Szrj   16-bit offset to symbol-entry within GOT.
6017*a9fa9459Szrj ENUM
6018*a9fa9459Szrj   BFD_RELOC_CRIS_32_GOTPLT
6019*a9fa9459Szrj ENUMDOC
6020*a9fa9459Szrj   32-bit offset to symbol-entry within GOT, with PLT handling.
6021*a9fa9459Szrj ENUM
6022*a9fa9459Szrj   BFD_RELOC_CRIS_16_GOTPLT
6023*a9fa9459Szrj ENUMDOC
6024*a9fa9459Szrj   16-bit offset to symbol-entry within GOT, with PLT handling.
6025*a9fa9459Szrj ENUM
6026*a9fa9459Szrj   BFD_RELOC_CRIS_32_GOTREL
6027*a9fa9459Szrj ENUMDOC
6028*a9fa9459Szrj   32-bit offset to symbol, relative to GOT.
6029*a9fa9459Szrj ENUM
6030*a9fa9459Szrj   BFD_RELOC_CRIS_32_PLT_GOTREL
6031*a9fa9459Szrj ENUMDOC
6032*a9fa9459Szrj   32-bit offset to symbol with PLT entry, relative to GOT.
6033*a9fa9459Szrj ENUM
6034*a9fa9459Szrj   BFD_RELOC_CRIS_32_PLT_PCREL
6035*a9fa9459Szrj ENUMDOC
6036*a9fa9459Szrj   32-bit offset to symbol with PLT entry, relative to this relocation.
6037*a9fa9459Szrj 
6038*a9fa9459Szrj ENUM
6039*a9fa9459Szrj   BFD_RELOC_CRIS_32_GOT_GD
6040*a9fa9459Szrj ENUMX
6041*a9fa9459Szrj   BFD_RELOC_CRIS_16_GOT_GD
6042*a9fa9459Szrj ENUMX
6043*a9fa9459Szrj   BFD_RELOC_CRIS_32_GD
6044*a9fa9459Szrj ENUMX
6045*a9fa9459Szrj   BFD_RELOC_CRIS_DTP
6046*a9fa9459Szrj ENUMX
6047*a9fa9459Szrj   BFD_RELOC_CRIS_32_DTPREL
6048*a9fa9459Szrj ENUMX
6049*a9fa9459Szrj   BFD_RELOC_CRIS_16_DTPREL
6050*a9fa9459Szrj ENUMX
6051*a9fa9459Szrj   BFD_RELOC_CRIS_32_GOT_TPREL
6052*a9fa9459Szrj ENUMX
6053*a9fa9459Szrj   BFD_RELOC_CRIS_16_GOT_TPREL
6054*a9fa9459Szrj ENUMX
6055*a9fa9459Szrj   BFD_RELOC_CRIS_32_TPREL
6056*a9fa9459Szrj ENUMX
6057*a9fa9459Szrj   BFD_RELOC_CRIS_16_TPREL
6058*a9fa9459Szrj ENUMX
6059*a9fa9459Szrj   BFD_RELOC_CRIS_DTPMOD
6060*a9fa9459Szrj ENUMX
6061*a9fa9459Szrj   BFD_RELOC_CRIS_32_IE
6062*a9fa9459Szrj ENUMDOC
6063*a9fa9459Szrj   Relocs used in TLS code for CRIS.
6064*a9fa9459Szrj 
6065*a9fa9459Szrj ENUM
6066*a9fa9459Szrj   BFD_RELOC_860_COPY
6067*a9fa9459Szrj ENUMX
6068*a9fa9459Szrj   BFD_RELOC_860_GLOB_DAT
6069*a9fa9459Szrj ENUMX
6070*a9fa9459Szrj   BFD_RELOC_860_JUMP_SLOT
6071*a9fa9459Szrj ENUMX
6072*a9fa9459Szrj   BFD_RELOC_860_RELATIVE
6073*a9fa9459Szrj ENUMX
6074*a9fa9459Szrj   BFD_RELOC_860_PC26
6075*a9fa9459Szrj ENUMX
6076*a9fa9459Szrj   BFD_RELOC_860_PLT26
6077*a9fa9459Szrj ENUMX
6078*a9fa9459Szrj   BFD_RELOC_860_PC16
6079*a9fa9459Szrj ENUMX
6080*a9fa9459Szrj   BFD_RELOC_860_LOW0
6081*a9fa9459Szrj ENUMX
6082*a9fa9459Szrj   BFD_RELOC_860_SPLIT0
6083*a9fa9459Szrj ENUMX
6084*a9fa9459Szrj   BFD_RELOC_860_LOW1
6085*a9fa9459Szrj ENUMX
6086*a9fa9459Szrj   BFD_RELOC_860_SPLIT1
6087*a9fa9459Szrj ENUMX
6088*a9fa9459Szrj   BFD_RELOC_860_LOW2
6089*a9fa9459Szrj ENUMX
6090*a9fa9459Szrj   BFD_RELOC_860_SPLIT2
6091*a9fa9459Szrj ENUMX
6092*a9fa9459Szrj   BFD_RELOC_860_LOW3
6093*a9fa9459Szrj ENUMX
6094*a9fa9459Szrj   BFD_RELOC_860_LOGOT0
6095*a9fa9459Szrj ENUMX
6096*a9fa9459Szrj   BFD_RELOC_860_SPGOT0
6097*a9fa9459Szrj ENUMX
6098*a9fa9459Szrj   BFD_RELOC_860_LOGOT1
6099*a9fa9459Szrj ENUMX
6100*a9fa9459Szrj   BFD_RELOC_860_SPGOT1
6101*a9fa9459Szrj ENUMX
6102*a9fa9459Szrj   BFD_RELOC_860_LOGOTOFF0
6103*a9fa9459Szrj ENUMX
6104*a9fa9459Szrj   BFD_RELOC_860_SPGOTOFF0
6105*a9fa9459Szrj ENUMX
6106*a9fa9459Szrj   BFD_RELOC_860_LOGOTOFF1
6107*a9fa9459Szrj ENUMX
6108*a9fa9459Szrj   BFD_RELOC_860_SPGOTOFF1
6109*a9fa9459Szrj ENUMX
6110*a9fa9459Szrj   BFD_RELOC_860_LOGOTOFF2
6111*a9fa9459Szrj ENUMX
6112*a9fa9459Szrj   BFD_RELOC_860_LOGOTOFF3
6113*a9fa9459Szrj ENUMX
6114*a9fa9459Szrj   BFD_RELOC_860_LOPC
6115*a9fa9459Szrj ENUMX
6116*a9fa9459Szrj   BFD_RELOC_860_HIGHADJ
6117*a9fa9459Szrj ENUMX
6118*a9fa9459Szrj   BFD_RELOC_860_HAGOT
6119*a9fa9459Szrj ENUMX
6120*a9fa9459Szrj   BFD_RELOC_860_HAGOTOFF
6121*a9fa9459Szrj ENUMX
6122*a9fa9459Szrj   BFD_RELOC_860_HAPC
6123*a9fa9459Szrj ENUMX
6124*a9fa9459Szrj   BFD_RELOC_860_HIGH
6125*a9fa9459Szrj ENUMX
6126*a9fa9459Szrj   BFD_RELOC_860_HIGOT
6127*a9fa9459Szrj ENUMX
6128*a9fa9459Szrj   BFD_RELOC_860_HIGOTOFF
6129*a9fa9459Szrj ENUMDOC
6130*a9fa9459Szrj   Intel i860 Relocations.
6131*a9fa9459Szrj 
6132*a9fa9459Szrj ENUM
6133*a9fa9459Szrj   BFD_RELOC_OR1K_REL_26
6134*a9fa9459Szrj ENUMX
6135*a9fa9459Szrj   BFD_RELOC_OR1K_GOTPC_HI16
6136*a9fa9459Szrj ENUMX
6137*a9fa9459Szrj   BFD_RELOC_OR1K_GOTPC_LO16
6138*a9fa9459Szrj ENUMX
6139*a9fa9459Szrj   BFD_RELOC_OR1K_GOT16
6140*a9fa9459Szrj ENUMX
6141*a9fa9459Szrj   BFD_RELOC_OR1K_PLT26
6142*a9fa9459Szrj ENUMX
6143*a9fa9459Szrj   BFD_RELOC_OR1K_GOTOFF_HI16
6144*a9fa9459Szrj ENUMX
6145*a9fa9459Szrj   BFD_RELOC_OR1K_GOTOFF_LO16
6146*a9fa9459Szrj ENUMX
6147*a9fa9459Szrj   BFD_RELOC_OR1K_COPY
6148*a9fa9459Szrj ENUMX
6149*a9fa9459Szrj   BFD_RELOC_OR1K_GLOB_DAT
6150*a9fa9459Szrj ENUMX
6151*a9fa9459Szrj   BFD_RELOC_OR1K_JMP_SLOT
6152*a9fa9459Szrj ENUMX
6153*a9fa9459Szrj   BFD_RELOC_OR1K_RELATIVE
6154*a9fa9459Szrj ENUMX
6155*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_GD_HI16
6156*a9fa9459Szrj ENUMX
6157*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_GD_LO16
6158*a9fa9459Szrj ENUMX
6159*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LDM_HI16
6160*a9fa9459Szrj ENUMX
6161*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LDM_LO16
6162*a9fa9459Szrj ENUMX
6163*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LDO_HI16
6164*a9fa9459Szrj ENUMX
6165*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LDO_LO16
6166*a9fa9459Szrj ENUMX
6167*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_IE_HI16
6168*a9fa9459Szrj ENUMX
6169*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_IE_LO16
6170*a9fa9459Szrj ENUMX
6171*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LE_HI16
6172*a9fa9459Szrj ENUMX
6173*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_LE_LO16
6174*a9fa9459Szrj ENUMX
6175*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_TPOFF
6176*a9fa9459Szrj ENUMX
6177*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_DTPOFF
6178*a9fa9459Szrj ENUMX
6179*a9fa9459Szrj   BFD_RELOC_OR1K_TLS_DTPMOD
6180*a9fa9459Szrj ENUMDOC
6181*a9fa9459Szrj   OpenRISC 1000 Relocations.
6182*a9fa9459Szrj 
6183*a9fa9459Szrj ENUM
6184*a9fa9459Szrj   BFD_RELOC_H8_DIR16A8
6185*a9fa9459Szrj ENUMX
6186*a9fa9459Szrj   BFD_RELOC_H8_DIR16R8
6187*a9fa9459Szrj ENUMX
6188*a9fa9459Szrj   BFD_RELOC_H8_DIR24A8
6189*a9fa9459Szrj ENUMX
6190*a9fa9459Szrj   BFD_RELOC_H8_DIR24R8
6191*a9fa9459Szrj ENUMX
6192*a9fa9459Szrj   BFD_RELOC_H8_DIR32A16
6193*a9fa9459Szrj ENUMX
6194*a9fa9459Szrj   BFD_RELOC_H8_DISP32A16
6195*a9fa9459Szrj ENUMDOC
6196*a9fa9459Szrj   H8 elf Relocations.
6197*a9fa9459Szrj 
6198*a9fa9459Szrj ENUM
6199*a9fa9459Szrj   BFD_RELOC_XSTORMY16_REL_12
6200*a9fa9459Szrj ENUMX
6201*a9fa9459Szrj   BFD_RELOC_XSTORMY16_12
6202*a9fa9459Szrj ENUMX
6203*a9fa9459Szrj   BFD_RELOC_XSTORMY16_24
6204*a9fa9459Szrj ENUMX
6205*a9fa9459Szrj   BFD_RELOC_XSTORMY16_FPTR16
6206*a9fa9459Szrj ENUMDOC
6207*a9fa9459Szrj   Sony Xstormy16 Relocations.
6208*a9fa9459Szrj 
6209*a9fa9459Szrj ENUM
6210*a9fa9459Szrj   BFD_RELOC_RELC
6211*a9fa9459Szrj ENUMDOC
6212*a9fa9459Szrj   Self-describing complex relocations.
6213*a9fa9459Szrj COMMENT
6214*a9fa9459Szrj 
6215*a9fa9459Szrj ENUM
6216*a9fa9459Szrj   BFD_RELOC_XC16X_PAG
6217*a9fa9459Szrj ENUMX
6218*a9fa9459Szrj   BFD_RELOC_XC16X_POF
6219*a9fa9459Szrj ENUMX
6220*a9fa9459Szrj   BFD_RELOC_XC16X_SEG
6221*a9fa9459Szrj ENUMX
6222*a9fa9459Szrj   BFD_RELOC_XC16X_SOF
6223*a9fa9459Szrj ENUMDOC
6224*a9fa9459Szrj   Infineon Relocations.
6225*a9fa9459Szrj 
6226*a9fa9459Szrj ENUM
6227*a9fa9459Szrj   BFD_RELOC_VAX_GLOB_DAT
6228*a9fa9459Szrj ENUMX
6229*a9fa9459Szrj   BFD_RELOC_VAX_JMP_SLOT
6230*a9fa9459Szrj ENUMX
6231*a9fa9459Szrj   BFD_RELOC_VAX_RELATIVE
6232*a9fa9459Szrj ENUMDOC
6233*a9fa9459Szrj   Relocations used by VAX ELF.
6234*a9fa9459Szrj 
6235*a9fa9459Szrj ENUM
6236*a9fa9459Szrj   BFD_RELOC_MT_PC16
6237*a9fa9459Szrj ENUMDOC
6238*a9fa9459Szrj   Morpho MT - 16 bit immediate relocation.
6239*a9fa9459Szrj ENUM
6240*a9fa9459Szrj   BFD_RELOC_MT_HI16
6241*a9fa9459Szrj ENUMDOC
6242*a9fa9459Szrj   Morpho MT - Hi 16 bits of an address.
6243*a9fa9459Szrj ENUM
6244*a9fa9459Szrj   BFD_RELOC_MT_LO16
6245*a9fa9459Szrj ENUMDOC
6246*a9fa9459Szrj   Morpho MT - Low 16 bits of an address.
6247*a9fa9459Szrj ENUM
6248*a9fa9459Szrj   BFD_RELOC_MT_GNU_VTINHERIT
6249*a9fa9459Szrj ENUMDOC
6250*a9fa9459Szrj   Morpho MT - Used to tell the linker which vtable entries are used.
6251*a9fa9459Szrj ENUM
6252*a9fa9459Szrj   BFD_RELOC_MT_GNU_VTENTRY
6253*a9fa9459Szrj ENUMDOC
6254*a9fa9459Szrj   Morpho MT - Used to tell the linker which vtable entries are used.
6255*a9fa9459Szrj ENUM
6256*a9fa9459Szrj   BFD_RELOC_MT_PCINSN8
6257*a9fa9459Szrj ENUMDOC
6258*a9fa9459Szrj   Morpho MT - 8 bit immediate relocation.
6259*a9fa9459Szrj 
6260*a9fa9459Szrj ENUM
6261*a9fa9459Szrj   BFD_RELOC_MSP430_10_PCREL
6262*a9fa9459Szrj ENUMX
6263*a9fa9459Szrj   BFD_RELOC_MSP430_16_PCREL
6264*a9fa9459Szrj ENUMX
6265*a9fa9459Szrj   BFD_RELOC_MSP430_16
6266*a9fa9459Szrj ENUMX
6267*a9fa9459Szrj   BFD_RELOC_MSP430_16_PCREL_BYTE
6268*a9fa9459Szrj ENUMX
6269*a9fa9459Szrj   BFD_RELOC_MSP430_16_BYTE
6270*a9fa9459Szrj ENUMX
6271*a9fa9459Szrj   BFD_RELOC_MSP430_2X_PCREL
6272*a9fa9459Szrj ENUMX
6273*a9fa9459Szrj   BFD_RELOC_MSP430_RL_PCREL
6274*a9fa9459Szrj ENUMX
6275*a9fa9459Szrj   BFD_RELOC_MSP430_ABS8
6276*a9fa9459Szrj ENUMX
6277*a9fa9459Szrj   BFD_RELOC_MSP430X_PCR20_EXT_SRC
6278*a9fa9459Szrj ENUMX
6279*a9fa9459Szrj   BFD_RELOC_MSP430X_PCR20_EXT_DST
6280*a9fa9459Szrj ENUMX
6281*a9fa9459Szrj   BFD_RELOC_MSP430X_PCR20_EXT_ODST
6282*a9fa9459Szrj ENUMX
6283*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS20_EXT_SRC
6284*a9fa9459Szrj ENUMX
6285*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS20_EXT_DST
6286*a9fa9459Szrj ENUMX
6287*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS20_EXT_ODST
6288*a9fa9459Szrj ENUMX
6289*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS20_ADR_SRC
6290*a9fa9459Szrj ENUMX
6291*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS20_ADR_DST
6292*a9fa9459Szrj ENUMX
6293*a9fa9459Szrj   BFD_RELOC_MSP430X_PCR16
6294*a9fa9459Szrj ENUMX
6295*a9fa9459Szrj   BFD_RELOC_MSP430X_PCR20_CALL
6296*a9fa9459Szrj ENUMX
6297*a9fa9459Szrj   BFD_RELOC_MSP430X_ABS16
6298*a9fa9459Szrj ENUMX
6299*a9fa9459Szrj   BFD_RELOC_MSP430_ABS_HI16
6300*a9fa9459Szrj ENUMX
6301*a9fa9459Szrj   BFD_RELOC_MSP430_PREL31
6302*a9fa9459Szrj ENUMX
6303*a9fa9459Szrj   BFD_RELOC_MSP430_SYM_DIFF
6304*a9fa9459Szrj ENUMDOC
6305*a9fa9459Szrj   msp430 specific relocation codes
6306*a9fa9459Szrj 
6307*a9fa9459Szrj ENUM
6308*a9fa9459Szrj   BFD_RELOC_NIOS2_S16
6309*a9fa9459Szrj ENUMX
6310*a9fa9459Szrj   BFD_RELOC_NIOS2_U16
6311*a9fa9459Szrj ENUMX
6312*a9fa9459Szrj   BFD_RELOC_NIOS2_CALL26
6313*a9fa9459Szrj ENUMX
6314*a9fa9459Szrj   BFD_RELOC_NIOS2_IMM5
6315*a9fa9459Szrj ENUMX
6316*a9fa9459Szrj   BFD_RELOC_NIOS2_CACHE_OPX
6317*a9fa9459Szrj ENUMX
6318*a9fa9459Szrj   BFD_RELOC_NIOS2_IMM6
6319*a9fa9459Szrj ENUMX
6320*a9fa9459Szrj   BFD_RELOC_NIOS2_IMM8
6321*a9fa9459Szrj ENUMX
6322*a9fa9459Szrj   BFD_RELOC_NIOS2_HI16
6323*a9fa9459Szrj ENUMX
6324*a9fa9459Szrj   BFD_RELOC_NIOS2_LO16
6325*a9fa9459Szrj ENUMX
6326*a9fa9459Szrj   BFD_RELOC_NIOS2_HIADJ16
6327*a9fa9459Szrj ENUMX
6328*a9fa9459Szrj   BFD_RELOC_NIOS2_GPREL
6329*a9fa9459Szrj ENUMX
6330*a9fa9459Szrj   BFD_RELOC_NIOS2_UJMP
6331*a9fa9459Szrj ENUMX
6332*a9fa9459Szrj   BFD_RELOC_NIOS2_CJMP
6333*a9fa9459Szrj ENUMX
6334*a9fa9459Szrj   BFD_RELOC_NIOS2_CALLR
6335*a9fa9459Szrj ENUMX
6336*a9fa9459Szrj   BFD_RELOC_NIOS2_ALIGN
6337*a9fa9459Szrj ENUMX
6338*a9fa9459Szrj   BFD_RELOC_NIOS2_GOT16
6339*a9fa9459Szrj ENUMX
6340*a9fa9459Szrj   BFD_RELOC_NIOS2_CALL16
6341*a9fa9459Szrj ENUMX
6342*a9fa9459Szrj   BFD_RELOC_NIOS2_GOTOFF_LO
6343*a9fa9459Szrj ENUMX
6344*a9fa9459Szrj   BFD_RELOC_NIOS2_GOTOFF_HA
6345*a9fa9459Szrj ENUMX
6346*a9fa9459Szrj   BFD_RELOC_NIOS2_PCREL_LO
6347*a9fa9459Szrj ENUMX
6348*a9fa9459Szrj   BFD_RELOC_NIOS2_PCREL_HA
6349*a9fa9459Szrj ENUMX
6350*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_GD16
6351*a9fa9459Szrj ENUMX
6352*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_LDM16
6353*a9fa9459Szrj ENUMX
6354*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_LDO16
6355*a9fa9459Szrj ENUMX
6356*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_IE16
6357*a9fa9459Szrj ENUMX
6358*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_LE16
6359*a9fa9459Szrj ENUMX
6360*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_DTPMOD
6361*a9fa9459Szrj ENUMX
6362*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_DTPREL
6363*a9fa9459Szrj ENUMX
6364*a9fa9459Szrj   BFD_RELOC_NIOS2_TLS_TPREL
6365*a9fa9459Szrj ENUMX
6366*a9fa9459Szrj   BFD_RELOC_NIOS2_COPY
6367*a9fa9459Szrj ENUMX
6368*a9fa9459Szrj   BFD_RELOC_NIOS2_GLOB_DAT
6369*a9fa9459Szrj ENUMX
6370*a9fa9459Szrj   BFD_RELOC_NIOS2_JUMP_SLOT
6371*a9fa9459Szrj ENUMX
6372*a9fa9459Szrj   BFD_RELOC_NIOS2_RELATIVE
6373*a9fa9459Szrj ENUMX
6374*a9fa9459Szrj   BFD_RELOC_NIOS2_GOTOFF
6375*a9fa9459Szrj ENUMX
6376*a9fa9459Szrj   BFD_RELOC_NIOS2_CALL26_NOAT
6377*a9fa9459Szrj ENUMX
6378*a9fa9459Szrj   BFD_RELOC_NIOS2_GOT_LO
6379*a9fa9459Szrj ENUMX
6380*a9fa9459Szrj   BFD_RELOC_NIOS2_GOT_HA
6381*a9fa9459Szrj ENUMX
6382*a9fa9459Szrj   BFD_RELOC_NIOS2_CALL_LO
6383*a9fa9459Szrj ENUMX
6384*a9fa9459Szrj   BFD_RELOC_NIOS2_CALL_HA
6385*a9fa9459Szrj ENUMX
6386*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_S12
6387*a9fa9459Szrj ENUMX
6388*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_I10_1_PCREL
6389*a9fa9459Szrj ENUMX
6390*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T1I7_1_PCREL
6391*a9fa9459Szrj ENUMX
6392*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T1I7_2
6393*a9fa9459Szrj ENUMX
6394*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T2I4
6395*a9fa9459Szrj ENUMX
6396*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T2I4_1
6397*a9fa9459Szrj ENUMX
6398*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T2I4_2
6399*a9fa9459Szrj ENUMX
6400*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_X1I7_2
6401*a9fa9459Szrj ENUMX
6402*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_X2L5
6403*a9fa9459Szrj ENUMX
6404*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_F1I5_2
6405*a9fa9459Szrj ENUMX
6406*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_L5I4X1
6407*a9fa9459Szrj ENUMX
6408*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T1X1I6
6409*a9fa9459Szrj ENUMX
6410*a9fa9459Szrj   BFD_RELOC_NIOS2_R2_T1X1I6_2
6411*a9fa9459Szrj ENUMDOC
6412*a9fa9459Szrj   Relocations used by the Altera Nios II core.
6413*a9fa9459Szrj 
6414*a9fa9459Szrj ENUM
6415*a9fa9459Szrj   BFD_RELOC_IQ2000_OFFSET_16
6416*a9fa9459Szrj ENUMX
6417*a9fa9459Szrj   BFD_RELOC_IQ2000_OFFSET_21
6418*a9fa9459Szrj ENUMX
6419*a9fa9459Szrj   BFD_RELOC_IQ2000_UHI16
6420*a9fa9459Szrj ENUMDOC
6421*a9fa9459Szrj   IQ2000 Relocations.
6422*a9fa9459Szrj 
6423*a9fa9459Szrj ENUM
6424*a9fa9459Szrj   BFD_RELOC_XTENSA_RTLD
6425*a9fa9459Szrj ENUMDOC
6426*a9fa9459Szrj   Special Xtensa relocation used only by PLT entries in ELF shared
6427*a9fa9459Szrj   objects to indicate that the runtime linker should set the value
6428*a9fa9459Szrj   to one of its own internal functions or data structures.
6429*a9fa9459Szrj ENUM
6430*a9fa9459Szrj   BFD_RELOC_XTENSA_GLOB_DAT
6431*a9fa9459Szrj ENUMX
6432*a9fa9459Szrj   BFD_RELOC_XTENSA_JMP_SLOT
6433*a9fa9459Szrj ENUMX
6434*a9fa9459Szrj   BFD_RELOC_XTENSA_RELATIVE
6435*a9fa9459Szrj ENUMDOC
6436*a9fa9459Szrj   Xtensa relocations for ELF shared objects.
6437*a9fa9459Szrj ENUM
6438*a9fa9459Szrj   BFD_RELOC_XTENSA_PLT
6439*a9fa9459Szrj ENUMDOC
6440*a9fa9459Szrj   Xtensa relocation used in ELF object files for symbols that may require
6441*a9fa9459Szrj   PLT entries.  Otherwise, this is just a generic 32-bit relocation.
6442*a9fa9459Szrj ENUM
6443*a9fa9459Szrj   BFD_RELOC_XTENSA_DIFF8
6444*a9fa9459Szrj ENUMX
6445*a9fa9459Szrj   BFD_RELOC_XTENSA_DIFF16
6446*a9fa9459Szrj ENUMX
6447*a9fa9459Szrj   BFD_RELOC_XTENSA_DIFF32
6448*a9fa9459Szrj ENUMDOC
6449*a9fa9459Szrj   Xtensa relocations to mark the difference of two local symbols.
6450*a9fa9459Szrj   These are only needed to support linker relaxation and can be ignored
6451*a9fa9459Szrj   when not relaxing.  The field is set to the value of the difference
6452*a9fa9459Szrj   assuming no relaxation.  The relocation encodes the position of the
6453*a9fa9459Szrj   first symbol so the linker can determine whether to adjust the field
6454*a9fa9459Szrj   value.
6455*a9fa9459Szrj ENUM
6456*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT0_OP
6457*a9fa9459Szrj ENUMX
6458*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT1_OP
6459*a9fa9459Szrj ENUMX
6460*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT2_OP
6461*a9fa9459Szrj ENUMX
6462*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT3_OP
6463*a9fa9459Szrj ENUMX
6464*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT4_OP
6465*a9fa9459Szrj ENUMX
6466*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT5_OP
6467*a9fa9459Szrj ENUMX
6468*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT6_OP
6469*a9fa9459Szrj ENUMX
6470*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT7_OP
6471*a9fa9459Szrj ENUMX
6472*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT8_OP
6473*a9fa9459Szrj ENUMX
6474*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT9_OP
6475*a9fa9459Szrj ENUMX
6476*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT10_OP
6477*a9fa9459Szrj ENUMX
6478*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT11_OP
6479*a9fa9459Szrj ENUMX
6480*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT12_OP
6481*a9fa9459Szrj ENUMX
6482*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT13_OP
6483*a9fa9459Szrj ENUMX
6484*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT14_OP
6485*a9fa9459Szrj ENUMDOC
6486*a9fa9459Szrj   Generic Xtensa relocations for instruction operands.  Only the slot
6487*a9fa9459Szrj   number is encoded in the relocation.  The relocation applies to the
6488*a9fa9459Szrj   last PC-relative immediate operand, or if there are no PC-relative
6489*a9fa9459Szrj   immediates, to the last immediate operand.
6490*a9fa9459Szrj ENUM
6491*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT0_ALT
6492*a9fa9459Szrj ENUMX
6493*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT1_ALT
6494*a9fa9459Szrj ENUMX
6495*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT2_ALT
6496*a9fa9459Szrj ENUMX
6497*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT3_ALT
6498*a9fa9459Szrj ENUMX
6499*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT4_ALT
6500*a9fa9459Szrj ENUMX
6501*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT5_ALT
6502*a9fa9459Szrj ENUMX
6503*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT6_ALT
6504*a9fa9459Szrj ENUMX
6505*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT7_ALT
6506*a9fa9459Szrj ENUMX
6507*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT8_ALT
6508*a9fa9459Szrj ENUMX
6509*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT9_ALT
6510*a9fa9459Szrj ENUMX
6511*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT10_ALT
6512*a9fa9459Szrj ENUMX
6513*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT11_ALT
6514*a9fa9459Szrj ENUMX
6515*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT12_ALT
6516*a9fa9459Szrj ENUMX
6517*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT13_ALT
6518*a9fa9459Szrj ENUMX
6519*a9fa9459Szrj   BFD_RELOC_XTENSA_SLOT14_ALT
6520*a9fa9459Szrj ENUMDOC
6521*a9fa9459Szrj   Alternate Xtensa relocations.  Only the slot is encoded in the
6522*a9fa9459Szrj   relocation.  The meaning of these relocations is opcode-specific.
6523*a9fa9459Szrj ENUM
6524*a9fa9459Szrj   BFD_RELOC_XTENSA_OP0
6525*a9fa9459Szrj ENUMX
6526*a9fa9459Szrj   BFD_RELOC_XTENSA_OP1
6527*a9fa9459Szrj ENUMX
6528*a9fa9459Szrj   BFD_RELOC_XTENSA_OP2
6529*a9fa9459Szrj ENUMDOC
6530*a9fa9459Szrj   Xtensa relocations for backward compatibility.  These have all been
6531*a9fa9459Szrj   replaced by BFD_RELOC_XTENSA_SLOT0_OP.
6532*a9fa9459Szrj ENUM
6533*a9fa9459Szrj   BFD_RELOC_XTENSA_ASM_EXPAND
6534*a9fa9459Szrj ENUMDOC
6535*a9fa9459Szrj   Xtensa relocation to mark that the assembler expanded the
6536*a9fa9459Szrj   instructions from an original target.  The expansion size is
6537*a9fa9459Szrj   encoded in the reloc size.
6538*a9fa9459Szrj ENUM
6539*a9fa9459Szrj   BFD_RELOC_XTENSA_ASM_SIMPLIFY
6540*a9fa9459Szrj ENUMDOC
6541*a9fa9459Szrj   Xtensa relocation to mark that the linker should simplify
6542*a9fa9459Szrj   assembler-expanded instructions.  This is commonly used
6543*a9fa9459Szrj   internally by the linker after analysis of a
6544*a9fa9459Szrj   BFD_RELOC_XTENSA_ASM_EXPAND.
6545*a9fa9459Szrj ENUM
6546*a9fa9459Szrj   BFD_RELOC_XTENSA_TLSDESC_FN
6547*a9fa9459Szrj ENUMX
6548*a9fa9459Szrj   BFD_RELOC_XTENSA_TLSDESC_ARG
6549*a9fa9459Szrj ENUMX
6550*a9fa9459Szrj   BFD_RELOC_XTENSA_TLS_DTPOFF
6551*a9fa9459Szrj ENUMX
6552*a9fa9459Szrj   BFD_RELOC_XTENSA_TLS_TPOFF
6553*a9fa9459Szrj ENUMX
6554*a9fa9459Szrj   BFD_RELOC_XTENSA_TLS_FUNC
6555*a9fa9459Szrj ENUMX
6556*a9fa9459Szrj   BFD_RELOC_XTENSA_TLS_ARG
6557*a9fa9459Szrj ENUMX
6558*a9fa9459Szrj   BFD_RELOC_XTENSA_TLS_CALL
6559*a9fa9459Szrj ENUMDOC
6560*a9fa9459Szrj   Xtensa TLS relocations.
6561*a9fa9459Szrj 
6562*a9fa9459Szrj ENUM
6563*a9fa9459Szrj   BFD_RELOC_Z80_DISP8
6564*a9fa9459Szrj ENUMDOC
6565*a9fa9459Szrj   8 bit signed offset in (ix+d) or (iy+d).
6566*a9fa9459Szrj 
6567*a9fa9459Szrj ENUM
6568*a9fa9459Szrj   BFD_RELOC_Z8K_DISP7
6569*a9fa9459Szrj ENUMDOC
6570*a9fa9459Szrj   DJNZ offset.
6571*a9fa9459Szrj ENUM
6572*a9fa9459Szrj   BFD_RELOC_Z8K_CALLR
6573*a9fa9459Szrj ENUMDOC
6574*a9fa9459Szrj   CALR offset.
6575*a9fa9459Szrj ENUM
6576*a9fa9459Szrj   BFD_RELOC_Z8K_IMM4L
6577*a9fa9459Szrj ENUMDOC
6578*a9fa9459Szrj   4 bit value.
6579*a9fa9459Szrj 
6580*a9fa9459Szrj ENUM
6581*a9fa9459Szrj    BFD_RELOC_LM32_CALL
6582*a9fa9459Szrj ENUMX
6583*a9fa9459Szrj    BFD_RELOC_LM32_BRANCH
6584*a9fa9459Szrj ENUMX
6585*a9fa9459Szrj    BFD_RELOC_LM32_16_GOT
6586*a9fa9459Szrj ENUMX
6587*a9fa9459Szrj    BFD_RELOC_LM32_GOTOFF_HI16
6588*a9fa9459Szrj ENUMX
6589*a9fa9459Szrj    BFD_RELOC_LM32_GOTOFF_LO16
6590*a9fa9459Szrj ENUMX
6591*a9fa9459Szrj    BFD_RELOC_LM32_COPY
6592*a9fa9459Szrj ENUMX
6593*a9fa9459Szrj    BFD_RELOC_LM32_GLOB_DAT
6594*a9fa9459Szrj ENUMX
6595*a9fa9459Szrj    BFD_RELOC_LM32_JMP_SLOT
6596*a9fa9459Szrj ENUMX
6597*a9fa9459Szrj    BFD_RELOC_LM32_RELATIVE
6598*a9fa9459Szrj ENUMDOC
6599*a9fa9459Szrj  Lattice Mico32 relocations.
6600*a9fa9459Szrj 
6601*a9fa9459Szrj ENUM
6602*a9fa9459Szrj   BFD_RELOC_MACH_O_SECTDIFF
6603*a9fa9459Szrj ENUMDOC
6604*a9fa9459Szrj   Difference between two section addreses.  Must be followed by a
6605*a9fa9459Szrj   BFD_RELOC_MACH_O_PAIR.
6606*a9fa9459Szrj ENUM
6607*a9fa9459Szrj   BFD_RELOC_MACH_O_LOCAL_SECTDIFF
6608*a9fa9459Szrj ENUMDOC
6609*a9fa9459Szrj   Like BFD_RELOC_MACH_O_SECTDIFF but with a local symbol.
6610*a9fa9459Szrj ENUM
6611*a9fa9459Szrj   BFD_RELOC_MACH_O_PAIR
6612*a9fa9459Szrj ENUMDOC
6613*a9fa9459Szrj   Pair of relocation.  Contains the first symbol.
6614*a9fa9459Szrj ENUM
6615*a9fa9459Szrj   BFD_RELOC_MACH_O_SUBTRACTOR32
6616*a9fa9459Szrj ENUMDOC
6617*a9fa9459Szrj   Symbol will be substracted.  Must be followed by a BFD_RELOC_32.
6618*a9fa9459Szrj ENUM
6619*a9fa9459Szrj   BFD_RELOC_MACH_O_SUBTRACTOR64
6620*a9fa9459Szrj ENUMDOC
6621*a9fa9459Szrj   Symbol will be substracted.  Must be followed by a BFD_RELOC_64.
6622*a9fa9459Szrj 
6623*a9fa9459Szrj ENUM
6624*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_BRANCH32
6625*a9fa9459Szrj ENUMX
6626*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_BRANCH8
6627*a9fa9459Szrj ENUMDOC
6628*a9fa9459Szrj   PCREL relocations.  They are marked as branch to create PLT entry if
6629*a9fa9459Szrj   required.
6630*a9fa9459Szrj ENUM
6631*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_GOT
6632*a9fa9459Szrj ENUMDOC
6633*a9fa9459Szrj   Used when referencing a GOT entry.
6634*a9fa9459Szrj ENUM
6635*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_GOT_LOAD
6636*a9fa9459Szrj ENUMDOC
6637*a9fa9459Szrj   Used when loading a GOT entry with movq.  It is specially marked so that
6638*a9fa9459Szrj   the linker could optimize the movq to a leaq if possible.
6639*a9fa9459Szrj ENUM
6640*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_PCREL32_1
6641*a9fa9459Szrj ENUMDOC
6642*a9fa9459Szrj   Same as BFD_RELOC_32_PCREL but with an implicit -1 addend.
6643*a9fa9459Szrj ENUM
6644*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_PCREL32_2
6645*a9fa9459Szrj ENUMDOC
6646*a9fa9459Szrj   Same as BFD_RELOC_32_PCREL but with an implicit -2 addend.
6647*a9fa9459Szrj ENUM
6648*a9fa9459Szrj   BFD_RELOC_MACH_O_X86_64_PCREL32_4
6649*a9fa9459Szrj ENUMDOC
6650*a9fa9459Szrj   Same as BFD_RELOC_32_PCREL but with an implicit -4 addend.
6651*a9fa9459Szrj 
6652*a9fa9459Szrj 
6653*a9fa9459Szrj ENUM
6654*a9fa9459Szrj   BFD_RELOC_MACH_O_ARM64_ADDEND
6655*a9fa9459Szrj ENUMDOC
6656*a9fa9459Szrj   Addend for PAGE or PAGEOFF.
6657*a9fa9459Szrj ENUM
6658*a9fa9459Szrj   BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21
6659*a9fa9459Szrj ENUMDOC
6660*a9fa9459Szrj   Relative offset to page of GOT slot.
6661*a9fa9459Szrj ENUM
6662*a9fa9459Szrj   BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12
6663*a9fa9459Szrj ENUMDOC
6664*a9fa9459Szrj   Relative offset within page of GOT slot.
6665*a9fa9459Szrj ENUM
6666*a9fa9459Szrj   BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT
6667*a9fa9459Szrj ENUMDOC
6668*a9fa9459Szrj   Address of a GOT entry.
6669*a9fa9459Szrj 
6670*a9fa9459Szrj ENUM
6671*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_LO
6672*a9fa9459Szrj ENUMDOC
6673*a9fa9459Szrj   This is a 32 bit reloc for the microblaze that stores the
6674*a9fa9459Szrj   low 16 bits of a value
6675*a9fa9459Szrj ENUM
6676*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_LO_PCREL
6677*a9fa9459Szrj ENUMDOC
6678*a9fa9459Szrj   This is a 32 bit pc-relative reloc for the microblaze that
6679*a9fa9459Szrj   stores the low 16 bits of a value
6680*a9fa9459Szrj ENUM
6681*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_ROSDA
6682*a9fa9459Szrj ENUMDOC
6683*a9fa9459Szrj   This is a 32 bit reloc for the microblaze that stores a
6684*a9fa9459Szrj   value relative to the read-only small data area anchor
6685*a9fa9459Szrj ENUM
6686*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_RWSDA
6687*a9fa9459Szrj ENUMDOC
6688*a9fa9459Szrj   This is a 32 bit reloc for the microblaze that stores a
6689*a9fa9459Szrj   value relative to the read-write small data area anchor
6690*a9fa9459Szrj ENUM
6691*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM
6692*a9fa9459Szrj ENUMDOC
6693*a9fa9459Szrj   This is a 32 bit reloc for the microblaze to handle
6694*a9fa9459Szrj   expressions of the form "Symbol Op Symbol"
6695*a9fa9459Szrj ENUM
6696*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_NONE
6697*a9fa9459Szrj ENUMDOC
6698*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit pc relative
6699*a9fa9459Szrj   value in two words (with an imm instruction).  No relocation is
6700*a9fa9459Szrj   done here - only used for relaxing
6701*a9fa9459Szrj ENUM
6702*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_GOTPC
6703*a9fa9459Szrj ENUMDOC
6704*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit pc relative
6705*a9fa9459Szrj   value in two words (with an imm instruction).  The relocation is
6706*a9fa9459Szrj   PC-relative GOT offset
6707*a9fa9459Szrj ENUM
6708*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_GOT
6709*a9fa9459Szrj ENUMDOC
6710*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit pc relative
6711*a9fa9459Szrj   value in two words (with an imm instruction).  The relocation is
6712*a9fa9459Szrj   GOT offset
6713*a9fa9459Szrj ENUM
6714*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_PLT
6715*a9fa9459Szrj ENUMDOC
6716*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit pc relative
6717*a9fa9459Szrj   value in two words (with an imm instruction).  The relocation is
6718*a9fa9459Szrj   PC-relative offset into PLT
6719*a9fa9459Szrj ENUM
6720*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_GOTOFF
6721*a9fa9459Szrj ENUMDOC
6722*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit GOT relative
6723*a9fa9459Szrj   value in two words (with an imm instruction).  The relocation is
6724*a9fa9459Szrj   relative offset from _GLOBAL_OFFSET_TABLE_
6725*a9fa9459Szrj ENUM
6726*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_GOTOFF
6727*a9fa9459Szrj ENUMDOC
6728*a9fa9459Szrj   This is a 32 bit reloc that stores the 32 bit GOT relative
6729*a9fa9459Szrj   value in a word.  The relocation is relative offset from
6730*a9fa9459Szrj   _GLOBAL_OFFSET_TABLE_
6731*a9fa9459Szrj ENUM
6732*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_COPY
6733*a9fa9459Szrj ENUMDOC
6734*a9fa9459Szrj   This is used to tell the dynamic linker to copy the value out of
6735*a9fa9459Szrj   the dynamic object into the runtime process image.
6736*a9fa9459Szrj ENUM
6737*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLS
6738*a9fa9459Szrj ENUMDOC
6739*a9fa9459Szrj   Unused Reloc
6740*a9fa9459Szrj ENUM
6741*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLSGD
6742*a9fa9459Szrj ENUMDOC
6743*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit GOT relative value
6744*a9fa9459Szrj   of the GOT TLS GD info entry in two words (with an imm instruction). The
6745*a9fa9459Szrj   relocation is GOT offset.
6746*a9fa9459Szrj ENUM
6747*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLSLD
6748*a9fa9459Szrj ENUMDOC
6749*a9fa9459Szrj   This is a 64 bit reloc that stores the 32 bit GOT relative value
6750*a9fa9459Szrj   of the GOT TLS LD info entry in two words (with an imm instruction). The
6751*a9fa9459Szrj   relocation is GOT offset.
6752*a9fa9459Szrj ENUM
6753*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_TLSDTPMOD
6754*a9fa9459Szrj ENUMDOC
6755*a9fa9459Szrj   This is a 32 bit reloc that stores the Module ID to GOT(n).
6756*a9fa9459Szrj ENUM
6757*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_32_TLSDTPREL
6758*a9fa9459Szrj ENUMDOC
6759*a9fa9459Szrj   This is a 32 bit reloc that stores TLS offset to GOT(n+1).
6760*a9fa9459Szrj ENUM
6761*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLSDTPREL
6762*a9fa9459Szrj ENUMDOC
6763*a9fa9459Szrj   This is a 32 bit reloc for storing TLS offset to two words (uses imm
6764*a9fa9459Szrj   instruction)
6765*a9fa9459Szrj ENUM
6766*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLSGOTTPREL
6767*a9fa9459Szrj ENUMDOC
6768*a9fa9459Szrj   This is a 64 bit reloc that stores 32-bit thread pointer relative offset
6769*a9fa9459Szrj   to two words (uses imm instruction).
6770*a9fa9459Szrj ENUM
6771*a9fa9459Szrj   BFD_RELOC_MICROBLAZE_64_TLSTPREL
6772*a9fa9459Szrj ENUMDOC
6773*a9fa9459Szrj   This is a 64 bit reloc that stores 32-bit thread pointer relative offset
6774*a9fa9459Szrj   to two words (uses imm instruction).
6775*a9fa9459Szrj 
6776*a9fa9459Szrj ENUM
6777*a9fa9459Szrj   BFD_RELOC_AARCH64_RELOC_START
6778*a9fa9459Szrj ENUMDOC
6779*a9fa9459Szrj   AArch64 pseudo relocation code to mark the start of the AArch64
6780*a9fa9459Szrj   relocation enumerators.  N.B. the order of the enumerators is
6781*a9fa9459Szrj   important as several tables in the AArch64 bfd backend are indexed
6782*a9fa9459Szrj   by these enumerators; make sure they are all synced.
6783*a9fa9459Szrj ENUM
6784*a9fa9459Szrj   BFD_RELOC_AARCH64_NULL
6785*a9fa9459Szrj ENUMDOC
6786*a9fa9459Szrj   Deprecated AArch64 null relocation code.
6787*a9fa9459Szrj ENUM
6788*a9fa9459Szrj   BFD_RELOC_AARCH64_NONE
6789*a9fa9459Szrj ENUMDOC
6790*a9fa9459Szrj   AArch64 null relocation code.
6791*a9fa9459Szrj ENUM
6792*a9fa9459Szrj   BFD_RELOC_AARCH64_64
6793*a9fa9459Szrj ENUMX
6794*a9fa9459Szrj   BFD_RELOC_AARCH64_32
6795*a9fa9459Szrj ENUMX
6796*a9fa9459Szrj   BFD_RELOC_AARCH64_16
6797*a9fa9459Szrj ENUMDOC
6798*a9fa9459Szrj   Basic absolute relocations of N bits.  These are equivalent to
6799*a9fa9459Szrj BFD_RELOC_N and they were added to assist the indexing of the howto
6800*a9fa9459Szrj table.
6801*a9fa9459Szrj ENUM
6802*a9fa9459Szrj   BFD_RELOC_AARCH64_64_PCREL
6803*a9fa9459Szrj ENUMX
6804*a9fa9459Szrj   BFD_RELOC_AARCH64_32_PCREL
6805*a9fa9459Szrj ENUMX
6806*a9fa9459Szrj   BFD_RELOC_AARCH64_16_PCREL
6807*a9fa9459Szrj ENUMDOC
6808*a9fa9459Szrj   PC-relative relocations.  These are equivalent to BFD_RELOC_N_PCREL
6809*a9fa9459Szrj and they were added to assist the indexing of the howto table.
6810*a9fa9459Szrj ENUM
6811*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G0
6812*a9fa9459Szrj ENUMDOC
6813*a9fa9459Szrj   AArch64 MOV[NZK] instruction with most significant bits 0 to 15
6814*a9fa9459Szrj   of an unsigned address/value.
6815*a9fa9459Szrj ENUM
6816*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G0_NC
6817*a9fa9459Szrj ENUMDOC
6818*a9fa9459Szrj   AArch64 MOV[NZK] instruction with less significant bits 0 to 15 of
6819*a9fa9459Szrj   an address/value.  No overflow checking.
6820*a9fa9459Szrj ENUM
6821*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G1
6822*a9fa9459Szrj ENUMDOC
6823*a9fa9459Szrj   AArch64 MOV[NZK] instruction with most significant bits 16 to 31
6824*a9fa9459Szrj   of an unsigned address/value.
6825*a9fa9459Szrj ENUM
6826*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G1_NC
6827*a9fa9459Szrj ENUMDOC
6828*a9fa9459Szrj   AArch64 MOV[NZK] instruction with less significant bits 16 to 31
6829*a9fa9459Szrj   of an address/value.  No overflow checking.
6830*a9fa9459Szrj ENUM
6831*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G2
6832*a9fa9459Szrj ENUMDOC
6833*a9fa9459Szrj   AArch64 MOV[NZK] instruction with most significant bits 32 to 47
6834*a9fa9459Szrj   of an unsigned address/value.
6835*a9fa9459Szrj ENUM
6836*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G2_NC
6837*a9fa9459Szrj ENUMDOC
6838*a9fa9459Szrj   AArch64 MOV[NZK] instruction with less significant bits 32 to 47
6839*a9fa9459Szrj   of an address/value.  No overflow checking.
6840*a9fa9459Szrj ENUM
6841*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G3
6842*a9fa9459Szrj ENUMDOC
6843*a9fa9459Szrj   AArch64 MOV[NZK] instruction with most signficant bits 48 to 64
6844*a9fa9459Szrj   of a signed or unsigned address/value.
6845*a9fa9459Szrj ENUM
6846*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G0_S
6847*a9fa9459Szrj ENUMDOC
6848*a9fa9459Szrj   AArch64 MOV[NZ] instruction with most significant bits 0 to 15
6849*a9fa9459Szrj   of a signed value.  Changes instruction to MOVZ or MOVN depending on the
6850*a9fa9459Szrj   value's sign.
6851*a9fa9459Szrj ENUM
6852*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G1_S
6853*a9fa9459Szrj ENUMDOC
6854*a9fa9459Szrj   AArch64 MOV[NZ] instruction with most significant bits 16 to 31
6855*a9fa9459Szrj   of a signed value.  Changes instruction to MOVZ or MOVN depending on the
6856*a9fa9459Szrj   value's sign.
6857*a9fa9459Szrj ENUM
6858*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_G2_S
6859*a9fa9459Szrj ENUMDOC
6860*a9fa9459Szrj   AArch64 MOV[NZ] instruction with most significant bits 32 to 47
6861*a9fa9459Szrj   of a signed value.  Changes instruction to MOVZ or MOVN depending on the
6862*a9fa9459Szrj   value's sign.
6863*a9fa9459Szrj ENUM
6864*a9fa9459Szrj   BFD_RELOC_AARCH64_LD_LO19_PCREL
6865*a9fa9459Szrj ENUMDOC
6866*a9fa9459Szrj   AArch64 Load Literal instruction, holding a 19 bit pc-relative word
6867*a9fa9459Szrj   offset.  The lowest two bits must be zero and are not stored in the
6868*a9fa9459Szrj   instruction, giving a 21 bit signed byte offset.
6869*a9fa9459Szrj ENUM
6870*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_LO21_PCREL
6871*a9fa9459Szrj ENUMDOC
6872*a9fa9459Szrj   AArch64 ADR instruction, holding a simple 21 bit pc-relative byte offset.
6873*a9fa9459Szrj ENUM
6874*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_HI21_PCREL
6875*a9fa9459Szrj ENUMDOC
6876*a9fa9459Szrj   AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
6877*a9fa9459Szrj   offset, giving a 4KB aligned page base address.
6878*a9fa9459Szrj ENUM
6879*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_HI21_NC_PCREL
6880*a9fa9459Szrj ENUMDOC
6881*a9fa9459Szrj   AArch64 ADRP instruction, with bits 12 to 32 of a pc-relative page
6882*a9fa9459Szrj   offset, giving a 4KB aligned page base address, but with no overflow
6883*a9fa9459Szrj   checking.
6884*a9fa9459Szrj ENUM
6885*a9fa9459Szrj   BFD_RELOC_AARCH64_ADD_LO12
6886*a9fa9459Szrj ENUMDOC
6887*a9fa9459Szrj   AArch64 ADD immediate instruction, holding bits 0 to 11 of the address.
6888*a9fa9459Szrj   Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6889*a9fa9459Szrj ENUM
6890*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST8_LO12
6891*a9fa9459Szrj ENUMDOC
6892*a9fa9459Szrj   AArch64 8-bit load/store instruction, holding bits 0 to 11 of the
6893*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6894*a9fa9459Szrj ENUM
6895*a9fa9459Szrj   BFD_RELOC_AARCH64_TSTBR14
6896*a9fa9459Szrj ENUMDOC
6897*a9fa9459Szrj   AArch64 14 bit pc-relative test bit and branch.
6898*a9fa9459Szrj   The lowest two bits must be zero and are not stored in the instruction,
6899*a9fa9459Szrj   giving a 16 bit signed byte offset.
6900*a9fa9459Szrj ENUM
6901*a9fa9459Szrj   BFD_RELOC_AARCH64_BRANCH19
6902*a9fa9459Szrj ENUMDOC
6903*a9fa9459Szrj   AArch64 19 bit pc-relative conditional branch and compare & branch.
6904*a9fa9459Szrj   The lowest two bits must be zero and are not stored in the instruction,
6905*a9fa9459Szrj   giving a 21 bit signed byte offset.
6906*a9fa9459Szrj ENUM
6907*a9fa9459Szrj   BFD_RELOC_AARCH64_JUMP26
6908*a9fa9459Szrj ENUMDOC
6909*a9fa9459Szrj   AArch64 26 bit pc-relative unconditional branch.
6910*a9fa9459Szrj   The lowest two bits must be zero and are not stored in the instruction,
6911*a9fa9459Szrj   giving a 28 bit signed byte offset.
6912*a9fa9459Szrj ENUM
6913*a9fa9459Szrj   BFD_RELOC_AARCH64_CALL26
6914*a9fa9459Szrj ENUMDOC
6915*a9fa9459Szrj   AArch64 26 bit pc-relative unconditional branch and link.
6916*a9fa9459Szrj   The lowest two bits must be zero and are not stored in the instruction,
6917*a9fa9459Szrj   giving a 28 bit signed byte offset.
6918*a9fa9459Szrj ENUM
6919*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST16_LO12
6920*a9fa9459Szrj ENUMDOC
6921*a9fa9459Szrj   AArch64 16-bit load/store instruction, holding bits 0 to 11 of the
6922*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6923*a9fa9459Szrj ENUM
6924*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST32_LO12
6925*a9fa9459Szrj ENUMDOC
6926*a9fa9459Szrj   AArch64 32-bit load/store instruction, holding bits 0 to 11 of the
6927*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6928*a9fa9459Szrj ENUM
6929*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST64_LO12
6930*a9fa9459Szrj ENUMDOC
6931*a9fa9459Szrj   AArch64 64-bit load/store instruction, holding bits 0 to 11 of the
6932*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6933*a9fa9459Szrj ENUM
6934*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST128_LO12
6935*a9fa9459Szrj ENUMDOC
6936*a9fa9459Szrj   AArch64 128-bit load/store instruction, holding bits 0 to 11 of the
6937*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
6938*a9fa9459Szrj ENUM
6939*a9fa9459Szrj   BFD_RELOC_AARCH64_GOT_LD_PREL19
6940*a9fa9459Szrj ENUMDOC
6941*a9fa9459Szrj   AArch64 Load Literal instruction, holding a 19 bit PC relative word
6942*a9fa9459Szrj   offset of the global offset table entry for a symbol.  The lowest two
6943*a9fa9459Szrj   bits must be zero and are not stored in the instruction, giving a 21
6944*a9fa9459Szrj   bit signed byte offset.  This relocation type requires signed overflow
6945*a9fa9459Szrj   checking.
6946*a9fa9459Szrj ENUM
6947*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_GOT_PAGE
6948*a9fa9459Szrj ENUMDOC
6949*a9fa9459Szrj   Get to the page base of the global offset table entry for a symbol as
6950*a9fa9459Szrj   part of an ADRP instruction using a 21 bit PC relative value.Used in
6951*a9fa9459Szrj   conjunction with BFD_RELOC_AARCH64_LD64_GOT_LO12_NC.
6952*a9fa9459Szrj ENUM
6953*a9fa9459Szrj   BFD_RELOC_AARCH64_LD64_GOT_LO12_NC
6954*a9fa9459Szrj ENUMDOC
6955*a9fa9459Szrj   Unsigned 12 bit byte offset for 64 bit load/store from the page of
6956*a9fa9459Szrj   the GOT entry for this symbol.  Used in conjunction with
6957*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in LP64 ABI only.
6958*a9fa9459Szrj ENUM
6959*a9fa9459Szrj   BFD_RELOC_AARCH64_LD32_GOT_LO12_NC
6960*a9fa9459Szrj ENUMDOC
6961*a9fa9459Szrj   Unsigned 12 bit byte offset for 32 bit load/store from the page of
6962*a9fa9459Szrj   the GOT entry for this symbol.  Used in conjunction with
6963*a9fa9459Szrj   BFD_RELOC_AARCH64_ADR_GOTPAGE.  Valid in ILP32 ABI only.
6964*a9fa9459Szrj  ENUM
6965*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
6966*a9fa9459Szrj ENUMDOC
6967*a9fa9459Szrj   Unsigned 16 bit byte offset for 64 bit load/store from the GOT entry
6968*a9fa9459Szrj   for this symbol.  Valid in LP64 ABI only.
6969*a9fa9459Szrj ENUM
6970*a9fa9459Szrj   BFD_RELOC_AARCH64_MOVW_GOTOFF_G1
6971*a9fa9459Szrj ENUMDOC
6972*a9fa9459Szrj   Unsigned 16 bit byte higher offset for 64 bit load/store from the GOT entry
6973*a9fa9459Szrj   for this symbol.  Valid in LP64 ABI only.
6974*a9fa9459Szrj ENUM
6975*a9fa9459Szrj   BFD_RELOC_AARCH64_LD64_GOTOFF_LO15
6976*a9fa9459Szrj ENUMDOC
6977*a9fa9459Szrj   Unsigned 15 bit byte offset for 64 bit load/store from the page of
6978*a9fa9459Szrj   the GOT entry for this symbol.  Valid in LP64 ABI only.
6979*a9fa9459Szrj ENUM
6980*a9fa9459Szrj   BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14
6981*a9fa9459Szrj ENUMDOC
6982*a9fa9459Szrj   Scaled 14 bit byte offset to the page base of the global offset table.
6983*a9fa9459Szrj ENUM
6984*a9fa9459Szrj   BFD_RELOC_AARCH64_LD64_GOTPAGE_LO15
6985*a9fa9459Szrj ENUMDOC
6986*a9fa9459Szrj   Scaled 15 bit byte offset to the page base of the global offset table.
6987*a9fa9459Szrj ENUM
6988*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21
6989*a9fa9459Szrj ENUMDOC
6990*a9fa9459Szrj   Get to the page base of the global offset table entry for a symbols
6991*a9fa9459Szrj   tls_index structure as part of an adrp instruction using a 21 bit PC
6992*a9fa9459Szrj   relative value.  Used in conjunction with
6993*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC.
6994*a9fa9459Szrj ENUM
6995*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_ADR_PREL21
6996*a9fa9459Szrj ENUMDOC
6997*a9fa9459Szrj   AArch64 TLS General Dynamic
6998*a9fa9459Szrj ENUM
6999*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_ADD_LO12_NC
7000*a9fa9459Szrj ENUMDOC
7001*a9fa9459Szrj   Unsigned 12 bit byte offset to global offset table entry for a symbols
7002*a9fa9459Szrj   tls_index structure.  Used in conjunction with
7003*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_ADR_PAGE21.
7004*a9fa9459Szrj ENUM
7005*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC
7006*a9fa9459Szrj ENUMDOC
7007*a9fa9459Szrj   AArch64 TLS General Dynamic relocation.
7008*a9fa9459Szrj ENUM
7009*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSGD_MOVW_G1
7010*a9fa9459Szrj ENUMDOC
7011*a9fa9459Szrj   AArch64 TLS General Dynamic relocation.
7012*a9fa9459Szrj ENUM
7013*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21
7014*a9fa9459Szrj ENUMDOC
7015*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7016*a9fa9459Szrj ENUM
7017*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC
7018*a9fa9459Szrj ENUMDOC
7019*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7020*a9fa9459Szrj ENUM
7021*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_LD32_GOTTPREL_LO12_NC
7022*a9fa9459Szrj ENUMDOC
7023*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7024*a9fa9459Szrj ENUM
7025*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_PREL19
7026*a9fa9459Szrj ENUMDOC
7027*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7028*a9fa9459Szrj ENUM
7029*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC
7030*a9fa9459Szrj ENUMDOC
7031*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7032*a9fa9459Szrj ENUM
7033*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1
7034*a9fa9459Szrj ENUMDOC
7035*a9fa9459Szrj   AArch64 TLS INITIAL EXEC relocation.
7036*a9fa9459Szrj ENUM
7037*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
7038*a9fa9459Szrj ENUMDOC
7039*a9fa9459Szrj   bit[23:12] of byte offset to module TLS base address.
7040*a9fa9459Szrj ENUM
7041*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12
7042*a9fa9459Szrj ENUMDOC
7043*a9fa9459Szrj   Unsigned 12 bit byte offset to module TLS base address.
7044*a9fa9459Szrj ENUM
7045*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12_NC
7046*a9fa9459Szrj ENUMDOC
7047*a9fa9459Szrj   No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12.
7048*a9fa9459Szrj ENUM
7049*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADD_LO12_NC
7050*a9fa9459Szrj ENUMDOC
7051*a9fa9459Szrj   Unsigned 12 bit byte offset to global offset table entry for a symbols
7052*a9fa9459Szrj   tls_index structure.  Used in conjunction with
7053*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21.
7054*a9fa9459Szrj ENUM
7055*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADR_PAGE21
7056*a9fa9459Szrj ENUMDOC
7057*a9fa9459Szrj   GOT entry page address for AArch64 TLS Local Dynamic, used with ADRP
7058*a9fa9459Szrj   instruction.
7059*a9fa9459Szrj ENUM
7060*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_ADR_PREL21
7061*a9fa9459Szrj ENUMDOC
7062*a9fa9459Szrj   GOT entry address for AArch64 TLS Local Dynamic, used with ADR instruction.
7063*a9fa9459Szrj ENUM
7064*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12
7065*a9fa9459Szrj ENUMDOC
7066*a9fa9459Szrj   bit[11:1] of byte offset to module TLS base address, encoded in ldst
7067*a9fa9459Szrj   instructions.
7068*a9fa9459Szrj ENUM
7069*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC
7070*a9fa9459Szrj ENUMDOC
7071*a9fa9459Szrj   Similar as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check.
7072*a9fa9459Szrj ENUM
7073*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12
7074*a9fa9459Szrj ENUMDOC
7075*a9fa9459Szrj   bit[11:2] of byte offset to module TLS base address, encoded in ldst
7076*a9fa9459Szrj   instructions.
7077*a9fa9459Szrj ENUM
7078*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC
7079*a9fa9459Szrj ENUMDOC
7080*a9fa9459Szrj   Similar as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check.
7081*a9fa9459Szrj ENUM
7082*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12
7083*a9fa9459Szrj ENUMDOC
7084*a9fa9459Szrj   bit[11:3] of byte offset to module TLS base address, encoded in ldst
7085*a9fa9459Szrj   instructions.
7086*a9fa9459Szrj ENUM
7087*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC
7088*a9fa9459Szrj ENUMDOC
7089*a9fa9459Szrj   Similar as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check.
7090*a9fa9459Szrj ENUM
7091*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12
7092*a9fa9459Szrj ENUMDOC
7093*a9fa9459Szrj   bit[11:0] of byte offset to module TLS base address, encoded in ldst
7094*a9fa9459Szrj   instructions.
7095*a9fa9459Szrj ENUM
7096*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC
7097*a9fa9459Szrj ENUMDOC
7098*a9fa9459Szrj   Similar as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check.
7099*a9fa9459Szrj ENUM
7100*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
7101*a9fa9459Szrj ENUMDOC
7102*a9fa9459Szrj   bit[15:0] of byte offset to module TLS base address.
7103*a9fa9459Szrj ENUM
7104*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
7105*a9fa9459Szrj ENUMDOC
7106*a9fa9459Szrj   No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
7107*a9fa9459Szrj ENUM
7108*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
7109*a9fa9459Szrj ENUMDOC
7110*a9fa9459Szrj   bit[31:16] of byte offset to module TLS base address.
7111*a9fa9459Szrj ENUM
7112*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
7113*a9fa9459Szrj ENUMDOC
7114*a9fa9459Szrj   No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
7115*a9fa9459Szrj ENUM
7116*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2
7117*a9fa9459Szrj ENUMDOC
7118*a9fa9459Szrj   bit[47:32] of byte offset to module TLS base address.
7119*a9fa9459Szrj ENUM
7120*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G2
7121*a9fa9459Szrj ENUMDOC
7122*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7123*a9fa9459Szrj ENUM
7124*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1
7125*a9fa9459Szrj ENUMDOC
7126*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7127*a9fa9459Szrj ENUM
7128*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G1_NC
7129*a9fa9459Szrj ENUMDOC
7130*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7131*a9fa9459Szrj ENUM
7132*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0
7133*a9fa9459Szrj ENUMDOC
7134*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7135*a9fa9459Szrj ENUM
7136*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0_NC
7137*a9fa9459Szrj ENUMDOC
7138*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7139*a9fa9459Szrj ENUM
7140*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_HI12
7141*a9fa9459Szrj ENUMDOC
7142*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7143*a9fa9459Szrj ENUM
7144*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12
7145*a9fa9459Szrj ENUMDOC
7146*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7147*a9fa9459Szrj ENUM
7148*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLE_ADD_TPREL_LO12_NC
7149*a9fa9459Szrj ENUMDOC
7150*a9fa9459Szrj   AArch64 TLS LOCAL EXEC relocation.
7151*a9fa9459Szrj ENUM
7152*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_LD_PREL19
7153*a9fa9459Szrj ENUMDOC
7154*a9fa9459Szrj   AArch64 TLS DESC relocation.
7155*a9fa9459Szrj ENUM
7156*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_ADR_PREL21
7157*a9fa9459Szrj ENUMDOC
7158*a9fa9459Szrj   AArch64 TLS DESC relocation.
7159*a9fa9459Szrj ENUM
7160*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_ADR_PAGE21
7161*a9fa9459Szrj ENUMDOC
7162*a9fa9459Szrj   AArch64 TLS DESC relocation.
7163*a9fa9459Szrj ENUM
7164*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_LD64_LO12_NC
7165*a9fa9459Szrj ENUMDOC
7166*a9fa9459Szrj   AArch64 TLS DESC relocation.
7167*a9fa9459Szrj ENUM
7168*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_LD32_LO12_NC
7169*a9fa9459Szrj ENUMDOC
7170*a9fa9459Szrj   AArch64 TLS DESC relocation.
7171*a9fa9459Szrj ENUM
7172*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_ADD_LO12_NC
7173*a9fa9459Szrj ENUMDOC
7174*a9fa9459Szrj   AArch64 TLS DESC relocation.
7175*a9fa9459Szrj ENUM
7176*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_OFF_G1
7177*a9fa9459Szrj ENUMDOC
7178*a9fa9459Szrj   AArch64 TLS DESC relocation.
7179*a9fa9459Szrj ENUM
7180*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC
7181*a9fa9459Szrj ENUMDOC
7182*a9fa9459Szrj   AArch64 TLS DESC relocation.
7183*a9fa9459Szrj ENUM
7184*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_LDR
7185*a9fa9459Szrj ENUMDOC
7186*a9fa9459Szrj   AArch64 TLS DESC relocation.
7187*a9fa9459Szrj ENUM
7188*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_ADD
7189*a9fa9459Szrj ENUMDOC
7190*a9fa9459Szrj   AArch64 TLS DESC relocation.
7191*a9fa9459Szrj ENUM
7192*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_CALL
7193*a9fa9459Szrj ENUMDOC
7194*a9fa9459Szrj   AArch64 TLS DESC relocation.
7195*a9fa9459Szrj ENUM
7196*a9fa9459Szrj   BFD_RELOC_AARCH64_COPY
7197*a9fa9459Szrj ENUMDOC
7198*a9fa9459Szrj   AArch64 TLS relocation.
7199*a9fa9459Szrj ENUM
7200*a9fa9459Szrj   BFD_RELOC_AARCH64_GLOB_DAT
7201*a9fa9459Szrj ENUMDOC
7202*a9fa9459Szrj   AArch64 TLS relocation.
7203*a9fa9459Szrj ENUM
7204*a9fa9459Szrj   BFD_RELOC_AARCH64_JUMP_SLOT
7205*a9fa9459Szrj ENUMDOC
7206*a9fa9459Szrj   AArch64 TLS relocation.
7207*a9fa9459Szrj ENUM
7208*a9fa9459Szrj   BFD_RELOC_AARCH64_RELATIVE
7209*a9fa9459Szrj ENUMDOC
7210*a9fa9459Szrj   AArch64 TLS relocation.
7211*a9fa9459Szrj ENUM
7212*a9fa9459Szrj   BFD_RELOC_AARCH64_TLS_DTPMOD
7213*a9fa9459Szrj ENUMDOC
7214*a9fa9459Szrj   AArch64 TLS relocation.
7215*a9fa9459Szrj ENUM
7216*a9fa9459Szrj   BFD_RELOC_AARCH64_TLS_DTPREL
7217*a9fa9459Szrj ENUMDOC
7218*a9fa9459Szrj   AArch64 TLS relocation.
7219*a9fa9459Szrj ENUM
7220*a9fa9459Szrj   BFD_RELOC_AARCH64_TLS_TPREL
7221*a9fa9459Szrj ENUMDOC
7222*a9fa9459Szrj   AArch64 TLS relocation.
7223*a9fa9459Szrj ENUM
7224*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC
7225*a9fa9459Szrj ENUMDOC
7226*a9fa9459Szrj   AArch64 TLS relocation.
7227*a9fa9459Szrj ENUM
7228*a9fa9459Szrj   BFD_RELOC_AARCH64_IRELATIVE
7229*a9fa9459Szrj ENUMDOC
7230*a9fa9459Szrj   AArch64 support for STT_GNU_IFUNC.
7231*a9fa9459Szrj ENUM
7232*a9fa9459Szrj   BFD_RELOC_AARCH64_RELOC_END
7233*a9fa9459Szrj ENUMDOC
7234*a9fa9459Szrj   AArch64 pseudo relocation code to mark the end of the AArch64
7235*a9fa9459Szrj   relocation enumerators that have direct mapping to ELF reloc codes.
7236*a9fa9459Szrj   There are a few more enumerators after this one; those are mainly
7237*a9fa9459Szrj   used by the AArch64 assembler for the internal fixup or to select
7238*a9fa9459Szrj   one of the above enumerators.
7239*a9fa9459Szrj ENUM
7240*a9fa9459Szrj   BFD_RELOC_AARCH64_GAS_INTERNAL_FIXUP
7241*a9fa9459Szrj ENUMDOC
7242*a9fa9459Szrj   AArch64 pseudo relocation code to be used internally by the AArch64
7243*a9fa9459Szrj   assembler and not (currently) written to any object files.
7244*a9fa9459Szrj ENUM
7245*a9fa9459Szrj   BFD_RELOC_AARCH64_LDST_LO12
7246*a9fa9459Szrj ENUMDOC
7247*a9fa9459Szrj   AArch64 unspecified load/store instruction, holding bits 0 to 11 of the
7248*a9fa9459Szrj   address.  Used in conjunction with BFD_RELOC_AARCH64_ADR_HI21_PCREL.
7249*a9fa9459Szrj ENUM
7250*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12
7251*a9fa9459Szrj ENUMDOC
7252*a9fa9459Szrj   AArch64 pseudo relocation code for TLS local dynamic mode.  It's to be
7253*a9fa9459Szrj   used internally by the AArch64 assembler and not (currently) written to
7254*a9fa9459Szrj   any object files.
7255*a9fa9459Szrj ENUM
7256*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12_NC
7257*a9fa9459Szrj ENUMDOC
7258*a9fa9459Szrj   Similar as BFD_RELOC_AARCH64_TLSLD_LDST_DTPREL_LO12, but no overflow check.
7259*a9fa9459Szrj ENUM
7260*a9fa9459Szrj   BFD_RELOC_AARCH64_LD_GOT_LO12_NC
7261*a9fa9459Szrj ENUMDOC
7262*a9fa9459Szrj   AArch64 pseudo relocation code to be used internally by the AArch64
7263*a9fa9459Szrj   assembler and not (currently) written to any object files.
7264*a9fa9459Szrj ENUM
7265*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSIE_LD_GOTTPREL_LO12_NC
7266*a9fa9459Szrj ENUMDOC
7267*a9fa9459Szrj   AArch64 pseudo relocation code to be used internally by the AArch64
7268*a9fa9459Szrj   assembler and not (currently) written to any object files.
7269*a9fa9459Szrj ENUM
7270*a9fa9459Szrj   BFD_RELOC_AARCH64_TLSDESC_LD_LO12_NC
7271*a9fa9459Szrj ENUMDOC
7272*a9fa9459Szrj   AArch64 pseudo relocation code to be used internally by the AArch64
7273*a9fa9459Szrj   assembler and not (currently) written to any object files.
7274*a9fa9459Szrj ENUM
7275*a9fa9459Szrj   BFD_RELOC_TILEPRO_COPY
7276*a9fa9459Szrj ENUMX
7277*a9fa9459Szrj   BFD_RELOC_TILEPRO_GLOB_DAT
7278*a9fa9459Szrj ENUMX
7279*a9fa9459Szrj   BFD_RELOC_TILEPRO_JMP_SLOT
7280*a9fa9459Szrj ENUMX
7281*a9fa9459Szrj   BFD_RELOC_TILEPRO_RELATIVE
7282*a9fa9459Szrj ENUMX
7283*a9fa9459Szrj   BFD_RELOC_TILEPRO_BROFF_X1
7284*a9fa9459Szrj ENUMX
7285*a9fa9459Szrj   BFD_RELOC_TILEPRO_JOFFLONG_X1
7286*a9fa9459Szrj ENUMX
7287*a9fa9459Szrj   BFD_RELOC_TILEPRO_JOFFLONG_X1_PLT
7288*a9fa9459Szrj ENUMX
7289*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_X0
7290*a9fa9459Szrj ENUMX
7291*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_Y0
7292*a9fa9459Szrj ENUMX
7293*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_X1
7294*a9fa9459Szrj ENUMX
7295*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_Y1
7296*a9fa9459Szrj ENUMX
7297*a9fa9459Szrj   BFD_RELOC_TILEPRO_DEST_IMM8_X1
7298*a9fa9459Szrj ENUMX
7299*a9fa9459Szrj   BFD_RELOC_TILEPRO_MT_IMM15_X1
7300*a9fa9459Szrj ENUMX
7301*a9fa9459Szrj   BFD_RELOC_TILEPRO_MF_IMM15_X1
7302*a9fa9459Szrj ENUMX
7303*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0
7304*a9fa9459Szrj ENUMX
7305*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1
7306*a9fa9459Szrj ENUMX
7307*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_LO
7308*a9fa9459Szrj ENUMX
7309*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_LO
7310*a9fa9459Szrj ENUMX
7311*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_HI
7312*a9fa9459Szrj ENUMX
7313*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_HI
7314*a9fa9459Szrj ENUMX
7315*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_HA
7316*a9fa9459Szrj ENUMX
7317*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_HA
7318*a9fa9459Szrj ENUMX
7319*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_PCREL
7320*a9fa9459Szrj ENUMX
7321*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_PCREL
7322*a9fa9459Szrj ENUMX
7323*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_LO_PCREL
7324*a9fa9459Szrj ENUMX
7325*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_LO_PCREL
7326*a9fa9459Szrj ENUMX
7327*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_HI_PCREL
7328*a9fa9459Szrj ENUMX
7329*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_HI_PCREL
7330*a9fa9459Szrj ENUMX
7331*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_HA_PCREL
7332*a9fa9459Szrj ENUMX
7333*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_HA_PCREL
7334*a9fa9459Szrj ENUMX
7335*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_GOT
7336*a9fa9459Szrj ENUMX
7337*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_GOT
7338*a9fa9459Szrj ENUMX
7339*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO
7340*a9fa9459Szrj ENUMX
7341*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO
7342*a9fa9459Szrj ENUMX
7343*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI
7344*a9fa9459Szrj ENUMX
7345*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI
7346*a9fa9459Szrj ENUMX
7347*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA
7348*a9fa9459Szrj ENUMX
7349*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA
7350*a9fa9459Szrj ENUMX
7351*a9fa9459Szrj   BFD_RELOC_TILEPRO_MMSTART_X0
7352*a9fa9459Szrj ENUMX
7353*a9fa9459Szrj   BFD_RELOC_TILEPRO_MMEND_X0
7354*a9fa9459Szrj ENUMX
7355*a9fa9459Szrj   BFD_RELOC_TILEPRO_MMSTART_X1
7356*a9fa9459Szrj ENUMX
7357*a9fa9459Szrj   BFD_RELOC_TILEPRO_MMEND_X1
7358*a9fa9459Szrj ENUMX
7359*a9fa9459Szrj   BFD_RELOC_TILEPRO_SHAMT_X0
7360*a9fa9459Szrj ENUMX
7361*a9fa9459Szrj   BFD_RELOC_TILEPRO_SHAMT_X1
7362*a9fa9459Szrj ENUMX
7363*a9fa9459Szrj   BFD_RELOC_TILEPRO_SHAMT_Y0
7364*a9fa9459Szrj ENUMX
7365*a9fa9459Szrj   BFD_RELOC_TILEPRO_SHAMT_Y1
7366*a9fa9459Szrj ENUMX
7367*a9fa9459Szrj   BFD_RELOC_TILEPRO_TLS_GD_CALL
7368*a9fa9459Szrj ENUMX
7369*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD
7370*a9fa9459Szrj ENUMX
7371*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD
7372*a9fa9459Szrj ENUMX
7373*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD
7374*a9fa9459Szrj ENUMX
7375*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD
7376*a9fa9459Szrj ENUMX
7377*a9fa9459Szrj   BFD_RELOC_TILEPRO_TLS_IE_LOAD
7378*a9fa9459Szrj ENUMX
7379*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD
7380*a9fa9459Szrj ENUMX
7381*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD
7382*a9fa9459Szrj ENUMX
7383*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO
7384*a9fa9459Szrj ENUMX
7385*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO
7386*a9fa9459Szrj ENUMX
7387*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI
7388*a9fa9459Szrj ENUMX
7389*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI
7390*a9fa9459Szrj ENUMX
7391*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA
7392*a9fa9459Szrj ENUMX
7393*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA
7394*a9fa9459Szrj ENUMX
7395*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE
7396*a9fa9459Szrj ENUMX
7397*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE
7398*a9fa9459Szrj ENUMX
7399*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO
7400*a9fa9459Szrj ENUMX
7401*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO
7402*a9fa9459Szrj ENUMX
7403*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI
7404*a9fa9459Szrj ENUMX
7405*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI
7406*a9fa9459Szrj ENUMX
7407*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA
7408*a9fa9459Szrj ENUMX
7409*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA
7410*a9fa9459Szrj ENUMX
7411*a9fa9459Szrj   BFD_RELOC_TILEPRO_TLS_DTPMOD32
7412*a9fa9459Szrj ENUMX
7413*a9fa9459Szrj   BFD_RELOC_TILEPRO_TLS_DTPOFF32
7414*a9fa9459Szrj ENUMX
7415*a9fa9459Szrj   BFD_RELOC_TILEPRO_TLS_TPOFF32
7416*a9fa9459Szrj ENUMX
7417*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE
7418*a9fa9459Szrj ENUMX
7419*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE
7420*a9fa9459Szrj ENUMX
7421*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO
7422*a9fa9459Szrj ENUMX
7423*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO
7424*a9fa9459Szrj ENUMX
7425*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI
7426*a9fa9459Szrj ENUMX
7427*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI
7428*a9fa9459Szrj ENUMX
7429*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA
7430*a9fa9459Szrj ENUMX
7431*a9fa9459Szrj   BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA
7432*a9fa9459Szrj ENUMDOC
7433*a9fa9459Szrj   Tilera TILEPro Relocations.
7434*a9fa9459Szrj ENUM
7435*a9fa9459Szrj   BFD_RELOC_TILEGX_HW0
7436*a9fa9459Szrj ENUMX
7437*a9fa9459Szrj   BFD_RELOC_TILEGX_HW1
7438*a9fa9459Szrj ENUMX
7439*a9fa9459Szrj   BFD_RELOC_TILEGX_HW2
7440*a9fa9459Szrj ENUMX
7441*a9fa9459Szrj   BFD_RELOC_TILEGX_HW3
7442*a9fa9459Szrj ENUMX
7443*a9fa9459Szrj   BFD_RELOC_TILEGX_HW0_LAST
7444*a9fa9459Szrj ENUMX
7445*a9fa9459Szrj   BFD_RELOC_TILEGX_HW1_LAST
7446*a9fa9459Szrj ENUMX
7447*a9fa9459Szrj   BFD_RELOC_TILEGX_HW2_LAST
7448*a9fa9459Szrj ENUMX
7449*a9fa9459Szrj   BFD_RELOC_TILEGX_COPY
7450*a9fa9459Szrj ENUMX
7451*a9fa9459Szrj   BFD_RELOC_TILEGX_GLOB_DAT
7452*a9fa9459Szrj ENUMX
7453*a9fa9459Szrj   BFD_RELOC_TILEGX_JMP_SLOT
7454*a9fa9459Szrj ENUMX
7455*a9fa9459Szrj   BFD_RELOC_TILEGX_RELATIVE
7456*a9fa9459Szrj ENUMX
7457*a9fa9459Szrj   BFD_RELOC_TILEGX_BROFF_X1
7458*a9fa9459Szrj ENUMX
7459*a9fa9459Szrj   BFD_RELOC_TILEGX_JUMPOFF_X1
7460*a9fa9459Szrj ENUMX
7461*a9fa9459Szrj   BFD_RELOC_TILEGX_JUMPOFF_X1_PLT
7462*a9fa9459Szrj ENUMX
7463*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X0
7464*a9fa9459Szrj ENUMX
7465*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y0
7466*a9fa9459Szrj ENUMX
7467*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X1
7468*a9fa9459Szrj ENUMX
7469*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y1
7470*a9fa9459Szrj ENUMX
7471*a9fa9459Szrj   BFD_RELOC_TILEGX_DEST_IMM8_X1
7472*a9fa9459Szrj ENUMX
7473*a9fa9459Szrj   BFD_RELOC_TILEGX_MT_IMM14_X1
7474*a9fa9459Szrj ENUMX
7475*a9fa9459Szrj   BFD_RELOC_TILEGX_MF_IMM14_X1
7476*a9fa9459Szrj ENUMX
7477*a9fa9459Szrj   BFD_RELOC_TILEGX_MMSTART_X0
7478*a9fa9459Szrj ENUMX
7479*a9fa9459Szrj   BFD_RELOC_TILEGX_MMEND_X0
7480*a9fa9459Szrj ENUMX
7481*a9fa9459Szrj   BFD_RELOC_TILEGX_SHAMT_X0
7482*a9fa9459Szrj ENUMX
7483*a9fa9459Szrj   BFD_RELOC_TILEGX_SHAMT_X1
7484*a9fa9459Szrj ENUMX
7485*a9fa9459Szrj   BFD_RELOC_TILEGX_SHAMT_Y0
7486*a9fa9459Szrj ENUMX
7487*a9fa9459Szrj   BFD_RELOC_TILEGX_SHAMT_Y1
7488*a9fa9459Szrj ENUMX
7489*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0
7490*a9fa9459Szrj ENUMX
7491*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0
7492*a9fa9459Szrj ENUMX
7493*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1
7494*a9fa9459Szrj ENUMX
7495*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1
7496*a9fa9459Szrj ENUMX
7497*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2
7498*a9fa9459Szrj ENUMX
7499*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2
7500*a9fa9459Szrj ENUMX
7501*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW3
7502*a9fa9459Szrj ENUMX
7503*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW3
7504*a9fa9459Szrj ENUMX
7505*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST
7506*a9fa9459Szrj ENUMX
7507*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST
7508*a9fa9459Szrj ENUMX
7509*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST
7510*a9fa9459Szrj ENUMX
7511*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST
7512*a9fa9459Szrj ENUMX
7513*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST
7514*a9fa9459Szrj ENUMX
7515*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST
7516*a9fa9459Szrj ENUMX
7517*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL
7518*a9fa9459Szrj ENUMX
7519*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL
7520*a9fa9459Szrj ENUMX
7521*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL
7522*a9fa9459Szrj ENUMX
7523*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL
7524*a9fa9459Szrj ENUMX
7525*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL
7526*a9fa9459Szrj ENUMX
7527*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL
7528*a9fa9459Szrj ENUMX
7529*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL
7530*a9fa9459Szrj ENUMX
7531*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL
7532*a9fa9459Szrj ENUMX
7533*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL
7534*a9fa9459Szrj ENUMX
7535*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL
7536*a9fa9459Szrj ENUMX
7537*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL
7538*a9fa9459Szrj ENUMX
7539*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL
7540*a9fa9459Szrj ENUMX
7541*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL
7542*a9fa9459Szrj ENUMX
7543*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL
7544*a9fa9459Szrj ENUMX
7545*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT
7546*a9fa9459Szrj ENUMX
7547*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT
7548*a9fa9459Szrj ENUMX
7549*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL
7550*a9fa9459Szrj ENUMX
7551*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL
7552*a9fa9459Szrj ENUMX
7553*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL
7554*a9fa9459Szrj ENUMX
7555*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL
7556*a9fa9459Szrj ENUMX
7557*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL
7558*a9fa9459Szrj ENUMX
7559*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL
7560*a9fa9459Szrj ENUMX
7561*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT
7562*a9fa9459Szrj ENUMX
7563*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT
7564*a9fa9459Szrj ENUMX
7565*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT
7566*a9fa9459Szrj ENUMX
7567*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT
7568*a9fa9459Szrj ENUMX
7569*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL
7570*a9fa9459Szrj ENUMX
7571*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL
7572*a9fa9459Szrj ENUMX
7573*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD
7574*a9fa9459Szrj ENUMX
7575*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD
7576*a9fa9459Szrj ENUMX
7577*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE
7578*a9fa9459Szrj ENUMX
7579*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE
7580*a9fa9459Szrj ENUMX
7581*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE
7582*a9fa9459Szrj ENUMX
7583*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE
7584*a9fa9459Szrj ENUMX
7585*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE
7586*a9fa9459Szrj ENUMX
7587*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE
7588*a9fa9459Szrj ENUMX
7589*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD
7590*a9fa9459Szrj ENUMX
7591*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD
7592*a9fa9459Szrj ENUMX
7593*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD
7594*a9fa9459Szrj ENUMX
7595*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD
7596*a9fa9459Szrj ENUMX
7597*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE
7598*a9fa9459Szrj ENUMX
7599*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE
7600*a9fa9459Szrj ENUMX
7601*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL
7602*a9fa9459Szrj ENUMX
7603*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL
7604*a9fa9459Szrj ENUMX
7605*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL
7606*a9fa9459Szrj ENUMX
7607*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL
7608*a9fa9459Szrj ENUMX
7609*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL
7610*a9fa9459Szrj ENUMX
7611*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL
7612*a9fa9459Szrj ENUMX
7613*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE
7614*a9fa9459Szrj ENUMX
7615*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE
7616*a9fa9459Szrj ENUMX
7617*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE
7618*a9fa9459Szrj ENUMX
7619*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE
7620*a9fa9459Szrj ENUMX
7621*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_DTPMOD64
7622*a9fa9459Szrj ENUMX
7623*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_DTPOFF64
7624*a9fa9459Szrj ENUMX
7625*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_TPOFF64
7626*a9fa9459Szrj ENUMX
7627*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_DTPMOD32
7628*a9fa9459Szrj ENUMX
7629*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_DTPOFF32
7630*a9fa9459Szrj ENUMX
7631*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_TPOFF32
7632*a9fa9459Szrj ENUMX
7633*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_GD_CALL
7634*a9fa9459Szrj ENUMX
7635*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD
7636*a9fa9459Szrj ENUMX
7637*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD
7638*a9fa9459Szrj ENUMX
7639*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD
7640*a9fa9459Szrj ENUMX
7641*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD
7642*a9fa9459Szrj ENUMX
7643*a9fa9459Szrj   BFD_RELOC_TILEGX_TLS_IE_LOAD
7644*a9fa9459Szrj ENUMX
7645*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD
7646*a9fa9459Szrj ENUMX
7647*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD
7648*a9fa9459Szrj ENUMX
7649*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD
7650*a9fa9459Szrj ENUMX
7651*a9fa9459Szrj   BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD
7652*a9fa9459Szrj ENUMDOC
7653*a9fa9459Szrj   Tilera TILE-Gx Relocations.
7654*a9fa9459Szrj 
7655*a9fa9459Szrj ENUM
7656*a9fa9459Szrj   BFD_RELOC_EPIPHANY_SIMM8
7657*a9fa9459Szrj ENUMDOC
7658*a9fa9459Szrj   Adapteva EPIPHANY - 8 bit signed pc-relative displacement
7659*a9fa9459Szrj ENUM
7660*a9fa9459Szrj   BFD_RELOC_EPIPHANY_SIMM24
7661*a9fa9459Szrj ENUMDOC
7662*a9fa9459Szrj   Adapteva EPIPHANY - 24 bit signed pc-relative displacement
7663*a9fa9459Szrj ENUM
7664*a9fa9459Szrj   BFD_RELOC_EPIPHANY_HIGH
7665*a9fa9459Szrj ENUMDOC
7666*a9fa9459Szrj   Adapteva EPIPHANY - 16 most-significant bits of absolute address
7667*a9fa9459Szrj ENUM
7668*a9fa9459Szrj   BFD_RELOC_EPIPHANY_LOW
7669*a9fa9459Szrj ENUMDOC
7670*a9fa9459Szrj   Adapteva EPIPHANY - 16 least-significant bits of absolute address
7671*a9fa9459Szrj ENUM
7672*a9fa9459Szrj   BFD_RELOC_EPIPHANY_SIMM11
7673*a9fa9459Szrj ENUMDOC
7674*a9fa9459Szrj   Adapteva EPIPHANY - 11 bit signed number - add/sub immediate
7675*a9fa9459Szrj ENUM
7676*a9fa9459Szrj   BFD_RELOC_EPIPHANY_IMM11
7677*a9fa9459Szrj ENUMDOC
7678*a9fa9459Szrj   Adapteva EPIPHANY - 11 bit sign-magnitude number (ld/st displacement)
7679*a9fa9459Szrj ENUM
7680*a9fa9459Szrj   BFD_RELOC_EPIPHANY_IMM8
7681*a9fa9459Szrj ENUMDOC
7682*a9fa9459Szrj   Adapteva EPIPHANY - 8 bit immediate for 16 bit mov instruction.
7683*a9fa9459Szrj 
7684*a9fa9459Szrj ENUM
7685*a9fa9459Szrj   BFD_RELOC_VISIUM_HI16
7686*a9fa9459Szrj ENUMX
7687*a9fa9459Szrj   BFD_RELOC_VISIUM_LO16
7688*a9fa9459Szrj ENUMX
7689*a9fa9459Szrj   BFD_RELOC_VISIUM_IM16
7690*a9fa9459Szrj ENUMX
7691*a9fa9459Szrj   BFD_RELOC_VISIUM_REL16
7692*a9fa9459Szrj ENUMX
7693*a9fa9459Szrj   BFD_RELOC_VISIUM_HI16_PCREL
7694*a9fa9459Szrj ENUMX
7695*a9fa9459Szrj   BFD_RELOC_VISIUM_LO16_PCREL
7696*a9fa9459Szrj ENUMX
7697*a9fa9459Szrj   BFD_RELOC_VISIUM_IM16_PCREL
7698*a9fa9459Szrj ENUMDOC
7699*a9fa9459Szrj   Visium Relocations.
7700*a9fa9459Szrj 
7701*a9fa9459Szrj ENDSENUM
7702*a9fa9459Szrj   BFD_RELOC_UNUSED
7703*a9fa9459Szrj CODE_FRAGMENT
7704*a9fa9459Szrj .
7705*a9fa9459Szrj .typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
7706*a9fa9459Szrj */
7707*a9fa9459Szrj 
7708*a9fa9459Szrj /*
7709*a9fa9459Szrj FUNCTION
7710*a9fa9459Szrj 	bfd_reloc_type_lookup
7711*a9fa9459Szrj 	bfd_reloc_name_lookup
7712*a9fa9459Szrj 
7713*a9fa9459Szrj SYNOPSIS
7714*a9fa9459Szrj 	reloc_howto_type *bfd_reloc_type_lookup
7715*a9fa9459Szrj 	  (bfd *abfd, bfd_reloc_code_real_type code);
7716*a9fa9459Szrj 	reloc_howto_type *bfd_reloc_name_lookup
7717*a9fa9459Szrj 	  (bfd *abfd, const char *reloc_name);
7718*a9fa9459Szrj 
7719*a9fa9459Szrj DESCRIPTION
7720*a9fa9459Szrj 	Return a pointer to a howto structure which, when
7721*a9fa9459Szrj 	invoked, will perform the relocation @var{code} on data from the
7722*a9fa9459Szrj 	architecture noted.
7723*a9fa9459Szrj 
7724*a9fa9459Szrj */
7725*a9fa9459Szrj 
7726*a9fa9459Szrj reloc_howto_type *
bfd_reloc_type_lookup(bfd * abfd,bfd_reloc_code_real_type code)7727*a9fa9459Szrj bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
7728*a9fa9459Szrj {
7729*a9fa9459Szrj   return BFD_SEND (abfd, reloc_type_lookup, (abfd, code));
7730*a9fa9459Szrj }
7731*a9fa9459Szrj 
7732*a9fa9459Szrj reloc_howto_type *
bfd_reloc_name_lookup(bfd * abfd,const char * reloc_name)7733*a9fa9459Szrj bfd_reloc_name_lookup (bfd *abfd, const char *reloc_name)
7734*a9fa9459Szrj {
7735*a9fa9459Szrj   return BFD_SEND (abfd, reloc_name_lookup, (abfd, reloc_name));
7736*a9fa9459Szrj }
7737*a9fa9459Szrj 
7738*a9fa9459Szrj static reloc_howto_type bfd_howto_32 =
7739*a9fa9459Szrj HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_dont, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE);
7740*a9fa9459Szrj 
7741*a9fa9459Szrj /*
7742*a9fa9459Szrj INTERNAL_FUNCTION
7743*a9fa9459Szrj 	bfd_default_reloc_type_lookup
7744*a9fa9459Szrj 
7745*a9fa9459Szrj SYNOPSIS
7746*a9fa9459Szrj 	reloc_howto_type *bfd_default_reloc_type_lookup
7747*a9fa9459Szrj 	  (bfd *abfd, bfd_reloc_code_real_type  code);
7748*a9fa9459Szrj 
7749*a9fa9459Szrj DESCRIPTION
7750*a9fa9459Szrj 	Provides a default relocation lookup routine for any architecture.
7751*a9fa9459Szrj 
7752*a9fa9459Szrj */
7753*a9fa9459Szrj 
7754*a9fa9459Szrj reloc_howto_type *
bfd_default_reloc_type_lookup(bfd * abfd,bfd_reloc_code_real_type code)7755*a9fa9459Szrj bfd_default_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
7756*a9fa9459Szrj {
7757*a9fa9459Szrj   switch (code)
7758*a9fa9459Szrj     {
7759*a9fa9459Szrj     case BFD_RELOC_CTOR:
7760*a9fa9459Szrj       /* The type of reloc used in a ctor, which will be as wide as the
7761*a9fa9459Szrj 	 address - so either a 64, 32, or 16 bitter.  */
7762*a9fa9459Szrj       switch (bfd_arch_bits_per_address (abfd))
7763*a9fa9459Szrj 	{
7764*a9fa9459Szrj 	case 64:
7765*a9fa9459Szrj 	  BFD_FAIL ();
7766*a9fa9459Szrj 	case 32:
7767*a9fa9459Szrj 	  return &bfd_howto_32;
7768*a9fa9459Szrj 	case 16:
7769*a9fa9459Szrj 	  BFD_FAIL ();
7770*a9fa9459Szrj 	default:
7771*a9fa9459Szrj 	  BFD_FAIL ();
7772*a9fa9459Szrj 	}
7773*a9fa9459Szrj     default:
7774*a9fa9459Szrj       BFD_FAIL ();
7775*a9fa9459Szrj     }
7776*a9fa9459Szrj   return NULL;
7777*a9fa9459Szrj }
7778*a9fa9459Szrj 
7779*a9fa9459Szrj /*
7780*a9fa9459Szrj FUNCTION
7781*a9fa9459Szrj 	bfd_get_reloc_code_name
7782*a9fa9459Szrj 
7783*a9fa9459Szrj SYNOPSIS
7784*a9fa9459Szrj 	const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
7785*a9fa9459Szrj 
7786*a9fa9459Szrj DESCRIPTION
7787*a9fa9459Szrj 	Provides a printable name for the supplied relocation code.
7788*a9fa9459Szrj 	Useful mainly for printing error messages.
7789*a9fa9459Szrj */
7790*a9fa9459Szrj 
7791*a9fa9459Szrj const char *
bfd_get_reloc_code_name(bfd_reloc_code_real_type code)7792*a9fa9459Szrj bfd_get_reloc_code_name (bfd_reloc_code_real_type code)
7793*a9fa9459Szrj {
7794*a9fa9459Szrj   if (code > BFD_RELOC_UNUSED)
7795*a9fa9459Szrj     return 0;
7796*a9fa9459Szrj   return bfd_reloc_code_real_names[code];
7797*a9fa9459Szrj }
7798*a9fa9459Szrj 
7799*a9fa9459Szrj /*
7800*a9fa9459Szrj INTERNAL_FUNCTION
7801*a9fa9459Szrj 	bfd_generic_relax_section
7802*a9fa9459Szrj 
7803*a9fa9459Szrj SYNOPSIS
7804*a9fa9459Szrj 	bfd_boolean bfd_generic_relax_section
7805*a9fa9459Szrj 	  (bfd *abfd,
7806*a9fa9459Szrj 	   asection *section,
7807*a9fa9459Szrj 	   struct bfd_link_info *,
7808*a9fa9459Szrj 	   bfd_boolean *);
7809*a9fa9459Szrj 
7810*a9fa9459Szrj DESCRIPTION
7811*a9fa9459Szrj 	Provides default handling for relaxing for back ends which
7812*a9fa9459Szrj 	don't do relaxing.
7813*a9fa9459Szrj */
7814*a9fa9459Szrj 
7815*a9fa9459Szrj bfd_boolean
bfd_generic_relax_section(bfd * abfd ATTRIBUTE_UNUSED,asection * section ATTRIBUTE_UNUSED,struct bfd_link_info * link_info ATTRIBUTE_UNUSED,bfd_boolean * again)7816*a9fa9459Szrj bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED,
7817*a9fa9459Szrj 			   asection *section ATTRIBUTE_UNUSED,
7818*a9fa9459Szrj 			   struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
7819*a9fa9459Szrj 			   bfd_boolean *again)
7820*a9fa9459Szrj {
7821*a9fa9459Szrj   if (bfd_link_relocatable (link_info))
7822*a9fa9459Szrj     (*link_info->callbacks->einfo)
7823*a9fa9459Szrj       (_("%P%F: --relax and -r may not be used together\n"));
7824*a9fa9459Szrj 
7825*a9fa9459Szrj   *again = FALSE;
7826*a9fa9459Szrj   return TRUE;
7827*a9fa9459Szrj }
7828*a9fa9459Szrj 
7829*a9fa9459Szrj /*
7830*a9fa9459Szrj INTERNAL_FUNCTION
7831*a9fa9459Szrj 	bfd_generic_gc_sections
7832*a9fa9459Szrj 
7833*a9fa9459Szrj SYNOPSIS
7834*a9fa9459Szrj 	bfd_boolean bfd_generic_gc_sections
7835*a9fa9459Szrj 	  (bfd *, struct bfd_link_info *);
7836*a9fa9459Szrj 
7837*a9fa9459Szrj DESCRIPTION
7838*a9fa9459Szrj 	Provides default handling for relaxing for back ends which
7839*a9fa9459Szrj 	don't do section gc -- i.e., does nothing.
7840*a9fa9459Szrj */
7841*a9fa9459Szrj 
7842*a9fa9459Szrj bfd_boolean
bfd_generic_gc_sections(bfd * abfd ATTRIBUTE_UNUSED,struct bfd_link_info * info ATTRIBUTE_UNUSED)7843*a9fa9459Szrj bfd_generic_gc_sections (bfd *abfd ATTRIBUTE_UNUSED,
7844*a9fa9459Szrj 			 struct bfd_link_info *info ATTRIBUTE_UNUSED)
7845*a9fa9459Szrj {
7846*a9fa9459Szrj   return TRUE;
7847*a9fa9459Szrj }
7848*a9fa9459Szrj 
7849*a9fa9459Szrj /*
7850*a9fa9459Szrj INTERNAL_FUNCTION
7851*a9fa9459Szrj 	bfd_generic_lookup_section_flags
7852*a9fa9459Szrj 
7853*a9fa9459Szrj SYNOPSIS
7854*a9fa9459Szrj 	bfd_boolean bfd_generic_lookup_section_flags
7855*a9fa9459Szrj 	  (struct bfd_link_info *, struct flag_info *, asection *);
7856*a9fa9459Szrj 
7857*a9fa9459Szrj DESCRIPTION
7858*a9fa9459Szrj 	Provides default handling for section flags lookup
7859*a9fa9459Szrj 	-- i.e., does nothing.
7860*a9fa9459Szrj 	Returns FALSE if the section should be omitted, otherwise TRUE.
7861*a9fa9459Szrj */
7862*a9fa9459Szrj 
7863*a9fa9459Szrj bfd_boolean
bfd_generic_lookup_section_flags(struct bfd_link_info * info ATTRIBUTE_UNUSED,struct flag_info * flaginfo,asection * section ATTRIBUTE_UNUSED)7864*a9fa9459Szrj bfd_generic_lookup_section_flags (struct bfd_link_info *info ATTRIBUTE_UNUSED,
7865*a9fa9459Szrj 				  struct flag_info *flaginfo,
7866*a9fa9459Szrj 				  asection *section ATTRIBUTE_UNUSED)
7867*a9fa9459Szrj {
7868*a9fa9459Szrj   if (flaginfo != NULL)
7869*a9fa9459Szrj     {
7870*a9fa9459Szrj       (*_bfd_error_handler) (_("INPUT_SECTION_FLAGS are not supported.\n"));
7871*a9fa9459Szrj       return FALSE;
7872*a9fa9459Szrj     }
7873*a9fa9459Szrj   return TRUE;
7874*a9fa9459Szrj }
7875*a9fa9459Szrj 
7876*a9fa9459Szrj /*
7877*a9fa9459Szrj INTERNAL_FUNCTION
7878*a9fa9459Szrj 	bfd_generic_merge_sections
7879*a9fa9459Szrj 
7880*a9fa9459Szrj SYNOPSIS
7881*a9fa9459Szrj 	bfd_boolean bfd_generic_merge_sections
7882*a9fa9459Szrj 	  (bfd *, struct bfd_link_info *);
7883*a9fa9459Szrj 
7884*a9fa9459Szrj DESCRIPTION
7885*a9fa9459Szrj 	Provides default handling for SEC_MERGE section merging for back ends
7886*a9fa9459Szrj 	which don't have SEC_MERGE support -- i.e., does nothing.
7887*a9fa9459Szrj */
7888*a9fa9459Szrj 
7889*a9fa9459Szrj bfd_boolean
bfd_generic_merge_sections(bfd * abfd ATTRIBUTE_UNUSED,struct bfd_link_info * link_info ATTRIBUTE_UNUSED)7890*a9fa9459Szrj bfd_generic_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
7891*a9fa9459Szrj 			    struct bfd_link_info *link_info ATTRIBUTE_UNUSED)
7892*a9fa9459Szrj {
7893*a9fa9459Szrj   return TRUE;
7894*a9fa9459Szrj }
7895*a9fa9459Szrj 
7896*a9fa9459Szrj /*
7897*a9fa9459Szrj INTERNAL_FUNCTION
7898*a9fa9459Szrj 	bfd_generic_get_relocated_section_contents
7899*a9fa9459Szrj 
7900*a9fa9459Szrj SYNOPSIS
7901*a9fa9459Szrj 	bfd_byte *bfd_generic_get_relocated_section_contents
7902*a9fa9459Szrj 	  (bfd *abfd,
7903*a9fa9459Szrj 	   struct bfd_link_info *link_info,
7904*a9fa9459Szrj 	   struct bfd_link_order *link_order,
7905*a9fa9459Szrj 	   bfd_byte *data,
7906*a9fa9459Szrj 	   bfd_boolean relocatable,
7907*a9fa9459Szrj 	   asymbol **symbols);
7908*a9fa9459Szrj 
7909*a9fa9459Szrj DESCRIPTION
7910*a9fa9459Szrj 	Provides default handling of relocation effort for back ends
7911*a9fa9459Szrj 	which can't be bothered to do it efficiently.
7912*a9fa9459Szrj 
7913*a9fa9459Szrj */
7914*a9fa9459Szrj 
7915*a9fa9459Szrj bfd_byte *
bfd_generic_get_relocated_section_contents(bfd * abfd,struct bfd_link_info * link_info,struct bfd_link_order * link_order,bfd_byte * data,bfd_boolean relocatable,asymbol ** symbols)7916*a9fa9459Szrj bfd_generic_get_relocated_section_contents (bfd *abfd,
7917*a9fa9459Szrj 					    struct bfd_link_info *link_info,
7918*a9fa9459Szrj 					    struct bfd_link_order *link_order,
7919*a9fa9459Szrj 					    bfd_byte *data,
7920*a9fa9459Szrj 					    bfd_boolean relocatable,
7921*a9fa9459Szrj 					    asymbol **symbols)
7922*a9fa9459Szrj {
7923*a9fa9459Szrj   bfd *input_bfd = link_order->u.indirect.section->owner;
7924*a9fa9459Szrj   asection *input_section = link_order->u.indirect.section;
7925*a9fa9459Szrj   long reloc_size;
7926*a9fa9459Szrj   arelent **reloc_vector;
7927*a9fa9459Szrj   long reloc_count;
7928*a9fa9459Szrj 
7929*a9fa9459Szrj   reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
7930*a9fa9459Szrj   if (reloc_size < 0)
7931*a9fa9459Szrj     return NULL;
7932*a9fa9459Szrj 
7933*a9fa9459Szrj   /* Read in the section.  */
7934*a9fa9459Szrj   if (!bfd_get_full_section_contents (input_bfd, input_section, &data))
7935*a9fa9459Szrj     return NULL;
7936*a9fa9459Szrj 
7937*a9fa9459Szrj   if (reloc_size == 0)
7938*a9fa9459Szrj     return data;
7939*a9fa9459Szrj 
7940*a9fa9459Szrj   reloc_vector = (arelent **) bfd_malloc (reloc_size);
7941*a9fa9459Szrj   if (reloc_vector == NULL)
7942*a9fa9459Szrj     return NULL;
7943*a9fa9459Szrj 
7944*a9fa9459Szrj   reloc_count = bfd_canonicalize_reloc (input_bfd,
7945*a9fa9459Szrj 					input_section,
7946*a9fa9459Szrj 					reloc_vector,
7947*a9fa9459Szrj 					symbols);
7948*a9fa9459Szrj   if (reloc_count < 0)
7949*a9fa9459Szrj     goto error_return;
7950*a9fa9459Szrj 
7951*a9fa9459Szrj   if (reloc_count > 0)
7952*a9fa9459Szrj     {
7953*a9fa9459Szrj       arelent **parent;
7954*a9fa9459Szrj 
7955*a9fa9459Szrj       for (parent = reloc_vector; *parent != NULL; parent++)
7956*a9fa9459Szrj 	{
7957*a9fa9459Szrj 	  char *error_message = NULL;
7958*a9fa9459Szrj 	  asymbol *symbol;
7959*a9fa9459Szrj 	  bfd_reloc_status_type r;
7960*a9fa9459Szrj 
7961*a9fa9459Szrj 	  symbol = *(*parent)->sym_ptr_ptr;
7962*a9fa9459Szrj 	  /* PR ld/19628: A specially crafted input file
7963*a9fa9459Szrj 	     can result in a NULL symbol pointer here.  */
7964*a9fa9459Szrj 	  if (symbol == NULL)
7965*a9fa9459Szrj 	    {
7966*a9fa9459Szrj 	      link_info->callbacks->einfo
7967*a9fa9459Szrj 		(_("%X%P: %B(%A): error: relocation for offset %V has no value\n"),
7968*a9fa9459Szrj 		 abfd, input_section, (* parent)->address);
7969*a9fa9459Szrj 	      goto error_return;
7970*a9fa9459Szrj 	    }
7971*a9fa9459Szrj 
7972*a9fa9459Szrj 	  if (symbol->section && discarded_section (symbol->section))
7973*a9fa9459Szrj 	    {
7974*a9fa9459Szrj 	      bfd_byte *p;
7975*a9fa9459Szrj 	      static reloc_howto_type none_howto
7976*a9fa9459Szrj 		= HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL,
7977*a9fa9459Szrj 			 "unused", FALSE, 0, 0, FALSE);
7978*a9fa9459Szrj 
7979*a9fa9459Szrj 	      p = data + (*parent)->address * bfd_octets_per_byte (input_bfd);
7980*a9fa9459Szrj 	      _bfd_clear_contents ((*parent)->howto, input_bfd, input_section,
7981*a9fa9459Szrj 				   p);
7982*a9fa9459Szrj 	      (*parent)->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
7983*a9fa9459Szrj 	      (*parent)->addend = 0;
7984*a9fa9459Szrj 	      (*parent)->howto = &none_howto;
7985*a9fa9459Szrj 	      r = bfd_reloc_ok;
7986*a9fa9459Szrj 	    }
7987*a9fa9459Szrj 	  else
7988*a9fa9459Szrj 	    r = bfd_perform_relocation (input_bfd,
7989*a9fa9459Szrj 					*parent,
7990*a9fa9459Szrj 					data,
7991*a9fa9459Szrj 					input_section,
7992*a9fa9459Szrj 					relocatable ? abfd : NULL,
7993*a9fa9459Szrj 					&error_message);
7994*a9fa9459Szrj 
7995*a9fa9459Szrj 	  if (relocatable)
7996*a9fa9459Szrj 	    {
7997*a9fa9459Szrj 	      asection *os = input_section->output_section;
7998*a9fa9459Szrj 
7999*a9fa9459Szrj 	      /* A partial link, so keep the relocs.  */
8000*a9fa9459Szrj 	      os->orelocation[os->reloc_count] = *parent;
8001*a9fa9459Szrj 	      os->reloc_count++;
8002*a9fa9459Szrj 	    }
8003*a9fa9459Szrj 
8004*a9fa9459Szrj 	  if (r != bfd_reloc_ok)
8005*a9fa9459Szrj 	    {
8006*a9fa9459Szrj 	      switch (r)
8007*a9fa9459Szrj 		{
8008*a9fa9459Szrj 		case bfd_reloc_undefined:
8009*a9fa9459Szrj 		  (*link_info->callbacks->undefined_symbol)
8010*a9fa9459Szrj 		    (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
8011*a9fa9459Szrj 		     input_bfd, input_section, (*parent)->address, TRUE);
8012*a9fa9459Szrj 		  break;
8013*a9fa9459Szrj 		case bfd_reloc_dangerous:
8014*a9fa9459Szrj 		  BFD_ASSERT (error_message != NULL);
8015*a9fa9459Szrj 		  (*link_info->callbacks->reloc_dangerous)
8016*a9fa9459Szrj 		    (link_info, error_message,
8017*a9fa9459Szrj 		     input_bfd, input_section, (*parent)->address);
8018*a9fa9459Szrj 		  break;
8019*a9fa9459Szrj 		case bfd_reloc_overflow:
8020*a9fa9459Szrj 		  (*link_info->callbacks->reloc_overflow)
8021*a9fa9459Szrj 		    (link_info, NULL,
8022*a9fa9459Szrj 		     bfd_asymbol_name (*(*parent)->sym_ptr_ptr),
8023*a9fa9459Szrj 		     (*parent)->howto->name, (*parent)->addend,
8024*a9fa9459Szrj 		     input_bfd, input_section, (*parent)->address);
8025*a9fa9459Szrj 		  break;
8026*a9fa9459Szrj 		case bfd_reloc_outofrange:
8027*a9fa9459Szrj 		  /* PR ld/13730:
8028*a9fa9459Szrj 		     This error can result when processing some partially
8029*a9fa9459Szrj 		     complete binaries.  Do not abort, but issue an error
8030*a9fa9459Szrj 		     message instead.  */
8031*a9fa9459Szrj 		  link_info->callbacks->einfo
8032*a9fa9459Szrj 		    (_("%X%P: %B(%A): relocation \"%R\" goes out of range\n"),
8033*a9fa9459Szrj 		     abfd, input_section, * parent);
8034*a9fa9459Szrj 		  goto error_return;
8035*a9fa9459Szrj 
8036*a9fa9459Szrj 		case bfd_reloc_notsupported:
8037*a9fa9459Szrj 		  /* PR ld/17512
8038*a9fa9459Szrj 		     This error can result when processing a corrupt binary.
8039*a9fa9459Szrj 		     Do not abort.  Issue an error message instead.  */
8040*a9fa9459Szrj 		  link_info->callbacks->einfo
8041*a9fa9459Szrj 		    (_("%X%P: %B(%A): relocation \"%R\" is not supported\n"),
8042*a9fa9459Szrj 		     abfd, input_section, * parent);
8043*a9fa9459Szrj 		  goto error_return;
8044*a9fa9459Szrj 
8045*a9fa9459Szrj 		default:
8046*a9fa9459Szrj 		  /* PR 17512; file: 90c2a92e.
8047*a9fa9459Szrj 		     Report unexpected results, without aborting.  */
8048*a9fa9459Szrj 		  link_info->callbacks->einfo
8049*a9fa9459Szrj 		    (_("%X%P: %B(%A): relocation \"%R\" returns an unrecognized value %x\n"),
8050*a9fa9459Szrj 		     abfd, input_section, * parent, r);
8051*a9fa9459Szrj 		  break;
8052*a9fa9459Szrj 		}
8053*a9fa9459Szrj 
8054*a9fa9459Szrj 	    }
8055*a9fa9459Szrj 	}
8056*a9fa9459Szrj     }
8057*a9fa9459Szrj 
8058*a9fa9459Szrj   free (reloc_vector);
8059*a9fa9459Szrj   return data;
8060*a9fa9459Szrj 
8061*a9fa9459Szrj error_return:
8062*a9fa9459Szrj   free (reloc_vector);
8063*a9fa9459Szrj   return NULL;
8064*a9fa9459Szrj }
8065