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

Subversion Repositories or1k

[/] [or1k/] [tags/] [start/] [gdb-5.0/] [bfd/] [doc/] [reloc.texi] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 104 markom
@section Relocations
2
BFD maintains relocations in much the same way it maintains
3
symbols: they are left alone until required, then read in
4
en-mass and translated into an internal form.  A common
5
routine @code{bfd_perform_relocation} acts upon the
6
canonical form to do the fixup.
7
 
8
Relocations are maintained on a per section basis,
9
while symbols are maintained on a per BFD basis.
10
 
11
All that a back end has to do to fit the BFD interface is to create
12
a @code{struct reloc_cache_entry} for each relocation
13
in a particular section, and fill in the right bits of the structures.
14
 
15
@menu
16
* typedef arelent::
17
* howto manager::
18
@end menu
19
 
20
 
21
@node typedef arelent, howto manager, Relocations, Relocations
22
@subsection typedef arelent
23
This is the structure of a relocation entry:
24
 
25
 
26
@example
27
 
28
typedef enum bfd_reloc_status
29
@{
30
       /* No errors detected */
31
  bfd_reloc_ok,
32
 
33
       /* The relocation was performed, but there was an overflow. */
34
  bfd_reloc_overflow,
35
 
36
       /* The address to relocate was not within the section supplied. */
37
  bfd_reloc_outofrange,
38
 
39
       /* Used by special functions */
40
  bfd_reloc_continue,
41
 
42
       /* Unsupported relocation size requested. */
43
  bfd_reloc_notsupported,
44
 
45
       /* Unused */
46
  bfd_reloc_other,
47
 
48
       /* The symbol to relocate against was undefined. */
49
  bfd_reloc_undefined,
50
 
51
       /* The relocation was performed, but may not be ok - presently
52
          generated only when linking i960 coff files with i960 b.out
53
          symbols.  If this type is returned, the error_message argument
54
          to bfd_perform_relocation will be set.  */
55
  bfd_reloc_dangerous
56
 @}
57
 bfd_reloc_status_type;
58
 
59
 
60
typedef struct reloc_cache_entry
61
@{
62
       /* A pointer into the canonical table of pointers  */
63
  struct symbol_cache_entry **sym_ptr_ptr;
64
 
65
       /* offset in section */
66
  bfd_size_type address;
67
 
68
       /* addend for relocation value */
69
  bfd_vma addend;
70
 
71
       /* Pointer to how to perform the required relocation */
72
  reloc_howto_type *howto;
73
 
74
@} arelent;
75
@end example
76
@strong{Description}@*
77
Here is a description of each of the fields within an @code{arelent}:
78
 
79
@itemize @bullet
80
 
81
@item
82
@code{sym_ptr_ptr}
83
@end itemize
84
The symbol table pointer points to a pointer to the symbol
85
associated with the relocation request.  It is
86
the pointer into the table returned by the back end's
87
@code{get_symtab} action. @xref{Symbols}. The symbol is referenced
88
through a pointer to a pointer so that tools like the linker
89
can fix up all the symbols of the same name by modifying only
90
one pointer. The relocation routine looks in the symbol and
91
uses the base of the section the symbol is attached to and the
92
value of the symbol as the initial relocation offset. If the
93
symbol pointer is zero, then the section provided is looked up.
94
 
95
@itemize @bullet
96
 
97
@item
98
@code{address}
99
@end itemize
100
The @code{address} field gives the offset in bytes from the base of
101
the section data which owns the relocation record to the first
102
byte of relocatable information. The actual data relocated
103
will be relative to this point; for example, a relocation
104
type which modifies the bottom two bytes of a four byte word
105
would not touch the first byte pointed to in a big endian
106
world.
107
 
108
@itemize @bullet
109
 
110
@item
111
@code{addend}
112
@end itemize
113
The @code{addend} is a value provided by the back end to be added (!)
114
to the relocation offset. Its interpretation is dependent upon
115
the howto. For example, on the 68k the code:
116
 
117
@example
118
        char foo[];
119
        main()
120
                @{
121
                return foo[0x12345678];
122
                @}
123
@end example
124
 
125
Could be compiled into:
126
 
127
@example
128
        linkw fp,#-4
129
        moveb @@#12345678,d0
130
        extbl d0
131
        unlk fp
132
        rts
133
@end example
134
 
135
This could create a reloc pointing to @code{foo}, but leave the
136
offset in the data, something like:
137
 
138
@example
139
RELOCATION RECORDS FOR [.text]:
140
offset   type      value
141
00000006 32        _foo
142
 
143
00000000 4e56 fffc          ; linkw fp,#-4
144
00000004 1039 1234 5678     ; moveb @@#12345678,d0
145
0000000a 49c0               ; extbl d0
146
0000000c 4e5e               ; unlk fp
147
0000000e 4e75               ; rts
148
@end example
149
 
150
Using coff and an 88k, some instructions don't have enough
151
space in them to represent the full address range, and
152
pointers have to be loaded in two parts. So you'd get something like:
153
 
154
@example
155
        or.u     r13,r0,hi16(_foo+0x12345678)
156
        ld.b     r2,r13,lo16(_foo+0x12345678)
157
        jmp      r1
158
@end example
159
 
160
This should create two relocs, both pointing to @code{_foo}, and with
161
0x12340000 in their addend field. The data would consist of:
162
 
163
@example
164
RELOCATION RECORDS FOR [.text]:
165
offset   type      value
166
00000002 HVRT16    _foo+0x12340000
167
00000006 LVRT16    _foo+0x12340000
168
 
169
00000000 5da05678           ; or.u r13,r0,0x5678
170
00000004 1c4d5678           ; ld.b r2,r13,0x5678
171
00000008 f400c001           ; jmp r1
172
@end example
173
 
174
The relocation routine digs out the value from the data, adds
175
it to the addend to get the original offset, and then adds the
176
value of @code{_foo}. Note that all 32 bits have to be kept around
177
somewhere, to cope with carry from bit 15 to bit 16.
178
 
179
One further example is the sparc and the a.out format. The
180
sparc has a similar problem to the 88k, in that some
181
instructions don't have room for an entire offset, but on the
182
sparc the parts are created in odd sized lumps. The designers of
183
the a.out format chose to not use the data within the section
184
for storing part of the offset; all the offset is kept within
185
the reloc. Anything in the data should be ignored.
186
 
187
@example
188
        save %sp,-112,%sp
189
        sethi %hi(_foo+0x12345678),%g2
190
        ldsb [%g2+%lo(_foo+0x12345678)],%i0
191
        ret
192
        restore
193
@end example
194
 
195
Both relocs contain a pointer to @code{foo}, and the offsets
196
contain junk.
197
 
198
@example
199
RELOCATION RECORDS FOR [.text]:
200
offset   type      value
201
00000004 HI22      _foo+0x12345678
202
00000008 LO10      _foo+0x12345678
203
 
204
00000000 9de3bf90     ; save %sp,-112,%sp
205
00000004 05000000     ; sethi %hi(_foo+0),%g2
206
00000008 f048a000     ; ldsb [%g2+%lo(_foo+0)],%i0
207
0000000c 81c7e008     ; ret
208
00000010 81e80000     ; restore
209
@end example
210
 
211
@itemize @bullet
212
 
