OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [bfd/] [doc/] [bfd.info-3] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
This is bfd.info, produced by makeinfo version 4.0 from bfd.texinfo.
2
 
3
START-INFO-DIR-ENTRY
4
* Bfd: (bfd).                   The Binary File Descriptor library.
5
END-INFO-DIR-ENTRY
6
 
7
   This file documents the BFD library.
8
 
9
   Copyright (C) 1991, 2000 Free Software Foundation, Inc.
10
 
11
   Permission is granted to copy, distribute and/or modify this document
12
     under the terms of the GNU Free Documentation License, Version 1.1
13
     or any later version published by the Free Software Foundation;
14
   with no Invariant Sections, with no Front-Cover Texts, and with no
15
    Back-Cover Texts.  A copy of the license is included in the
16
section entitled "GNU Free Documentation License".
17
 
18

19
File: bfd.info,  Node: typedef arelent,  Next: howto manager,  Prev: Relocations,  Up: Relocations
20
 
21
typedef arelent
22
---------------
23
 
24
   This is the structure of a relocation entry:
25
 
26
 
27
     typedef enum bfd_reloc_status
28
     {
29
            /* No errors detected */
30
       bfd_reloc_ok,
31
 
32
            /* The relocation was performed, but there was an overflow. */
33
       bfd_reloc_overflow,
34
 
35
            /* The address to relocate was not within the section supplied. */
36
       bfd_reloc_outofrange,
37
 
38
            /* Used by special functions */
39
       bfd_reloc_continue,
40
 
41
            /* Unsupported relocation size requested. */
42
       bfd_reloc_notsupported,
43
 
44
            /* Unused */
45
       bfd_reloc_other,
46
 
47
            /* The symbol to relocate against was undefined. */
48
       bfd_reloc_undefined,
49
 
50
            /* The relocation was performed, but may not be ok - presently
51
               generated only when linking i960 coff files with i960 b.out
52
               symbols.  If this type is returned, the error_message argument
53
               to bfd_perform_relocation will be set.  */
54
       bfd_reloc_dangerous
55
      }
56
      bfd_reloc_status_type;
57
 
58
 
59
     typedef struct reloc_cache_entry
60
     {
61
            /* A pointer into the canonical table of pointers  */
62
       struct symbol_cache_entry **sym_ptr_ptr;
63
 
64
            /* offset in section */
65
       bfd_size_type address;
66
 
67
            /* addend for relocation value */
68
       bfd_vma addend;
69
 
70
            /* Pointer to how to perform the required relocation */
71
       reloc_howto_type *howto;
72
 
73
     } arelent;
74
   *Description*
75
Here is a description of each of the fields within an `arelent':
76
 
77
   * `sym_ptr_ptr'
78
   The symbol table pointer points to a pointer to the symbol
79
associated with the relocation request.  It is the pointer into the
80
table returned by the back end's `get_symtab' action. *Note Symbols::.
81
The symbol is referenced through a pointer to a pointer so that tools
82
like the linker can fix up all the symbols of the same name by
83
modifying only one pointer. The relocation routine looks in the symbol
84
and uses the base of the section the symbol is attached to and the
85
value of the symbol as the initial relocation offset. If the symbol
86
pointer is zero, then the section provided is looked up.
87
 
88
   * `address'
89
   The `address' field gives the offset in bytes from the base of the
90
section data which owns the relocation record to the first byte of
91
relocatable information. The actual data relocated will be relative to
92
this point; for example, a relocation type which modifies the bottom
93
two bytes of a four byte word would not touch the first byte pointed to
94
in a big endian world.
95
 
96
   * `addend'
97
   The `addend' is a value provided by the back end to be added (!)  to
98
the relocation offset. Its interpretation is dependent upon the howto.
99
For example, on the 68k the code:
100
 
101
             char foo[];
102
             main()
103
                     {
104
                     return foo[0x12345678];
105
                     }
106
 
107
   Could be compiled into:
108
 
109
             linkw fp,#-4
110
             moveb @#12345678,d0
111
             extbl d0
112
             unlk fp
113
             rts
114
 
115
   This could create a reloc pointing to `foo', but leave the offset in
116
the data, something like:
117
 
118
     RELOCATION RECORDS FOR [.text]:
119
     offset   type      value
120
     00000006 32        _foo
121
 
122
     00000000 4e56 fffc          ; linkw fp,#-4
123
     00000004 1039 1234 5678     ; moveb @#12345678,d0
124
     0000000a 49c0               ; extbl d0
125
     0000000c 4e5e               ; unlk fp
126
     0000000e 4e75               ; rts
127
 
128
   Using coff and an 88k, some instructions don't have enough space in
129
them to represent the full address range, and pointers have to be
130
loaded in two parts. So you'd get something like:
131
 
132
             or.u     r13,r0,hi16(_foo+0x12345678)
133
             ld.b     r2,r13,lo16(_foo+0x12345678)
134
             jmp      r1
135
 
136
   This should create two relocs, both pointing to `_foo', and with
137
0x12340000 in their addend field. The data would consist of:
138
 
139
     RELOCATION RECORDS FOR [.text]:
140
     offset   type      value
141
     00000002 HVRT16    _foo+0x12340000
142
     00000006 LVRT16    _foo+0x12340000
143
 
144
     00000000 5da05678           ; or.u r13,r0,0x5678
145
     00000004 1c4d5678           ; ld.b r2,r13,0x5678
146
     00000008 f400c001           ; jmp r1
147
 
148
   The relocation routine digs out the value from the data, adds it to
149
the addend to get the original offset, and then adds the value of
150
`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
151
with carry from bit 15 to bit 16.
152
 
153
   One further example is the sparc and the a.out format. The sparc has
154
a similar problem to the 88k, in that some instructions don't have room
155
for an entire offset, but on the sparc the parts are created in odd
156
sized lumps. The designers of the a.out format chose to not use the
157
data within the section for storing part of the offset; all the offset
158
is kept within the reloc. Anything in the data should be ignored.
159
 
160
             save %sp,-112,%sp
161
             sethi %hi(_foo+0x12345678),%g2
162
             ldsb [%g2+%lo(_foo+0x12345678)],%i0
163
             ret
164
             restore
165
 
166
   Both relocs contain a pointer to `foo', and the offsets contain junk.
167
 
168
     RELOCATION RECORDS FOR [.text]:
169
     offset   type      value
170
     00000004 HI22      _foo+0x12345678
171
     00000008 LO10      _foo+0x12345678
172
 
173
     00000000 9de3bf90     ; save %sp,-112,%sp
174
     00000004 05000000     ; sethi %hi(_foo+0),%g2
175
     00000008 f048a000     ; ldsb [%g2+%lo(_foo+0)],%i0
176
     0000000c 81c7e008     ; ret
177
     00000010 81e80000     ; restore
178
 
179
   * `howto'
180
   The `howto' field can be imagined as a relocation instruction. It is
181
a pointer to a structure which contains information on what to do with
182
all of the other information in the reloc record and data section. A
183
back end would normally have a relocation instruction set and turn
184
relocations into pointers to the correct structure on input - but it
185
would be possible to create each howto field on demand.
186
 
187
`enum complain_overflow'
188
........................
189
 
190
   Indicates what sort of overflow checking should be done when
191
performing a relocation.
192
 
193
 
194
     enum complain_overflow
195
     {
196
            /* Do not complain on overflow. */
197
       complain_overflow_dont,
198
 
199
            /* Complain if the bitfield overflows, whether it is considered
200
               as signed or unsigned. */
201
       complain_overflow_bitfield,
202
 
203
            /* Complain if the value overflows when considered as signed
204
               number. */
205
       complain_overflow_signed,
206
 
207
            /* Complain if the value overflows when considered as an
208
               unsigned number. */
209
       complain_overflow_unsigned
210
     };
211
 
212
`reloc_howto_type'
213
..................
214
 