213
@item
214
@code{howto}
215
@end itemize
216
The @code{howto} field can be imagined as a
217
relocation instruction. It is a pointer to a structure which
218
contains information on what to do with all of the other
219
information in the reloc record and data section. A back end
220
would normally have a relocation instruction set and turn
221
relocations into pointers to the correct structure on input -
222
but it would be possible to create each howto field on demand.
223
 
224
@subsubsection @code{enum complain_overflow}
225
Indicates what sort of overflow checking should be done when
226
performing a relocation.
227
 
228
 
229
@example
230
 
231
enum complain_overflow
232
@{
233
       /* Do not complain on overflow. */
234
  complain_overflow_dont,
235
 
236
       /* Complain if the bitfield overflows, whether it is considered
237
          as signed or unsigned. */
238
  complain_overflow_bitfield,
239
 
240
       /* Complain if the value overflows when considered as signed
241
          number. */
242
  complain_overflow_signed,
243
 
244
       /* Complain if the value overflows when considered as an
245
          unsigned number. */
246
  complain_overflow_unsigned
247
@};
248
@end example
249
@subsubsection @code{reloc_howto_type}
250
The @code{reloc_howto_type} is a structure which contains all the
251
information that libbfd needs to know to tie up a back end's data.
252
 
253
 
254
@example
255
struct symbol_cache_entry;             /* Forward declaration */
256
 
257
struct reloc_howto_struct
258
@{
259
       /*  The type field has mainly a documentary use - the back end can
260
           do what it wants with it, though normally the back end's
261
           external idea of what a reloc number is stored
262
           in this field. For example, a PC relative word relocation
263
           in a coff environment has the type 023 - because that's
264
           what the outside world calls a R_PCRWORD reloc. */
265
  unsigned int type;
266
 
267
       /*  The value the final relocation is shifted right by. This drops
268
           unwanted data from the relocation.  */
269
  unsigned int rightshift;
270
 
271
       /*  The size of the item to be relocated.  This is *not* a
272
           power-of-two measure.  To get the number of bytes operated
273
           on by a type of relocation, use bfd_get_reloc_size.  */
274
  int size;
275
 
276
       /*  The number of bits in the item to be relocated.  This is used
277
           when doing overflow checking.  */
278
  unsigned int bitsize;
279
 
280
       /*  Notes that the relocation is relative to the location in the
281
           data section of the addend. The relocation function will
282
           subtract from the relocation value the address of the location
283
           being relocated. */
284
  boolean pc_relative;
285
 
286
       /*  The bit position of the reloc value in the destination.
287
           The relocated value is left shifted by this amount. */
288
  unsigned int bitpos;
289
 
290
       /* What type of overflow error should be checked for when
291
          relocating. */
292
  enum complain_overflow complain_on_overflow;
293
 
294
       /* If this field is non null, then the supplied function is
295
          called rather than the normal function. This allows really
296
          strange relocation methods to be accomodated (e.g., i960 callj
297
          instructions). */
298
  bfd_reloc_status_type (*special_function)
299
                                   PARAMS ((bfd *abfd,
300
                                            arelent *reloc_entry,
301
                                            struct symbol_cache_entry *symbol,
302
                                            PTR data,
303
                                            asection *input_section,
304
                                            bfd *output_bfd,
305
                                            char **error_message));
306
 
307
       /* The textual name of the relocation type. */
308
  char *name;
309
 
310
       /* Some formats record a relocation addend in the section contents
311
          rather than with the relocation.  For ELF formats this is the
312
          distinction between USE_REL and USE_RELA (though the code checks
313
          for USE_REL == 1/0).  The value of this field is TRUE if the
314
          addend is recorded with the section contents; when performing a
315
          partial link (ld -r) the section contents (the data) will be
316
          modified.  The value of this field is FALSE if addends are
317
          recorded with the relocation (in arelent.addend); when performing
318
          a partial link the relocation will be modified.
319
          All relocations for all ELF USE_RELA targets should set this field
320
          to FALSE (values of TRUE should be looked on with suspicion).
321
          However, the converse is not true: not all relocations of all ELF
322
          USE_REL targets set this field to TRUE.  Why this is so is peculiar
323
          to each particular target.  For relocs that aren't used in partial
324
          links (e.g. GOT stuff) it doesn't matter what this is set to.  */
325
  boolean partial_inplace;
326
 
327
       /* The src_mask selects which parts of the read in data
328
          are to be used in the relocation sum.  E.g., if this was an 8 bit
329
          byte of data which we read and relocated, this would be
330
          0x000000ff. When we have relocs which have an addend, such as
331
          sun4 extended relocs, the value in the offset part of a
332
          relocating field is garbage so we never use it. In this case
333
          the mask would be 0x00000000. */
334
  bfd_vma src_mask;
335
 
336
       /* The dst_mask selects which parts of the instruction are replaced
337
          into the instruction. In most cases src_mask == dst_mask,
338
          except in the above special case, where dst_mask would be
339
          0x000000ff, and src_mask would be 0x00000000.   */
340
  bfd_vma dst_mask;
341
 
342
       /* When some formats create PC relative instructions, they leave
343
          the value of the pc of the place being relocated in the offset
344
          slot of the instruction, so that a PC relative relocation can
345
          be made just by adding in an ordinary offset (e.g., sun3 a.out).
346
          Some formats leave the displacement part of an instruction
347
          empty (e.g., m88k bcs); this flag signals the fact.*/
348
  boolean pcrel_offset;
349
 
350
@};
351
@end example
352
@findex The HOWTO Macro
353
@subsubsection @code{The HOWTO Macro}
354
@strong{Description}@*
355
The HOWTO define is horrible and will go away.
356
@example
357
#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
358
  @{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC@}
359
@end example
360
 
361
@strong{Description}@*
362
And will be replaced with the totally magic way. But for the
363
moment, we are compatible, so do it this way.
364
@example
365
#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
366
 
367
@end example
368
 
369
@strong{Description}@*
370
This is used to fill in an empty howto entry in an array.
371
@example
372
#define EMPTY_HOWTO(C) \
373
  HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
374
 
375
@end example
376
 
377
@strong{Description}@*
378
Helper routine to turn a symbol into a relocation value.
379
@example
380
#define HOWTO_PREPARE(relocation, symbol)      \
381
  @{                                            \
382
  if (symbol != (asymbol *)NULL) @{             \
383
    if (bfd_is_com_section (symbol->section)) @{ \
384
      relocation = 0;                          \
385
    @}                                          \
386
    else @{                                     \
387
      relocation = symbol->value;              \
388
    @}                                          \
389
  @}                                            \
390
@}
391
@end example
392
 
393
@findex bfd_get_reloc_size
394
@subsubsection @code{bfd_get_reloc_size}
395
@strong{Synopsis}
396
@example
397
unsigned int bfd_get_reloc_size (reloc_howto_type *);
398
@end example
399
@strong{Description}@*
400
For a reloc_howto_type that operates on a fixed number of bytes,
401
this returns the number of bytes operated on.
402
 
403
@findex arelent_chain
404
@subsubsection @code{arelent_chain}
405
@strong{Description}@*
406
How relocs are tied together in an @code{asection}:
407
@example
408
typedef struct relent_chain @{
409
  arelent relent;
410
  struct   relent_chain *next;
411
@} arelent_chain;
412
@end example
413
 
414
@findex bfd_check_overflow
415
@subsubsection @code{bfd_check_overflow}
416
@strong{Synopsis}
417
@example
418
bfd_reloc_status_type
419
bfd_check_overflow
420
   (enum complain_overflow how,
421
    unsigned int bitsize,
422
    unsigned int rightshift,
423
    unsigned int addrsize,
424
    bfd_vma relocation);
425
@end example
426
@strong{Description}@*
427
Perform overflow checking on @var{relocation} which has
428
@var{bitsize} significant bits and will be shifted right by
429
@var{rightshift} bits, on a machine with addresses containing
430
@var{addrsize} significant bits.  The result is either of
431
@code{bfd_reloc_ok} or @code{bfd_reloc_overflow}.
432
 
433
@findex bfd_perform_relocation
434
@subsubsection @code{bfd_perform_relocation}
435
@strong{Synopsis}
436
@example
437
bfd_reloc_status_type
438
bfd_perform_relocation
439
   (bfd *abfd,
440
    arelent *reloc_entry,
441
    PTR data,
442
    asection *input_section,
443
    bfd *output_bfd,
444
    char **error_message);
445
@end example
446
@strong{Description}@*
447
If @var{output_bfd} is supplied to this function, the
448
generated image will be relocatable; the relocations are
449
copied to the output file after they have been changed to
450
reflect the new state of the world. There are two ways of
451
reflecting the results of partial linkage in an output file:
452
by modifying the output data in place, and by modifying the
453
relocation record.  Some native formats (e.g., basic a.out and
454
basic coff) have no way of specifying an addend in the
455
relocation type, so the addend has to go in the output data.
456
This is no big deal since in these formats the output data
457
slot will always be big enough for the addend. Complex reloc
458
types with addends were invented to solve just this problem.
459
The @var{error_message} argument is set to an error message if
460
this return @code{bfd_reloc_dangerous}.
461
 
462
@findex bfd_install_relocation
463
@subsubsection @code{bfd_install_relocation}
464
@strong{Synopsis}
465
@example
466
bfd_reloc_status_type
467
bfd_install_relocation
468
   (bfd *abfd,
469
    arelent *reloc_entry,
470
    PTR data, bfd_vma data_start,
471
    asection *input_section,
472
    char **error_message);
473
@end example
474
@strong{Description}@*
475
This looks remarkably like @code{bfd_perform_relocation}, except it
476
does not expect that the section contents have been filled in.
477
I.e., it's suitable for use when creating, rather than applying
478
a relocation.
479
 
480
For now, this function should be considered reserved for the
481
assembler.
482
 
483
 
484
@node howto manager,  , typedef arelent, Relocations
485
@section The howto manager
486
When an application wants to create a relocation, but doesn't
487
know what the target machine might call it, it can find out by
488
using this bit of code.
489
 
490
@findex bfd_reloc_code_type
491
@subsubsection @code{bfd_reloc_code_type}
492
@strong{Description}@*
493
The insides of a reloc code.  The idea is that, eventually, there
494
will be one enumerator for every type of relocation we ever do.
495
Pass one of these values to @code{bfd_reloc_type_lookup}, and it'll
496
return a howto pointer.
497
 
498
This does mean that the application must determine the correct
499
enumerator value; you can't get a howto pointer from a random set
500
of attributes.
501
 
502
Here are the possible values for @code{enum bfd_reloc_code_real}:
503
 
504
@deffn {} BFD_RELOC_64
505
@deffnx {} BFD_RELOC_32
506
@deffnx {} BFD_RELOC_26
507
@deffnx {} BFD_RELOC_24
508
@deffnx {} BFD_RELOC_16
509
@deffnx {} BFD_RELOC_14
510
@deffnx {} BFD_RELOC_8
511
Basic absolute relocations of N bits.
512
@end deffn
513
@deffn {} BFD_RELOC_64_PCREL
514
@deffnx {} BFD_RELOC_32_PCREL
515
@deffnx {} BFD_RELOC_24_PCREL
516
@deffnx {} BFD_RELOC_16_PCREL
517
@deffnx {} BFD_RELOC_12_PCREL
518
@deffnx {} BFD_RELOC_8_PCREL
519
PC-relative relocations.  Sometimes these are relative to the address
520
of the relocation itself; sometimes they are relative to the start of
521
the section containing the relocation.  It depends on the specific target.
522
 