215
   The `reloc_howto_type' is a structure which contains all the
216
information that libbfd needs to know to tie up a back end's data.
217
 
218
     struct symbol_cache_entry;             /* Forward declaration */
219
 
220
     struct reloc_howto_struct
221
     {
222
            /*  The type field has mainly a documentary use - the back end can
223
                do what it wants with it, though normally the back end's
224
                external idea of what a reloc number is stored
225
                in this field. For example, a PC relative word relocation
226
                in a coff environment has the type 023 - because that's
227
                what the outside world calls a R_PCRWORD reloc. */
228
       unsigned int type;
229
 
230
            /*  The value the final relocation is shifted right by. This drops
231
                unwanted data from the relocation.  */
232
       unsigned int rightshift;
233
 
234
            /*  The size of the item to be relocated.  This is *not* a
235
                power-of-two measure.  To get the number of bytes operated
236
                on by a type of relocation, use bfd_get_reloc_size.  */
237
       int size;
238
 
239
            /*  The number of bits in the item to be relocated.  This is used
240
                when doing overflow checking.  */
241
       unsigned int bitsize;
242
 
243
            /*  Notes that the relocation is relative to the location in the
244
                data section of the addend. The relocation function will
245
                subtract from the relocation value the address of the location
246
                being relocated. */
247
       boolean pc_relative;
248
 
249
            /*  The bit position of the reloc value in the destination.
250
                The relocated value is left shifted by this amount. */
251
       unsigned int bitpos;
252
 
253
            /* What type of overflow error should be checked for when
254
               relocating. */
255
       enum complain_overflow complain_on_overflow;
256
 
257
            /* If this field is non null, then the supplied function is
258
               called rather than the normal function. This allows really
259
               strange relocation methods to be accomodated (e.g., i960 callj
260
               instructions). */
261
       bfd_reloc_status_type (*special_function)
262
                                        PARAMS ((bfd *abfd,
263
                                                 arelent *reloc_entry,
264
                                                 struct symbol_cache_entry *symbol,
265
                                                 PTR data,
266
                                                 asection *input_section,
267
                                                 bfd *output_bfd,
268
                                                 char **error_message));
269
 
270
            /* The textual name of the relocation type. */
271
       char *name;
272
 
273
            /* Some formats record a relocation addend in the section contents
274
               rather than with the relocation.  For ELF formats this is the
275
               distinction between USE_REL and USE_RELA (though the code checks
276
               for USE_REL == 1/0).  The value of this field is TRUE if the
277
               addend is recorded with the section contents; when performing a
278
               partial link (ld -r) the section contents (the data) will be
279
               modified.  The value of this field is FALSE if addends are
280
               recorded with the relocation (in arelent.addend); when performing
281
               a partial link the relocation will be modified.
282
               All relocations for all ELF USE_RELA targets should set this field
283
               to FALSE (values of TRUE should be looked on with suspicion).
284
               However, the converse is not true: not all relocations of all ELF
285
               USE_REL targets set this field to TRUE.  Why this is so is peculiar
286
               to each particular target.  For relocs that aren't used in partial
287
               links (e.g. GOT stuff) it doesn't matter what this is set to.  */
288
       boolean partial_inplace;
289
 
290
            /* The src_mask selects which parts of the read in data
291
               are to be used in the relocation sum.  E.g., if this was an 8 bit
292
               byte of data which we read and relocated, this would be
293
               0x000000ff. When we have relocs which have an addend, such as
294
               sun4 extended relocs, the value in the offset part of a
295
               relocating field is garbage so we never use it. In this case
296
               the mask would be 0x00000000. */
297
       bfd_vma src_mask;
298
 
299
            /* The dst_mask selects which parts of the instruction are replaced
300
               into the instruction. In most cases src_mask == dst_mask,
301
               except in the above special case, where dst_mask would be
302
               0x000000ff, and src_mask would be 0x00000000.   */
303
       bfd_vma dst_mask;
304
 
305
            /* When some formats create PC relative instructions, they leave
306
               the value of the pc of the place being relocated in the offset
307
               slot of the instruction, so that a PC relative relocation can
308
               be made just by adding in an ordinary offset (e.g., sun3 a.out).
309
               Some formats leave the displacement part of an instruction
310
               empty (e.g., m88k bcs); this flag signals the fact.*/
311
       boolean pcrel_offset;
312
 
313
     };
314
 
315
`The HOWTO Macro'
316
.................
317
 
318
   *Description*
319
The HOWTO define is horrible and will go away.
320
     #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