523
The 24-bit relocation is used in some Intel 960 configurations.
524
@end deffn
525
@deffn {} BFD_RELOC_32_GOT_PCREL
526
@deffnx {} BFD_RELOC_16_GOT_PCREL
527
@deffnx {} BFD_RELOC_8_GOT_PCREL
528
@deffnx {} BFD_RELOC_32_GOTOFF
529
@deffnx {} BFD_RELOC_16_GOTOFF
530
@deffnx {} BFD_RELOC_LO16_GOTOFF
531
@deffnx {} BFD_RELOC_HI16_GOTOFF
532
@deffnx {} BFD_RELOC_HI16_S_GOTOFF
533
@deffnx {} BFD_RELOC_8_GOTOFF
534
@deffnx {} BFD_RELOC_32_PLT_PCREL
535
@deffnx {} BFD_RELOC_24_PLT_PCREL
536
@deffnx {} BFD_RELOC_16_PLT_PCREL
537
@deffnx {} BFD_RELOC_8_PLT_PCREL
538
@deffnx {} BFD_RELOC_32_PLTOFF
539
@deffnx {} BFD_RELOC_16_PLTOFF
540
@deffnx {} BFD_RELOC_LO16_PLTOFF
541
@deffnx {} BFD_RELOC_HI16_PLTOFF
542
@deffnx {} BFD_RELOC_HI16_S_PLTOFF
543
@deffnx {} BFD_RELOC_8_PLTOFF
544
For ELF.
545
@end deffn
546
@deffn {} BFD_RELOC_68K_GLOB_DAT
547
@deffnx {} BFD_RELOC_68K_JMP_SLOT
548
@deffnx {} BFD_RELOC_68K_RELATIVE
549
Relocations used by 68K ELF.
550
@end deffn
551
@deffn {} BFD_RELOC_32_BASEREL
552
@deffnx {} BFD_RELOC_16_BASEREL
553
@deffnx {} BFD_RELOC_LO16_BASEREL
554
@deffnx {} BFD_RELOC_HI16_BASEREL
555
@deffnx {} BFD_RELOC_HI16_S_BASEREL
556
@deffnx {} BFD_RELOC_8_BASEREL
557
@deffnx {} BFD_RELOC_RVA
558
Linkage-table relative.
559
@end deffn
560
@deffn {} BFD_RELOC_8_FFnn
561
Absolute 8-bit relocation, but used to form an address like 0xFFnn.
562
@end deffn
563
@deffn {} BFD_RELOC_32_PCREL_S2
564
@deffnx {} BFD_RELOC_16_PCREL_S2
565
@deffnx {} BFD_RELOC_23_PCREL_S2
566
These PC-relative relocations are stored as word displacements --
567
i.e., byte displacements shifted right two bits.  The 30-bit word
568
displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
569
SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
570
signed 16-bit displacement is used on the MIPS, and the 23-bit
571
displacement is used on the Alpha.
572
@end deffn
573
@deffn {} BFD_RELOC_HI22
574
@deffnx {} BFD_RELOC_LO10
575
High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
576
the target word.  These are used on the SPARC.
577
@end deffn
578
@deffn {} BFD_RELOC_GPREL16
579
@deffnx {} BFD_RELOC_GPREL32
580
For systems that allocate a Global Pointer register, these are
581
displacements off that register.  These relocation types are
582
handled specially, because the value the register will have is
583
decided relatively late.
584
@end deffn
585
@deffn {} BFD_RELOC_I960_CALLJ
586
Reloc types used for i960/b.out.
587
@end deffn
588
@deffn {} BFD_RELOC_NONE
589
@deffnx {} BFD_RELOC_SPARC_WDISP22
590
@deffnx {} BFD_RELOC_SPARC22
591
@deffnx {} BFD_RELOC_SPARC13
592
@deffnx {} BFD_RELOC_SPARC_GOT10
593
@deffnx {} BFD_RELOC_SPARC_GOT13
594
@deffnx {} BFD_RELOC_SPARC_GOT22
595
@deffnx {} BFD_RELOC_SPARC_PC10
596
@deffnx {} BFD_RELOC_SPARC_PC22
597
@deffnx {} BFD_RELOC_SPARC_WPLT30
598
@deffnx {} BFD_RELOC_SPARC_COPY
599
@deffnx {} BFD_RELOC_SPARC_GLOB_DAT
600
@deffnx {} BFD_RELOC_SPARC_JMP_SLOT
601
@deffnx {} BFD_RELOC_SPARC_RELATIVE
602
@deffnx {} BFD_RELOC_SPARC_UA32
603
SPARC ELF relocations.  There is probably some overlap with other
604
relocation types already defined.
605
@end deffn
606
@deffn {} BFD_RELOC_SPARC_BASE13
607
@deffnx {} BFD_RELOC_SPARC_BASE22
608
I think these are specific to SPARC a.out (e.g., Sun 4).
609
@end deffn
610
@deffn {} BFD_RELOC_SPARC_64
611
@deffnx {} BFD_RELOC_SPARC_10
612
@deffnx {} BFD_RELOC_SPARC_11
613
@deffnx {} BFD_RELOC_SPARC_OLO10
614
@deffnx {} BFD_RELOC_SPARC_HH22
615
@deffnx {} BFD_RELOC_SPARC_HM10
616
@deffnx {} BFD_RELOC_SPARC_LM22
617
@deffnx {} BFD_RELOC_SPARC_PC_HH22
618
@deffnx {} BFD_RELOC_SPARC_PC_HM10
619
@deffnx {} BFD_RELOC_SPARC_PC_LM22
620
@deffnx {} BFD_RELOC_SPARC_WDISP16
621
@deffnx {} BFD_RELOC_SPARC_WDISP19
622
@deffnx {} BFD_RELOC_SPARC_7
623
@deffnx {} BFD_RELOC_SPARC_6
624
@deffnx {} BFD_RELOC_SPARC_5
625
@deffnx {} BFD_RELOC_SPARC_DISP64
626
@deffnx {} BFD_RELOC_SPARC_PLT64
627
@deffnx {} BFD_RELOC_SPARC_HIX22
628
@deffnx {} BFD_RELOC_SPARC_LOX10
629
@deffnx {} BFD_RELOC_SPARC_H44
630
@deffnx {} BFD_RELOC_SPARC_M44
631
@deffnx {} BFD_RELOC_SPARC_L44
632
@deffnx {} BFD_RELOC_SPARC_REGISTER
633
SPARC64 relocations
634
@end deffn
635
@deffn {} BFD_RELOC_SPARC_REV32
636
SPARC little endian relocation
637
@end deffn
638
@deffn {} BFD_RELOC_ALPHA_GPDISP_HI16
639
Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
640
"addend" in some special way.
641
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
642
writing; when reading, it will be the absolute section symbol.  The
643
addend is the displacement in bytes of the "lda" instruction from
644
the "ldah" instruction (which is at the address of this reloc).
645
@end deffn
646
@deffn {} BFD_RELOC_ALPHA_GPDISP_LO16
647
For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
648
with GPDISP_HI16 relocs.  The addend is ignored when writing the
649
relocations out, and is filled in with the file's GP value on
650
reading, for convenience.
651
@end deffn
652
@deffn {} BFD_RELOC_ALPHA_GPDISP
653
The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
654
relocation except that there is no accompanying GPDISP_LO16
655
relocation.
656
@end deffn
657
@deffn {} BFD_RELOC_ALPHA_LITERAL
658
@deffnx {} BFD_RELOC_ALPHA_ELF_LITERAL
659
@deffnx {} BFD_RELOC_ALPHA_LITUSE
660
The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
661
the assembler turns it into a LDQ instruction to load the address of
662
the symbol, and then fills in a register in the real instruction.
663
 
664
The LITERAL reloc, at the LDQ instruction, refers to the .lita
665
section symbol.  The addend is ignored when writing, but is filled
666
in with the file's GP value on reading, for convenience, as with the
667
GPDISP_LO16 reloc.
668
 
669
The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
670
It should refer to the symbol to be referenced, as with 16_GOTOFF,
671
but it generates output not based on the position within the .got
672
section, but relative to the GP value chosen for the file during the
673
final link stage.
674
 
675
The LITUSE reloc, on the instruction using the loaded address, gives
676
information to the linker that it might be able to use to optimize
677
away some literal section references.  The symbol is ignored (read
678
as the absolute section symbol), and the "addend" indicates the type
679
of instruction using the register:
680
1 - "memory" fmt insn
681
2 - byte-manipulation (byte offset reg)
682
3 - jsr (target of branch)
683
 
684
The GNU linker currently doesn't do any of this optimizing.
685
@end deffn
686
@deffn {} BFD_RELOC_ALPHA_USER_LITERAL
687
@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BASE
688
@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
689
@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_JSR
690
@deffnx {} BFD_RELOC_ALPHA_USER_GPDISP
691
@deffnx {} BFD_RELOC_ALPHA_USER_GPRELHIGH
692
@deffnx {} BFD_RELOC_ALPHA_USER_GPRELLOW
693
The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
694
process the explicit !<reloc>!sequence relocations, and are mapped
695
into the normal relocations at the end of processing.
696
@end deffn
697
@deffn {} BFD_RELOC_ALPHA_HINT
698
The HINT relocation indicates a value that should be filled into the
699
"hint" field of a jmp/jsr/ret instruction, for possible branch-
700
prediction logic which may be provided on some processors.
701
@end deffn
702
@deffn {} BFD_RELOC_ALPHA_LINKAGE
703
The LINKAGE relocation outputs a linkage pair in the object file,
704
which is filled by the linker.
705
@end deffn
706
@deffn {} BFD_RELOC_ALPHA_CODEADDR
707
The CODEADDR relocation outputs a STO_CA in the object file,
708
which is filled by the linker.
709
@end deffn
710
@deffn {} BFD_RELOC_MIPS_JMP
711
Bits 27..2 of the relocation address shifted right 2 bits;
712
simple reloc otherwise.
713
@end deffn
714
@deffn {} BFD_RELOC_MIPS16_JMP
715
The MIPS16 jump instruction.
716
@end deffn
717
@deffn {} BFD_RELOC_MIPS16_GPREL
718
MIPS16 GP relative reloc.
719
@end deffn
720
@deffn {} BFD_RELOC_HI16
721
High 16 bits of 32-bit value; simple reloc.
722
@end deffn
723
@deffn {} BFD_RELOC_HI16_S
724
High 16 bits of 32-bit value but the low 16 bits will be sign
725
extended and added to form the final result.  If the low 16
726
bits form a negative number, we need to add one to the high value
727
to compensate for the borrow when the low bits are added.
728
@end deffn
729
@deffn {} BFD_RELOC_LO16
730
Low 16 bits.
731
@end deffn
732
@deffn {} BFD_RELOC_PCREL_HI16_S
733
Like BFD_RELOC_HI16_S, but PC relative.
734
@end deffn
735
@deffn {} BFD_RELOC_PCREL_LO16
736
Like BFD_RELOC_LO16, but PC relative.
737
@end deffn
738
@deffn {} BFD_RELOC_MIPS_GPREL
739
Relocation relative to the global pointer.
740
@end deffn
741
@deffn {} BFD_RELOC_MIPS_LITERAL
742
Relocation against a MIPS literal section.
743
@end deffn
744
@deffn {} BFD_RELOC_MIPS_GOT16
745
@deffnx {} BFD_RELOC_MIPS_CALL16
746
@deffnx {} BFD_RELOC_MIPS_GPREL32
747
@deffnx {} BFD_RELOC_MIPS_GOT_HI16
748
@deffnx {} BFD_RELOC_MIPS_GOT_LO16
749
@deffnx {} BFD_RELOC_MIPS_CALL_HI16
750
@deffnx {} BFD_RELOC_MIPS_CALL_LO16
751
@deffnx {} BFD_RELOC_MIPS_SUB
752
@deffnx {} BFD_RELOC_MIPS_GOT_PAGE
753
@deffnx {} BFD_RELOC_MIPS_GOT_OFST
754
@deffnx {} BFD_RELOC_MIPS_GOT_DISP
755
MIPS ELF relocations.
756
@end deffn
757
@deffn {} BFD_RELOC_386_GOT32
758
@deffnx {} BFD_RELOC_386_PLT32
759
@deffnx {} BFD_RELOC_386_COPY
760
@deffnx {} BFD_RELOC_386_GLOB_DAT
761
@deffnx {} BFD_RELOC_386_JUMP_SLOT
762
@deffnx {} BFD_RELOC_386_RELATIVE
763
@deffnx {} BFD_RELOC_386_GOTOFF
764
@deffnx {} BFD_RELOC_386_GOTPC
765
i386/elf relocations
766
@end deffn
767
@deffn {} BFD_RELOC_NS32K_IMM_8
768
@deffnx {} BFD_RELOC_NS32K_IMM_16
769
@deffnx {} BFD_RELOC_NS32K_IMM_32
770
@deffnx {} BFD_RELOC_NS32K_IMM_8_PCREL
771
@deffnx {} BFD_RELOC_NS32K_IMM_16_PCREL
772
@deffnx {} BFD_RELOC_NS32K_IMM_32_PCREL
773
@deffnx {} BFD_RELOC_NS32K_DISP_8
774
@deffnx {} BFD_RELOC_NS32K_DISP_16
775
@deffnx {} BFD_RELOC_NS32K_DISP_32
776
@deffnx {} BFD_RELOC_NS32K_DISP_8_PCREL
777
@deffnx {} BFD_RELOC_NS32K_DISP_16_PCREL
778
@deffnx {} BFD_RELOC_NS32K_DISP_32_PCREL
779
ns32k relocations
780
@end deffn
781
@deffn {} BFD_RELOC_PJ_CODE_HI16
782
@deffnx {} BFD_RELOC_PJ_CODE_LO16
783
@deffnx {} BFD_RELOC_PJ_CODE_DIR16
784
@deffnx {} BFD_RELOC_PJ_CODE_DIR32
785
@deffnx {} BFD_RELOC_PJ_CODE_REL16
786
@deffnx {} BFD_RELOC_PJ_CODE_REL32
787
Picojava relocs.  Not all of these appear in object files.
788
@end deffn
789
@deffn {} BFD_RELOC_PPC_B26
790
@deffnx {} BFD_RELOC_PPC_BA26
791
@deffnx {} BFD_RELOC_PPC_TOC16
792
@deffnx {} BFD_RELOC_PPC_B16
793
@deffnx {} BFD_RELOC_PPC_B16_BRTAKEN
794
@deffnx {} BFD_RELOC_PPC_B16_BRNTAKEN
795
@deffnx {} BFD_RELOC_PPC_BA16
796
@deffnx {} BFD_RELOC_PPC_BA16_BRTAKEN
797
@deffnx {} BFD_RELOC_PPC_BA16_BRNTAKEN
798
@deffnx {} BFD_RELOC_PPC_COPY
799
@deffnx {} BFD_RELOC_PPC_GLOB_DAT
800
@deffnx {} BFD_RELOC_PPC_JMP_SLOT
801
@deffnx {} BFD_RELOC_PPC_RELATIVE
802
@deffnx {} BFD_RELOC_PPC_LOCAL24PC
803
@deffnx {} BFD_RELOC_PPC_EMB_NADDR32
804
@deffnx {} BFD_RELOC_PPC_EMB_NADDR16
805
@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_LO
806
@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_HI
807
@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_HA
808
@deffnx {} BFD_RELOC_PPC_EMB_SDAI16
809
@deffnx {} BFD_RELOC_PPC_EMB_SDA2I16
810
@deffnx {} BFD_RELOC_PPC_EMB_SDA2REL
811
@deffnx {} BFD_RELOC_PPC_EMB_SDA21
812
@deffnx {} BFD_RELOC_PPC_EMB_MRKREF
813
@deffnx {} BFD_RELOC_PPC_EMB_RELSEC16
814
@deffnx {} BFD_RELOC_PPC_EMB_RELST_LO
815
@deffnx {} BFD_RELOC_PPC_EMB_RELST_HI
816
@deffnx {} BFD_RELOC_PPC_EMB_RELST_HA
817
@deffnx {} BFD_RELOC_PPC_EMB_BIT_FLD
818
@deffnx {} BFD_RELOC_PPC_EMB_RELSDA
819
Power(rs6000) and PowerPC relocations.
820
@end deffn
821
@deffn {} BFD_RELOC_I370_D12
822
IBM 370/390 relocations
823
@end deffn
824
@deffn {} BFD_RELOC_CTOR
825
The type of reloc used to build a contructor table - at the moment
826
probably a 32 bit wide absolute relocation, but the target can choose.
827
It generally does map to one of the other relocation types.
828
@end deffn
829
@deffn {} BFD_RELOC_ARM_PCREL_BRANCH
830
ARM 26 bit pc-relative branch.  The lowest two bits must be zero and are
831
not stored in the instruction.
832
@end deffn
833
@deffn {} BFD_RELOC_ARM_PCREL_BLX
834
ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
835
not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
836
field in the instruction.
837
@end deffn
838
@deffn {} BFD_RELOC_THUMB_PCREL_BLX
839
Thumb 22 bit pc-relative branch.  The lowest bit must be zero and is
840
not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
841
field in the instruction.
842
@end deffn
843
@deffn {} BFD_RELOC_ARM_IMMEDIATE
844
@deffnx {} BFD_RELOC_ARM_ADRL_IMMEDIATE
845
@deffnx {} BFD_RELOC_ARM_OFFSET_IMM
846
@deffnx {} BFD_RELOC_ARM_SHIFT_IMM
847
@deffnx {} BFD_RELOC_ARM_SWI
848
@deffnx {} BFD_RELOC_ARM_MULTI
849
@deffnx {} BFD_RELOC_ARM_CP_OFF_IMM
850
@deffnx {} BFD_RELOC_ARM_ADR_IMM
851
@deffnx {} BFD_RELOC_ARM_LDR_IMM
852
@deffnx {} BFD_RELOC_ARM_LITERAL
853
@deffnx {} BFD_RELOC_ARM_IN_POOL
854
@deffnx {} BFD_RELOC_ARM_OFFSET_IMM8
855
@deffnx {} BFD_RELOC_ARM_HWLITERAL
856
@deffnx {} BFD_RELOC_ARM_THUMB_ADD
857
@deffnx {} BFD_RELOC_ARM_THUMB_IMM
858
@deffnx {} BFD_RELOC_ARM_THUMB_SHIFT
859
@deffnx {} BFD_RELOC_ARM_THUMB_OFFSET
860
@deffnx {} BFD_RELOC_ARM_GOT12
861
@deffnx {} BFD_RELOC_ARM_GOT32
862
@deffnx {} BFD_RELOC_ARM_JUMP_SLOT
863
@deffnx {} BFD_RELOC_ARM_COPY
864
@deffnx {} BFD_RELOC_ARM_GLOB_DAT
865
@deffnx {} BFD_RELOC_ARM_PLT32
866
@deffnx {} BFD_RELOC_ARM_RELATIVE
867
@deffnx {} BFD_RELOC_ARM_GOTOFF
868
@deffnx {} BFD_RELOC_ARM_GOTPC
869
These relocs are only used within the ARM assembler.  They are not
870
(at present) written to any object files.
871
@end deffn
872
@deffn {} BFD_RELOC_SH_PCDISP8BY2
873
@deffnx {} BFD_RELOC_SH_PCDISP12BY2
874
@deffnx {} BFD_RELOC_SH_IMM4
875
@deffnx {} BFD_RELOC_SH_IMM4BY2
876
@deffnx {} BFD_RELOC_SH_IMM4BY4
877
@deffnx {} BFD_RELOC_SH_IMM8
878
@deffnx {} BFD_RELOC_SH_IMM8BY2
879
@deffnx {} BFD_RELOC_SH_IMM8BY4
880
@deffnx {} BFD_RELOC_SH_PCRELIMM8BY2
881
@deffnx {} BFD_RELOC_SH_PCRELIMM8BY4
882
@deffnx {} BFD_RELOC_SH_SWITCH16
883
@deffnx {} BFD_RELOC_SH_SWITCH32
884
@deffnx {} BFD_RELOC_SH_USES
885
@deffnx {} BFD_RELOC_SH_COUNT
886
@deffnx {} BFD_RELOC_SH_ALIGN
887
@deffnx {} BFD_RELOC_SH_CODE
888
@deffnx {} BFD_RELOC_SH_DATA
889
@deffnx {} BFD_RELOC_SH_LABEL
890
@deffnx {} BFD_RELOC_SH_LOOP_START
891
@deffnx {} BFD_RELOC_SH_LOOP_END
892
Hitachi SH relocs.  Not all of these appear in object files.
893
@end deffn
894
@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH9
895
@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH12
896
@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH23
897
Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
898
be zero and is not stored in the instruction.
899
@end deffn
900
@deffn {} BFD_RELOC_ARC_B22_PCREL
901
Argonaut RISC Core (ARC) relocs.
902
ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
903
not stored in the instruction.  The high 20 bits are installed in bits 26
904
through 7 of the instruction.
905
@end deffn
906
@deffn {} BFD_RELOC_ARC_B26
907
ARC 26 bit absolute branch.  The lowest two bits must be zero and are not
908
stored in the instruction.  The high 24 bits are installed in bits 23
909
through 0.
910
@end deffn
911
@deffn {} BFD_RELOC_D10V_10_PCREL_R
912
Mitsubishi D10V relocs.
913
This is a 10-bit reloc with the right 2 bits
914
assumed to be 0.
915
@end deffn
916
@deffn {} BFD_RELOC_D10V_10_PCREL_L
917
Mitsubishi D10V relocs.
918
This is a 10-bit reloc with the right 2 bits
919
assumed to be 0.  This is the same as the previous reloc
920
except it is in the left container, i.e.,
921
shifted left 15 bits.
922
@end deffn
923
@deffn {} BFD_RELOC_D10V_18
924
This is an 18-bit reloc with the right 2 bits
925
assumed to be 0.
926
@end deffn
927
@deffn {} BFD_RELOC_D10V_18_PCREL
928
This is an 18-bit reloc with the right 2 bits
929
assumed to be 0.
930
@end deffn
931
@deffn {} BFD_RELOC_D30V_6
932
Mitsubishi D30V relocs.
933
This is a 6-bit absolute reloc.
934
@end deffn
935
@deffn {} BFD_RELOC_D30V_9_PCREL
936
This is a 6-bit pc-relative reloc with
937
the right 3 bits assumed to be 0.
938
@end deffn
939
@deffn {} BFD_RELOC_D30V_9_PCREL_R
940
This is a 6-bit pc-relative reloc with
941
the right 3 bits assumed to be 0. Same
942
as the previous reloc but on the right side
943
of the container.
944
@end deffn
945
@deffn {} BFD_RELOC_D30V_15
946
This is a 12-bit absolute reloc with the
947
right 3 bitsassumed to be 0.
948
@end deffn
949
@deffn {} BFD_RELOC_D30V_15_PCREL
950
This is a 12-bit pc-relative reloc with
951
the right 3 bits assumed to be 0.
952
@end deffn
953
@deffn {} BFD_RELOC_D30V_15_PCREL_R
954
This is a 12-bit pc-relative reloc with
955
the right 3 bits assumed to be 0. Same
956
as the previous reloc but on the right side
957
of the container.
958
@end deffn
959
@deffn {} BFD_RELOC_D30V_21
960
This is an 18-bit absolute reloc with
961
the right 3 bits assumed to be 0.
962
@end deffn
963
@deffn {} BFD_RELOC_D30V_21_PCREL
964
This is an 18-bit pc-relative reloc with
965
the right 3 bits assumed to be 0.
966
@end deffn
967
@deffn {} BFD_RELOC_D30V_21_PCREL_R
968
This is an 18-bit pc-relative reloc with
969
the right 3 bits assumed to be 0. Same
970
as the previous reloc but on the right side
971
of the container.
972
@end deffn
973
@deffn {} BFD_RELOC_D30V_32
974
This is a 32-bit absolute reloc.
975
@end deffn
976
@deffn {} BFD_RELOC_D30V_32_PCREL
977
This is a 32-bit pc-relative reloc.
978
@end deffn
979
@deffn {} BFD_RELOC_M32R_24
980
Mitsubishi M32R relocs.
981
This is a 24 bit absolute address.
982
@end deffn
983
@deffn {} BFD_RELOC_M32R_10_PCREL
984
This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0.
985
@end deffn
986
@deffn {} BFD_RELOC_M32R_18_PCREL
987
This is an 18-bit reloc with the right 2 bits assumed to be 0.
988
@end deffn
989
@deffn {} BFD_RELOC_M32R_26_PCREL
990
This is a 26-bit reloc with the right 2 bits assumed to be 0.
991
@end deffn
992
@deffn {} BFD_RELOC_M32R_HI16_ULO
993
This is a 16-bit reloc containing the high 16 bits of an address
994
used when the lower 16 bits are treated as unsigned.
995
@end deffn
996
@deffn {} BFD_RELOC_M32R_HI16_SLO
997
This is a 16-bit reloc containing the high 16 bits of an address
998
used when the lower 16 bits are treated as signed.
999
@end deffn
1000
@deffn {} BFD_RELOC_M32R_LO16
1001
This is a 16-bit reloc containing the lower 16 bits of an address.
1002
@end deffn
1003
@deffn {} BFD_RELOC_M32R_SDA16
1004
This is a 16-bit reloc containing the small data area offset for use in
1005
add3, load, and store instructions.
1006
@end deffn
1007
@deffn {} BFD_RELOC_V850_9_PCREL
1008
This is a 9-bit reloc
1009
@end deffn
1010
@deffn {} BFD_RELOC_V850_22_PCREL
1011
This is a 22-bit reloc
1012
@end deffn
1013
@deffn {} BFD_RELOC_V850_SDA_16_16_OFFSET
1014
This is a 16 bit offset from the short data area pointer.
1015
@end deffn
1016
@deffn {} BFD_RELOC_V850_SDA_15_16_OFFSET
1017
This is a 16 bit offset (of which only 15 bits are used) from the
1018
short data area pointer.
1019
@end deffn
1020
@deffn {} BFD_RELOC_V850_ZDA_16_16_OFFSET
1021
This is a 16 bit offset from the zero data area pointer.
1022
@end deffn
1023
@deffn {} BFD_RELOC_V850_ZDA_15_16_OFFSET
1024
This is a 16 bit offset (of which only 15 bits are used) from the
1025
zero data area pointer.
1026
@end deffn
1027
@deffn {} BFD_RELOC_V850_TDA_6_8_OFFSET
1028
This is an 8 bit offset (of which only 6 bits are used) from the
1029
tiny data area pointer.
1030
@end deffn
1031
@deffn {} BFD_RELOC_V850_TDA_7_8_OFFSET
1032
This is an 8bit offset (of which only 7 bits are used) from the tiny
1033
data area pointer.
1034
@end deffn
1035
@deffn {} BFD_RELOC_V850_TDA_7_7_OFFSET
1036
This is a 7 bit offset from the tiny data area pointer.
1037
@end deffn
1038
@deffn {} BFD_RELOC_V850_TDA_16_16_OFFSET
1039
This is a 16 bit offset from the tiny data area pointer.
1040
@end deffn
1041
@deffn {} BFD_RELOC_V850_TDA_4_5_OFFSET
1042
This is a 5 bit offset (of which only 4 bits are used) from the tiny
1043
data area pointer.
1044
@end deffn
1045
@deffn {} BFD_RELOC_V850_TDA_4_4_OFFSET
1046
This is a 4 bit offset from the tiny data area pointer.
1047
@end deffn
1048
@deffn {} BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
1049
This is a 16 bit offset from the short data area pointer, with the
1050
bits placed non-contigously in the instruction.
1051
@end deffn
1052
@deffn {} BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
1053
This is a 16 bit offset from the zero data area pointer, with the
1054
bits placed non-contigously in the instruction.
1055
@end deffn
1056
@deffn {} BFD_RELOC_V850_CALLT_6_7_OFFSET
1057
This is a 6 bit offset from the call table base pointer.
1058
@end deffn
1059
@deffn {} BFD_RELOC_V850_CALLT_16_16_OFFSET
1060
This is a 16 bit offset from the call table base pointer.
1061
@end deffn
1062
@deffn {} BFD_RELOC_MN10300_32_PCREL
1063
This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
1064
instruction.
1065
@end deffn
1066
@deffn {} BFD_RELOC_MN10300_16_PCREL
1067
This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
1068
instruction.
1069
@end deffn
1070
@deffn {} BFD_RELOC_TIC30_LDP
1071
This is a 8bit DP reloc for the tms320c30, where the most
1072
significant 8 bits of a 24 bit word are placed into the least
1073
significant 8 bits of the opcode.
1074
@end deffn
1075
@deffn {} BFD_RELOC_TIC54X_PARTLS7
1076
This is a 7bit reloc for the tms320c54x, where the least
1077
significant 7 bits of a 16 bit word are placed into the least
1078
significant 7 bits of the opcode.
1079
@end deffn
1080
@deffn {} BFD_RELOC_TIC54X_PARTMS9
1081
This is a 9bit DP reloc for the tms320c54x, where the most
1082
significant 9 bits of a 16 bit word are placed into the least
1083
significant 9 bits of the opcode.
1084
@end deffn
1085
@deffn {} BFD_RELOC_TIC54X_23
1086
This is an extended address 23-bit reloc for the tms320c54x.
1087
@end deffn
1088
@deffn {} BFD_RELOC_TIC54X_16_OF_23
1089
This is a 16-bit reloc for the tms320c54x, where the least
1090
significant 16 bits of a 23-bit extended address are placed into
1091
the opcode.
1092
@end deffn
1093
@deffn {} BFD_RELOC_TIC54X_MS7_OF_23
1094
This is a reloc for the tms320c54x, where the most
1095
significant 7 bits of a 23-bit extended address are placed into
1096
the opcode.
1097
@end deffn
1098
@deffn {} BFD_RELOC_FR30_48
1099
This is a 48 bit reloc for the FR30 that stores 32 bits.
1100
@end deffn
1101
@deffn {} BFD_RELOC_FR30_20
1102
This is a 32 bit reloc for the FR30 that stores 20 bits split up into
1103
two sections.
1104
@end deffn
1105
@deffn {} BFD_RELOC_FR30_6_IN_4
1106
This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
1107
4 bits.
1108
@end deffn
1109
@deffn {} BFD_RELOC_FR30_8_IN_8
1110
This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
1111
into 8 bits.
1112
@end deffn
1113
@deffn {} BFD_RELOC_FR30_9_IN_8
1114
This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
1115
into 8 bits.
1116
@end deffn
1117
@deffn {} BFD_RELOC_FR30_10_IN_8
1118
This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
1119
into 8 bits.
1120
@end deffn
1121
@deffn {} BFD_RELOC_FR30_9_PCREL
1122
This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
1123
short offset into 8 bits.
1124
@end deffn
1125
@deffn {} BFD_RELOC_FR30_12_PCREL
1126
This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
1127
short offset into 11 bits.
1128
@end deffn
1129
@deffn {} BFD_RELOC_MCORE_PCREL_IMM8BY4
1130
@deffnx {} BFD_RELOC_MCORE_PCREL_IMM11BY2
1131
@deffnx {} BFD_RELOC_MCORE_PCREL_IMM4BY2
1132
@deffnx {} BFD_RELOC_MCORE_PCREL_32
1133
@deffnx {} BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
1134
@deffnx {} BFD_RELOC_MCORE_RVA
1135
Motorola Mcore relocations.
1136
@end deffn
1137
@deffn {} BFD_RELOC_AVR_7_PCREL
1138
This is a 16 bit reloc for the AVR that stores 8 bit pc relative
1139
short offset into 7 bits.
1140
@end deffn
1141
@deffn {} BFD_RELOC_AVR_13_PCREL
1142
This is a 16 bit reloc for the AVR that stores 13 bit pc relative
1143
short offset into 12 bits.
1144
@end deffn
1145
@deffn {} BFD_RELOC_AVR_16_PM
1146
This is a 16 bit reloc for the AVR that stores 17 bit value (usually
1147
program memory address) into 16 bits.
1148
@end deffn
1149
@deffn {} BFD_RELOC_AVR_LO8_LDI
1150
This is a 16 bit reloc for the AVR that stores 8 bit value (usually
1151
data memory address) into 8 bit immediate value of LDI insn.
1152
@end deffn
1153
@deffn {} BFD_RELOC_AVR_HI8_LDI
1154
This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
1155
of data memory address) into 8 bit immediate value of LDI insn.
1156
@end deffn
1157
@deffn {} BFD_RELOC_AVR_HH8_LDI
1158
This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
1159
of program memory address) into 8 bit immediate value of LDI insn.
1160
@end deffn
1161
@deffn {} BFD_RELOC_AVR_LO8_LDI_NEG
1162
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1163
(usually data memory address) into 8 bit immediate value of SUBI insn.
1164
@end deffn
1165
@deffn {} BFD_RELOC_AVR_HI8_LDI_NEG
1166
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1167
(high 8 bit of data memory address) into 8 bit immediate value of
1168
SUBI insn.
1169
@end deffn
1170
@deffn {} BFD_RELOC_AVR_HH8_LDI_NEG
1171
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1172
(most high 8 bit of program memory address) into 8 bit immediate value
1173
of LDI or SUBI insn.
1174
@end deffn
1175
@deffn {} BFD_RELOC_AVR_LO8_LDI_PM
1176
This is a 16 bit reloc for the AVR that stores 8 bit value (usually
1177
command address) into 8 bit immediate value of LDI insn.
1178
@end deffn
1179
@deffn {} BFD_RELOC_AVR_HI8_LDI_PM
1180
This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
1181
of command address) into 8 bit immediate value of LDI insn.
1182
@end deffn
1183
@deffn {} BFD_RELOC_AVR_HH8_LDI_PM
1184
This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
1185
of command address) into 8 bit immediate value of LDI insn.
1186
@end deffn
1187
@deffn {} BFD_RELOC_AVR_LO8_LDI_PM_NEG
1188
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1189
(usually command address) into 8 bit immediate value of SUBI insn.
1190
@end deffn
1191
@deffn {} BFD_RELOC_AVR_HI8_LDI_PM_NEG
1192
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1193
(high 8 bit of 16 bit command address) into 8 bit immediate value
1194
of SUBI insn.
1195
@end deffn
1196
@deffn {} BFD_RELOC_AVR_HH8_LDI_PM_NEG
1197
This is a 16 bit reloc for the AVR that stores negated 8 bit value
1198
(high 6 bit of 22 bit command address) into 8 bit immediate
1199
value of SUBI insn.
1200
@end deffn
1201
@deffn {} BFD_RELOC_AVR_CALL
1202
This is a 32 bit reloc for the AVR that stores 23 bit value
1203
into 22 bits.
1204
@end deffn
1205
@deffn {} BFD_RELOC_VTABLE_INHERIT
1206
@deffnx {} BFD_RELOC_VTABLE_ENTRY
1207
These two relocations are used by the linker to determine which of
1208
the entries in a C++ virtual function table are actually used.  When
1209
the --gc-sections option is given, the linker will zero out the entries
1210
that are not used, so that the code for those functions need not be
1211
included in the output.
1212
 