321
       {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
322
 
323
   *Description*
324
And will be replaced with the totally magic way. But for the moment, we
325
are compatible, so do it this way.
326
     #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
327
 
328
   *Description*
329
This is used to fill in an empty howto entry in an array.
330
     #define EMPTY_HOWTO(C) \
331
       HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
332
 
333
   *Description*
334
Helper routine to turn a symbol into a relocation value.
335
     #define HOWTO_PREPARE(relocation, symbol)      \
336
       {                                            \
337
       if (symbol != (asymbol *)NULL) {             \
338
         if (bfd_is_com_section (symbol->section)) { \
339
           relocation = 0;                          \
340
         }                                          \
341
         else {                                     \
342
           relocation = symbol->value;              \
343
         }                                          \
344
       }                                            \
345
     }
346
 
347
`bfd_get_reloc_size'
348
....................
349
 
350
   *Synopsis*
351
     unsigned int bfd_get_reloc_size (reloc_howto_type *);
352
   *Description*
353
For a reloc_howto_type that operates on a fixed number of bytes, this
354
returns the number of bytes operated on.
355
 
356
`arelent_chain'
357
...............
358
 
359
   *Description*
360
How relocs are tied together in an `asection':
361
     typedef struct relent_chain {
362
       arelent relent;
363
       struct   relent_chain *next;
364
     } arelent_chain;
365
 
366
`bfd_check_overflow'
367
....................
368
 
369
   *Synopsis*
370
     bfd_reloc_status_type
371
     bfd_check_overflow
372
        (enum complain_overflow how,
373
         unsigned int bitsize,
374
         unsigned int rightshift,
375
         unsigned int addrsize,
376
         bfd_vma relocation);
377
   *Description*
378
Perform overflow checking on RELOCATION which has BITSIZE significant
379
bits and will be shifted right by RIGHTSHIFT bits, on a machine with
380
addresses containing ADDRSIZE significant bits.  The result is either of
381
`bfd_reloc_ok' or `bfd_reloc_overflow'.
382
 
383
`bfd_perform_relocation'
384
........................
385
 
386
   *Synopsis*
387
     bfd_reloc_status_type
388
     bfd_perform_relocation
389
        (bfd *abfd,
390
         arelent *reloc_entry,
391
         PTR data,
392
         asection *input_section,
393
         bfd *output_bfd,
394
         char **error_message);
395
   *Description*
396
If OUTPUT_BFD is supplied to this function, the generated image will be
397
relocatable; the relocations are copied to the output file after they
398
have been changed to reflect the new state of the world. There are two
399
ways of reflecting the results of partial linkage in an output file: by
400
modifying the output data in place, and by modifying the relocation
401
record.  Some native formats (e.g., basic a.out and basic coff) have no
402
way of specifying an addend in the relocation type, so the addend has
403
to go in the output data.  This is no big deal since in these formats
404
the output data slot will always be big enough for the addend. Complex
405
reloc types with addends were invented to solve just this problem.  The
406
ERROR_MESSAGE argument is set to an error message if this return
407
`bfd_reloc_dangerous'.
408
 
409
`bfd_install_relocation'
410
........................
411
 
412
   *Synopsis*
413
     bfd_reloc_status_type
414
     bfd_install_relocation
415
        (bfd *abfd,
416
         arelent *reloc_entry,
417
         PTR data, bfd_vma data_start,
418
         asection *input_section,
419
         char **error_message);
420
   *Description*
421
This looks remarkably like `bfd_perform_relocation', except it does not
422
expect that the section contents have been filled in.  I.e., it's
423
suitable for use when creating, rather than applying a relocation.
424
 
425
   For now, this function should be considered reserved for the
426
assembler.
427
 
428

429
File: bfd.info,  Node: howto manager,  Prev: typedef arelent,  Up: Relocations
430
 
431
The howto manager
432
=================
433
 
434
   When an application wants to create a relocation, but doesn't know
435
what the target machine might call it, it can find out by using this
436
bit of code.
437
 
438
`bfd_reloc_code_type'
439
.....................
440
 
441
   *Description*
442
The insides of a reloc code.  The idea is that, eventually, there will
443
be one enumerator for every type of relocation we ever do.  Pass one of
444
these values to `bfd_reloc_type_lookup', and it'll return a howto
445
pointer.
446
 
447
   This does mean that the application must determine the correct
448
enumerator value; you can't get a howto pointer from a random set of
449
attributes.
450
 
451
   Here are the possible values for `enum bfd_reloc_code_real':
452
 
453
 - : BFD_RELOC_64
454
 - : BFD_RELOC_32
455
 - : BFD_RELOC_26
456
 - : BFD_RELOC_24
457
 - : BFD_RELOC_16
458
 - : BFD_RELOC_14
459
 - : BFD_RELOC_8
460
     Basic absolute relocations of N bits.
461
 
462
 - : BFD_RELOC_64_PCREL
463
 - : BFD_RELOC_32_PCREL
464
 - : BFD_RELOC_24_PCREL
465
 - : BFD_RELOC_16_PCREL
466
 - : BFD_RELOC_12_PCREL
467
 - : BFD_RELOC_8_PCREL
468
     PC-relative relocations.  Sometimes these are relative to the
469
     address of the relocation itself; sometimes they are relative to
470
     the start of the section containing the relocation.  It depends on
471
     the specific target.
472
 
473
     The 24-bit relocation is used in some Intel 960 configurations.
474
 
475
 - : BFD_RELOC_32_GOT_PCREL
476
 - : BFD_RELOC_16_GOT_PCREL
477
 - : BFD_RELOC_8_GOT_PCREL
478
 - : BFD_RELOC_32_GOTOFF
479
 - : BFD_RELOC_16_GOTOFF
480
 - : BFD_RELOC_LO16_GOTOFF
481
 - : BFD_RELOC_HI16_GOTOFF
482
 - : BFD_RELOC_HI16_S_GOTOFF
483
 - : BFD_RELOC_8_GOTOFF
484
 - : BFD_RELOC_32_PLT_PCREL
485
 - : BFD_RELOC_24_PLT_PCREL
486
 - : BFD_RELOC_16_PLT_PCREL
487
 - : BFD_RELOC_8_PLT_PCREL
488
 - : BFD_RELOC_32_PLTOFF
489
 - : BFD_RELOC_16_PLTOFF
490
 - : BFD_RELOC_LO16_PLTOFF
491
 - : BFD_RELOC_HI16_PLTOFF
492
 - : BFD_RELOC_HI16_S_PLTOFF
493
 - : BFD_RELOC_8_PLTOFF
494
     For ELF.
495
 
496
 - : BFD_RELOC_68K_GLOB_DAT
497
 - : BFD_RELOC_68K_JMP_SLOT
498
 - : BFD_RELOC_68K_RELATIVE
499
     Relocations used by 68K ELF.
500
 
501
 - : BFD_RELOC_32_BASEREL
502
 - : BFD_RELOC_16_BASEREL
503
 - : BFD_RELOC_LO16_BASEREL
504
 - : BFD_RELOC_HI16_BASEREL
505
 - : BFD_RELOC_HI16_S_BASEREL
506
 - : BFD_RELOC_8_BASEREL
507
 - : BFD_RELOC_RVA
508
     Linkage-table relative.
509
 
510
 - : BFD_RELOC_8_FFnn
511
     Absolute 8-bit relocation, but used to form an address like 0xFFnn.
512
 
513
 - : BFD_RELOC_32_PCREL_S2
514
 - : BFD_RELOC_16_PCREL_S2
515
 - : BFD_RELOC_23_PCREL_S2
516
     These PC-relative relocations are stored as word displacements -
517
     i.e., byte displacements shifted right two bits.  The 30-bit word
518
     displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
519
     SPARC.  (SPARC tools generally refer to this as <>.)  The
520
     signed 16-bit displacement is used on the MIPS, and the 23-bit
521
     displacement is used on the Alpha.
522
 
523
 - : BFD_RELOC_HI22
524
 - : BFD_RELOC_LO10
525
     High 22 bits and low 10 bits of 32-bit value, placed into lower
526
     bits of the target word.  These are used on the SPARC.
527
 
528
 - : BFD_RELOC_GPREL16
529
 - : BFD_RELOC_GPREL32
530
     For systems that allocate a Global Pointer register, these are
531
     displacements off that register.  These relocation types are
532
     handled specially, because the value the register will have is
533
     decided relatively late.
534
 
535
 - : BFD_RELOC_I960_CALLJ
536
     Reloc types used for i960/b.out.
537
 
538
 - : BFD_RELOC_NONE
539
 - : BFD_RELOC_SPARC_WDISP22
540
 - : BFD_RELOC_SPARC22
541
 - : BFD_RELOC_SPARC13
542
 - : BFD_RELOC_SPARC_GOT10
543
 - : BFD_RELOC_SPARC_GOT13
544
 - : BFD_RELOC_SPARC_GOT22
545
 - : BFD_RELOC_SPARC_PC10
546
 - : BFD_RELOC_SPARC_PC22
547
 - : BFD_RELOC_SPARC_WPLT30
548
 - : BFD_RELOC_SPARC_COPY
549
 - : BFD_RELOC_SPARC_GLOB_DAT
550
 - : BFD_RELOC_SPARC_JMP_SLOT
551
 - : BFD_RELOC_SPARC_RELATIVE
552
 - : BFD_RELOC_SPARC_UA16
553
 - : BFD_RELOC_SPARC_UA32
554
 - : BFD_RELOC_SPARC_UA64
555
     SPARC ELF relocations.  There is probably some overlap with other
556
     relocation types already defined.
557
 
558
 - : BFD_RELOC_SPARC_BASE13
559
 - : BFD_RELOC_SPARC_BASE22
560
     I think these are specific to SPARC a.out (e.g., Sun 4).
561
 
562
 - : BFD_RELOC_SPARC_64
563
 - : BFD_RELOC_SPARC_10
564
 - : BFD_RELOC_SPARC_11
565
 - : BFD_RELOC_SPARC_OLO10
566
 - : BFD_RELOC_SPARC_HH22
567
 - : BFD_RELOC_SPARC_HM10
568
 - : BFD_RELOC_SPARC_LM22
569
 - : BFD_RELOC_SPARC_PC_HH22
570
 - : BFD_RELOC_SPARC_PC_HM10
571
 - : BFD_RELOC_SPARC_PC_LM22
572
 - : BFD_RELOC_SPARC_WDISP16
573
 - : BFD_RELOC_SPARC_WDISP19
574
 - : BFD_RELOC_SPARC_7
575
 - : BFD_RELOC_SPARC_6
576
 - : BFD_RELOC_SPARC_5
577
 - : BFD_RELOC_SPARC_DISP64
578
 - : BFD_RELOC_SPARC_PLT64
579
 - : BFD_RELOC_SPARC_HIX22
580
 - : BFD_RELOC_SPARC_LOX10
581
 - : BFD_RELOC_SPARC_H44
582
 - : BFD_RELOC_SPARC_M44
583
 - : BFD_RELOC_SPARC_L44
584
 - : BFD_RELOC_SPARC_REGISTER
585
     SPARC64 relocations
586
 
587
 - : BFD_RELOC_SPARC_REV32
588
     SPARC little endian relocation
589
 
590
 - : BFD_RELOC_ALPHA_GPDISP_HI16
591
     Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
592
     "addend" in some special way.  For GPDISP_HI16 ("gpdisp")
593
     relocations, the symbol is ignored when writing; when reading, it
594
     will be the absolute section symbol.  The addend is the
595
     displacement in bytes of the "lda" instruction from the "ldah"
596
     instruction (which is at the address of this reloc).
597
 
598
 - : BFD_RELOC_ALPHA_GPDISP_LO16
599
     For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
600
     with GPDISP_HI16 relocs.  The addend is ignored when writing the
601
     relocations out, and is filled in with the file's GP value on
602
     reading, for convenience.
603
 
604
 - : BFD_RELOC_ALPHA_GPDISP
605
     The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
606
     relocation except that there is no accompanying GPDISP_LO16
607
     relocation.
608
 
609
 - : BFD_RELOC_ALPHA_LITERAL
610
 - : BFD_RELOC_ALPHA_ELF_LITERAL
611
 - : BFD_RELOC_ALPHA_LITUSE
612
     The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
613
     the assembler turns it into a LDQ instruction to load the address
614
     of the symbol, and then fills in a register in the real
615
     instruction.
616
 
617
     The LITERAL reloc, at the LDQ instruction, refers to the .lita
618
     section symbol.  The addend is ignored when writing, but is filled
619
     in with the file's GP value on reading, for convenience, as with
620
     the GPDISP_LO16 reloc.
621
 
622
     The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
623
     GPDISP_LO16.  It should refer to the symbol to be referenced, as
624
     with 16_GOTOFF, but it generates output not based on the position
625
     within the .got section, but relative to the GP value chosen for
626
     the file during the final link stage.
627
 
628
     The LITUSE reloc, on the instruction using the loaded address,
629
     gives information to the linker that it might be able to use to
630
     optimize away some literal section references.  The symbol is
631
     ignored (read as the absolute section symbol), and the "addend"
632
     indicates the type of instruction using the register: 1 - "memory"
633
     fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
634
     of branch)
635
 
636
     The GNU linker currently doesn't do any of this optimizing.
637
 
638
 - : BFD_RELOC_ALPHA_USER_LITERAL
639
 - : BFD_RELOC_ALPHA_USER_LITUSE_BASE
640
 - : BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
641
 - : BFD_RELOC_ALPHA_USER_LITUSE_JSR
642
 - : BFD_RELOC_ALPHA_USER_GPDISP
643
 - : BFD_RELOC_ALPHA_USER_GPRELHIGH
644
 - : BFD_RELOC_ALPHA_USER_GPRELLOW
645
     The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
646
     process the explicit !!sequence relocations, and are mapped
647
     into the normal relocations at the end of processing.
648
 
649
 - : BFD_RELOC_ALPHA_HINT
650
     The HINT relocation indicates a value that should be filled into
651
     the "hint" field of a jmp/jsr/ret instruction, for possible branch-
652
     prediction logic which may be provided on some processors.
653
 
654
 - : BFD_RELOC_ALPHA_LINKAGE
655
     The LINKAGE relocation outputs a linkage pair in the object file,
656
     which is filled by the linker.
657
 
658
 - : BFD_RELOC_ALPHA_CODEADDR
659
     The CODEADDR relocation outputs a STO_CA in the object file, which
660
     is filled by the linker.
661
 
662
 - : BFD_RELOC_MIPS_JMP
663
     Bits 27..2 of the relocation address shifted right 2 bits; simple
664
     reloc otherwise.
665
 
666
 - : BFD_RELOC_MIPS16_JMP
667
     The MIPS16 jump instruction.
668
 
669
 - : BFD_RELOC_MIPS16_GPREL
670
     MIPS16 GP relative reloc.
671
 
672
 - : BFD_RELOC_HI16
673
     High 16 bits of 32-bit value; simple reloc.
674
 
675
 - : BFD_RELOC_HI16_S
676
     High 16 bits of 32-bit value but the low 16 bits will be sign
677
     extended and added to form the final result.  If the low 16 bits
678
     form a negative number, we need to add one to the high value to
679
     compensate for the borrow when the low bits are added.
680
 
681
 - : BFD_RELOC_LO16
682
     Low 16 bits.
683
 
684
 - : BFD_RELOC_PCREL_HI16_S
685
     Like BFD_RELOC_HI16_S, but PC relative.
686
 
687
 - : BFD_RELOC_PCREL_LO16
688
     Like BFD_RELOC_LO16, but PC relative.
689
 
690
 - : BFD_RELOC_MIPS_GPREL
691
     Relocation relative to the global pointer.
692
 
693
 - : BFD_RELOC_MIPS_LITERAL
694
     Relocation against a MIPS literal section.
695
 
696
 - : BFD_RELOC_MIPS_GOT16
697
 - : BFD_RELOC_MIPS_CALL16
698
 - : BFD_RELOC_MIPS_GPREL32
699
 - : BFD_RELOC_MIPS_GOT_HI16
700
 - : BFD_RELOC_MIPS_GOT_LO16
701
 - : BFD_RELOC_MIPS_CALL_HI16
702
 - : BFD_RELOC_MIPS_CALL_LO16
703
 - : BFD_RELOC_MIPS_SUB
704
 - : BFD_RELOC_MIPS_GOT_PAGE
705
 - : BFD_RELOC_MIPS_GOT_OFST
706
 - : BFD_RELOC_MIPS_GOT_DISP
707
 - : BFD_RELOC_MIPS_SHIFT5
708
 - : BFD_RELOC_MIPS_SHIFT6
709
 - : BFD_RELOC_MIPS_INSERT_A
710
 - : BFD_RELOC_MIPS_INSERT_B
711
 - : BFD_RELOC_MIPS_DELETE
712
 - : BFD_RELOC_MIPS_HIGHEST
713
 - : BFD_RELOC_MIPS_HIGHER
714
 - : BFD_RELOC_MIPS_SCN_DISP
715
 - : BFD_RELOC_MIPS_REL16
716
 - : BFD_RELOC_MIPS_RELGOT
717
 - : BFD_RELOC_MIPS_JALR
718
     MIPS ELF relocations.
719
 
720
 - : BFD_RELOC_386_GOT32
721
 - : BFD_RELOC_386_PLT32
722
 - : BFD_RELOC_386_COPY
723
 - : BFD_RELOC_386_GLOB_DAT
724
 - : BFD_RELOC_386_JUMP_SLOT
725
 - : BFD_RELOC_386_RELATIVE
726
 - : BFD_RELOC_386_GOTOFF
727
 - : BFD_RELOC_386_GOTPC
728
     i386/elf relocations
729
 
730
 - : BFD_RELOC_X86_64_GOT32
731
 - : BFD_RELOC_X86_64_PLT32
732
 - : BFD_RELOC_X86_64_COPY
733
 - : BFD_RELOC_X86_64_GLOB_DAT
734
 - : BFD_RELOC_X86_64_JUMP_SLOT
735
 - : BFD_RELOC_X86_64_RELATIVE
736
 - : BFD_RELOC_X86_64_GOTPCREL
737
 - : BFD_RELOC_X86_64_32S
738
     x86-64/elf relocations
739
 
740
 - : BFD_RELOC_NS32K_IMM_8
741
 - : BFD_RELOC_NS32K_IMM_16
742
 - : BFD_RELOC_NS32K_IMM_32
743
 - : BFD_RELOC_NS32K_IMM_8_PCREL
744
 - : BFD_RELOC_NS32K_IMM_16_PCREL
745
 - : BFD_RELOC_NS32K_IMM_32_PCREL
746
 - : BFD_RELOC_NS32K_DISP_8
747
 - : BFD_RELOC_NS32K_DISP_16
748
 - : BFD_RELOC_NS32K_DISP_32
749
 - : BFD_RELOC_NS32K_DISP_8_PCREL
750
 - : BFD_RELOC_NS32K_DISP_16_PCREL
751
 - : BFD_RELOC_NS32K_DISP_32_PCREL
752
     ns32k relocations
753
 
754
 - : BFD_RELOC_PDP11_DISP_8_PCREL
755
 - : BFD_RELOC_PDP11_DISP_6_PCREL
756
     PDP11 relocations
757
 
758
 - : BFD_RELOC_PJ_CODE_HI16
759
 - : BFD_RELOC_PJ_CODE_LO16
760
 - : BFD_RELOC_PJ_CODE_DIR16
761
 - : BFD_RELOC_PJ_CODE_DIR32
762
 - : BFD_RELOC_PJ_CODE_REL16
763
 - : BFD_RELOC_PJ_CODE_REL32
764
     Picojava relocs.  Not all of these appear in object files.
765
 
766
 - : BFD_RELOC_PPC_B26
767
 - : BFD_RELOC_PPC_BA26
768
 - : BFD_RELOC_PPC_TOC16
769
 - : BFD_RELOC_PPC_B16
770
 - : BFD_RELOC_PPC_B16_BRTAKEN
771
 - : BFD_RELOC_PPC_B16_BRNTAKEN
772
 - : BFD_RELOC_PPC_BA16
773
 - : BFD_RELOC_PPC_BA16_BRTAKEN
774
 - : BFD_RELOC_PPC_BA16_BRNTAKEN
775
 - : BFD_RELOC_PPC_COPY
776
 - : BFD_RELOC_PPC_GLOB_DAT
777
 - : BFD_RELOC_PPC_JMP_SLOT
778
 - : BFD_RELOC_PPC_RELATIVE
779
 - : BFD_RELOC_PPC_LOCAL24PC
780
 - : BFD_RELOC_PPC_EMB_NADDR32
781
 - : BFD_RELOC_PPC_EMB_NADDR16
782
 - : BFD_RELOC_PPC_EMB_NADDR16_LO
783
 - : BFD_RELOC_PPC_EMB_NADDR16_HI
784
 - : BFD_RELOC_PPC_EMB_NADDR16_HA
785
 - : BFD_RELOC_PPC_EMB_SDAI16
786
 - : BFD_RELOC_PPC_EMB_SDA2I16
787
 - : BFD_RELOC_PPC_EMB_SDA2REL
788
 - : BFD_RELOC_PPC_EMB_SDA21
789
 - : BFD_RELOC_PPC_EMB_MRKREF
790
 - : BFD_RELOC_PPC_EMB_RELSEC16
791
 - : BFD_RELOC_PPC_EMB_RELST_LO
792
 - : BFD_RELOC_PPC_EMB_RELST_HI
793
 - : BFD_RELOC_PPC_EMB_RELST_HA
794
 - : BFD_RELOC_PPC_EMB_BIT_FLD
795
 - : BFD_RELOC_PPC_EMB_RELSDA
796
     Power(rs6000) and PowerPC relocations.
797
 
798
 - : BFD_RELOC_I370_D12
799
     IBM 370/390 relocations
800
 
801
 - : BFD_RELOC_CTOR
802
     The type of reloc used to build a contructor table - at the moment
803
     probably a 32 bit wide absolute relocation, but the target can
804
     choose.  It generally does map to one of the other relocation
805
     types.
806
 
807
 - : BFD_RELOC_ARM_PCREL_BRANCH
808
     ARM 26 bit pc-relative branch.  The lowest two bits must be zero
809
     and are not stored in the instruction.
810
 
811
 - : BFD_RELOC_ARM_PCREL_BLX
812
     ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
813
     not stored in the instruction.  The 2nd lowest bit comes from a 1
814
     bit field in the instruction.
815
 
816
 - : BFD_RELOC_THUMB_PCREL_BLX
817
     Thumb 22 bit pc-relative branch.  The lowest bit must be zero and
818
     is not stored in the instruction.  The 2nd lowest bit comes from a
819
     1 bit field in the instruction.
820
 
821
 - : BFD_RELOC_ARM_IMMEDIATE
822
 - : BFD_RELOC_ARM_ADRL_IMMEDIATE
823
 - : BFD_RELOC_ARM_OFFSET_IMM
824
 - : BFD_RELOC_ARM_SHIFT_IMM
825
 - : BFD_RELOC_ARM_SWI
826
 - : BFD_RELOC_ARM_MULTI
827
 - : BFD_RELOC_ARM_CP_OFF_IMM
828
 - : BFD_RELOC_ARM_ADR_IMM
829
 - : BFD_RELOC_ARM_LDR_IMM
830
 - : BFD_RELOC_ARM_LITERAL
831
 - : BFD_RELOC_ARM_IN_POOL
832
 - : BFD_RELOC_ARM_OFFSET_IMM8
833
 - : BFD_RELOC_ARM_HWLITERAL
834
 - : BFD_RELOC_ARM_THUMB_ADD
835
 - : BFD_RELOC_ARM_THUMB_IMM
836
 - : BFD_RELOC_ARM_THUMB_SHIFT
837
 - : BFD_RELOC_ARM_THUMB_OFFSET
838
 - : BFD_RELOC_ARM_GOT12
839
 - : BFD_RELOC_ARM_GOT32
840
 - : BFD_RELOC_ARM_JUMP_SLOT
841
 - : BFD_RELOC_ARM_COPY
842
 - : BFD_RELOC_ARM_GLOB_DAT
843
 - : BFD_RELOC_ARM_PLT32
844
 - : BFD_RELOC_ARM_RELATIVE
845
 - : BFD_RELOC_ARM_GOTOFF
846
 - : BFD_RELOC_ARM_GOTPC
847
     These relocs are only used within the ARM assembler.  They are not
848
     (at present) written to any object files.
849
 
850
 - : BFD_RELOC_SH_PCDISP8BY2
851
 - : BFD_RELOC_SH_PCDISP12BY2
852
 - : BFD_RELOC_SH_IMM4
853
 - : BFD_RELOC_SH_IMM4BY2
854
 - : BFD_RELOC_SH_IMM4BY4
855
 - : BFD_RELOC_SH_IMM8
856
 - : BFD_RELOC_SH_IMM8BY2
857
 - : BFD_RELOC_SH_IMM8BY4
858
 - : BFD_RELOC_SH_PCRELIMM8BY2
859
 - : BFD_RELOC_SH_PCRELIMM8BY4
860
 - : BFD_RELOC_SH_SWITCH16
861
 - : BFD_RELOC_SH_SWITCH32
862
 - : BFD_RELOC_SH_USES
863
 - : BFD_RELOC_SH_COUNT
864
 - : BFD_RELOC_SH_ALIGN
865
 - : BFD_RELOC_SH_CODE
866
 - : BFD_RELOC_SH_DATA
867
 - : BFD_RELOC_SH_LABEL
868
 - : BFD_RELOC_SH_LOOP_START
869
 - : BFD_RELOC_SH_LOOP_END
870
 - : BFD_RELOC_SH_COPY
871
 - : BFD_RELOC_SH_GLOB_DAT
872
 - : BFD_RELOC_SH_JMP_SLOT
873
 - : BFD_RELOC_SH_RELATIVE
874
 - : BFD_RELOC_SH_GOTPC
875
     Hitachi SH relocs.  Not all of these appear in object files.
876
 
877
 - : BFD_RELOC_THUMB_PCREL_BRANCH9
878
 - : BFD_RELOC_THUMB_PCREL_BRANCH12
879
 - : BFD_RELOC_THUMB_PCREL_BRANCH23
880
     Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
881
     be zero and is not stored in the instruction.
882
 
883
 - : BFD_RELOC_ARC_B22_PCREL
884
     ARC Cores relocs.  ARC 22 bit pc-relative branch.  The lowest two
885
     bits must be zero and are not stored in the instruction.  The high
886
     20 bits are installed in bits 26 through 7 of the instruction.
887
 
888
 - : BFD_RELOC_ARC_B26
889
     ARC 26 bit absolute branch.  The lowest two bits must be zero and
890
     are not stored in the instruction.  The high 24 bits are installed
891
     in bits 23 through 0.
892
 
893
 - : BFD_RELOC_D10V_10_PCREL_R
894
     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
895
     bits assumed to be 0.
896
 
897
 - : BFD_RELOC_D10V_10_PCREL_L
898
     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
899
     bits assumed to be 0.  This is the same as the previous reloc
900
     except it is in the left container, i.e., shifted left 15 bits.
901
 
902
 - : BFD_RELOC_D10V_18
903
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
904
 
905
 - : BFD_RELOC_D10V_18_PCREL
906
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
907
 
908
 - : BFD_RELOC_D30V_6
909
     Mitsubishi D30V relocs.  This is a 6-bit absolute reloc.
910
 
911
 - : BFD_RELOC_D30V_9_PCREL
912
     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
913
     be 0.
914
 
915
 - : BFD_RELOC_D30V_9_PCREL_R
916
     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
917
     be 0. Same as the previous reloc but on the right side of the
918
     container.
919
 
920
 - : BFD_RELOC_D30V_15
921
     This is a 12-bit absolute reloc with the right 3 bitsassumed to be
922
     0.
923
 
924
 - : BFD_RELOC_D30V_15_PCREL
925
     This is a 12-bit pc-relative reloc with the right 3 bits assumed
926
     to be 0.
927
 
928
 - : BFD_RELOC_D30V_15_PCREL_R
929
     This is a 12-bit pc-relative reloc with the right 3 bits assumed
930
     to be 0. Same as the previous reloc but on the right side of the
931
     container.
932
 
933
 - : BFD_RELOC_D30V_21
934
     This is an 18-bit absolute reloc with the right 3 bits assumed to
935
     be 0.
936
 
937
 - : BFD_RELOC_D30V_21_PCREL
938
     This is an 18-bit pc-relative reloc with the right 3 bits assumed
939
     to be 0.
940
 
941
 - : BFD_RELOC_D30V_21_PCREL_R
942
     This is an 18-bit pc-relative reloc with the right 3 bits assumed
943
     to be 0. Same as the previous reloc but on the right side of the
944
     container.
945
 
946
 - : BFD_RELOC_D30V_32
947
     This is a 32-bit absolute reloc.
948
 
949
 - : BFD_RELOC_D30V_32_PCREL
950
     This is a 32-bit pc-relative reloc.
951
 
952
 - : BFD_RELOC_M32R_24
953
     Mitsubishi M32R relocs.  This is a 24 bit absolute address.
954
 
955
 - : BFD_RELOC_M32R_10_PCREL
956
     This is a 10-bit pc-relative reloc with the right 2 bits assumed
957
     to be 0.
958
 
959
 - : BFD_RELOC_M32R_18_PCREL
960
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
961
 
962
 - : BFD_RELOC_M32R_26_PCREL
963
     This is a 26-bit reloc with the right 2 bits assumed to be 0.
964
 
965
 - : BFD_RELOC_M32R_HI16_ULO
966
     This is a 16-bit reloc containing the high 16 bits of an address
967
     used when the lower 16 bits are treated as unsigned.
968
 
969
 - : BFD_RELOC_M32R_HI16_SLO
970
     This is a 16-bit reloc containing the high 16 bits of an address
971
     used when the lower 16 bits are treated as signed.
972
 
973
 - : BFD_RELOC_M32R_LO16
974
     This is a 16-bit reloc containing the lower 16 bits of an address.
975
 
976
 - : BFD_RELOC_M32R_SDA16
977
     This is a 16-bit reloc containing the small data area offset for
978
     use in add3, load, and store instructions.
979
 
980
 - : BFD_RELOC_V850_9_PCREL
981
     This is a 9-bit reloc
982
 
983
 - : BFD_RELOC_V850_22_PCREL
984
     This is a 22-bit reloc
985
 
986
 - : BFD_RELOC_V850_SDA_16_16_OFFSET
987
     This is a 16 bit offset from the short data area pointer.
988
 
989
 - : BFD_RELOC_V850_SDA_15_16_OFFSET
990
     This is a 16 bit offset (of which only 15 bits are used) from the
991
     short data area pointer.
992
 
993
 - : BFD_RELOC_V850_ZDA_16_16_OFFSET
994
     This is a 16 bit offset from the zero data area pointer.
995
 
996
 - : BFD_RELOC_V850_ZDA_15_16_OFFSET
997
     This is a 16 bit offset (of which only 15 bits are used) from the
998
     zero data area pointer.
999
 
1000
 - : BFD_RELOC_V850_TDA_6_8_OFFSET
1001
     This is an 8 bit offset (of which only 6 bits are used) from the
1002
     tiny data area pointer.
1003
 
1004
 - : BFD_RELOC_V850_TDA_7_8_OFFSET
1005
     This is an 8bit offset (of which only 7 bits are used) from the
1006
     tiny data area pointer.
1007
 
1008
 - : BFD_RELOC_V850_TDA_7_7_OFFSET
1009
     This is a 7 bit offset from the tiny data area pointer.
1010
 
1011
 - : BFD_RELOC_V850_TDA_16_16_OFFSET
1012
     This is a 16 bit offset from the tiny data area pointer.
1013
 
1014
 - : BFD_RELOC_V850_TDA_4_5_OFFSET
1015
     This is a 5 bit offset (of which only 4 bits are used) from the
1016
     tiny data area pointer.
1017
 
1018
 - : BFD_RELOC_V850_TDA_4_4_OFFSET
1019
     This is a 4 bit offset from the tiny data area pointer.
1020
 
1021
 - : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
1022
     This is a 16 bit offset from the short data area pointer, with the
1023
     bits placed non-contigously in the instruction.
1024
 
1025
 - : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
1026
     This is a 16 bit offset from the zero data area pointer, with the
1027
     bits placed non-contigously in the instruction.
1028
 
1029
 - : BFD_RELOC_V850_CALLT_6_7_OFFSET
1030
     This is a 6 bit offset from the call table base pointer.
1031
 
1032
 - : BFD_RELOC_V850_CALLT_16_16_OFFSET
1033
     This is a 16 bit offset from the call table base pointer.
1034
 
1035
 - : BFD_RELOC_MN10300_32_PCREL
1036
     This is a 32bit pcrel reloc for the mn10300, offset by two bytes
1037
     in the instruction.
1038
 
1039
 - : BFD_RELOC_MN10300_16_PCREL
1040
     This is a 16bit pcrel reloc for the mn10300, offset by two bytes
1041
     in the instruction.
1042
 
1043
 - : BFD_RELOC_TIC30_LDP
1044
     This is a 8bit DP reloc for the tms320c30, where the most
1045
     significant 8 bits of a 24 bit word are placed into the least
1046
     significant 8 bits of the opcode.
1047
 
1048
 - : BFD_RELOC_TIC54X_PARTLS7
1049
     This is a 7bit reloc for the tms320c54x, where the least
1050
     significant 7 bits of a 16 bit word are placed into the least
1051
     significant 7 bits of the opcode.
1052
 
1053
 - : BFD_RELOC_TIC54X_PARTMS9
1054
     This is a 9bit DP reloc for the tms320c54x, where the most
1055
     significant 9 bits of a 16 bit word are placed into the least
1056
     significant 9 bits of the opcode.
1057
 
1058
 - : BFD_RELOC_TIC54X_23
1059
     This is an extended address 23-bit reloc for the tms320c54x.
1060
 
1061
 - : BFD_RELOC_TIC54X_16_OF_23
1062
     This is a 16-bit reloc for the tms320c54x, where the least
1063
     significant 16 bits of a 23-bit extended address are placed into
1064
     the opcode.
1065
 
1066
 - : BFD_RELOC_TIC54X_MS7_OF_23
1067
     This is a reloc for the tms320c54x, where the most significant 7
1068
     bits of a 23-bit extended address are placed into the opcode.
1069
 
1070
 - : BFD_RELOC_FR30_48
1071
     This is a 48 bit reloc for the FR30 that stores 32 bits.
1072
 
1073
 - : BFD_RELOC_FR30_20
1074
     This is a 32 bit reloc for the FR30 that stores 20 bits split up
1075
     into two sections.
1076
 
1077
 - : BFD_RELOC_FR30_6_IN_4
1078
     This is a 16 bit reloc for the FR30 that stores a 6 bit word
1079
     offset in 4 bits.
1080
 
1081
 - : BFD_RELOC_FR30_8_IN_8
1082
     This is a 16 bit reloc for the FR30 that stores an 8 bit byte
1083
     offset into 8 bits.
1084
 
1085
 - : BFD_RELOC_FR30_9_IN_8
1086
     This is a 16 bit reloc for the FR30 that stores a 9 bit short
1087
     offset into 8 bits.
1088
 
1089
 - : BFD_RELOC_FR30_10_IN_8
1090
     This is a 16 bit reloc for the FR30 that stores a 10 bit word
1091
     offset into 8 bits.
1092
 
1093
 - : BFD_RELOC_FR30_9_PCREL
1094
     This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
1095
     short offset into 8 bits.
1096
 
1097
 - : BFD_RELOC_FR30_12_PCREL
1098
     This is a 16 bit reloc for the FR30 that stores a 12 bit pc
1099
     relative short offset into 11 bits.
1100
 
1101
 - : BFD_RELOC_MCORE_PCREL_IMM8BY4
1102
 - : BFD_RELOC_MCORE_PCREL_IMM11BY2
1103
 - : BFD_RELOC_MCORE_PCREL_IMM4BY2
1104
 - : BFD_RELOC_MCORE_PCREL_32
1105
 - : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
1106
 - : BFD_RELOC_MCORE_RVA
1107
     Motorola Mcore relocations.
1108
 
1109
 - : BFD_RELOC_AVR_7_PCREL
1110
     This is a 16 bit reloc for the AVR that stores 8 bit pc relative
1111
     short offset into 7 bits.
1112
 
1113
 - : BFD_RELOC_AVR_13_PCREL
1114
     This is a 16 bit reloc for the AVR that stores 13 bit pc relative
1115
     short offset into 12 bits.
1116
 
1117
 - : BFD_RELOC_AVR_16_PM
1118
     This is a 16 bit reloc for the AVR that stores 17 bit value
1119
     (usually program memory address) into 16 bits.
1120
 
1121
 - : BFD_RELOC_AVR_LO8_LDI
1122
     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
1123
     data memory address) into 8 bit immediate value of LDI insn.
1124
 
1125
 - : BFD_RELOC_AVR_HI8_LDI
1126
     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
1127
     bit of data memory address) into 8 bit immediate value of LDI insn.
1128
 
1129
 - : BFD_RELOC_AVR_HH8_LDI
1130
     This is a 16 bit reloc for the AVR that stores 8 bit value (most
1131
     high 8 bit of program memory address) into 8 bit immediate value
1132
     of LDI insn.
1133
 
1134
 - : BFD_RELOC_AVR_LO8_LDI_NEG
1135
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1136
     (usually data memory address) into 8 bit immediate value of SUBI
1137
     insn.
1138
 
1139
 - : BFD_RELOC_AVR_HI8_LDI_NEG
1140
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1141
     (high 8 bit of data memory address) into 8 bit immediate value of
1142
     SUBI insn.
1143
 
1144
 - : BFD_RELOC_AVR_HH8_LDI_NEG
1145
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1146
     (most high 8 bit of program memory address) into 8 bit immediate
1147
     value of LDI or SUBI insn.
1148
 
1149
 - : BFD_RELOC_AVR_LO8_LDI_PM
1150
     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
1151
     command address) into 8 bit immediate value of LDI insn.
1152
 
1153
 - : BFD_RELOC_AVR_HI8_LDI_PM
1154
     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
1155
     bit of command address) into 8 bit immediate value of LDI insn.
1156
 
1157
 - : BFD_RELOC_AVR_HH8_LDI_PM
1158
     This is a 16 bit reloc for the AVR that stores 8 bit value (most
1159
     high 8 bit of command address) into 8 bit immediate value of LDI
1160
     insn.
1161
 
1162
 - : BFD_RELOC_AVR_LO8_LDI_PM_NEG
1163
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1164
     (usually command address) into 8 bit immediate value of SUBI insn.
1165
 
1166
 - : BFD_RELOC_AVR_HI8_LDI_PM_NEG
1167
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1168
     (high 8 bit of 16 bit command address) into 8 bit immediate value
1169
     of SUBI insn.
1170
 
1171
 - : BFD_RELOC_AVR_HH8_LDI_PM_NEG
1172
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
1173
     (high 6 bit of 22 bit command address) into 8 bit immediate value
1174
     of SUBI insn.
1175
 
1176
 - : BFD_RELOC_AVR_CALL
1177
     This is a 32 bit reloc for the AVR that stores 23 bit value into
1178
     22 bits.
1179
 
1180
 - : BFD_RELOC_390_12
1181
     Direct 12 bit.
1182
 
1183
 - : BFD_RELOC_390_GOT12
1184
     12 bit GOT offset.
1185
 
1186
 - : BFD_RELOC_390_PLT32
1187
     32 bit PC relative PLT address.
1188
 
1189
 - : BFD_RELOC_390_COPY
1190
     Copy symbol at runtime.
1191
 
1192
 - : BFD_RELOC_390_GLOB_DAT
1193
     Create GOT entry.
1194
 
1195
 - : BFD_RELOC_390_JMP_SLOT
1196
     Create PLT entry.
1197
 
1198
 - : BFD_RELOC_390_RELATIVE
1199
     Adjust by program base.
1200
 
1201
 - : BFD_RELOC_390_GOTPC
1202
     32 bit PC relative offset to GOT.
1203
 
1204
 - : BFD_RELOC_390_GOT16
1205
     16 bit GOT offset.
1206
 
1207
 - : BFD_RELOC_390_PC16DBL
1208
     PC relative 16 bit shifted by 1.
1209
 
1210
 - : BFD_RELOC_390_PLT16DBL
1211
     16 bit PC rel. PLT shifted by 1.
1212
 
1213
 - : BFD_RELOC_390_PC32DBL
1214
     PC relative 32 bit shifted by 1.
1215
 
1216
 - : BFD_RELOC_390_PLT32DBL
1217
     32 bit PC rel. PLT shifted by 1.
1218
 
1219
 - : BFD_RELOC_390_GOTPCDBL
1220
     32 bit PC rel. GOT shifted by 1.
1221
 
1222
 - : BFD_RELOC_390_GOT64
1223
     64 bit GOT offset.
1224
 
1225
 - : BFD_RELOC_390_PLT64
1226
     64 bit PC relative PLT address.
1227
 
1228
 - : BFD_RELOC_390_GOTENT
1229
     32 bit rel. offset to GOT entry.
1230
 
1231
 - : BFD_RELOC_VTABLE_INHERIT
1232
 - : BFD_RELOC_VTABLE_ENTRY
1233
     These two relocations are used by the linker to determine which of
1234
     the entries in a C++ virtual function table are actually used.
1235
     When the -gc-sections option is given, the linker will zero out
1236
     the entries that are not used, so that the code for those
1237
     functions need not be included in the output.
1238
 
1239
     VTABLE_INHERIT is a zero-space relocation used to describe to the
1240
     linker the inheritence tree of a C++ virtual function table.  The
1241
     relocation's symbol should be the parent class' vtable, and the
1242
     relocation should be located at the child vtable.
1243
 
1244
     VTABLE_ENTRY is a zero-space relocation that describes the use of a
1245
     virtual function table entry.  The reloc's symbol should refer to
1246
     the table of the class mentioned in the code.  Off of that base,
1247
     an offset describes the entry that is being used.  For Rela hosts,
1248
     this offset is stored in the reloc's addend.  For Rel hosts, we
1249
     are forced to put this offset in the reloc's section offset.
1250
 
1251
 - : BFD_RELOC_IA64_IMM14
1252
 - : BFD_RELOC_IA64_IMM22
1253
 - : BFD_RELOC_IA64_IMM64
1254
 - : BFD_RELOC_IA64_DIR32MSB
1255
 - : BFD_RELOC_IA64_DIR32LSB
1256
 - : BFD_RELOC_IA64_DIR64MSB
1257
 - : BFD_RELOC_IA64_DIR64LSB
1258
 - : BFD_RELOC_IA64_GPREL22
1259
 - : BFD_RELOC_IA64_GPREL64I
1260
 - : BFD_RELOC_IA64_GPREL32MSB
1261
 - : BFD_RELOC_IA64_GPREL32LSB
1262
 - : BFD_RELOC_IA64_GPREL64MSB
1263
 - : BFD_RELOC_IA64_GPREL64LSB
1264
 - : BFD_RELOC_IA64_LTOFF22
1265
 - : BFD_RELOC_IA64_LTOFF64I
1266
 - : BFD_RELOC_IA64_PLTOFF22
1267
 - : BFD_RELOC_IA64_PLTOFF64I
1268
 - : BFD_RELOC_IA64_PLTOFF64MSB
1269
 - : BFD_RELOC_IA64_PLTOFF64LSB
1270
 - : BFD_RELOC_IA64_FPTR64I
1271
 - : BFD_RELOC_IA64_FPTR32MSB
1272
 - : BFD_RELOC_IA64_FPTR32LSB
1273
 - : BFD_RELOC_IA64_FPTR64MSB
1274
 - : BFD_RELOC_IA64_FPTR64LSB
1275
 - : BFD_RELOC_IA64_PCREL21B
1276
 - : BFD_RELOC_IA64_PCREL21BI
1277
 - : BFD_RELOC_IA64_PCREL21M
1278
 - : BFD_RELOC_IA64_PCREL21F
1279
 - : BFD_RELOC_IA64_PCREL22
1280
 - : BFD_RELOC_IA64_PCREL60B
1281
 - : BFD_RELOC_IA64_PCREL64I
1282
 - : BFD_RELOC_IA64_PCREL32MSB
1283
 - : BFD_RELOC_IA64_PCREL32LSB
1284
 - : BFD_RELOC_IA64_PCREL64MSB
1285
 - : BFD_RELOC_IA64_PCREL64LSB
1286
 - : BFD_RELOC_IA64_LTOFF_FPTR22
1287
 - : BFD_RELOC_IA64_LTOFF_FPTR64I
1288
 - : BFD_RELOC_IA64_LTOFF_FPTR64MSB
1289
 - : BFD_RELOC_IA64_LTOFF_FPTR64LSB
1290
 - : BFD_RELOC_IA64_SEGREL32MSB
1291
 - : BFD_RELOC_IA64_SEGREL32LSB
1292
 - : BFD_RELOC_IA64_SEGREL64MSB
1293
 - : BFD_RELOC_IA64_SEGREL64LSB
1294
 - : BFD_RELOC_IA64_SECREL32MSB
1295
 - : BFD_RELOC_IA64_SECREL32LSB
1296
 - : BFD_RELOC_IA64_SECREL64MSB
1297
 - : BFD_RELOC_IA64_SECREL64LSB
1298
 - : BFD_RELOC_IA64_REL32MSB
1299
 - : BFD_RELOC_IA64_REL32LSB
1300
 - : BFD_RELOC_IA64_REL64MSB
1301
 - : BFD_RELOC_IA64_REL64LSB
1302
 - : BFD_RELOC_IA64_LTV32MSB
1303
 - : BFD_RELOC_IA64_LTV32LSB
1304
 - : BFD_RELOC_IA64_LTV64MSB
1305
 - : BFD_RELOC_IA64_LTV64LSB
1306
 - : BFD_RELOC_IA64_IPLTMSB
1307
 - : BFD_RELOC_IA64_IPLTLSB
1308
 - : BFD_RELOC_IA64_COPY
1309
 - : BFD_RELOC_IA64_TPREL22
1310
 - : BFD_RELOC_IA64_TPREL64MSB
1311
 - : BFD_RELOC_IA64_TPREL64LSB
1312
 - : BFD_RELOC_IA64_LTOFF_TP22
1313
 - : BFD_RELOC_IA64_LTOFF22X
1314
 - : BFD_RELOC_IA64_LDXMOV
1315
     Intel IA64 Relocations.
1316
 
1317
 - : BFD_RELOC_M68HC11_HI8
1318
     Motorola 68HC11 reloc.  This is the 8 bits high part of an
1319
     absolute address.
1320
 
1321
 - : BFD_RELOC_M68HC11_LO8
1322
     Motorola 68HC11 reloc.  This is the 8 bits low part of an absolute
1323
     address.
1324
 
1325
 - : BFD_RELOC_M68HC11_3B
1326
     Motorola 68HC11 reloc.  This is the 3 bits of a value.
1327
 
1328
 - : BFD_RELOC_CRIS_BDISP8
1329
 - : BFD_RELOC_CRIS_UNSIGNED_5
1330
 - : BFD_RELOC_CRIS_SIGNED_6
1331
 - : BFD_RELOC_CRIS_UNSIGNED_6
1332
 - : BFD_RELOC_CRIS_UNSIGNED_4
1333
     These relocs are only used within the CRIS assembler.  They are not
1334
     (at present) written to any object files.
1335
 
1336
 - : BFD_RELOC_CRIS_COPY
1337
 - : BFD_RELOC_CRIS_GLOB_DAT
1338
 - : BFD_RELOC_CRIS_JUMP_SLOT
1339
 - : BFD_RELOC_CRIS_RELATIVE
1340
     Relocs used in ELF shared libraries for CRIS.
1341
 
1342
 - : BFD_RELOC_CRIS_32_GOT
1343
     32-bit offset to symbol-entry within GOT.
1344
 
1345
 - : BFD_RELOC_CRIS_16_GOT
1346
     16-bit offset to symbol-entry within GOT.
1347
 
1348
 - : BFD_RELOC_CRIS_32_GOTPLT
1349
     32-bit offset to symbol-entry within GOT, with PLT handling.
1350
 
1351
 - : BFD_RELOC_CRIS_16_GOTPLT
1352
     16-bit offset to symbol-entry within GOT, with PLT handling.
1353
 
1354
 - : BFD_RELOC_CRIS_32_GOTREL
1355
     32-bit offset to symbol, relative to GOT.
1356
 
1357
 - : BFD_RELOC_CRIS_32_PLT_GOTREL
1358
     32-bit offset to symbol with PLT entry, relative to GOT.
1359
 
1360
 - : BFD_RELOC_CRIS_32_PLT_PCREL
1361
     32-bit offset to symbol with PLT entry, relative to this
1362
     relocation.
1363
 
1364
 - : BFD_RELOC_860_COPY
1365
 - : BFD_RELOC_860_GLOB_DAT
1366
 - : BFD_RELOC_860_JUMP_SLOT
1367
 - : BFD_RELOC_860_RELATIVE
1368
 - : BFD_RELOC_860_PC26
1369
 - : BFD_RELOC_860_PLT26
1370
 - : BFD_RELOC_860_PC16
1371
 - : BFD_RELOC_860_LOW0
1372
 - : BFD_RELOC_860_SPLIT0
1373
 - : BFD_RELOC_860_LOW1
1374
 - : BFD_RELOC_860_SPLIT1
1375
 - : BFD_RELOC_860_LOW2
1376
 - : BFD_RELOC_860_SPLIT2
1377
 - : BFD_RELOC_860_LOW3
1378
 - : BFD_RELOC_860_LOGOT0
1379
 - : BFD_RELOC_860_SPGOT0
1380
 - : BFD_RELOC_860_LOGOT1
1381
 - : BFD_RELOC_860_SPGOT1
1382
 - : BFD_RELOC_860_LOGOTOFF0
1383
 - : BFD_RELOC_860_SPGOTOFF0
1384
 - : BFD_RELOC_860_LOGOTOFF1
1385
 - : BFD_RELOC_860_SPGOTOFF1
1386
 - : BFD_RELOC_860_LOGOTOFF2
1387
 - : BFD_RELOC_860_LOGOTOFF3
1388
 - : BFD_RELOC_860_LOPC
1389
 - : BFD_RELOC_860_HIGHADJ
1390
 - : BFD_RELOC_860_HAGOT
1391
 - : BFD_RELOC_860_HAGOTOFF
1392
 - : BFD_RELOC_860_HAPC
1393
 - : BFD_RELOC_860_HIGH
1394
 - : BFD_RELOC_860_HIGOT
1395
 - : BFD_RELOC_860_HIGOTOFF
1396
     Intel i860 Relocations.
1397
 
1398
 - : BFD_RELOC_OPENRISC_ABS_26
1399
 - : BFD_RELOC_OPENRISC_REL_26
1400
     OpenRISC Relocations.
1401
 
1402
 
1403
     typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
1404
 
1405
`bfd_reloc_type_lookup'
1406
.......................
1407
 
1408
   *Synopsis*
1409
     reloc_howto_type *
1410
     bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
1411
   *Description*
1412
Return a pointer to a howto structure which, when invoked, will perform
1413
the relocation CODE on data from the architecture noted.
1414
 
1415
`bfd_default_reloc_type_lookup'
1416
...............................
1417
 
1418
   *Synopsis*
1419
     reloc_howto_type *bfd_default_reloc_type_lookup
1420
        (bfd *abfd, bfd_reloc_code_real_type  code);
1421
   *Description*
1422
Provides a default relocation lookup routine for any architecture.
1423
 
1424
`bfd_get_reloc_code_name'
1425
.........................
1426
 
1427
   *Synopsis*
1428
     const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
1429
   *Description*
1430
Provides a printable name for the supplied relocation code.  Useful
1431
mainly for printing error messages.
1432
 
1433
`bfd_generic_relax_section'
1434
...........................
1435
 
1436
   *Synopsis*
1437
     boolean bfd_generic_relax_section
1438
        (bfd *abfd,
1439
         asection *section,
1440
         struct bfd_link_info *,
1441
         boolean *);
1442
   *Description*
1443
Provides default handling for relaxing for back ends which don't do
1444
relaxing - i.e., does nothing.
1445
 
1446
`bfd_generic_gc_sections'
1447
.........................
1448
 
1449
   *Synopsis*
1450
     boolean bfd_generic_gc_sections
1451
        (bfd *, struct bfd_link_info *);
1452
   *Description*
1453
Provides default handling for relaxing for back ends which don't do
1454
section gc - i.e., does nothing.
1455
 
1456
`bfd_generic_merge_sections'
1457
............................
1458
 
1459
   *Synopsis*
1460
     boolean bfd_generic_merge_sections
1461
        (bfd *, struct bfd_link_info *);
1462
   *Description*
1463
Provides default handling for SEC_MERGE section merging for back ends
1464
which don't have SEC_MERGE support - i.e., does nothing.
1465
 
1466
`bfd_generic_get_relocated_section_contents'
1467
............................................
1468
 
1469
   *Synopsis*
1470
     bfd_byte *
1471
     bfd_generic_get_relocated_section_contents (bfd *abfd,
1472
         struct bfd_link_info *link_info,
1473
         struct bfd_link_order *link_order,
1474
         bfd_byte *data,
1475
         boolean relocateable,
1476
         asymbol **symbols);
1477
   *Description*
1478
Provides default handling of relocation effort for back ends which
1479
can't be bothered to do it efficiently.
1480
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.