1213
VTABLE_INHERIT is a zero-space relocation used to describe to the
1214
linker the inheritence tree of a C++ virtual function table.  The
1215
relocation's symbol should be the parent class' vtable, and the
1216
relocation should be located at the child vtable.
1217
 
1218
VTABLE_ENTRY is a zero-space relocation that describes the use of a
1219
virtual function table entry.  The reloc's symbol should refer to the
1220
table of the class mentioned in the code.  Off of that base, an offset
1221
describes the entry that is being used.  For Rela hosts, this offset
1222
is stored in the reloc's addend.  For Rel hosts, we are forced to put
1223
this offset in the reloc's section offset.
1224
@end deffn
1225
 
1226
@example
1227
 
1228
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
1229
@end example
1230
@findex bfd_reloc_type_lookup
1231
@subsubsection @code{bfd_reloc_type_lookup}
1232
@strong{Synopsis}
1233
@example
1234
reloc_howto_type *
1235
bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code);
1236
@end example
1237
@strong{Description}@*
1238
Return a pointer to a howto structure which, when
1239
invoked, will perform the relocation @var{code} on data from the
1240
architecture noted.
1241
 
1242
@findex bfd_default_reloc_type_lookup
1243
@subsubsection @code{bfd_default_reloc_type_lookup}
1244
@strong{Synopsis}
1245
@example
1246
reloc_howto_type *bfd_default_reloc_type_lookup
1247
   (bfd *abfd, bfd_reloc_code_real_type  code);
1248
@end example
1249
@strong{Description}@*
1250
Provides a default relocation lookup routine for any architecture.
1251
 
1252
@findex bfd_get_reloc_code_name
1253
@subsubsection @code{bfd_get_reloc_code_name}
1254
@strong{Synopsis}
1255
@example
1256
const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
1257
@end example
1258
@strong{Description}@*
1259
Provides a printable name for the supplied relocation code.
1260
Useful mainly for printing error messages.
1261
 
1262
@findex bfd_generic_relax_section
1263
@subsubsection @code{bfd_generic_relax_section}
1264
@strong{Synopsis}
1265
@example
1266
boolean bfd_generic_relax_section
1267
   (bfd *abfd,
1268
    asection *section,
1269
    struct bfd_link_info *,
1270
    boolean *);
1271
@end example
1272
@strong{Description}@*
1273
Provides default handling for relaxing for back ends which
1274
don't do relaxing -- i.e., does nothing.
1275
 
1276
@findex bfd_generic_gc_sections
1277
@subsubsection @code{bfd_generic_gc_sections}
1278
@strong{Synopsis}
1279
@example
1280
boolean bfd_generic_gc_sections
1281
   (bfd *, struct bfd_link_info *);
1282
@end example
1283
@strong{Description}@*
1284
Provides default handling for relaxing for back ends which
1285
don't do section gc -- i.e., does nothing.
1286
 
1287
@findex bfd_generic_get_relocated_section_contents
1288
@subsubsection @code{bfd_generic_get_relocated_section_contents}
1289
@strong{Synopsis}
1290
@example
1291
bfd_byte *
1292
bfd_generic_get_relocated_section_contents (bfd *abfd,
1293
    struct bfd_link_info *link_info,
1294
    struct bfd_link_order *link_order,
1295
    bfd_byte *data,
1296
    boolean relocateable,
1297
    asymbol **symbols);
1298
@end example
1299
@strong{Description}@*
1300
Provides default handling of relocation effort for back ends
1301
which can't be bothered to do it efficiently.
1302
 

powered by: WebSVN 2.1.0

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