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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [bfd/] [doc/] [bfd.info] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
This is bfd.info, produced by makeinfo version 4.8 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, 2001, 2003, 2006, 2007 Free Software
10
Foundation, Inc.
11
 
12
   Permission is granted to copy, distribute and/or modify this document
13
under the terms of the GNU Free Documentation License, Version 1.1 or
14
any later version published by the Free Software Foundation; with the
15
Invariant Sections being "GNU General Public License" and "Funding Free
16
Software", the Front-Cover texts being (a) (see below), and with the
17
Back-Cover Texts being (b) (see below).  A copy of the license is
18
included in the section entitled "GNU Free Documentation License".
19
 
20
   (a) The FSF's Front-Cover Text is:
21
 
22
   A GNU Manual
23
 
24
   (b) The FSF's Back-Cover Text is:
25
 
26
   You have freedom to copy and modify this GNU Manual, like GNU
27
software.  Copies published by the Free Software Foundation raise
28
funds for GNU development.
29
 
30

31
File: bfd.info,  Node: Top,  Next: Overview,  Prev: (dir),  Up: (dir)
32
 
33
   This file documents the binary file descriptor library libbfd.
34
 
35
* Menu:
36
 
37
* Overview::                    Overview of BFD
38
* BFD front end::               BFD front end
39
* BFD back ends::               BFD back ends
40
* GNU Free Documentation License::  GNU Free Documentation License
41
* BFD Index::           BFD Index
42
 
43

44
File: bfd.info,  Node: Overview,  Next: BFD front end,  Prev: Top,  Up: Top
45
 
46
1 Introduction
47
**************
48
 
49
BFD is a package which allows applications to use the same routines to
50
operate on object files whatever the object file format.  A new object
51
file format can be supported simply by creating a new BFD back end and
52
adding it to the library.
53
 
54
   BFD is split into two parts: the front end, and the back ends (one
55
for each object file format).
56
   * The front end of BFD provides the interface to the user. It manages
57
     memory and various canonical data structures. The front end also
58
     decides which back end to use and when to call back end routines.
59
 
60
   * The back ends provide BFD its view of the real world. Each back
61
     end provides a set of calls which the BFD front end can use to
62
     maintain its canonical form. The back ends also may keep around
63
     information for their own use, for greater efficiency.
64
 
65
* Menu:
66
 
67
* History::                     History
68
* How It Works::                How It Works
69
* What BFD Version 2 Can Do::   What BFD Version 2 Can Do
70
 
71

72
File: bfd.info,  Node: History,  Next: How It Works,  Prev: Overview,  Up: Overview
73
 
74
1.1 History
75
===========
76
 
77
One spur behind BFD was the desire, on the part of the GNU 960 team at
78
Intel Oregon, for interoperability of applications on their COFF and
79
b.out file formats.  Cygnus was providing GNU support for the team, and
80
was contracted to provide the required functionality.
81
 
82
   The name came from a conversation David Wallace was having with
83
Richard Stallman about the library: RMS said that it would be quite
84
hard--David said "BFD".  Stallman was right, but the name stuck.
85
 
86
   At the same time, Ready Systems wanted much the same thing, but for
87
different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k
88
coff.
89
 
90
   BFD was first implemented by members of Cygnus Support; Steve
91
Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K.
92
Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace
93
(`gumby@cygnus.com').
94
 
95

96
File: bfd.info,  Node: How It Works,  Next: What BFD Version 2 Can Do,  Prev: History,  Up: Overview
97
 
98
1.2 How To Use BFD
99
==================
100
 
101
To use the library, include `bfd.h' and link with `libbfd.a'.
102
 
103
   BFD provides a common interface to the parts of an object file for a
104
calling application.
105
 
106
   When an application successfully opens a target file (object,
107
archive, or whatever), a pointer to an internal structure is returned.
108
This pointer points to a structure called `bfd', described in `bfd.h'.
109
Our convention is to call this pointer a BFD, and instances of it
110
within code `abfd'.  All operations on the target object file are
111
applied as methods to the BFD.  The mapping is defined within `bfd.h'
112
in a set of macros, all beginning with `bfd_' to reduce namespace
113
pollution.
114
 
115
   For example, this sequence does what you would probably expect:
116
return the number of sections in an object file attached to a BFD
117
`abfd'.
118
 
119
     #include "bfd.h"
120
 
121
     unsigned int number_of_sections (abfd)
122
     bfd *abfd;
123
     {
124
       return bfd_count_sections (abfd);
125
     }
126
 
127
   The abstraction used within BFD is that an object file has:
128
 
129
   * a header,
130
 
131
   * a number of sections containing raw data (*note Sections::),
132
 
133
   * a set of relocations (*note Relocations::), and
134
 
135
   * some symbol information (*note Symbols::).
136
   Also, BFDs opened for archives have the additional attribute of an
137
index and contain subordinate BFDs. This approach is fine for a.out and
138
coff, but loses efficiency when applied to formats such as S-records and
139
IEEE-695.
140
 
141

142
File: bfd.info,  Node: What BFD Version 2 Can Do,  Prev: How It Works,  Up: Overview
143
 
144
1.3 What BFD Version 2 Can Do
145
=============================
146
 
147
When an object file is opened, BFD subroutines automatically determine
148
the format of the input object file.  They then build a descriptor in
149
memory with pointers to routines that will be used to access elements of
150
the object file's data structures.
151
 
152
   As different information from the object files is required, BFD
153
reads from different sections of the file and processes them.  For
154
example, a very common operation for the linker is processing symbol
155
tables.  Each BFD back end provides a routine for converting between
156
the object file's representation of symbols and an internal canonical
157
format. When the linker asks for the symbol table of an object file, it
158
calls through a memory pointer to the routine from the relevant BFD
159
back end which reads and converts the table into a canonical form.  The
160
linker then operates upon the canonical form. When the link is finished
161
and the linker writes the output file's symbol table, another BFD back
162
end routine is called to take the newly created symbol table and
163
convert it into the chosen output format.
164
 
165
* Menu:
166
 
167
* BFD information loss::        Information Loss
168
* Canonical format::            The BFD canonical object-file format
169
 
170

171
File: bfd.info,  Node: BFD information loss,  Next: Canonical format,  Up: What BFD Version 2 Can Do
172
 
173
1.3.1 Information Loss
174
----------------------
175
 
176
_Information can be lost during output._ The output formats supported
177
by BFD do not provide identical facilities, and information which can
178
be described in one form has nowhere to go in another format. One
179
example of this is alignment information in `b.out'. There is nowhere
180
in an `a.out' format file to store alignment information on the
181
contained data, so when a file is linked from `b.out' and an `a.out'
182
image is produced, alignment information will not propagate to the
183
output file. (The linker will still use the alignment information
184
internally, so the link is performed correctly).
185
 
186
   Another example is COFF section names. COFF files may contain an
187
unlimited number of sections, each one with a textual section name. If
188
the target of the link is a format which does not have many sections
189
(e.g., `a.out') or has sections without names (e.g., the Oasys format),
190
the link cannot be done simply. You can circumvent this problem by
191
describing the desired input-to-output section mapping with the linker
192
command language.
193
 
194
   _Information can be lost during canonicalization._ The BFD internal
195
canonical form of the external formats is not exhaustive; there are
196
structures in input formats for which there is no direct representation
197
internally.  This means that the BFD back ends cannot maintain all
198
possible data richness through the transformation between external to
199
internal and back to external formats.
200
 
201
   This limitation is only a problem when an application reads one
202
format and writes another.  Each BFD back end is responsible for
203
maintaining as much data as possible, and the internal BFD canonical
204
form has structures which are opaque to the BFD core, and exported only
205
to the back ends. When a file is read in one format, the canonical form
206
is generated for BFD and the application. At the same time, the back
207
end saves away any information which may otherwise be lost. If the data
208
is then written back in the same format, the back end routine will be
209
able to use the canonical form provided by the BFD core as well as the
210
information it prepared earlier.  Since there is a great deal of
211
commonality between back ends, there is no information lost when
212
linking or copying big endian COFF to little endian COFF, or `a.out' to
213
`b.out'.  When a mixture of formats is linked, the information is only
214
lost from the files whose format differs from the destination.
215
 
216

217
File: bfd.info,  Node: Canonical format,  Prev: BFD information loss,  Up: What BFD Version 2 Can Do
218
 
219
1.3.2 The BFD canonical object-file format
220
------------------------------------------
221
 
222
The greatest potential for loss of information occurs when there is the
223
least overlap between the information provided by the source format,
224
that stored by the canonical format, and that needed by the destination
225
format. A brief description of the canonical form may help you
226
understand which kinds of data you can count on preserving across
227
conversions.
228
 
229
_files_
230
     Information stored on a per-file basis includes target machine
231
     architecture, particular implementation format type, a demand
232
     pageable bit, and a write protected bit.  Information like Unix
233
     magic numbers is not stored here--only the magic numbers' meaning,
234
     so a `ZMAGIC' file would have both the demand pageable bit and the
235
     write protected text bit set.  The byte order of the target is
236
     stored on a per-file basis, so that big- and little-endian object
237
     files may be used with one another.
238
 
239
_sections_
240
     Each section in the input file contains the name of the section,
241
     the section's original address in the object file, size and
242
     alignment information, various flags, and pointers into other BFD
243
     data structures.
244
 
245
_symbols_
246
     Each symbol contains a pointer to the information for the object
247
     file which originally defined it, its name, its value, and various
248
     flag bits.  When a BFD back end reads in a symbol table, it
249
     relocates all symbols to make them relative to the base of the
250
     section where they were defined.  Doing this ensures that each
251
     symbol points to its containing section.  Each symbol also has a
252
     varying amount of hidden private data for the BFD back end.  Since
253
     the symbol points to the original file, the private data format
254
     for that symbol is accessible.  `ld' can operate on a collection
255
     of symbols of wildly different formats without problems.
256
 
257
     Normal global and simple local symbols are maintained on output,
258
     so an output file (no matter its format) will retain symbols
259
     pointing to functions and to global, static, and common variables.
260
     Some symbol information is not worth retaining; in `a.out', type
261
     information is stored in the symbol table as long symbol names.
262
     This information would be useless to most COFF debuggers; the
263
     linker has command line switches to allow users to throw it away.
264
 
265
     There is one word of type information within the symbol, so if the
266
     format supports symbol type information within symbols (for
267
     example, COFF, IEEE, Oasys) and the type is simple enough to fit
268
     within one word (nearly everything but aggregates), the
269
     information will be preserved.
270
 
271
_relocation level_
272
     Each canonical BFD relocation record contains a pointer to the
273
     symbol to relocate to, the offset of the data to relocate, the
274
     section the data is in, and a pointer to a relocation type
275
     descriptor. Relocation is performed by passing messages through
276
     the relocation type descriptor and the symbol pointer. Therefore,
277
     relocations can be performed on output data using a relocation
278
     method that is only available in one of the input formats. For
279
     instance, Oasys provides a byte relocation format.  A relocation
280
     record requesting this relocation type would point indirectly to a
281
     routine to perform this, so the relocation may be performed on a
282
     byte being written to a 68k COFF file, even though 68k COFF has no
283
     such relocation type.
284
 
285
_line numbers_
286
     Object formats can contain, for debugging purposes, some form of
287
     mapping between symbols, source line numbers, and addresses in the
288
     output file.  These addresses have to be relocated along with the
289
     symbol information.  Each symbol with an associated list of line
290
     number records points to the first record of the list.  The head
291
     of a line number list consists of a pointer to the symbol, which
292
     allows finding out the address of the function whose line number
293
     is being described. The rest of the list is made up of pairs:
294
     offsets into the section and line numbers. Any format which can
295
     simply derive this information can pass it successfully between
296
     formats (COFF, IEEE and Oasys).
297
 
298

299
File: bfd.info,  Node: BFD front end,  Next: BFD back ends,  Prev: Overview,  Up: Top
300
 
301
2 BFD Front End
302
***************
303
 
304
2.1 `typedef bfd'
305
=================
306
 
307
A BFD has type `bfd'; objects of this type are the cornerstone of any
308
application using BFD. Using BFD consists of making references though
309
the BFD and to data in the BFD.
310
 
311
   Here is the structure that defines the type `bfd'.  It contains the
312
major data about the file and pointers to the rest of the data.
313
 
314
 
315
     struct bfd
316
     {
317
       /* A unique identifier of the BFD  */
318
       unsigned int id;
319
 
320
       /* The filename the application opened the BFD with.  */
321
       const char *filename;
322
 
323
       /* A pointer to the target jump table.  */
324
       const struct bfd_target *xvec;
325
 
326
       /* The IOSTREAM, and corresponding IO vector that provide access
327
          to the file backing the BFD.  */
328
       void *iostream;
329
       const struct bfd_iovec *iovec;
330
 
331
       /* The caching routines use these to maintain a
332
          least-recently-used list of BFDs.  */
333
       struct bfd *lru_prev, *lru_next;
334
 
335
       /* When a file is closed by the caching routines, BFD retains
336
          state information on the file here...  */
337
       ufile_ptr where;
338
 
339
       /* File modified time, if mtime_set is TRUE.  */
340
       long mtime;
341
 
342
       /* Reserved for an unimplemented file locking extension.  */
343
       int ifd;
344
 
345
       /* The format which belongs to the BFD. (object, core, etc.)  */
346
       bfd_format format;
347
 
348
       /* The direction with which the BFD was opened.  */
349
       enum bfd_direction
350
         {
351
           no_direction = 0,
352
           read_direction = 1,
353
           write_direction = 2,
354
           both_direction = 3
355
         }
356
       direction;
357
 
358
       /* Format_specific flags.  */
359
       flagword flags;
360
 
361
       /* Values that may appear in the flags field of a BFD.  These also
362
          appear in the object_flags field of the bfd_target structure, where
363
          they indicate the set of flags used by that backend (not all flags
364
          are meaningful for all object file formats) (FIXME: at the moment,
365
          the object_flags values have mostly just been copied from backend
366
          to another, and are not necessarily correct).  */
367
 
368
     #define BFD_NO_FLAGS   0x00
369
 
370
       /* BFD contains relocation entries.  */
371
     #define HAS_RELOC      0x01
372
 
373
       /* BFD is directly executable.  */
374
     #define EXEC_P         0x02
375
 
376
       /* BFD has line number information (basically used for F_LNNO in a
377
          COFF header).  */
378
     #define HAS_LINENO     0x04
379
 
380
       /* BFD has debugging information.  */
381
     #define HAS_DEBUG      0x08
382
 
383
       /* BFD has symbols.  */
384
     #define HAS_SYMS       0x10
385
 
386
       /* BFD has local symbols (basically used for F_LSYMS in a COFF
387
          header).  */
388
     #define HAS_LOCALS     0x20
389
 
390
       /* BFD is a dynamic object.  */
391
     #define DYNAMIC        0x40
392
 
393
       /* Text section is write protected (if D_PAGED is not set, this is
394
          like an a.out NMAGIC file) (the linker sets this by default, but
395
          clears it for -r or -N).  */
396
     #define WP_TEXT        0x80
397
 
398
       /* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
399
          linker sets this by default, but clears it for -r or -n or -N).  */
400
     #define D_PAGED        0x100
401
 
402
       /* BFD is relaxable (this means that bfd_relax_section may be able to
403
          do something) (sometimes bfd_relax_section can do something even if
404
          this is not set).  */
405
     #define BFD_IS_RELAXABLE 0x200
406
 
407
       /* This may be set before writing out a BFD to request using a
408
          traditional format.  For example, this is used to request that when
409
          writing out an a.out object the symbols not be hashed to eliminate
410
          duplicates.  */
411
     #define BFD_TRADITIONAL_FORMAT 0x400
412
 
413
       /* This flag indicates that the BFD contents are actually cached
414
          in memory.  If this is set, iostream points to a bfd_in_memory
415
          struct.  */
416
     #define BFD_IN_MEMORY 0x800
417
 
418
       /* The sections in this BFD specify a memory page.  */
419
     #define HAS_LOAD_PAGE 0x1000
420
 
421
       /* This BFD has been created by the linker and doesn't correspond
422
          to any input file.  */
423
     #define BFD_LINKER_CREATED 0x2000
424
 
425
       /* Currently my_archive is tested before adding origin to
426
          anything. I believe that this can become always an add of
427
          origin, with origin set to 0 for non archive files.  */
428
       ufile_ptr origin;
429
 
430
       /* The origin in the archive of the proxy entry.  This will
431
          normally be the same as origin, except for thin archives,
432
          when it will contain the current offset of the proxy in the
433
          thin archive rather than the offset of the bfd in its actual
434
          container.  */
435
       ufile_ptr proxy_origin;
436
 
437
       /* A hash table for section names.  */
438
       struct bfd_hash_table section_htab;
439
 
440
       /* Pointer to linked list of sections.  */
441
       struct bfd_section *sections;
442
 
443
       /* The last section on the section list.  */
444
       struct bfd_section *section_last;
445
 
446
       /* The number of sections.  */
447
       unsigned int section_count;
448
 
449
       /* Stuff only useful for object files:
450
          The start address.  */
451
       bfd_vma start_address;
452
 
453
       /* Used for input and output.  */
454
       unsigned int symcount;
455
 
456
       /* Symbol table for output BFD (with symcount entries).  */
457
       struct bfd_symbol  **outsymbols;
458
 
459
       /* Used for slurped dynamic symbol tables.  */
460
       unsigned int dynsymcount;
461
 
462
       /* Pointer to structure which contains architecture information.  */
463
       const struct bfd_arch_info *arch_info;
464
 
465
       /* Stuff only useful for archives.  */
466
       void *arelt_data;
467
       struct bfd *my_archive;      /* The containing archive BFD.  */
468
       struct bfd *archive_next;    /* The next BFD in the archive.  */
469
       struct bfd *archive_head;    /* The first BFD in the archive.  */
470
       struct bfd *nested_archives; /* List of nested archive in a flattened
471
                                       thin archive.  */
472
 
473
       /* A chain of BFD structures involved in a link.  */
474
       struct bfd *link_next;
475
 
476
       /* A field used by _bfd_generic_link_add_archive_symbols.  This will
477
          be used only for archive elements.  */
478
       int archive_pass;
479
 
480
       /* Used by the back end to hold private data.  */
481
       union
482
         {
483
           struct aout_data_struct *aout_data;
484
           struct artdata *aout_ar_data;
485
           struct _oasys_data *oasys_obj_data;
486
           struct _oasys_ar_data *oasys_ar_data;
487
           struct coff_tdata *coff_obj_data;
488
           struct pe_tdata *pe_obj_data;
489
           struct xcoff_tdata *xcoff_obj_data;
490
           struct ecoff_tdata *ecoff_obj_data;
491
           struct ieee_data_struct *ieee_data;
492
           struct ieee_ar_data_struct *ieee_ar_data;
493
           struct srec_data_struct *srec_data;
494
           struct ihex_data_struct *ihex_data;
495
           struct tekhex_data_struct *tekhex_data;
496
           struct elf_obj_tdata *elf_obj_data;
497
           struct nlm_obj_tdata *nlm_obj_data;
498
           struct bout_data_struct *bout_data;
499
           struct mmo_data_struct *mmo_data;
500
           struct sun_core_struct *sun_core_data;
501
           struct sco5_core_struct *sco5_core_data;
502
           struct trad_core_struct *trad_core_data;
503
           struct som_data_struct *som_data;
504
           struct hpux_core_struct *hpux_core_data;
505
           struct hppabsd_core_struct *hppabsd_core_data;
506
           struct sgi_core_struct *sgi_core_data;
507
           struct lynx_core_struct *lynx_core_data;
508
           struct osf_core_struct *osf_core_data;
509
           struct cisco_core_struct *cisco_core_data;
510
           struct versados_data_struct *versados_data;
511
           struct netbsd_core_struct *netbsd_core_data;
512
           struct mach_o_data_struct *mach_o_data;
513
           struct mach_o_fat_data_struct *mach_o_fat_data;
514
           struct bfd_pef_data_struct *pef_data;
515
           struct bfd_pef_xlib_data_struct *pef_xlib_data;
516
           struct bfd_sym_data_struct *sym_data;
517
           void *any;
518
         }
519
       tdata;
520
 
521
       /* Used by the application to hold private data.  */
522
       void *usrdata;
523
 
524
       /* Where all the allocated stuff under this BFD goes.  This is a
525
          struct objalloc *, but we use void * to avoid requiring the inclusion
526
          of objalloc.h.  */
527
       void *memory;
528
 
529
       /* Is the file descriptor being cached?  That is, can it be closed as
530
          needed, and re-opened when accessed later?  */
531
       unsigned int cacheable : 1;
532
 
533
       /* Marks whether there was a default target specified when the
534
          BFD was opened. This is used to select which matching algorithm
535
          to use to choose the back end.  */
536
       unsigned int target_defaulted : 1;
537
 
538
       /* ... and here: (``once'' means at least once).  */
539
       unsigned int opened_once : 1;
540
 
541
       /* Set if we have a locally maintained mtime value, rather than
542
          getting it from the file each time.  */
543
       unsigned int mtime_set : 1;
544
 
545
       /* Flag set if symbols from this BFD should not be exported.  */
546
       unsigned int no_export : 1;
547
 
548
       /* Remember when output has begun, to stop strange things
549
          from happening.  */
550
       unsigned int output_has_begun : 1;
551
 
552
       /* Have archive map.  */
553
       unsigned int has_armap : 1;
554
 
555
       /* Set if this is a thin archive.  */
556
       unsigned int is_thin_archive : 1;
557
     };
558
 
559
2.2 Error reporting
560
===================
561
 
562
Most BFD functions return nonzero on success (check their individual
563
documentation for precise semantics).  On an error, they call
564
`bfd_set_error' to set an error condition that callers can check by
565
calling `bfd_get_error'.  If that returns `bfd_error_system_call', then
566
check `errno'.
567
 
568
   The easiest way to report a BFD error to the user is to use
569
`bfd_perror'.
570
 
571
2.2.1 Type `bfd_error_type'
572
---------------------------
573
 
574
The values returned by `bfd_get_error' are defined by the enumerated
575
type `bfd_error_type'.
576
 
577
 
578
     typedef enum bfd_error
579
     {
580
       bfd_error_no_error = 0,
581
       bfd_error_system_call,
582
       bfd_error_invalid_target,
583
       bfd_error_wrong_format,
584
       bfd_error_wrong_object_format,
585
       bfd_error_invalid_operation,
586
       bfd_error_no_memory,
587
       bfd_error_no_symbols,
588
       bfd_error_no_armap,
589
       bfd_error_no_more_archived_files,
590
       bfd_error_malformed_archive,
591
       bfd_error_file_not_recognized,
592
       bfd_error_file_ambiguously_recognized,
593
       bfd_error_no_contents,
594
       bfd_error_nonrepresentable_section,
595
       bfd_error_no_debug_section,
596
       bfd_error_bad_value,
597
       bfd_error_file_truncated,
598
       bfd_error_file_too_big,
599
       bfd_error_on_input,
600
       bfd_error_invalid_error_code
601
     }
602
     bfd_error_type;
603
 
604
2.2.1.1 `bfd_get_error'
605
.......................
606
 
607
*Synopsis*
608
     bfd_error_type bfd_get_error (void);
609
   *Description*
610
Return the current BFD error condition.
611
 
612
2.2.1.2 `bfd_set_error'
613
.......................
614
 
615
*Synopsis*
616
     void bfd_set_error (bfd_error_type error_tag, ...);
617
   *Description*
618
Set the BFD error condition to be ERROR_TAG.  If ERROR_TAG is
619
bfd_error_on_input, then this function takes two more parameters, the
620
input bfd where the error occurred, and the bfd_error_type error.
621
 
622
2.2.1.3 `bfd_errmsg'
623
....................
624
 
625
*Synopsis*
626
     const char *bfd_errmsg (bfd_error_type error_tag);
627
   *Description*
628
Return a string describing the error ERROR_TAG, or the system error if
629
ERROR_TAG is `bfd_error_system_call'.
630
 
631
2.2.1.4 `bfd_perror'
632
....................
633
 
634
*Synopsis*
635
     void bfd_perror (const char *message);
636
   *Description*
637
Print to the standard error stream a string describing the last BFD
638
error that occurred, or the last system error if the last BFD error was
639
a system call failure.  If MESSAGE is non-NULL and non-empty, the error
640
string printed is preceded by MESSAGE, a colon, and a space.  It is
641
followed by a newline.
642
 
643
2.2.2 BFD error handler
644
-----------------------
645
 
646
Some BFD functions want to print messages describing the problem.  They
647
call a BFD error handler function.  This function may be overridden by
648
the program.
649
 
650
   The BFD error handler acts like printf.
651
 
652
 
653
     typedef void (*bfd_error_handler_type) (const char *, ...);
654
 
655
2.2.2.1 `bfd_set_error_handler'
656
...............................
657
 
658
*Synopsis*
659
     bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
660
   *Description*
661
Set the BFD error handler function.  Returns the previous function.
662
 
663
2.2.2.2 `bfd_set_error_program_name'
664
....................................
665
 
666
*Synopsis*
667
     void bfd_set_error_program_name (const char *);
668
   *Description*
669
Set the program name to use when printing a BFD error.  This is printed
670
before the error message followed by a colon and space.  The string
671
must not be changed after it is passed to this function.
672
 
673
2.2.2.3 `bfd_get_error_handler'
674
...............................
675
 
676
*Synopsis*
677
     bfd_error_handler_type bfd_get_error_handler (void);
678
   *Description*
679
Return the BFD error handler function.
680
 
681
2.3 Miscellaneous
682
=================
683
 
684
2.3.1 Miscellaneous functions
685
-----------------------------
686
 
687
2.3.1.1 `bfd_get_reloc_upper_bound'
688
...................................
689
 
690
*Synopsis*
691
     long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
692
   *Description*
693
Return the number of bytes required to store the relocation information
694
associated with section SECT attached to bfd ABFD.  If an error occurs,
695
return -1.
696
 
697
2.3.1.2 `bfd_canonicalize_reloc'
698
................................
699
 
700
*Synopsis*
701
     long bfd_canonicalize_reloc
702
        (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
703
   *Description*
704
Call the back end associated with the open BFD ABFD and translate the
705
external form of the relocation information attached to SEC into the
706
internal canonical form.  Place the table into memory at LOC, which has
707
been preallocated, usually by a call to `bfd_get_reloc_upper_bound'.
708
Returns the number of relocs, or -1 on error.
709
 
710
   The SYMS table is also needed for horrible internal magic reasons.
711
 
712
2.3.1.3 `bfd_set_reloc'
713
.......................
714
 
715
*Synopsis*
716
     void bfd_set_reloc
717
        (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
718
   *Description*
719
Set the relocation pointer and count within section SEC to the values
720
REL and COUNT.  The argument ABFD is ignored.
721
 
722
2.3.1.4 `bfd_set_file_flags'
723
............................
724
 
725
*Synopsis*
726
     bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
727
   *Description*
728
Set the flag word in the BFD ABFD to the value FLAGS.
729
 
730
   Possible errors are:
731
   * `bfd_error_wrong_format' - The target bfd was not of object format.
732
 
733
   * `bfd_error_invalid_operation' - The target bfd was open for
734
     reading.
735
 
736
   * `bfd_error_invalid_operation' - The flag word contained a bit
737
     which was not applicable to the type of file.  E.g., an attempt
738
     was made to set the `D_PAGED' bit on a BFD format which does not
739
     support demand paging.
740
 
741
2.3.1.5 `bfd_get_arch_size'
742
...........................
743
 
744
*Synopsis*
745
     int bfd_get_arch_size (bfd *abfd);
746
   *Description*
747
Returns the architecture address size, in bits, as determined by the
748
object file's format.  For ELF, this information is included in the
749
header.
750
 
751
   *Returns*
752
Returns the arch size in bits if known, `-1' otherwise.
753
 
754
2.3.1.6 `bfd_get_sign_extend_vma'
755
.................................
756
 
757
*Synopsis*
758
     int bfd_get_sign_extend_vma (bfd *abfd);
759
   *Description*
760
Indicates if the target architecture "naturally" sign extends an
761
address.  Some architectures implicitly sign extend address values when
762
they are converted to types larger than the size of an address.  For
763
instance, bfd_get_start_address() will return an address sign extended
764
to fill a bfd_vma when this is the case.
765
 
766
   *Returns*
767
Returns `1' if the target architecture is known to sign extend
768
addresses, `0' if the target architecture is known to not sign extend
769
addresses, and `-1' otherwise.
770
 
771
2.3.1.7 `bfd_set_start_address'
772
...............................
773
 
774
*Synopsis*
775
     bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
776
   *Description*
777
Make VMA the entry point of output BFD ABFD.
778
 
779
   *Returns*
780
Returns `TRUE' on success, `FALSE' otherwise.
781
 
782
2.3.1.8 `bfd_get_gp_size'
783
.........................
784
 
785
*Synopsis*
786
     unsigned int bfd_get_gp_size (bfd *abfd);
787
   *Description*
788
Return the maximum size of objects to be optimized using the GP
789
register under MIPS ECOFF.  This is typically set by the `-G' argument
790
to the compiler, assembler or linker.
791
 
792
2.3.1.9 `bfd_set_gp_size'
793
.........................
794
 
795
*Synopsis*
796
     void bfd_set_gp_size (bfd *abfd, unsigned int i);
797
   *Description*
798
Set the maximum size of objects to be optimized using the GP register
799
under ECOFF or MIPS ELF.  This is typically set by the `-G' argument to
800
the compiler, assembler or linker.
801
 
802
2.3.1.10 `bfd_scan_vma'
803
.......................
804
 
805
*Synopsis*
806
     bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
807
   *Description*
808
Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
809
integer, and return that integer.  (Though without as many bells and
810
whistles as `strtoul'.)  The expression is assumed to be unsigned
811
(i.e., positive).  If given a BASE, it is used as the base for
812
conversion.  A base of 0 causes the function to interpret the string in
813
hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
814
zero is found, otherwise in decimal.
815
 
816
   If the value would overflow, the maximum `bfd_vma' value is returned.
817
 
818
2.3.1.11 `bfd_copy_private_header_data'
819
.......................................
820
 
821
*Synopsis*
822
     bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
823
   *Description*
824
Copy private BFD header information from the BFD IBFD to the the BFD
825
OBFD.  This copies information that may require sections to exist, but
826
does not require symbol tables.  Return `true' on success, `false' on
827
error.  Possible error returns are:
828
 
829
   * `bfd_error_no_memory' - Not enough memory exists to create private
830
     data for OBFD.
831
 
832
     #define bfd_copy_private_header_data(ibfd, obfd) \
833
          BFD_SEND (obfd, _bfd_copy_private_header_data, \
834
                    (ibfd, obfd))
835
 
836
2.3.1.12 `bfd_copy_private_bfd_data'
837
....................................
838
 
839
*Synopsis*
840
     bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
841
   *Description*
842
Copy private BFD information from the BFD IBFD to the the BFD OBFD.
843
Return `TRUE' on success, `FALSE' on error.  Possible error returns are:
844
 
845
   * `bfd_error_no_memory' - Not enough memory exists to create private
846
     data for OBFD.
847
 
848
     #define bfd_copy_private_bfd_data(ibfd, obfd) \
849
          BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
850
                    (ibfd, obfd))
851
 
852
2.3.1.13 `bfd_merge_private_bfd_data'
853
.....................................
854
 
855
*Synopsis*
856
     bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
857
   *Description*
858
Merge private BFD information from the BFD IBFD to the the output file
859
BFD OBFD when linking.  Return `TRUE' on success, `FALSE' on error.
860
Possible error returns are:
861
 
862
   * `bfd_error_no_memory' - Not enough memory exists to create private
863
     data for OBFD.
864
 
865
     #define bfd_merge_private_bfd_data(ibfd, obfd) \
866
          BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
867
                    (ibfd, obfd))
868
 
869
2.3.1.14 `bfd_set_private_flags'
870
................................
871
 
872
*Synopsis*
873
     bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
874
   *Description*
875
Set private BFD flag information in the BFD ABFD.  Return `TRUE' on
876
success, `FALSE' on error.  Possible error returns are:
877
 
878
   * `bfd_error_no_memory' - Not enough memory exists to create private
879
     data for OBFD.
880
 
881
     #define bfd_set_private_flags(abfd, flags) \
882
          BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
883
 
884
2.3.1.15 `Other functions'
885
..........................
886
 
887
*Description*
888
The following functions exist but have not yet been documented.
889
     #define bfd_sizeof_headers(abfd, info) \
890
            BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
891
 
892
     #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
893
            BFD_SEND (abfd, _bfd_find_nearest_line, \
894
                      (abfd, sec, syms, off, file, func, line))
895
 
896
     #define bfd_find_line(abfd, syms, sym, file, line) \
897
            BFD_SEND (abfd, _bfd_find_line, \
898
                      (abfd, syms, sym, file, line))
899
 
900
     #define bfd_find_inliner_info(abfd, file, func, line) \
901
            BFD_SEND (abfd, _bfd_find_inliner_info, \
902
                      (abfd, file, func, line))
903
 
904
     #define bfd_debug_info_start(abfd) \
905
            BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
906
 
907
     #define bfd_debug_info_end(abfd) \
908
            BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
909
 
910
     #define bfd_debug_info_accumulate(abfd, section) \
911
            BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
912
 
913
     #define bfd_stat_arch_elt(abfd, stat) \
914
            BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
915
 
916
     #define bfd_update_armap_timestamp(abfd) \
917
            BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
918
 
919
     #define bfd_set_arch_mach(abfd, arch, mach)\
920
            BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
921
 
922
     #define bfd_relax_section(abfd, section, link_info, again) \
923
            BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
924
 
925
     #define bfd_gc_sections(abfd, link_info) \
926
            BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
927
 
928
     #define bfd_merge_sections(abfd, link_info) \
929
            BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
930
 
931
     #define bfd_is_group_section(abfd, sec) \
932
            BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
933
 
934
     #define bfd_discard_group(abfd, sec) \
935
            BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
936
 
937
     #define bfd_link_hash_table_create(abfd) \
938
            BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
939
 
940
     #define bfd_link_hash_table_free(abfd, hash) \
941
            BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
942
 
943
     #define bfd_link_add_symbols(abfd, info) \
944
            BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
945
 
946
     #define bfd_link_just_syms(abfd, sec, info) \
947
            BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
948
 
949
     #define bfd_final_link(abfd, info) \
950
            BFD_SEND (abfd, _bfd_final_link, (abfd, info))
951
 
952
     #define bfd_free_cached_info(abfd) \
953
            BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
954
 
955
     #define bfd_get_dynamic_symtab_upper_bound(abfd) \
956
            BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
957
 
958
     #define bfd_print_private_bfd_data(abfd, file)\
959
            BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
960
 
961
     #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
962
            BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
963
 
964
     #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
965
            BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
966
                                                        dyncount, dynsyms, ret))
967
 
968
     #define bfd_get_dynamic_reloc_upper_bound(abfd) \
969
            BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
970
 
971
     #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
972
            BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
973
 
974
     extern bfd_byte *bfd_get_relocated_section_contents
975
       (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
976
        bfd_boolean, asymbol **);
977
 
978
2.3.1.16 `bfd_alt_mach_code'
979
............................
980
 
981
*Synopsis*
982
     bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
983
   *Description*
984
When more than one machine code number is available for the same
985
machine type, this function can be used to switch between the preferred
986
one (alternative == 0) and any others.  Currently, only ELF supports
987
this feature, with up to two alternate machine codes.
988
 
989
     struct bfd_preserve
990
     {
991
       void *marker;
992
       void *tdata;
993
       flagword flags;
994
       const struct bfd_arch_info *arch_info;
995
       struct bfd_section *sections;
996
       struct bfd_section *section_last;
997
       unsigned int section_count;
998
       struct bfd_hash_table section_htab;
999
     };
1000
 
1001
2.3.1.17 `bfd_preserve_save'
1002
............................
1003
 
1004
*Synopsis*
1005
     bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
1006
   *Description*
1007
When testing an object for compatibility with a particular target
1008
back-end, the back-end object_p function needs to set up certain fields
1009
in the bfd on successfully recognizing the object.  This typically
1010
happens in a piecemeal fashion, with failures possible at many points.
1011
On failure, the bfd is supposed to be restored to its initial state,
1012
which is virtually impossible.  However, restoring a subset of the bfd
1013
state works in practice.  This function stores the subset and
1014
reinitializes the bfd.
1015
 
1016
2.3.1.18 `bfd_preserve_restore'
1017
...............................
1018
 
1019
*Synopsis*
1020
     void bfd_preserve_restore (bfd *, struct bfd_preserve *);
1021
   *Description*
1022
This function restores bfd state saved by bfd_preserve_save.  If MARKER
1023
is non-NULL in struct bfd_preserve then that block and all subsequently
1024
bfd_alloc'd memory is freed.
1025
 
1026
2.3.1.19 `bfd_preserve_finish'
1027
..............................
1028
 
1029
*Synopsis*
1030
     void bfd_preserve_finish (bfd *, struct bfd_preserve *);
1031
   *Description*
1032
This function should be called when the bfd state saved by
1033
bfd_preserve_save is no longer needed.  ie. when the back-end object_p
1034
function returns with success.
1035
 
1036
2.3.1.20 `bfd_emul_get_maxpagesize'
1037
...................................
1038
 
1039
*Synopsis*
1040
     bfd_vma bfd_emul_get_maxpagesize (const char *);
1041
   *Description*
1042
Returns the maximum page size, in bytes, as determined by emulation.
1043
 
1044
   *Returns*
1045
Returns the maximum page size in bytes for ELF, abort otherwise.
1046
 
1047
2.3.1.21 `bfd_emul_set_maxpagesize'
1048
...................................
1049
 
1050
*Synopsis*
1051
     void bfd_emul_set_maxpagesize (const char *, bfd_vma);
1052
   *Description*
1053
For ELF, set the maximum page size for the emulation.  It is a no-op
1054
for other formats.
1055
 
1056
2.3.1.22 `bfd_emul_get_commonpagesize'
1057
......................................
1058
 
1059
*Synopsis*
1060
     bfd_vma bfd_emul_get_commonpagesize (const char *);
1061
   *Description*
1062
Returns the common page size, in bytes, as determined by emulation.
1063
 
1064
   *Returns*
1065
Returns the common page size in bytes for ELF, abort otherwise.
1066
 
1067
2.3.1.23 `bfd_emul_set_commonpagesize'
1068
......................................
1069
 
1070
*Synopsis*
1071
     void bfd_emul_set_commonpagesize (const char *, bfd_vma);
1072
   *Description*
1073
For ELF, set the common page size for the emulation.  It is a no-op for
1074
other formats.
1075
 
1076
2.3.1.24 `bfd_demangle'
1077
.......................
1078
 
1079
*Synopsis*
1080
     char *bfd_demangle (bfd *, const char *, int);
1081
   *Description*
1082
Wrapper around cplus_demangle.  Strips leading underscores and other
1083
such chars that would otherwise confuse the demangler.  If passed a g++
1084
v3 ABI mangled name, returns a buffer allocated with malloc holding the
1085
demangled name.  Returns NULL otherwise and on memory alloc failure.
1086
 
1087
2.3.1.25 `struct bfd_iovec'
1088
...........................
1089
 
1090
*Description*
1091
The `struct bfd_iovec' contains the internal file I/O class.  Each
1092
`BFD' has an instance of this class and all file I/O is routed through
1093
it (it is assumed that the instance implements all methods listed
1094
below).
1095
     struct bfd_iovec
1096
     {
1097
       /* To avoid problems with macros, a "b" rather than "f"
1098
          prefix is prepended to each method name.  */
1099
       /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
1100
          bytes starting at PTR.  Return the number of bytes actually
1101
          transfered (a read past end-of-file returns less than NBYTES),
1102
          or -1 (setting `bfd_error') if an error occurs.  */
1103
       file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
1104
       file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
1105
                           file_ptr nbytes);
1106
       /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error'
1107
          if an error occurs.  */
1108
       file_ptr (*btell) (struct bfd *abfd);
1109
       /* For the following, on successful completion a value of 0 is returned.
1110
          Otherwise, a value of -1 is returned (and  `bfd_error' is set).  */
1111
       int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
1112
       int (*bclose) (struct bfd *abfd);
1113
       int (*bflush) (struct bfd *abfd);
1114
       int (*bstat) (struct bfd *abfd, struct stat *sb);
1115
     };
1116
 
1117
2.3.1.26 `bfd_get_mtime'
1118
........................
1119
 
1120
*Synopsis*
1121
     long bfd_get_mtime (bfd *abfd);
1122
   *Description*
1123
Return the file modification time (as read from the file system, or
1124
from the archive header for archive members).
1125
 
1126
2.3.1.27 `bfd_get_size'
1127
.......................
1128
 
1129
*Synopsis*
1130
     file_ptr bfd_get_size (bfd *abfd);
1131
   *Description*
1132
Return the file size (as read from file system) for the file associated
1133
with BFD ABFD.
1134
 
1135
   The initial motivation for, and use of, this routine is not so we
1136
can get the exact size of the object the BFD applies to, since that
1137
might not be generally possible (archive members for example).  It
1138
would be ideal if someone could eventually modify it so that such
1139
results were guaranteed.
1140
 
1141
   Instead, we want to ask questions like "is this NNN byte sized
1142
object I'm about to try read from file offset YYY reasonable?"  As as
1143
example of where we might do this, some object formats use string
1144
tables for which the first `sizeof (long)' bytes of the table contain
1145
the size of the table itself, including the size bytes.  If an
1146
application tries to read what it thinks is one of these string tables,
1147
without some way to validate the size, and for some reason the size is
1148
wrong (byte swapping error, wrong location for the string table, etc.),
1149
the only clue is likely to be a read error when it tries to read the
1150
table, or a "virtual memory exhausted" error when it tries to allocate
1151
15 bazillon bytes of space for the 15 bazillon byte table it is about
1152
to read.  This function at least allows us to answer the question, "is
1153
the size reasonable?".
1154
 
1155
* Menu:
1156
 
1157
* Memory Usage::
1158
* Initialization::
1159
* Sections::
1160
* Symbols::
1161
* Archives::
1162
* Formats::
1163
* Relocations::
1164
* Core Files::
1165
* Targets::
1166
* Architectures::
1167
* Opening and Closing::
1168
* Internal::
1169
* File Caching::
1170
* Linker Functions::
1171
* Hash Tables::
1172
 
1173

1174
File: bfd.info,  Node: Memory Usage,  Next: Initialization,  Prev: BFD front end,  Up: BFD front end
1175
 
1176
2.4 Memory Usage
1177
================
1178
 
1179
BFD keeps all of its internal structures in obstacks. There is one
1180
obstack per open BFD file, into which the current state is stored. When
1181
a BFD is closed, the obstack is deleted, and so everything which has
1182
been allocated by BFD for the closing file is thrown away.
1183
 
1184
   BFD does not free anything created by an application, but pointers
1185
into `bfd' structures become invalid on a `bfd_close'; for example,
1186
after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
1187
still around, since it has been allocated by the application, but the
1188
data that it pointed to are lost.
1189
 
1190
   The general rule is to not close a BFD until all operations dependent
1191
upon data from the BFD have been completed, or all the data from within
1192
the file has been copied. To help with the management of memory, there
1193
is a function (`bfd_alloc_size') which returns the number of bytes in
1194
obstacks associated with the supplied BFD. This could be used to select
1195
the greediest open BFD, close it to reclaim the memory, perform some
1196
operation and reopen the BFD again, to get a fresh copy of the data
1197
structures.
1198
 
1199

1200
File: bfd.info,  Node: Initialization,  Next: Sections,  Prev: Memory Usage,  Up: BFD front end
1201
 
1202
2.5 Initialization
1203
==================
1204
 
1205
2.5.1 Initialization functions
1206
------------------------------
1207
 
1208
These are the functions that handle initializing a BFD.
1209
 
1210
2.5.1.1 `bfd_init'
1211
..................
1212
 
1213
*Synopsis*
1214
     void bfd_init (void);
1215
   *Description*
1216
This routine must be called before any other BFD function to initialize
1217
magical internal data structures.
1218
 
1219

1220
File: bfd.info,  Node: Sections,  Next: Symbols,  Prev: Initialization,  Up: BFD front end
1221
 
1222
2.6 Sections
1223
============
1224
 
1225
The raw data contained within a BFD is maintained through the section
1226
abstraction.  A single BFD may have any number of sections.  It keeps
1227
hold of them by pointing to the first; each one points to the next in
1228
the list.
1229
 
1230
   Sections are supported in BFD in `section.c'.
1231
 
1232
* Menu:
1233
 
1234
* Section Input::
1235
* Section Output::
1236
* typedef asection::
1237
* section prototypes::
1238
 
1239

1240
File: bfd.info,  Node: Section Input,  Next: Section Output,  Prev: Sections,  Up: Sections
1241
 
1242
2.6.1 Section input
1243
-------------------
1244
 
1245
When a BFD is opened for reading, the section structures are created
1246
and attached to the BFD.
1247
 
1248
   Each section has a name which describes the section in the outside
1249
world--for example, `a.out' would contain at least three sections,
1250
called `.text', `.data' and `.bss'.
1251
 
1252
   Names need not be unique; for example a COFF file may have several
1253
sections named `.data'.
1254
 
1255
   Sometimes a BFD will contain more than the "natural" number of
1256
sections. A back end may attach other sections containing constructor
1257
data, or an application may add a section (using `bfd_make_section') to
1258
the sections attached to an already open BFD. For example, the linker
1259
creates an extra section `COMMON' for each input file's BFD to hold
1260
information about common storage.
1261
 
1262
   The raw data is not necessarily read in when the section descriptor
1263
is created. Some targets may leave the data in place until a
1264
`bfd_get_section_contents' call is made. Other back ends may read in
1265
all the data at once.  For example, an S-record file has to be read
1266
once to determine the size of the data. An IEEE-695 file doesn't
1267
contain raw data in sections, but data and relocation expressions
1268
intermixed, so the data area has to be parsed to get out the data and
1269
relocations.
1270
 
1271

1272
File: bfd.info,  Node: Section Output,  Next: typedef asection,  Prev: Section Input,  Up: Sections
1273
 
1274
2.6.2 Section output
1275
--------------------
1276
 
1277
To write a new object style BFD, the various sections to be written
1278
have to be created. They are attached to the BFD in the same way as
1279
input sections; data is written to the sections using
1280
`bfd_set_section_contents'.
1281
 
1282
   Any program that creates or combines sections (e.g., the assembler
1283
and linker) must use the `asection' fields `output_section' and
1284
`output_offset' to indicate the file sections to which each section
1285
must be written.  (If the section is being created from scratch,
1286
`output_section' should probably point to the section itself and
1287
`output_offset' should probably be zero.)
1288
 
1289
   The data to be written comes from input sections attached (via
1290
`output_section' pointers) to the output sections.  The output section
1291
structure can be considered a filter for the input section: the output
1292
section determines the vma of the output data and the name, but the
1293
input section determines the offset into the output section of the data
1294
to be written.
1295
 
1296
   E.g., to create a section "O", starting at 0x100, 0x123 long,
1297
containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and
1298
"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would
1299
look like:
1300
 
1301
        section name          "A"
1302
          output_offset   0x00
1303
          size            0x20
1304
          output_section ----------->  section name    "O"
1305
                                  |    vma             0x100
1306
        section name          "B" |    size            0x123
1307
          output_offset   0x20    |
1308
          size            0x103   |
1309
          output_section  --------|
1310
 
1311
2.6.3 Link orders
1312
-----------------
1313
 
1314
The data within a section is stored in a "link_order".  These are much
1315
like the fixups in `gas'.  The link_order abstraction allows a section
1316
to grow and shrink within itself.
1317
 
1318
   A link_order knows how big it is, and which is the next link_order
1319
and where the raw data for it is; it also points to a list of
1320
relocations which apply to it.
1321
 
1322
   The link_order is used by the linker to perform relaxing on final
1323
code.  The compiler creates code which is as big as necessary to make
1324
it work without relaxing, and the user can select whether to relax.
1325
Sometimes relaxing takes a lot of time.  The linker runs around the
1326
relocations to see if any are attached to data which can be shrunk, if
1327
so it does it on a link_order by link_order basis.
1328
 
1329

1330
File: bfd.info,  Node: typedef asection,  Next: section prototypes,  Prev: Section Output,  Up: Sections
1331
 
1332
2.6.4 typedef asection
1333
----------------------
1334
 
1335
Here is the section structure:
1336
 
1337
 
1338
     typedef struct bfd_section
1339
     {
1340
       /* The name of the section; the name isn't a copy, the pointer is
1341
          the same as that passed to bfd_make_section.  */
1342
       const char *name;
1343
 
1344
       /* A unique sequence number.  */
1345
       int id;
1346
 
1347
       /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
1348
       int index;
1349
 
1350
       /* The next section in the list belonging to the BFD, or NULL.  */
1351
       struct bfd_section *next;
1352
 
1353
       /* The previous section in the list belonging to the BFD, or NULL.  */
1354
       struct bfd_section *prev;
1355
 
1356
       /* The field flags contains attributes of the section. Some
1357
          flags are read in from the object file, and some are
1358
          synthesized from other information.  */
1359
       flagword flags;
1360
 
1361
     #define SEC_NO_FLAGS   0x000
1362
 
1363
       /* Tells the OS to allocate space for this section when loading.
1364
          This is clear for a section containing debug information only.  */
1365
     #define SEC_ALLOC      0x001
1366
 
1367
       /* Tells the OS to load the section from the file when loading.
1368
          This is clear for a .bss section.  */
1369
     #define SEC_LOAD       0x002
1370
 
1371
       /* The section contains data still to be relocated, so there is
1372
          some relocation information too.  */
1373
     #define SEC_RELOC      0x004
1374
 
1375
       /* A signal to the OS that the section contains read only data.  */
1376
     #define SEC_READONLY   0x008
1377
 
1378
       /* The section contains code only.  */
1379
     #define SEC_CODE       0x010
1380
 
1381
       /* The section contains data only.  */
1382
     #define SEC_DATA       0x020
1383
 
1384
       /* The section will reside in ROM.  */
1385
     #define SEC_ROM        0x040
1386
 
1387
       /* The section contains constructor information. This section
1388
          type is used by the linker to create lists of constructors and
1389
          destructors used by `g++'. When a back end sees a symbol
1390
          which should be used in a constructor list, it creates a new
1391
          section for the type of name (e.g., `__CTOR_LIST__'), attaches
1392
          the symbol to it, and builds a relocation. To build the lists
1393
          of constructors, all the linker has to do is catenate all the
1394
          sections called `__CTOR_LIST__' and relocate the data
1395
          contained within - exactly the operations it would peform on
1396
          standard data.  */
1397
     #define SEC_CONSTRUCTOR 0x080
1398
 
1399
       /* The section has contents - a data section could be
1400
          `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
1401
          `SEC_HAS_CONTENTS'  */
1402
     #define SEC_HAS_CONTENTS 0x100
1403
 
1404
       /* An instruction to the linker to not output the section
1405
          even if it has information which would normally be written.  */
1406
     #define SEC_NEVER_LOAD 0x200
1407
 
1408
       /* The section contains thread local data.  */
1409
     #define SEC_THREAD_LOCAL 0x400
1410
 
1411
       /* The section has GOT references.  This flag is only for the
1412
          linker, and is currently only used by the elf32-hppa back end.
1413
          It will be set if global offset table references were detected
1414
          in this section, which indicate to the linker that the section
1415
          contains PIC code, and must be handled specially when doing a
1416
          static link.  */
1417
     #define SEC_HAS_GOT_REF 0x800
1418
 
1419
       /* The section contains common symbols (symbols may be defined
1420
          multiple times, the value of a symbol is the amount of
1421
          space it requires, and the largest symbol value is the one
1422
          used).  Most targets have exactly one of these (which we
1423
          translate to bfd_com_section_ptr), but ECOFF has two.  */
1424
     #define SEC_IS_COMMON 0x1000
1425
 
1426
       /* The section contains only debugging information.  For
1427
          example, this is set for ELF .debug and .stab sections.
1428
          strip tests this flag to see if a section can be
1429
          discarded.  */
1430
     #define SEC_DEBUGGING 0x2000
1431
 
1432
       /* The contents of this section are held in memory pointed to
1433
          by the contents field.  This is checked by bfd_get_section_contents,
1434
          and the data is retrieved from memory if appropriate.  */
1435
     #define SEC_IN_MEMORY 0x4000
1436
 
1437
       /* The contents of this section are to be excluded by the
1438
          linker for executable and shared objects unless those
1439
          objects are to be further relocated.  */
1440
     #define SEC_EXCLUDE 0x8000
1441
 
1442
       /* The contents of this section are to be sorted based on the sum of
1443
          the symbol and addend values specified by the associated relocation
1444
          entries.  Entries without associated relocation entries will be
1445
          appended to the end of the section in an unspecified order.  */
1446
     #define SEC_SORT_ENTRIES 0x10000
1447
 
1448
       /* When linking, duplicate sections of the same name should be
1449
          discarded, rather than being combined into a single section as
1450
          is usually done.  This is similar to how common symbols are
1451
          handled.  See SEC_LINK_DUPLICATES below.  */
1452
     #define SEC_LINK_ONCE 0x20000
1453
 
1454
       /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
1455
          should handle duplicate sections.  */
1456
     #define SEC_LINK_DUPLICATES 0xc0000
1457
 
1458
       /* This value for SEC_LINK_DUPLICATES means that duplicate
1459
          sections with the same name should simply be discarded.  */
1460
     #define SEC_LINK_DUPLICATES_DISCARD 0x0
1461
 
1462
       /* This value for SEC_LINK_DUPLICATES means that the linker
1463
          should warn if there are any duplicate sections, although
1464
          it should still only link one copy.  */
1465
     #define SEC_LINK_DUPLICATES_ONE_ONLY 0x40000
1466
 
1467
       /* This value for SEC_LINK_DUPLICATES means that the linker
1468
          should warn if any duplicate sections are a different size.  */
1469
     #define SEC_LINK_DUPLICATES_SAME_SIZE 0x80000
1470
 
1471
       /* This value for SEC_LINK_DUPLICATES means that the linker
1472
          should warn if any duplicate sections contain different
1473
          contents.  */
1474
     #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
1475
       (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
1476
 
1477
       /* This section was created by the linker as part of dynamic
1478
          relocation or other arcane processing.  It is skipped when
1479
          going through the first-pass output, trusting that someone
1480
          else up the line will take care of it later.  */
1481
     #define SEC_LINKER_CREATED 0x100000
1482
 
1483
       /* This section should not be subject to garbage collection.
1484
          Also set to inform the linker that this section should not be
1485
          listed in the link map as discarded.  */
1486
     #define SEC_KEEP 0x200000
1487
 
1488
       /* This section contains "short" data, and should be placed
1489
          "near" the GP.  */
1490
     #define SEC_SMALL_DATA 0x400000
1491
 
1492
       /* Attempt to merge identical entities in the section.
1493
          Entity size is given in the entsize field.  */
1494
     #define SEC_MERGE 0x800000
1495
 
1496
       /* If given with SEC_MERGE, entities to merge are zero terminated
1497
          strings where entsize specifies character size instead of fixed
1498
          size entries.  */
1499
     #define SEC_STRINGS 0x1000000
1500
 
1501
       /* This section contains data about section groups.  */
1502
     #define SEC_GROUP 0x2000000
1503
 
1504
       /* The section is a COFF shared library section.  This flag is
1505
          only for the linker.  If this type of section appears in
1506
          the input file, the linker must copy it to the output file
1507
          without changing the vma or size.  FIXME: Although this
1508
          was originally intended to be general, it really is COFF
1509
          specific (and the flag was renamed to indicate this).  It
1510
          might be cleaner to have some more general mechanism to
1511
          allow the back end to control what the linker does with
1512
          sections.  */
1513
     #define SEC_COFF_SHARED_LIBRARY 0x4000000
1514
 
1515
       /* This section contains data which may be shared with other
1516
          executables or shared objects. This is for COFF only.  */
1517
     #define SEC_COFF_SHARED 0x8000000
1518
 
1519
       /* When a section with this flag is being linked, then if the size of
1520
          the input section is less than a page, it should not cross a page
1521
          boundary.  If the size of the input section is one page or more,
1522
          it should be aligned on a page boundary.  This is for TI
1523
          TMS320C54X only.  */
1524
     #define SEC_TIC54X_BLOCK 0x10000000
1525
 
1526
       /* Conditionally link this section; do not link if there are no
1527
          references found to any symbol in the section.  This is for TI
1528
          TMS320C54X only.  */
1529
     #define SEC_TIC54X_CLINK 0x20000000
1530
 
1531
       /*  End of section flags.  */
1532
 
1533
       /* Some internal packed boolean fields.  */
1534
 
1535
       /* See the vma field.  */
1536
       unsigned int user_set_vma : 1;
1537
 
1538
       /* A mark flag used by some of the linker backends.  */
1539
       unsigned int linker_mark : 1;
1540
 
1541
       /* Another mark flag used by some of the linker backends.  Set for
1542
          output sections that have an input section.  */
1543
       unsigned int linker_has_input : 1;
1544
 
1545
       /* Mark flag used by some linker backends for garbage collection.  */
1546
       unsigned int gc_mark : 1;
1547
 
1548
       /* The following flags are used by the ELF linker. */
1549
 
1550
       /* Mark sections which have been allocated to segments.  */
1551
       unsigned int segment_mark : 1;
1552
 
1553
       /* Type of sec_info information.  */
1554
       unsigned int sec_info_type:3;
1555
     #define ELF_INFO_TYPE_NONE      0
1556
     #define ELF_INFO_TYPE_STABS     1
1557
     #define ELF_INFO_TYPE_MERGE     2
1558
     #define ELF_INFO_TYPE_EH_FRAME  3
1559
     #define ELF_INFO_TYPE_JUST_SYMS 4
1560
 
1561
       /* Nonzero if this section uses RELA relocations, rather than REL.  */
1562
       unsigned int use_rela_p:1;
1563
 
1564
       /* Bits used by various backends.  The generic code doesn't touch
1565
          these fields.  */
1566
 
1567
       /* Nonzero if this section has TLS related relocations.  */
1568
       unsigned int has_tls_reloc:1;
1569
 
1570
       /* Nonzero if this section has a gp reloc.  */
1571
       unsigned int has_gp_reloc:1;
1572
 
1573
       /* Nonzero if this section needs the relax finalize pass.  */
1574
       unsigned int need_finalize_relax:1;
1575
 
1576
       /* Whether relocations have been processed.  */
1577
       unsigned int reloc_done : 1;
1578
 
1579
       /* End of internal packed boolean fields.  */
1580
 
1581
       /*  The virtual memory address of the section - where it will be
1582
           at run time.  The symbols are relocated against this.  The
1583
           user_set_vma flag is maintained by bfd; if it's not set, the
1584
           backend can assign addresses (for example, in `a.out', where
1585
           the default address for `.data' is dependent on the specific
1586
           target and various flags).  */
1587
       bfd_vma vma;
1588
 
1589
       /*  The load address of the section - where it would be in a
1590
           rom image; really only used for writing section header
1591
           information.  */
1592
       bfd_vma lma;
1593
 
1594
       /* The size of the section in octets, as it will be output.
1595
          Contains a value even if the section has no contents (e.g., the
1596
          size of `.bss').  */
1597
       bfd_size_type size;
1598
 
1599
       /* For input sections, the original size on disk of the section, in
1600
          octets.  This field should be set for any section whose size is
1601
          changed by linker relaxation.  It is required for sections where
1602
          the linker relaxation scheme doesn't cache altered section and
1603
          reloc contents (stabs, eh_frame, SEC_MERGE, some coff relaxing
1604
          targets), and thus the original size needs to be kept to read the
1605
          section multiple times.  For output sections, rawsize holds the
1606
          section size calculated on a previous linker relaxation pass.  */
1607
       bfd_size_type rawsize;
1608
 
1609
       /* If this section is going to be output, then this value is the
1610
          offset in *bytes* into the output section of the first byte in the
1611
          input section (byte ==> smallest addressable unit on the
1612
          target).  In most cases, if this was going to start at the
1613
          100th octet (8-bit quantity) in the output section, this value
1614
          would be 100.  However, if the target byte size is 16 bits
1615
          (bfd_octets_per_byte is "2"), this value would be 50.  */
1616
       bfd_vma output_offset;
1617
 
1618
       /* The output section through which to map on output.  */
1619
       struct bfd_section *output_section;
1620
 
1621
       /* The alignment requirement of the section, as an exponent of 2 -
1622
          e.g., 3 aligns to 2^3 (or 8).  */
1623
       unsigned int alignment_power;
1624
 
1625
       /* If an input section, a pointer to a vector of relocation
1626
          records for the data in this section.  */
1627
       struct reloc_cache_entry *relocation;
1628
 
1629
       /* If an output section, a pointer to a vector of pointers to
1630
          relocation records for the data in this section.  */
1631
       struct reloc_cache_entry **orelocation;
1632
 
1633
       /* The number of relocation records in one of the above.  */
1634
       unsigned reloc_count;
1635
 
1636
       /* Information below is back end specific - and not always used
1637
          or updated.  */
1638
 
1639
       /* File position of section data.  */
1640
       file_ptr filepos;
1641
 
1642
       /* File position of relocation info.  */
1643
       file_ptr rel_filepos;
1644
 
1645
       /* File position of line data.  */
1646
       file_ptr line_filepos;
1647
 
1648
       /* Pointer to data for applications.  */
1649
       void *userdata;
1650
 
1651
       /* If the SEC_IN_MEMORY flag is set, this points to the actual
1652
          contents.  */
1653
       unsigned char *contents;
1654
 
1655
       /* Attached line number information.  */
1656
       alent *lineno;
1657
 
1658
       /* Number of line number records.  */
1659
       unsigned int lineno_count;
1660
 
1661
       /* Entity size for merging purposes.  */
1662
       unsigned int entsize;
1663
 
1664
       /* Points to the kept section if this section is a link-once section,
1665
          and is discarded.  */
1666
       struct bfd_section *kept_section;
1667
 
1668
       /* When a section is being output, this value changes as more
1669
          linenumbers are written out.  */
1670
       file_ptr moving_line_filepos;
1671
 
1672
       /* What the section number is in the target world.  */
1673
       int target_index;
1674
 
1675
       void *used_by_bfd;
1676
 
1677
       /* If this is a constructor section then here is a list of the
1678
          relocations created to relocate items within it.  */
1679
       struct relent_chain *constructor_chain;
1680
 
1681
       /* The BFD which owns the section.  */
1682
       bfd *owner;
1683
 
1684
       /* A symbol which points at this section only.  */
1685
       struct bfd_symbol *symbol;
1686
       struct bfd_symbol **symbol_ptr_ptr;
1687
 
1688
       /* Early in the link process, map_head and map_tail are used to build
1689
          a list of input sections attached to an output section.  Later,
1690
          output sections use these fields for a list of bfd_link_order
1691
          structs.  */
1692
       union {
1693
         struct bfd_link_order *link_order;
1694
         struct bfd_section *s;
1695
       } map_head, map_tail;
1696
     } asection;
1697
 
1698
     /* These sections are global, and are managed by BFD.  The application
1699
        and target back end are not permitted to change the values in
1700
        these sections.  New code should use the section_ptr macros rather
1701
        than referring directly to the const sections.  The const sections
1702
        may eventually vanish.  */
1703
     #define BFD_ABS_SECTION_NAME "*ABS*"
1704
     #define BFD_UND_SECTION_NAME "*UND*"
1705
     #define BFD_COM_SECTION_NAME "*COM*"
1706
     #define BFD_IND_SECTION_NAME "*IND*"
1707
 
1708
     /* The absolute section.  */
1709
     extern asection bfd_abs_section;
1710
     #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
1711
     #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
1712
     /* Pointer to the undefined section.  */
1713
     extern asection bfd_und_section;
1714
     #define bfd_und_section_ptr ((asection *) &bfd_und_section)
1715
     #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
1716
     /* Pointer to the common section.  */
1717
     extern asection bfd_com_section;
1718
     #define bfd_com_section_ptr ((asection *) &bfd_com_section)
1719
     /* Pointer to the indirect section.  */
1720
     extern asection bfd_ind_section;
1721
     #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
1722
     #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
1723
 
1724
     #define bfd_is_const_section(SEC)              \
1725
      (   ((SEC) == bfd_abs_section_ptr)            \
1726
       || ((SEC) == bfd_und_section_ptr)            \
1727
       || ((SEC) == bfd_com_section_ptr)            \
1728
       || ((SEC) == bfd_ind_section_ptr))
1729
 
1730
     /* Macros to handle insertion and deletion of a bfd's sections.  These
1731
        only handle the list pointers, ie. do not adjust section_count,
1732
        target_index etc.  */
1733
     #define bfd_section_list_remove(ABFD, S) \
1734
       do                                                   \
1735
         {                                                  \
1736
           asection *_s = S;                                \
1737
           asection *_next = _s->next;                      \
1738
           asection *_prev = _s->prev;                      \
1739
           if (_prev)                                       \
1740
             _prev->next = _next;                           \
1741
           else                                             \
1742
             (ABFD)->sections = _next;                      \
1743
           if (_next)                                       \
1744
             _next->prev = _prev;                           \
1745
           else                                             \
1746
             (ABFD)->section_last = _prev;                  \
1747
         }                                                  \
1748
       while (0)
1749
     #define bfd_section_list_append(ABFD, S) \
1750
       do                                                   \
1751
         {                                                  \
1752
           asection *_s = S;                                \
1753
           bfd *_abfd = ABFD;                               \
1754
           _s->next = NULL;                                 \
1755
           if (_abfd->section_last)                         \
1756
             {                                              \
1757
               _s->prev = _abfd->section_last;              \
1758
               _abfd->section_last->next = _s;              \
1759
             }                                              \
1760
           else                                             \
1761
             {                                              \
1762
               _s->prev = NULL;                             \
1763
               _abfd->sections = _s;                        \
1764
             }                                              \
1765
           _abfd->section_last = _s;                        \
1766
         }                                                  \
1767
       while (0)
1768
     #define bfd_section_list_prepend(ABFD, S) \
1769
       do                                                   \
1770
         {                                                  \
1771
           asection *_s = S;                                \
1772
           bfd *_abfd = ABFD;                               \
1773
           _s->prev = NULL;                                 \
1774
           if (_abfd->sections)                             \
1775
             {                                              \
1776
               _s->next = _abfd->sections;                  \
1777
               _abfd->sections->prev = _s;                  \
1778
             }                                              \
1779
           else                                             \
1780
             {                                              \
1781
               _s->next = NULL;                             \
1782
               _abfd->section_last = _s;                    \
1783
             }                                              \
1784
           _abfd->sections = _s;                            \
1785
         }                                                  \
1786
       while (0)
1787
     #define bfd_section_list_insert_after(ABFD, A, S) \
1788
       do                                                   \
1789
         {                                                  \
1790
           asection *_a = A;                                \
1791
           asection *_s = S;                                \
1792
           asection *_next = _a->next;                      \
1793
           _s->next = _next;                                \
1794
           _s->prev = _a;                                   \
1795
           _a->next = _s;                                   \
1796
           if (_next)                                       \
1797
             _next->prev = _s;                              \
1798
           else                                             \
1799
             (ABFD)->section_last = _s;                     \
1800
         }                                                  \
1801
       while (0)
1802
     #define bfd_section_list_insert_before(ABFD, B, S) \
1803
       do                                                   \
1804
         {                                                  \
1805
           asection *_b = B;                                \
1806
           asection *_s = S;                                \
1807
           asection *_prev = _b->prev;                      \
1808
           _s->prev = _prev;                                \
1809
           _s->next = _b;                                   \
1810
           _b->prev = _s;                                   \
1811
           if (_prev)                                       \
1812
             _prev->next = _s;                              \
1813
           else                                             \
1814
             (ABFD)->sections = _s;                         \
1815
         }                                                  \
1816
       while (0)
1817
     #define bfd_section_removed_from_list(ABFD, S) \
1818
       ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
1819
 
1820
     #define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX)                   \
1821
       /* name, id,  index, next, prev, flags, user_set_vma,            */  \
1822
       { NAME,  IDX, 0,     NULL, NULL, FLAGS, 0,                           \
1823
                                                                            \
1824
       /* linker_mark, linker_has_input, gc_mark,                       */  \
1825
          0,           0,                1,                                 \
1826
                                                                            \
1827
       /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc,       */  \
1828
          0,            0,             0,          0,                       \
1829
                                                                            \
1830
       /* has_gp_reloc, need_finalize_relax, reloc_done,                */  \
1831
          0,            0,                   0,                             \
1832
                                                                            \
1833
       /* vma, lma, size, rawsize                                       */  \
1834
          0,   0,   0,    0,                                                \
1835
                                                                            \
1836
       /* output_offset, output_section,              alignment_power,  */  \
1837
          0,             (struct bfd_section *) &SEC, 0,                    \
1838
                                                                            \
1839
       /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */  \
1840
          NULL,       NULL,        0,           0,       0,                 \
1841
                                                                            \
1842
       /* line_filepos, userdata, contents, lineno, lineno_count,       */  \
1843
          0,            NULL,     NULL,     NULL,   0,                      \
1844
                                                                            \
1845
       /* entsize, kept_section, moving_line_filepos,                    */ \
1846
          0,       NULL,          0,                                        \
1847
                                                                            \
1848
       /* target_index, used_by_bfd, constructor_chain, owner,          */  \
1849
          0,            NULL,        NULL,              NULL,               \
1850
                                                                            \
1851
       /* symbol,                    symbol_ptr_ptr,                    */  \
1852
          (struct bfd_symbol *) SYM, &SEC.symbol,                           \
1853
                                                                            \
1854
       /* map_head, map_tail                                            */  \
1855
          { NULL }, { NULL }                                                \
1856
         }
1857
 
1858

1859
File: bfd.info,  Node: section prototypes,  Prev: typedef asection,  Up: Sections
1860
 
1861
2.6.5 Section prototypes
1862
------------------------
1863
 
1864
These are the functions exported by the section handling part of BFD.
1865
 
1866
2.6.5.1 `bfd_section_list_clear'
1867
................................
1868
 
1869
*Synopsis*
1870
     void bfd_section_list_clear (bfd *);
1871
   *Description*
1872
Clears the section list, and also resets the section count and hash
1873
table entries.
1874
 
1875
2.6.5.2 `bfd_get_section_by_name'
1876
.................................
1877
 
1878
*Synopsis*
1879
     asection *bfd_get_section_by_name (bfd *abfd, const char *name);
1880
   *Description*
1881
Run through ABFD and return the one of the `asection's whose name
1882
matches NAME, otherwise `NULL'.  *Note Sections::, for more information.
1883
 
1884
   This should only be used in special cases; the normal way to process
1885
all sections of a given name is to use `bfd_map_over_sections' and
1886
`strcmp' on the name (or better yet, base it on the section flags or
1887
something else) for each section.
1888
 
1889
2.6.5.3 `bfd_get_section_by_name_if'
1890
....................................
1891
 
1892
*Synopsis*
1893
     asection *bfd_get_section_by_name_if
1894
        (bfd *abfd,
1895
         const char *name,
1896
         bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
1897
         void *obj);
1898
   *Description*
1899
Call the provided function FUNC for each section attached to the BFD
1900
ABFD whose name matches NAME, passing OBJ as an argument. The function
1901
will be called as if by
1902
 
1903
            func (abfd, the_section, obj);
1904
 
1905
   It returns the first section for which FUNC returns true, otherwise
1906
`NULL'.
1907
 
1908
2.6.5.4 `bfd_get_unique_section_name'
1909
.....................................
1910
 
1911
*Synopsis*
1912
     char *bfd_get_unique_section_name
1913
        (bfd *abfd, const char *templat, int *count);
1914
   *Description*
1915
Invent a section name that is unique in ABFD by tacking a dot and a
1916
digit suffix onto the original TEMPLAT.  If COUNT is non-NULL, then it
1917
specifies the first number tried as a suffix to generate a unique name.
1918
The value pointed to by COUNT will be incremented in this case.
1919
 
1920
2.6.5.5 `bfd_make_section_old_way'
1921
..................................
1922
 
1923
*Synopsis*
1924
     asection *bfd_make_section_old_way (bfd *abfd, const char *name);
1925
   *Description*
1926
Create a new empty section called NAME and attach it to the end of the
1927
chain of sections for the BFD ABFD. An attempt to create a section with
1928
a name which is already in use returns its pointer without changing the
1929
section chain.
1930
 
1931
   It has the funny name since this is the way it used to be before it
1932
was rewritten....
1933
 
1934
   Possible errors are:
1935
   * `bfd_error_invalid_operation' - If output has already started for
1936
     this BFD.
1937
 
1938
   * `bfd_error_no_memory' - If memory allocation fails.
1939
 
1940
2.6.5.6 `bfd_make_section_anyway_with_flags'
1941
............................................
1942
 
1943
*Synopsis*
1944
     asection *bfd_make_section_anyway_with_flags
1945
        (bfd *abfd, const char *name, flagword flags);
1946
   *Description*
1947
Create a new empty section called NAME and attach it to the end of the
1948
chain of sections for ABFD.  Create a new section even if there is
1949
already a section with that name.  Also set the attributes of the new
1950
section to the value FLAGS.
1951
 
1952
   Return `NULL' and set `bfd_error' on error; possible errors are:
1953
   * `bfd_error_invalid_operation' - If output has already started for
1954
     ABFD.
1955
 
1956
   * `bfd_error_no_memory' - If memory allocation fails.
1957
 
1958
2.6.5.7 `bfd_make_section_anyway'
1959
.................................
1960
 
1961
*Synopsis*
1962
     asection *bfd_make_section_anyway (bfd *abfd, const char *name);
1963
   *Description*
1964
Create a new empty section called NAME and attach it to the end of the
1965
chain of sections for ABFD.  Create a new section even if there is
1966
already a section with that name.
1967
 
1968
   Return `NULL' and set `bfd_error' on error; possible errors are:
1969
   * `bfd_error_invalid_operation' - If output has already started for
1970
     ABFD.
1971
 
1972
   * `bfd_error_no_memory' - If memory allocation fails.
1973
 
1974
2.6.5.8 `bfd_make_section_with_flags'
1975
.....................................
1976
 
1977
*Synopsis*
1978
     asection *bfd_make_section_with_flags
1979
        (bfd *, const char *name, flagword flags);
1980
   *Description*
1981
Like `bfd_make_section_anyway', but return `NULL' (without calling
1982
bfd_set_error ()) without changing the section chain if there is
1983
already a section named NAME.  Also set the attributes of the new
1984
section to the value FLAGS.  If there is an error, return `NULL' and set
1985
`bfd_error'.
1986
 
1987
2.6.5.9 `bfd_make_section'
1988
..........................
1989
 
1990
*Synopsis*
1991
     asection *bfd_make_section (bfd *, const char *name);
1992
   *Description*
1993
Like `bfd_make_section_anyway', but return `NULL' (without calling
1994
bfd_set_error ()) without changing the section chain if there is
1995
already a section named NAME.  If there is an error, return `NULL' and
1996
set `bfd_error'.
1997
 
1998
2.6.5.10 `bfd_set_section_flags'
1999
................................
2000
 
2001
*Synopsis*
2002
     bfd_boolean bfd_set_section_flags
2003
        (bfd *abfd, asection *sec, flagword flags);
2004
   *Description*
2005
Set the attributes of the section SEC in the BFD ABFD to the value
2006
FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
2007
returns are:
2008
 
2009
   * `bfd_error_invalid_operation' - The section cannot have one or
2010
     more of the attributes requested. For example, a .bss section in
2011
     `a.out' may not have the `SEC_HAS_CONTENTS' field set.
2012
 
2013
2.6.5.11 `bfd_map_over_sections'
2014
................................
2015
 
2016
*Synopsis*
2017
     void bfd_map_over_sections
2018
        (bfd *abfd,
2019
         void (*func) (bfd *abfd, asection *sect, void *obj),
2020
         void *obj);
2021
   *Description*
2022
Call the provided function FUNC for each section attached to the BFD
2023
ABFD, passing OBJ as an argument. The function will be called as if by
2024
 
2025
            func (abfd, the_section, obj);
2026
 
2027
   This is the preferred method for iterating over sections; an
2028
alternative would be to use a loop:
2029
 
2030
               section *p;
2031
               for (p = abfd->sections; p != NULL; p = p->next)
2032
                  func (abfd, p, ...)
2033
 
2034
2.6.5.12 `bfd_sections_find_if'
2035
...............................
2036
 
2037
*Synopsis*
2038
     asection *bfd_sections_find_if
2039
        (bfd *abfd,
2040
         bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
2041
         void *obj);
2042
   *Description*
2043
Call the provided function OPERATION for each section attached to the
2044
BFD ABFD, passing OBJ as an argument. The function will be called as if
2045
by
2046
 
2047
            operation (abfd, the_section, obj);
2048
 
2049
   It returns the first section for which OPERATION returns true.
2050
 
2051
2.6.5.13 `bfd_set_section_size'
2052
...............................
2053
 
2054
*Synopsis*
2055
     bfd_boolean bfd_set_section_size
2056
        (bfd *abfd, asection *sec, bfd_size_type val);
2057
   *Description*
2058
Set SEC to the size VAL. If the operation is ok, then `TRUE' is
2059
returned, else `FALSE'.
2060
 
2061
   Possible error returns:
2062
   * `bfd_error_invalid_operation' - Writing has started to the BFD, so
2063
     setting the size is invalid.
2064
 
2065
2.6.5.14 `bfd_set_section_contents'
2066
...................................
2067
 
2068
*Synopsis*
2069
     bfd_boolean bfd_set_section_contents
2070
        (bfd *abfd, asection *section, const void *data,
2071
         file_ptr offset, bfd_size_type count);
2072
   *Description*
2073
Sets the contents of the section SECTION in BFD ABFD to the data
2074
starting in memory at DATA. The data is written to the output section
2075
starting at offset OFFSET for COUNT octets.
2076
 
2077
   Normally `TRUE' is returned, else `FALSE'. Possible error returns
2078
are:
2079
   * `bfd_error_no_contents' - The output section does not have the
2080
     `SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
2081
 
2082
   * and some more too
2083
   This routine is front end to the back end function
2084
`_bfd_set_section_contents'.
2085
 
2086
2.6.5.15 `bfd_get_section_contents'
2087
...................................
2088
 
2089
*Synopsis*
2090
     bfd_boolean bfd_get_section_contents
2091
        (bfd *abfd, asection *section, void *location, file_ptr offset,
2092
         bfd_size_type count);
2093
   *Description*
2094
Read data from SECTION in BFD ABFD into memory starting at LOCATION.
2095
The data is read at an offset of OFFSET from the start of the input
2096
section, and is read for COUNT bytes.
2097
 
2098
   If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set
2099
are requested or if the section does not have the `SEC_HAS_CONTENTS'
2100
flag set, then the LOCATION is filled with zeroes. If no errors occur,
2101
`TRUE' is returned, else `FALSE'.
2102
 
2103
2.6.5.16 `bfd_malloc_and_get_section'
2104
.....................................
2105
 
2106
*Synopsis*
2107
     bfd_boolean bfd_malloc_and_get_section
2108
        (bfd *abfd, asection *section, bfd_byte **buf);
2109
   *Description*
2110
Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by
2111
this function.
2112
 
2113
2.6.5.17 `bfd_copy_private_section_data'
2114
........................................
2115
 
2116
*Synopsis*
2117
     bfd_boolean bfd_copy_private_section_data
2118
        (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
2119
   *Description*
2120
Copy private section information from ISEC in the BFD IBFD to the
2121
section OSEC in the BFD OBFD.  Return `TRUE' on success, `FALSE' on
2122
error.  Possible error returns are:
2123
 
2124
   * `bfd_error_no_memory' - Not enough memory exists to create private
2125
     data for OSEC.
2126
 
2127
     #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
2128
          BFD_SEND (obfd, _bfd_copy_private_section_data, \
2129
                    (ibfd, isection, obfd, osection))
2130
 
2131
2.6.5.18 `bfd_generic_is_group_section'
2132
.......................................
2133
 
2134
*Synopsis*
2135
     bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
2136
   *Description*
2137
Returns TRUE if SEC is a member of a group.
2138
 
2139
2.6.5.19 `bfd_generic_discard_group'
2140
....................................
2141
 
2142
*Synopsis*
2143
     bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
2144
   *Description*
2145
Remove all members of GROUP from the output.
2146
 
2147

2148
File: bfd.info,  Node: Symbols,  Next: Archives,  Prev: Sections,  Up: BFD front end
2149
 
2150
2.7 Symbols
2151
===========
2152
 
2153
BFD tries to maintain as much symbol information as it can when it
2154
moves information from file to file. BFD passes information to
2155
applications though the `asymbol' structure. When the application
2156
requests the symbol table, BFD reads the table in the native form and
2157
translates parts of it into the internal format. To maintain more than
2158
the information passed to applications, some targets keep some
2159
information "behind the scenes" in a structure only the particular back
2160
end knows about. For example, the coff back end keeps the original
2161
symbol table structure as well as the canonical structure when a BFD is
2162
read in. On output, the coff back end can reconstruct the output symbol
2163
table so that no information is lost, even information unique to coff
2164
which BFD doesn't know or understand. If a coff symbol table were read,
2165
but were written through an a.out back end, all the coff specific
2166
information would be lost. The symbol table of a BFD is not necessarily
2167
read in until a canonicalize request is made. Then the BFD back end
2168
fills in a table provided by the application with pointers to the
2169
canonical information.  To output symbols, the application provides BFD
2170
with a table of pointers to pointers to `asymbol's. This allows
2171
applications like the linker to output a symbol as it was read, since
2172
the "behind the scenes" information will be still available.
2173
 
2174
* Menu:
2175
 
2176
* Reading Symbols::
2177
* Writing Symbols::
2178
* Mini Symbols::
2179
* typedef asymbol::
2180
* symbol handling functions::
2181
 
2182

2183
File: bfd.info,  Node: Reading Symbols,  Next: Writing Symbols,  Prev: Symbols,  Up: Symbols
2184
 
2185
2.7.1 Reading symbols
2186
---------------------
2187
 
2188
There are two stages to reading a symbol table from a BFD: allocating
2189
storage, and the actual reading process. This is an excerpt from an
2190
application which reads the symbol table:
2191
 
2192
              long storage_needed;
2193
              asymbol **symbol_table;
2194
              long number_of_symbols;
2195
              long i;
2196
 
2197
              storage_needed = bfd_get_symtab_upper_bound (abfd);
2198
 
2199
              if (storage_needed < 0)
2200
                FAIL
2201
 
2202
              if (storage_needed == 0)
2203
                return;
2204
 
2205
              symbol_table = xmalloc (storage_needed);
2206
                ...
2207
              number_of_symbols =
2208
                 bfd_canonicalize_symtab (abfd, symbol_table);
2209
 
2210
              if (number_of_symbols < 0)
2211
                FAIL
2212
 
2213
              for (i = 0; i < number_of_symbols; i++)
2214
                process_symbol (symbol_table[i]);
2215
 
2216
   All storage for the symbols themselves is in an objalloc connected
2217
to the BFD; it is freed when the BFD is closed.
2218
 
2219

2220
File: bfd.info,  Node: Writing Symbols,  Next: Mini Symbols,  Prev: Reading Symbols,  Up: Symbols
2221
 
2222
2.7.2 Writing symbols
2223
---------------------
2224
 
2225
Writing of a symbol table is automatic when a BFD open for writing is
2226
closed. The application attaches a vector of pointers to pointers to
2227
symbols to the BFD being written, and fills in the symbol count. The
2228
close and cleanup code reads through the table provided and performs
2229
all the necessary operations. The BFD output code must always be
2230
provided with an "owned" symbol: one which has come from another BFD,
2231
or one which has been created using `bfd_make_empty_symbol'.  Here is an
2232
example showing the creation of a symbol table with only one element:
2233
 
2234
            #include "bfd.h"
2235
            int main (void)
2236
            {
2237
              bfd *abfd;
2238
              asymbol *ptrs[2];
2239
              asymbol *new;
2240
 
2241
              abfd = bfd_openw ("foo","a.out-sunos-big");
2242
              bfd_set_format (abfd, bfd_object);
2243
              new = bfd_make_empty_symbol (abfd);
2244
              new->name = "dummy_symbol";
2245
              new->section = bfd_make_section_old_way (abfd, ".text");
2246
              new->flags = BSF_GLOBAL;
2247
              new->value = 0x12345;
2248
 
2249
              ptrs[0] = new;
2250
              ptrs[1] = 0;
2251
 
2252
              bfd_set_symtab (abfd, ptrs, 1);
2253
              bfd_close (abfd);
2254
              return 0;
2255
            }
2256
 
2257
            ./makesym
2258
            nm foo
2259
            00012345 A dummy_symbol
2260
 
2261
   Many formats cannot represent arbitrary symbol information; for
2262
instance, the `a.out' object format does not allow an arbitrary number
2263
of sections. A symbol pointing to a section which is not one  of
2264
`.text', `.data' or `.bss' cannot be described.
2265
 
2266

2267
File: bfd.info,  Node: Mini Symbols,  Next: typedef asymbol,  Prev: Writing Symbols,  Up: Symbols
2268
 
2269
2.7.3 Mini Symbols
2270
------------------
2271
 
2272
Mini symbols provide read-only access to the symbol table.  They use
2273
less memory space, but require more time to access.  They can be useful
2274
for tools like nm or objdump, which may have to handle symbol tables of
2275
extremely large executables.
2276
 
2277
   The `bfd_read_minisymbols' function will read the symbols into
2278
memory in an internal form.  It will return a `void *' pointer to a
2279
block of memory, a symbol count, and the size of each symbol.  The
2280
pointer is allocated using `malloc', and should be freed by the caller
2281
when it is no longer needed.
2282
 
2283
   The function `bfd_minisymbol_to_symbol' will take a pointer to a
2284
minisymbol, and a pointer to a structure returned by
2285
`bfd_make_empty_symbol', and return a `asymbol' structure.  The return
2286
value may or may not be the same as the value from
2287
`bfd_make_empty_symbol' which was passed in.
2288
 
2289

2290
File: bfd.info,  Node: typedef asymbol,  Next: symbol handling functions,  Prev: Mini Symbols,  Up: Symbols
2291
 
2292
2.7.4 typedef asymbol
2293
---------------------
2294
 
2295
An `asymbol' has the form:
2296
 
2297
 
2298
     typedef struct bfd_symbol
2299
     {
2300
       /* A pointer to the BFD which owns the symbol. This information
2301
          is necessary so that a back end can work out what additional
2302
          information (invisible to the application writer) is carried
2303
          with the symbol.
2304
 
2305
          This field is *almost* redundant, since you can use section->owner
2306
          instead, except that some symbols point to the global sections
2307
          bfd_{abs,com,und}_section.  This could be fixed by making
2308
          these globals be per-bfd (or per-target-flavor).  FIXME.  */
2309
       struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field.  */
2310
 
2311
       /* The text of the symbol. The name is left alone, and not copied; the
2312
          application may not alter it.  */
2313
       const char *name;
2314
 
2315
       /* The value of the symbol.  This really should be a union of a
2316
          numeric value with a pointer, since some flags indicate that
2317
          a pointer to another symbol is stored here.  */
2318
       symvalue value;
2319
 
2320
       /* Attributes of a symbol.  */
2321
     #define BSF_NO_FLAGS    0x00
2322
 
2323
       /* The symbol has local scope; `static' in `C'. The value
2324
          is the offset into the section of the data.  */
2325
     #define BSF_LOCAL      0x01
2326
 
2327
       /* The symbol has global scope; initialized data in `C'. The
2328
          value is the offset into the section of the data.  */
2329
     #define BSF_GLOBAL     0x02
2330
 
2331
       /* The symbol has global scope and is exported. The value is
2332
          the offset into the section of the data.  */
2333
     #define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
2334
 
2335
       /* A normal C symbol would be one of:
2336
          `BSF_LOCAL', `BSF_FORT_COMM',  `BSF_UNDEFINED' or
2337
          `BSF_GLOBAL'.  */
2338
 
2339
       /* The symbol is a debugging record. The value has an arbitrary
2340
          meaning, unless BSF_DEBUGGING_RELOC is also set.  */
2341
     #define BSF_DEBUGGING  0x08
2342
 
2343
       /* The symbol denotes a function entry point.  Used in ELF,
2344
          perhaps others someday.  */
2345
     #define BSF_FUNCTION    0x10
2346
 
2347
       /* Used by the linker.  */
2348
     #define BSF_KEEP        0x20
2349
     #define BSF_KEEP_G      0x40
2350
 
2351
       /* A weak global symbol, overridable without warnings by
2352
          a regular global symbol of the same name.  */
2353
     #define BSF_WEAK        0x80
2354
 
2355
       /* This symbol was created to point to a section, e.g. ELF's
2356
          STT_SECTION symbols.  */
2357
     #define BSF_SECTION_SYM 0x100
2358
 
2359
       /* The symbol used to be a common symbol, but now it is
2360
          allocated.  */
2361
     #define BSF_OLD_COMMON  0x200
2362
 
2363
       /* The default value for common data.  */
2364
     #define BFD_FORT_COMM_DEFAULT_VALUE 0
2365
 
2366
       /* In some files the type of a symbol sometimes alters its
2367
          location in an output file - ie in coff a `ISFCN' symbol
2368
          which is also `C_EXT' symbol appears where it was
2369
          declared and not at the end of a section.  This bit is set
2370
          by the target BFD part to convey this information.  */
2371
     #define BSF_NOT_AT_END    0x400
2372
 
2373
       /* Signal that the symbol is the label of constructor section.  */
2374
     #define BSF_CONSTRUCTOR   0x800
2375
 
2376
       /* Signal that the symbol is a warning symbol.  The name is a
2377
          warning.  The name of the next symbol is the one to warn about;
2378
          if a reference is made to a symbol with the same name as the next
2379
          symbol, a warning is issued by the linker.  */
2380
     #define BSF_WARNING       0x1000
2381
 
2382
       /* Signal that the symbol is indirect.  This symbol is an indirect
2383
          pointer to the symbol with the same name as the next symbol.  */
2384
     #define BSF_INDIRECT      0x2000
2385
 
2386
       /* BSF_FILE marks symbols that contain a file name.  This is used
2387
          for ELF STT_FILE symbols.  */
2388
     #define BSF_FILE          0x4000
2389
 
2390
       /* Symbol is from dynamic linking information.  */
2391
     #define BSF_DYNAMIC       0x8000
2392
 
2393
       /* The symbol denotes a data object.  Used in ELF, and perhaps
2394
          others someday.  */
2395
     #define BSF_OBJECT        0x10000
2396
 
2397
       /* This symbol is a debugging symbol.  The value is the offset
2398
          into the section of the data.  BSF_DEBUGGING should be set
2399
          as well.  */
2400
     #define BSF_DEBUGGING_RELOC 0x20000
2401
 
2402
       /* This symbol is thread local.  Used in ELF.  */
2403
     #define BSF_THREAD_LOCAL  0x40000
2404
 
2405
       /* This symbol represents a complex relocation expression,
2406
          with the expression tree serialized in the symbol name.  */
2407
     #define BSF_RELC 0x80000
2408
 
2409
       /* This symbol represents a signed complex relocation expression,
2410
          with the expression tree serialized in the symbol name.  */
2411
     #define BSF_SRELC 0x100000
2412
 
2413
       flagword flags;
2414
 
2415
       /* A pointer to the section to which this symbol is
2416
          relative.  This will always be non NULL, there are special
2417
          sections for undefined and absolute symbols.  */
2418
       struct bfd_section *section;
2419
 
2420
       /* Back end special data.  */
2421
       union
2422
         {
2423
           void *p;
2424
           bfd_vma i;
2425
         }
2426
       udata;
2427
     }
2428
     asymbol;
2429
 
2430

2431
File: bfd.info,  Node: symbol handling functions,  Prev: typedef asymbol,  Up: Symbols
2432
 
2433
2.7.5 Symbol handling functions
2434
-------------------------------
2435
 
2436
2.7.5.1 `bfd_get_symtab_upper_bound'
2437
....................................
2438
 
2439
*Description*
2440
Return the number of bytes required to store a vector of pointers to
2441
`asymbols' for all the symbols in the BFD ABFD, including a terminal
2442
NULL pointer. If there are no symbols in the BFD, then return 0.  If an
2443
error occurs, return -1.
2444
     #define bfd_get_symtab_upper_bound(abfd) \
2445
          BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
2446
 
2447
2.7.5.2 `bfd_is_local_label'
2448
............................
2449
 
2450
*Synopsis*
2451
     bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
2452
   *Description*
2453
Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
2454
generated local label, else return FALSE.
2455
 
2456
2.7.5.3 `bfd_is_local_label_name'
2457
.................................
2458
 
2459
*Synopsis*
2460
     bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
2461
   *Description*
2462
Return TRUE if a symbol with the name NAME in the BFD ABFD is a
2463
compiler generated local label, else return FALSE.  This just checks
2464
whether the name has the form of a local label.
2465
     #define bfd_is_local_label_name(abfd, name) \
2466
       BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
2467
 
2468
2.7.5.4 `bfd_is_target_special_symbol'
2469
......................................
2470
 
2471
*Synopsis*
2472
     bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
2473
   *Description*
2474
Return TRUE iff a symbol SYM in the BFD ABFD is something special to
2475
the particular target represented by the BFD.  Such symbols should
2476
normally not be mentioned to the user.
2477
     #define bfd_is_target_special_symbol(abfd, sym) \
2478
       BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
2479
 
2480
2.7.5.5 `bfd_canonicalize_symtab'
2481
.................................
2482
 
2483
*Description*
2484
Read the symbols from the BFD ABFD, and fills in the vector LOCATION
2485
with pointers to the symbols and a trailing NULL.  Return the actual
2486
number of symbol pointers, not including the NULL.
2487
     #define bfd_canonicalize_symtab(abfd, location) \
2488
       BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
2489
 
2490
2.7.5.6 `bfd_set_symtab'
2491
........................
2492
 
2493
*Synopsis*
2494
     bfd_boolean bfd_set_symtab
2495
        (bfd *abfd, asymbol **location, unsigned int count);
2496
   *Description*
2497
Arrange that when the output BFD ABFD is closed, the table LOCATION of
2498
COUNT pointers to symbols will be written.
2499
 
2500
2.7.5.7 `bfd_print_symbol_vandf'
2501
................................
2502
 
2503
*Synopsis*
2504
     void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
2505
   *Description*
2506
Print the value and flags of the SYMBOL supplied to the stream FILE.
2507
 
2508
2.7.5.8 `bfd_make_empty_symbol'
2509
...............................
2510
 
2511
*Description*
2512
Create a new `asymbol' structure for the BFD ABFD and return a pointer
2513
to it.
2514
 
2515
   This routine is necessary because each back end has private
2516
information surrounding the `asymbol'. Building your own `asymbol' and
2517
pointing to it will not create the private information, and will cause
2518
problems later on.
2519
     #define bfd_make_empty_symbol(abfd) \
2520
       BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
2521
 
2522
2.7.5.9 `_bfd_generic_make_empty_symbol'
2523
........................................
2524
 
2525
*Synopsis*
2526
     asymbol *_bfd_generic_make_empty_symbol (bfd *);
2527
   *Description*
2528
Create a new `asymbol' structure for the BFD ABFD and return a pointer
2529
to it.  Used by core file routines, binary back-end and anywhere else
2530
where no private info is needed.
2531
 
2532
2.7.5.10 `bfd_make_debug_symbol'
2533
................................
2534
 
2535
*Description*
2536
Create a new `asymbol' structure for the BFD ABFD, to be used as a
2537
debugging symbol.  Further details of its use have yet to be worked out.
2538
     #define bfd_make_debug_symbol(abfd,ptr,size) \
2539
       BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
2540
 
2541
2.7.5.11 `bfd_decode_symclass'
2542
..............................
2543
 
2544
*Description*
2545
Return a character corresponding to the symbol class of SYMBOL, or '?'
2546
for an unknown class.
2547
 
2548
   *Synopsis*
2549
     int bfd_decode_symclass (asymbol *symbol);
2550
 
2551
2.7.5.12 `bfd_is_undefined_symclass'
2552
....................................
2553
 
2554
*Description*
2555
Returns non-zero if the class symbol returned by bfd_decode_symclass
2556
represents an undefined symbol.  Returns zero otherwise.
2557
 
2558
   *Synopsis*
2559
     bfd_boolean bfd_is_undefined_symclass (int symclass);
2560
 
2561
2.7.5.13 `bfd_symbol_info'
2562
..........................
2563
 
2564
*Description*
2565
Fill in the basic info about symbol that nm needs.  Additional info may
2566
be added by the back-ends after calling this function.
2567
 
2568
   *Synopsis*
2569
     void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
2570
 
2571
2.7.5.14 `bfd_copy_private_symbol_data'
2572
.......................................
2573
 
2574
*Synopsis*
2575
     bfd_boolean bfd_copy_private_symbol_data
2576
        (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
2577
   *Description*
2578
Copy private symbol information from ISYM in the BFD IBFD to the symbol
2579
OSYM in the BFD OBFD.  Return `TRUE' on success, `FALSE' on error.
2580
Possible error returns are:
2581
 
2582
   * `bfd_error_no_memory' - Not enough memory exists to create private
2583
     data for OSEC.
2584
 
2585
     #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
2586
       BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
2587
                 (ibfd, isymbol, obfd, osymbol))
2588
 
2589

2590
File: bfd.info,  Node: Archives,  Next: Formats,  Prev: Symbols,  Up: BFD front end
2591
 
2592
2.8 Archives
2593
============
2594
 
2595
*Description*
2596
An archive (or library) is just another BFD.  It has a symbol table,
2597
although there's not much a user program will do with it.
2598
 
2599
   The big difference between an archive BFD and an ordinary BFD is
2600
that the archive doesn't have sections.  Instead it has a chain of BFDs
2601
that are considered its contents.  These BFDs can be manipulated like
2602
any other.  The BFDs contained in an archive opened for reading will
2603
all be opened for reading.  You may put either input or output BFDs
2604
into an archive opened for output; they will be handled correctly when
2605
the archive is closed.
2606
 
2607
   Use `bfd_openr_next_archived_file' to step through the contents of
2608
an archive opened for input.  You don't have to read the entire archive
2609
if you don't want to!  Read it until you find what you want.
2610
 
2611
   Archive contents of output BFDs are chained through the `next'
2612
pointer in a BFD.  The first one is findable through the `archive_head'
2613
slot of the archive.  Set it with `bfd_set_archive_head' (q.v.).  A
2614
given BFD may be in only one open output archive at a time.
2615
 
2616
   As expected, the BFD archive code is more general than the archive
2617
code of any given environment.  BFD archives may contain files of
2618
different formats (e.g., a.out and coff) and even different
2619
architectures.  You may even place archives recursively into archives!
2620
 
2621
   This can cause unexpected confusion, since some archive formats are
2622
more expressive than others.  For instance, Intel COFF archives can
2623
preserve long filenames; SunOS a.out archives cannot.  If you move a
2624
file from the first to the second format and back again, the filename
2625
may be truncated.  Likewise, different a.out environments have different
2626
conventions as to how they truncate filenames, whether they preserve
2627
directory names in filenames, etc.  When interoperating with native
2628
tools, be sure your files are homogeneous.
2629
 
2630
   Beware: most of these formats do not react well to the presence of
2631
spaces in filenames.  We do the best we can, but can't always handle
2632
this case due to restrictions in the format of archives.  Many Unix
2633
utilities are braindead in regards to spaces and such in filenames
2634
anyway, so this shouldn't be much of a restriction.
2635
 
2636
   Archives are supported in BFD in `archive.c'.
2637
 
2638
2.8.1 Archive functions
2639
-----------------------
2640
 
2641
2.8.1.1 `bfd_get_next_mapent'
2642
.............................
2643
 
2644
*Synopsis*
2645
     symindex bfd_get_next_mapent
2646
        (bfd *abfd, symindex previous, carsym **sym);
2647
   *Description*
2648
Step through archive ABFD's symbol table (if it has one).  Successively
2649
update SYM with the next symbol's information, returning that symbol's
2650
(internal) index into the symbol table.
2651
 
2652
   Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
2653
one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
2654
 
2655
   A `carsym' is a canonical archive symbol.  The only user-visible
2656
element is its name, a null-terminated string.
2657
 
2658
2.8.1.2 `bfd_set_archive_head'
2659
..............................
2660
 
2661
*Synopsis*
2662
     bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
2663
   *Description*
2664
Set the head of the chain of BFDs contained in the archive OUTPUT to
2665
NEW_HEAD.
2666
 
2667
2.8.1.3 `bfd_openr_next_archived_file'
2668
......................................
2669
 
2670
*Synopsis*
2671
     bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
2672
   *Description*
2673
Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
2674
BFD on the first contained element and returns that.  Subsequent calls
2675
should pass the archive and the previous return value to return a
2676
created BFD to the next contained element. NULL is returned when there
2677
are no more.
2678
 
2679

2680
File: bfd.info,  Node: Formats,  Next: Relocations,  Prev: Archives,  Up: BFD front end
2681
 
2682
2.9 File formats
2683
================
2684
 
2685
A format is a BFD concept of high level file contents type. The formats
2686
supported by BFD are:
2687
 
2688
   * `bfd_object'
2689
   The BFD may contain data, symbols, relocations and debug info.
2690
 
2691
   * `bfd_archive'
2692
   The BFD contains other BFDs and an optional index.
2693
 
2694
   * `bfd_core'
2695
   The BFD contains the result of an executable core dump.
2696
 
2697
2.9.1 File format functions
2698
---------------------------
2699
 
2700
2.9.1.1 `bfd_check_format'
2701
..........................
2702
 
2703
*Synopsis*
2704
     bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
2705
   *Description*
2706
Verify if the file attached to the BFD ABFD is compatible with the
2707
format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
2708
 
2709
   If the BFD has been set to a specific target before the call, only
2710
the named target and format combination is checked. If the target has
2711
not been set, or has been set to `default', then all the known target
2712
backends is interrogated to determine a match.  If the default target
2713
matches, it is used.  If not, exactly one target must recognize the
2714
file, or an error results.
2715
 
2716
   The function returns `TRUE' on success, otherwise `FALSE' with one
2717
of the following error codes:
2718
 
2719
   * `bfd_error_invalid_operation' - if `format' is not one of
2720
     `bfd_object', `bfd_archive' or `bfd_core'.
2721
 
2722
   * `bfd_error_system_call' - if an error occured during a read - even
2723
     some file mismatches can cause bfd_error_system_calls.
2724
 
2725
   * `file_not_recognised' - none of the backends recognised the file
2726
     format.
2727
 
2728
   * `bfd_error_file_ambiguously_recognized' - more than one backend
2729
     recognised the file format.
2730
 
2731
2.9.1.2 `bfd_check_format_matches'
2732
..................................
2733
 
2734
*Synopsis*
2735
     bfd_boolean bfd_check_format_matches
2736
        (bfd *abfd, bfd_format format, char ***matching);
2737
   *Description*
2738
Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
2739
set to `bfd_error_file_ambiguously_recognized'.  In that case, if
2740
MATCHING is not NULL, it will be filled in with a NULL-terminated list
2741
of the names of the formats that matched, allocated with `malloc'.
2742
Then the user may choose a format and try again.
2743
 
2744
   When done with the list that MATCHING points to, the caller should
2745
free it.
2746
 
2747
2.9.1.3 `bfd_set_format'
2748
........................
2749
 
2750
*Synopsis*
2751
     bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
2752
   *Description*
2753
This function sets the file format of the BFD ABFD to the format
2754
FORMAT. If the target set in the BFD does not support the format
2755
requested, the format is invalid, or the BFD is not open for writing,
2756
then an error occurs.
2757
 
2758
2.9.1.4 `bfd_format_string'
2759
...........................
2760
 
2761
*Synopsis*
2762
     const char *bfd_format_string (bfd_format format);
2763
   *Description*
2764
Return a pointer to a const string `invalid', `object', `archive',
2765
`core', or `unknown', depending upon the value of FORMAT.
2766
 
2767

2768
File: bfd.info,  Node: Relocations,  Next: Core Files,  Prev: Formats,  Up: BFD front end
2769
 
2770
2.10 Relocations
2771
================
2772
 
2773
BFD maintains relocations in much the same way it maintains symbols:
2774
they are left alone until required, then read in en-masse and
2775
translated into an internal form.  A common routine
2776
`bfd_perform_relocation' acts upon the canonical form to do the fixup.
2777
 
2778
   Relocations are maintained on a per section basis, while symbols are
2779
maintained on a per BFD basis.
2780
 
2781
   All that a back end has to do to fit the BFD interface is to create
2782
a `struct reloc_cache_entry' for each relocation in a particular
2783
section, and fill in the right bits of the structures.
2784
 
2785
* Menu:
2786
 
2787
* typedef arelent::
2788
* howto manager::
2789
 
2790

2791
File: bfd.info,  Node: typedef arelent,  Next: howto manager,  Prev: Relocations,  Up: Relocations
2792
 
2793
2.10.1 typedef arelent
2794
----------------------
2795
 
2796
This is the structure of a relocation entry:
2797
 
2798
 
2799
     typedef enum bfd_reloc_status
2800
     {
2801
       /* No errors detected.  */
2802
       bfd_reloc_ok,
2803
 
2804
       /* The relocation was performed, but there was an overflow.  */
2805
       bfd_reloc_overflow,
2806
 
2807
       /* The address to relocate was not within the section supplied.  */
2808
       bfd_reloc_outofrange,
2809
 
2810
       /* Used by special functions.  */
2811
       bfd_reloc_continue,
2812
 
2813
       /* Unsupported relocation size requested.  */
2814
       bfd_reloc_notsupported,
2815
 
2816
       /* Unused.  */
2817
       bfd_reloc_other,
2818
 
2819
       /* The symbol to relocate against was undefined.  */
2820
       bfd_reloc_undefined,
2821
 
2822
       /* The relocation was performed, but may not be ok - presently
2823
          generated only when linking i960 coff files with i960 b.out
2824
          symbols.  If this type is returned, the error_message argument
2825
          to bfd_perform_relocation will be set.  */
2826
       bfd_reloc_dangerous
2827
      }
2828
      bfd_reloc_status_type;
2829
 
2830
 
2831
     typedef struct reloc_cache_entry
2832
     {
2833
       /* A pointer into the canonical table of pointers.  */
2834
       struct bfd_symbol **sym_ptr_ptr;
2835
 
2836
       /* offset in section.  */
2837
       bfd_size_type address;
2838
 
2839
       /* addend for relocation value.  */
2840
       bfd_vma addend;
2841
 
2842
       /* Pointer to how to perform the required relocation.  */
2843
       reloc_howto_type *howto;
2844
 
2845
     }
2846
     arelent;
2847
   *Description*
2848
Here is a description of each of the fields within an `arelent':
2849
 
2850
   * `sym_ptr_ptr'
2851
   The symbol table pointer points to a pointer to the symbol
2852
associated with the relocation request.  It is the pointer into the
2853
table returned by the back end's `canonicalize_symtab' action. *Note
2854
Symbols::. The symbol is referenced through a pointer to a pointer so
2855
that tools like the linker can fix up all the symbols of the same name
2856
by modifying only one pointer. The relocation routine looks in the
2857
symbol and uses the base of the section the symbol is attached to and
2858
the value of the symbol as the initial relocation offset. If the symbol
2859
pointer is zero, then the section provided is looked up.
2860
 
2861
   * `address'
2862
   The `address' field gives the offset in bytes from the base of the
2863
section data which owns the relocation record to the first byte of
2864
relocatable information. The actual data relocated will be relative to
2865
this point; for example, a relocation type which modifies the bottom
2866
two bytes of a four byte word would not touch the first byte pointed to
2867
in a big endian world.
2868
 
2869
   * `addend'
2870
   The `addend' is a value provided by the back end to be added (!)  to
2871
the relocation offset. Its interpretation is dependent upon the howto.
2872
For example, on the 68k the code:
2873
 
2874
             char foo[];
2875
             main()
2876
                     {
2877
                     return foo[0x12345678];
2878
                     }
2879
 
2880
   Could be compiled into:
2881
 
2882
             linkw fp,#-4
2883
             moveb @#12345678,d0
2884
             extbl d0
2885
             unlk fp
2886
             rts
2887
 
2888
   This could create a reloc pointing to `foo', but leave the offset in
2889
the data, something like:
2890
 
2891
     RELOCATION RECORDS FOR [.text]:
2892
     offset   type      value
2893
     00000006 32        _foo
2894
 
2895
     00000000 4e56 fffc          ; linkw fp,#-4
2896
     00000004 1039 1234 5678     ; moveb @#12345678,d0
2897
     0000000a 49c0               ; extbl d0
2898
     0000000c 4e5e               ; unlk fp
2899
     0000000e 4e75               ; rts
2900
 
2901
   Using coff and an 88k, some instructions don't have enough space in
2902
them to represent the full address range, and pointers have to be
2903
loaded in two parts. So you'd get something like:
2904
 
2905
             or.u     r13,r0,hi16(_foo+0x12345678)
2906
             ld.b     r2,r13,lo16(_foo+0x12345678)
2907
             jmp      r1
2908
 
2909
   This should create two relocs, both pointing to `_foo', and with
2910
0x12340000 in their addend field. The data would consist of:
2911
 
2912
     RELOCATION RECORDS FOR [.text]:
2913
     offset   type      value
2914
     00000002 HVRT16    _foo+0x12340000
2915
     00000006 LVRT16    _foo+0x12340000
2916
 
2917
     00000000 5da05678           ; or.u r13,r0,0x5678
2918
     00000004 1c4d5678           ; ld.b r2,r13,0x5678
2919
     00000008 f400c001           ; jmp r1
2920
 
2921
   The relocation routine digs out the value from the data, adds it to
2922
the addend to get the original offset, and then adds the value of
2923
`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
2924
with carry from bit 15 to bit 16.
2925
 
2926
   One further example is the sparc and the a.out format. The sparc has
2927
a similar problem to the 88k, in that some instructions don't have room
2928
for an entire offset, but on the sparc the parts are created in odd
2929
sized lumps. The designers of the a.out format chose to not use the
2930
data within the section for storing part of the offset; all the offset
2931
is kept within the reloc. Anything in the data should be ignored.
2932
 
2933
             save %sp,-112,%sp
2934
             sethi %hi(_foo+0x12345678),%g2
2935
             ldsb [%g2+%lo(_foo+0x12345678)],%i0
2936
             ret
2937
             restore
2938
 
2939
   Both relocs contain a pointer to `foo', and the offsets contain junk.
2940
 
2941
     RELOCATION RECORDS FOR [.text]:
2942
     offset   type      value
2943
     00000004 HI22      _foo+0x12345678
2944
     00000008 LO10      _foo+0x12345678
2945
 
2946
     00000000 9de3bf90     ; save %sp,-112,%sp
2947
     00000004 05000000     ; sethi %hi(_foo+0),%g2
2948
     00000008 f048a000     ; ldsb [%g2+%lo(_foo+0)],%i0
2949
     0000000c 81c7e008     ; ret
2950
     00000010 81e80000     ; restore
2951
 
2952
   * `howto'
2953
   The `howto' field can be imagined as a relocation instruction. It is
2954
a pointer to a structure which contains information on what to do with
2955
all of the other information in the reloc record and data section. A
2956
back end would normally have a relocation instruction set and turn
2957
relocations into pointers to the correct structure on input - but it
2958
would be possible to create each howto field on demand.
2959
 
2960
2.10.1.1 `enum complain_overflow'
2961
.................................
2962
 
2963
Indicates what sort of overflow checking should be done when performing
2964
a relocation.
2965
 
2966
 
2967
     enum complain_overflow
2968
     {
2969
       /* Do not complain on overflow.  */
2970
       complain_overflow_dont,
2971
 
2972
       /* Complain if the value overflows when considered as a signed
2973
          number one bit larger than the field.  ie. A bitfield of N bits
2974
          is allowed to represent -2**n to 2**n-1.  */
2975
       complain_overflow_bitfield,
2976
 
2977
       /* Complain if the value overflows when considered as a signed
2978
          number.  */
2979
       complain_overflow_signed,
2980
 
2981
       /* Complain if the value overflows when considered as an
2982
          unsigned number.  */
2983
       complain_overflow_unsigned
2984
     };
2985
 
2986
2.10.1.2 `reloc_howto_type'
2987
...........................
2988
 
2989
The `reloc_howto_type' is a structure which contains all the
2990
information that libbfd needs to know to tie up a back end's data.
2991
 
2992
     struct bfd_symbol;             /* Forward declaration.  */
2993
 
2994
     struct reloc_howto_struct
2995
     {
2996
       /*  The type field has mainly a documentary use - the back end can
2997
           do what it wants with it, though normally the back end's
2998
           external idea of what a reloc number is stored
2999
           in this field.  For example, a PC relative word relocation
3000
           in a coff environment has the type 023 - because that's
3001
           what the outside world calls a R_PCRWORD reloc.  */
3002
       unsigned int type;
3003
 
3004
       /*  The value the final relocation is shifted right by.  This drops
3005
           unwanted data from the relocation.  */
3006
       unsigned int rightshift;
3007
 
3008
       /*  The size of the item to be relocated.  This is *not* a
3009
           power-of-two measure.  To get the number of bytes operated
3010
           on by a type of relocation, use bfd_get_reloc_size.  */
3011
       int size;
3012
 
3013
       /*  The number of bits in the item to be relocated.  This is used
3014
           when doing overflow checking.  */
3015
       unsigned int bitsize;
3016
 
3017
       /*  Notes that the relocation is relative to the location in the
3018
           data section of the addend.  The relocation function will
3019
           subtract from the relocation value the address of the location
3020
           being relocated.  */
3021
       bfd_boolean pc_relative;
3022
 
3023
       /*  The bit position of the reloc value in the destination.
3024
           The relocated value is left shifted by this amount.  */
3025
       unsigned int bitpos;
3026
 
3027
       /* What type of overflow error should be checked for when
3028
          relocating.  */
3029
       enum complain_overflow complain_on_overflow;
3030
 
3031
       /* If this field is non null, then the supplied function is
3032
          called rather than the normal function.  This allows really
3033
          strange relocation methods to be accommodated (e.g., i960 callj
3034
          instructions).  */
3035
       bfd_reloc_status_type (*special_function)
3036
         (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
3037
          bfd *, char **);
3038
 
3039
       /* The textual name of the relocation type.  */
3040
       char *name;
3041
 
3042
       /* Some formats record a relocation addend in the section contents
3043
          rather than with the relocation.  For ELF formats this is the
3044
          distinction between USE_REL and USE_RELA (though the code checks
3045
          for USE_REL == 1/0).  The value of this field is TRUE if the
3046
          addend is recorded with the section contents; when performing a
3047
          partial link (ld -r) the section contents (the data) will be
3048
          modified.  The value of this field is FALSE if addends are
3049
          recorded with the relocation (in arelent.addend); when performing
3050
          a partial link the relocation will be modified.
3051
          All relocations for all ELF USE_RELA targets should set this field
3052
          to FALSE (values of TRUE should be looked on with suspicion).
3053
          However, the converse is not true: not all relocations of all ELF
3054
          USE_REL targets set this field to TRUE.  Why this is so is peculiar
3055
          to each particular target.  For relocs that aren't used in partial
3056
          links (e.g. GOT stuff) it doesn't matter what this is set to.  */
3057
       bfd_boolean partial_inplace;
3058
 
3059
       /* src_mask selects the part of the instruction (or data) to be used
3060
          in the relocation sum.  If the target relocations don't have an
3061
          addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
3062
          dst_mask to extract the addend from the section contents.  If
3063
          relocations do have an addend in the reloc, eg. ELF USE_RELA, this
3064
          field should be zero.  Non-zero values for ELF USE_RELA targets are
3065
          bogus as in those cases the value in the dst_mask part of the
3066
          section contents should be treated as garbage.  */
3067
       bfd_vma src_mask;
3068
 
3069
       /* dst_mask selects which parts of the instruction (or data) are
3070
          replaced with a relocated value.  */
3071
       bfd_vma dst_mask;
3072
 
3073
       /* When some formats create PC relative instructions, they leave
3074
          the value of the pc of the place being relocated in the offset
3075
          slot of the instruction, so that a PC relative relocation can
3076
          be made just by adding in an ordinary offset (e.g., sun3 a.out).
3077
          Some formats leave the displacement part of an instruction
3078
          empty (e.g., m88k bcs); this flag signals the fact.  */
3079
       bfd_boolean pcrel_offset;
3080
     };
3081
 
3082
2.10.1.3 `The HOWTO Macro'
3083
..........................
3084
 
3085
*Description*
3086
The HOWTO define is horrible and will go away.
3087
     #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
3088
       { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
3089
 
3090
   *Description*
3091
And will be replaced with the totally magic way. But for the moment, we
3092
are compatible, so do it this way.
3093
     #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
3094
       HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
3095
              NAME, FALSE, 0, 0, IN)
3096
 
3097
   *Description*
3098
This is used to fill in an empty howto entry in an array.
3099
     #define EMPTY_HOWTO(C) \
3100
       HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
3101
              NULL, FALSE, 0, 0, FALSE)
3102
 
3103
   *Description*
3104
Helper routine to turn a symbol into a relocation value.
3105
     #define HOWTO_PREPARE(relocation, symbol)               \
3106
       {                                                     \
3107
         if (symbol != NULL)                                 \
3108
           {                                                 \
3109
             if (bfd_is_com_section (symbol->section))       \
3110
               {                                             \
3111
                 relocation = 0;                             \
3112
               }                                             \
3113
             else                                            \
3114
               {                                             \
3115
                 relocation = symbol->value;                 \
3116
               }                                             \
3117
           }                                                 \
3118
       }
3119
 
3120
2.10.1.4 `bfd_get_reloc_size'
3121
.............................
3122
 
3123
*Synopsis*
3124
     unsigned int bfd_get_reloc_size (reloc_howto_type *);
3125
   *Description*
3126
For a reloc_howto_type that operates on a fixed number of bytes, this
3127
returns the number of bytes operated on.
3128
 
3129
2.10.1.5 `arelent_chain'
3130
........................
3131
 
3132
*Description*
3133
How relocs are tied together in an `asection':
3134
     typedef struct relent_chain
3135
     {
3136
       arelent relent;
3137
       struct relent_chain *next;
3138
     }
3139
     arelent_chain;
3140
 
3141
2.10.1.6 `bfd_check_overflow'
3142
.............................
3143
 
3144
*Synopsis*
3145
     bfd_reloc_status_type bfd_check_overflow
3146
        (enum complain_overflow how,
3147
         unsigned int bitsize,
3148
         unsigned int rightshift,
3149
         unsigned int addrsize,
3150
         bfd_vma relocation);
3151
   *Description*
3152
Perform overflow checking on RELOCATION which has BITSIZE significant
3153
bits and will be shifted right by RIGHTSHIFT bits, on a machine with
3154
addresses containing ADDRSIZE significant bits.  The result is either of
3155
`bfd_reloc_ok' or `bfd_reloc_overflow'.
3156
 
3157
2.10.1.7 `bfd_perform_relocation'
3158
.................................
3159
 
3160
*Synopsis*
3161
     bfd_reloc_status_type bfd_perform_relocation
3162
        (bfd *abfd,
3163
         arelent *reloc_entry,
3164
         void *data,
3165
         asection *input_section,
3166
         bfd *output_bfd,
3167
         char **error_message);
3168
   *Description*
3169
If OUTPUT_BFD is supplied to this function, the generated image will be
3170
relocatable; the relocations are copied to the output file after they
3171
have been changed to reflect the new state of the world. There are two
3172
ways of reflecting the results of partial linkage in an output file: by
3173
modifying the output data in place, and by modifying the relocation
3174
record.  Some native formats (e.g., basic a.out and basic coff) have no
3175
way of specifying an addend in the relocation type, so the addend has
3176
to go in the output data.  This is no big deal since in these formats
3177
the output data slot will always be big enough for the addend. Complex
3178
reloc types with addends were invented to solve just this problem.  The
3179
ERROR_MESSAGE argument is set to an error message if this return
3180
`bfd_reloc_dangerous'.
3181
 
3182
2.10.1.8 `bfd_install_relocation'
3183
.................................
3184
 
3185
*Synopsis*
3186
     bfd_reloc_status_type bfd_install_relocation
3187
        (bfd *abfd,
3188
         arelent *reloc_entry,
3189
         void *data, bfd_vma data_start,
3190
         asection *input_section,
3191
         char **error_message);
3192
   *Description*
3193
This looks remarkably like `bfd_perform_relocation', except it does not
3194
expect that the section contents have been filled in.  I.e., it's
3195
suitable for use when creating, rather than applying a relocation.
3196
 
3197
   For now, this function should be considered reserved for the
3198
assembler.
3199
 
3200

3201
File: bfd.info,  Node: howto manager,  Prev: typedef arelent,  Up: Relocations
3202
 
3203
2.10.2 The howto manager
3204
------------------------
3205
 
3206
When an application wants to create a relocation, but doesn't know what
3207
the target machine might call it, it can find out by using this bit of
3208
code.
3209
 
3210
2.10.2.1 `bfd_reloc_code_type'
3211
..............................
3212
 
3213
*Description*
3214
The insides of a reloc code.  The idea is that, eventually, there will
3215
be one enumerator for every type of relocation we ever do.  Pass one of
3216
these values to `bfd_reloc_type_lookup', and it'll return a howto
3217
pointer.
3218
 
3219
   This does mean that the application must determine the correct
3220
enumerator value; you can't get a howto pointer from a random set of
3221
attributes.
3222
 
3223
   Here are the possible values for `enum bfd_reloc_code_real':
3224
 
3225
 -- : BFD_RELOC_64
3226
 -- : BFD_RELOC_32
3227
 -- : BFD_RELOC_26
3228
 -- : BFD_RELOC_24
3229
 -- : BFD_RELOC_16
3230
 -- : BFD_RELOC_14
3231
 -- : BFD_RELOC_8
3232
     Basic absolute relocations of N bits.
3233
 
3234
 -- : BFD_RELOC_64_PCREL
3235
 -- : BFD_RELOC_32_PCREL
3236
 -- : BFD_RELOC_24_PCREL
3237
 -- : BFD_RELOC_16_PCREL
3238
 -- : BFD_RELOC_12_PCREL
3239
 -- : BFD_RELOC_8_PCREL
3240
     PC-relative relocations.  Sometimes these are relative to the
3241
     address of the relocation itself; sometimes they are relative to
3242
     the start of the section containing the relocation.  It depends on
3243
     the specific target.
3244
 
3245
     The 24-bit relocation is used in some Intel 960 configurations.
3246
 
3247
 -- : BFD_RELOC_32_SECREL
3248
     Section relative relocations.  Some targets need this for DWARF2.
3249
 
3250
 -- : BFD_RELOC_32_GOT_PCREL
3251
 -- : BFD_RELOC_16_GOT_PCREL
3252
 -- : BFD_RELOC_8_GOT_PCREL
3253
 -- : BFD_RELOC_32_GOTOFF
3254
 -- : BFD_RELOC_16_GOTOFF
3255
 -- : BFD_RELOC_LO16_GOTOFF
3256
 -- : BFD_RELOC_HI16_GOTOFF
3257
 -- : BFD_RELOC_HI16_S_GOTOFF
3258
 -- : BFD_RELOC_8_GOTOFF
3259
 -- : BFD_RELOC_64_PLT_PCREL
3260
 -- : BFD_RELOC_32_PLT_PCREL
3261
 -- : BFD_RELOC_24_PLT_PCREL
3262
 -- : BFD_RELOC_16_PLT_PCREL
3263
 -- : BFD_RELOC_8_PLT_PCREL
3264
 -- : BFD_RELOC_64_PLTOFF
3265
 -- : BFD_RELOC_32_PLTOFF
3266
 -- : BFD_RELOC_16_PLTOFF
3267
 -- : BFD_RELOC_LO16_PLTOFF
3268
 -- : BFD_RELOC_HI16_PLTOFF
3269
 -- : BFD_RELOC_HI16_S_PLTOFF
3270
 -- : BFD_RELOC_8_PLTOFF
3271
     For ELF.
3272
 
3273
 -- : BFD_RELOC_68K_GLOB_DAT
3274
 -- : BFD_RELOC_68K_JMP_SLOT
3275
 -- : BFD_RELOC_68K_RELATIVE
3276
     Relocations used by 68K ELF.
3277
 
3278
 -- : BFD_RELOC_32_BASEREL
3279
 -- : BFD_RELOC_16_BASEREL
3280
 -- : BFD_RELOC_LO16_BASEREL
3281
 -- : BFD_RELOC_HI16_BASEREL
3282
 -- : BFD_RELOC_HI16_S_BASEREL
3283
 -- : BFD_RELOC_8_BASEREL
3284
 -- : BFD_RELOC_RVA
3285
     Linkage-table relative.
3286
 
3287
 -- : BFD_RELOC_8_FFnn
3288
     Absolute 8-bit relocation, but used to form an address like 0xFFnn.
3289
 
3290
 -- : BFD_RELOC_32_PCREL_S2
3291
 -- : BFD_RELOC_16_PCREL_S2
3292
 -- : BFD_RELOC_23_PCREL_S2
3293
     These PC-relative relocations are stored as word displacements -
3294
     i.e., byte displacements shifted right two bits.  The 30-bit word
3295
     displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
3296
     SPARC.  (SPARC tools generally refer to this as <>.)  The
3297
     signed 16-bit displacement is used on the MIPS, and the 23-bit
3298
     displacement is used on the Alpha.
3299
 
3300
 -- : BFD_RELOC_HI22
3301
 -- : BFD_RELOC_LO10
3302
     High 22 bits and low 10 bits of 32-bit value, placed into lower
3303
     bits of the target word.  These are used on the SPARC.
3304
 
3305
 -- : BFD_RELOC_GPREL16
3306
 -- : BFD_RELOC_GPREL32
3307
     For systems that allocate a Global Pointer register, these are
3308
     displacements off that register.  These relocation types are
3309
     handled specially, because the value the register will have is
3310
     decided relatively late.
3311
 
3312
 -- : BFD_RELOC_I960_CALLJ
3313
     Reloc types used for i960/b.out.
3314
 
3315
 -- : BFD_RELOC_NONE
3316
 -- : BFD_RELOC_SPARC_WDISP22
3317
 -- : BFD_RELOC_SPARC22
3318
 -- : BFD_RELOC_SPARC13
3319
 -- : BFD_RELOC_SPARC_GOT10
3320
 -- : BFD_RELOC_SPARC_GOT13
3321
 -- : BFD_RELOC_SPARC_GOT22
3322
 -- : BFD_RELOC_SPARC_PC10
3323
 -- : BFD_RELOC_SPARC_PC22
3324
 -- : BFD_RELOC_SPARC_WPLT30
3325
 -- : BFD_RELOC_SPARC_COPY
3326
 -- : BFD_RELOC_SPARC_GLOB_DAT
3327
 -- : BFD_RELOC_SPARC_JMP_SLOT
3328
 -- : BFD_RELOC_SPARC_RELATIVE
3329
 -- : BFD_RELOC_SPARC_UA16
3330
 -- : BFD_RELOC_SPARC_UA32
3331
 -- : BFD_RELOC_SPARC_UA64
3332
 -- : BFD_RELOC_SPARC_GOTDATA_HIX22
3333
 -- : BFD_RELOC_SPARC_GOTDATA_LOX10
3334
 -- : BFD_RELOC_SPARC_GOTDATA_OP_HIX22
3335
 -- : BFD_RELOC_SPARC_GOTDATA_OP_LOX10
3336
 -- : BFD_RELOC_SPARC_GOTDATA_OP
3337
     SPARC ELF relocations.  There is probably some overlap with other
3338
     relocation types already defined.
3339
 
3340
 -- : BFD_RELOC_SPARC_BASE13
3341
 -- : BFD_RELOC_SPARC_BASE22
3342
     I think these are specific to SPARC a.out (e.g., Sun 4).
3343
 
3344
 -- : BFD_RELOC_SPARC_64
3345
 -- : BFD_RELOC_SPARC_10
3346
 -- : BFD_RELOC_SPARC_11
3347
 -- : BFD_RELOC_SPARC_OLO10
3348
 -- : BFD_RELOC_SPARC_HH22
3349
 -- : BFD_RELOC_SPARC_HM10
3350
 -- : BFD_RELOC_SPARC_LM22
3351
 -- : BFD_RELOC_SPARC_PC_HH22
3352
 -- : BFD_RELOC_SPARC_PC_HM10
3353
 -- : BFD_RELOC_SPARC_PC_LM22
3354
 -- : BFD_RELOC_SPARC_WDISP16
3355
 -- : BFD_RELOC_SPARC_WDISP19
3356
 -- : BFD_RELOC_SPARC_7
3357
 -- : BFD_RELOC_SPARC_6
3358
 -- : BFD_RELOC_SPARC_5
3359
 -- : BFD_RELOC_SPARC_DISP64
3360
 -- : BFD_RELOC_SPARC_PLT32
3361
 -- : BFD_RELOC_SPARC_PLT64
3362
 -- : BFD_RELOC_SPARC_HIX22
3363
 -- : BFD_RELOC_SPARC_LOX10
3364
 -- : BFD_RELOC_SPARC_H44
3365
 -- : BFD_RELOC_SPARC_M44
3366
 -- : BFD_RELOC_SPARC_L44
3367
 -- : BFD_RELOC_SPARC_REGISTER
3368
     SPARC64 relocations
3369
 
3370
 -- : BFD_RELOC_SPARC_REV32
3371
     SPARC little endian relocation
3372
 
3373
 -- : BFD_RELOC_SPARC_TLS_GD_HI22
3374
 -- : BFD_RELOC_SPARC_TLS_GD_LO10
3375
 -- : BFD_RELOC_SPARC_TLS_GD_ADD
3376
 -- : BFD_RELOC_SPARC_TLS_GD_CALL
3377
 -- : BFD_RELOC_SPARC_TLS_LDM_HI22
3378
 -- : BFD_RELOC_SPARC_TLS_LDM_LO10
3379
 -- : BFD_RELOC_SPARC_TLS_LDM_ADD
3380
 -- : BFD_RELOC_SPARC_TLS_LDM_CALL
3381
 -- : BFD_RELOC_SPARC_TLS_LDO_HIX22
3382
 -- : BFD_RELOC_SPARC_TLS_LDO_LOX10
3383
 -- : BFD_RELOC_SPARC_TLS_LDO_ADD
3384
 -- : BFD_RELOC_SPARC_TLS_IE_HI22
3385
 -- : BFD_RELOC_SPARC_TLS_IE_LO10
3386
 -- : BFD_RELOC_SPARC_TLS_IE_LD
3387
 -- : BFD_RELOC_SPARC_TLS_IE_LDX
3388
 -- : BFD_RELOC_SPARC_TLS_IE_ADD
3389
 -- : BFD_RELOC_SPARC_TLS_LE_HIX22
3390
 -- : BFD_RELOC_SPARC_TLS_LE_LOX10
3391
 -- : BFD_RELOC_SPARC_TLS_DTPMOD32
3392
 -- : BFD_RELOC_SPARC_TLS_DTPMOD64
3393
 -- : BFD_RELOC_SPARC_TLS_DTPOFF32
3394
 -- : BFD_RELOC_SPARC_TLS_DTPOFF64
3395
 -- : BFD_RELOC_SPARC_TLS_TPOFF32
3396
 -- : BFD_RELOC_SPARC_TLS_TPOFF64
3397
     SPARC TLS relocations
3398
 
3399
 -- : BFD_RELOC_SPU_IMM7
3400
 -- : BFD_RELOC_SPU_IMM8
3401
 -- : BFD_RELOC_SPU_IMM10
3402
 -- : BFD_RELOC_SPU_IMM10W
3403
 -- : BFD_RELOC_SPU_IMM16
3404
 -- : BFD_RELOC_SPU_IMM16W
3405
 -- : BFD_RELOC_SPU_IMM18
3406
 -- : BFD_RELOC_SPU_PCREL9a
3407
 -- : BFD_RELOC_SPU_PCREL9b
3408
 -- : BFD_RELOC_SPU_PCREL16
3409
 -- : BFD_RELOC_SPU_LO16
3410
 -- : BFD_RELOC_SPU_HI16
3411
 -- : BFD_RELOC_SPU_PPU32
3412
 -- : BFD_RELOC_SPU_PPU64
3413
     SPU Relocations.
3414
 
3415
 -- : BFD_RELOC_ALPHA_GPDISP_HI16
3416
     Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
3417
     "addend" in some special way.  For GPDISP_HI16 ("gpdisp")
3418
     relocations, the symbol is ignored when writing; when reading, it
3419
     will be the absolute section symbol.  The addend is the
3420
     displacement in bytes of the "lda" instruction from the "ldah"
3421
     instruction (which is at the address of this reloc).
3422
 
3423
 -- : BFD_RELOC_ALPHA_GPDISP_LO16
3424
     For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
3425
     with GPDISP_HI16 relocs.  The addend is ignored when writing the
3426
     relocations out, and is filled in with the file's GP value on
3427
     reading, for convenience.
3428
 
3429
 -- : BFD_RELOC_ALPHA_GPDISP
3430
     The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
3431
     relocation except that there is no accompanying GPDISP_LO16
3432
     relocation.
3433
 
3434
 -- : BFD_RELOC_ALPHA_LITERAL
3435
 -- : BFD_RELOC_ALPHA_ELF_LITERAL
3436
 -- : BFD_RELOC_ALPHA_LITUSE
3437
     The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
3438
     the assembler turns it into a LDQ instruction to load the address
3439
     of the symbol, and then fills in a register in the real
3440
     instruction.
3441
 
3442
     The LITERAL reloc, at the LDQ instruction, refers to the .lita
3443
     section symbol.  The addend is ignored when writing, but is filled
3444
     in with the file's GP value on reading, for convenience, as with
3445
     the GPDISP_LO16 reloc.
3446
 
3447
     The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
3448
     GPDISP_LO16.  It should refer to the symbol to be referenced, as
3449
     with 16_GOTOFF, but it generates output not based on the position
3450
     within the .got section, but relative to the GP value chosen for
3451
     the file during the final link stage.
3452
 
3453
     The LITUSE reloc, on the instruction using the loaded address,
3454
     gives information to the linker that it might be able to use to
3455
     optimize away some literal section references.  The symbol is
3456
     ignored (read as the absolute section symbol), and the "addend"
3457
     indicates the type of instruction using the register: 1 - "memory"
3458
     fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
3459
     of branch)
3460
 
3461
 -- : BFD_RELOC_ALPHA_HINT
3462
     The HINT relocation indicates a value that should be filled into
3463
     the "hint" field of a jmp/jsr/ret instruction, for possible branch-
3464
     prediction logic which may be provided on some processors.
3465
 
3466
 -- : BFD_RELOC_ALPHA_LINKAGE
3467
     The LINKAGE relocation outputs a linkage pair in the object file,
3468
     which is filled by the linker.
3469
 
3470
 -- : BFD_RELOC_ALPHA_CODEADDR
3471
     The CODEADDR relocation outputs a STO_CA in the object file, which
3472
     is filled by the linker.
3473
 
3474
 -- : BFD_RELOC_ALPHA_GPREL_HI16
3475
 -- : BFD_RELOC_ALPHA_GPREL_LO16
3476
     The GPREL_HI/LO relocations together form a 32-bit offset from the
3477
     GP register.
3478
 
3479
 -- : BFD_RELOC_ALPHA_BRSGP
3480
     Like BFD_RELOC_23_PCREL_S2, except that the source and target must
3481
     share a common GP, and the target address is adjusted for
3482
     STO_ALPHA_STD_GPLOAD.
3483
 
3484
 -- : BFD_RELOC_ALPHA_TLSGD
3485
 -- : BFD_RELOC_ALPHA_TLSLDM
3486
 -- : BFD_RELOC_ALPHA_DTPMOD64
3487
 -- : BFD_RELOC_ALPHA_GOTDTPREL16
3488
 -- : BFD_RELOC_ALPHA_DTPREL64
3489
 -- : BFD_RELOC_ALPHA_DTPREL_HI16
3490
 -- : BFD_RELOC_ALPHA_DTPREL_LO16
3491
 -- : BFD_RELOC_ALPHA_DTPREL16
3492
 -- : BFD_RELOC_ALPHA_GOTTPREL16
3493
 -- : BFD_RELOC_ALPHA_TPREL64
3494
 -- : BFD_RELOC_ALPHA_TPREL_HI16
3495
 -- : BFD_RELOC_ALPHA_TPREL_LO16
3496
 -- : BFD_RELOC_ALPHA_TPREL16
3497
     Alpha thread-local storage relocations.
3498
 
3499
 -- : BFD_RELOC_MIPS_JMP
3500
     Bits 27..2 of the relocation address shifted right 2 bits; simple
3501
     reloc otherwise.
3502
 
3503
 -- : BFD_RELOC_MIPS16_JMP
3504
     The MIPS16 jump instruction.
3505
 
3506
 -- : BFD_RELOC_MIPS16_GPREL
3507
     MIPS16 GP relative reloc.
3508
 
3509
 -- : BFD_RELOC_HI16
3510
     High 16 bits of 32-bit value; simple reloc.
3511
 
3512
 -- : BFD_RELOC_HI16_S
3513
     High 16 bits of 32-bit value but the low 16 bits will be sign
3514
     extended and added to form the final result.  If the low 16 bits
3515
     form a negative number, we need to add one to the high value to
3516
     compensate for the borrow when the low bits are added.
3517
 
3518
 -- : BFD_RELOC_LO16
3519
     Low 16 bits.
3520
 
3521
 -- : BFD_RELOC_HI16_PCREL
3522
     High 16 bits of 32-bit pc-relative value
3523
 
3524
 -- : BFD_RELOC_HI16_S_PCREL
3525
     High 16 bits of 32-bit pc-relative value, adjusted
3526
 
3527
 -- : BFD_RELOC_LO16_PCREL
3528
     Low 16 bits of pc-relative value
3529
 
3530
 -- : BFD_RELOC_MIPS16_HI16
3531
     MIPS16 high 16 bits of 32-bit value.
3532
 
3533
 -- : BFD_RELOC_MIPS16_HI16_S
3534
     MIPS16 high 16 bits of 32-bit value but the low 16 bits will be
3535
     sign extended and added to form the final result.  If the low 16
3536
     bits form a negative number, we need to add one to the high value
3537
     to compensate for the borrow when the low bits are added.
3538
 
3539
 -- : BFD_RELOC_MIPS16_LO16
3540
     MIPS16 low 16 bits.
3541
 
3542
 -- : BFD_RELOC_MIPS_LITERAL
3543
     Relocation against a MIPS literal section.
3544
 
3545
 -- : BFD_RELOC_MIPS_GOT16
3546
 -- : BFD_RELOC_MIPS_CALL16
3547
 -- : BFD_RELOC_MIPS_GOT_HI16
3548
 -- : BFD_RELOC_MIPS_GOT_LO16
3549
 -- : BFD_RELOC_MIPS_CALL_HI16
3550
 -- : BFD_RELOC_MIPS_CALL_LO16
3551
 -- : BFD_RELOC_MIPS_SUB
3552
 -- : BFD_RELOC_MIPS_GOT_PAGE
3553
 -- : BFD_RELOC_MIPS_GOT_OFST
3554
 -- : BFD_RELOC_MIPS_GOT_DISP
3555
 -- : BFD_RELOC_MIPS_SHIFT5
3556
 -- : BFD_RELOC_MIPS_SHIFT6
3557
 -- : BFD_RELOC_MIPS_INSERT_A
3558
 -- : BFD_RELOC_MIPS_INSERT_B
3559
 -- : BFD_RELOC_MIPS_DELETE
3560
 -- : BFD_RELOC_MIPS_HIGHEST
3561
 -- : BFD_RELOC_MIPS_HIGHER
3562
 -- : BFD_RELOC_MIPS_SCN_DISP
3563
 -- : BFD_RELOC_MIPS_REL16
3564
 -- : BFD_RELOC_MIPS_RELGOT
3565
 -- : BFD_RELOC_MIPS_JALR
3566
 -- : BFD_RELOC_MIPS_TLS_DTPMOD32
3567
 -- : BFD_RELOC_MIPS_TLS_DTPREL32
3568
 -- : BFD_RELOC_MIPS_TLS_DTPMOD64
3569
 -- : BFD_RELOC_MIPS_TLS_DTPREL64
3570
 -- : BFD_RELOC_MIPS_TLS_GD
3571
 -- : BFD_RELOC_MIPS_TLS_LDM
3572
 -- : BFD_RELOC_MIPS_TLS_DTPREL_HI16
3573
 -- : BFD_RELOC_MIPS_TLS_DTPREL_LO16
3574
 -- : BFD_RELOC_MIPS_TLS_GOTTPREL
3575
 -- : BFD_RELOC_MIPS_TLS_TPREL32
3576
 -- : BFD_RELOC_MIPS_TLS_TPREL64
3577
 -- : BFD_RELOC_MIPS_TLS_TPREL_HI16
3578
 -- : BFD_RELOC_MIPS_TLS_TPREL_LO16
3579
     MIPS ELF relocations.
3580
 
3581
 -- : BFD_RELOC_MIPS_COPY
3582
 -- : BFD_RELOC_MIPS_JUMP_SLOT
3583
     MIPS ELF relocations (VxWorks extensions).
3584
 
3585
 -- : BFD_RELOC_FRV_LABEL16
3586
 -- : BFD_RELOC_FRV_LABEL24
3587
 -- : BFD_RELOC_FRV_LO16
3588
 -- : BFD_RELOC_FRV_HI16
3589
 -- : BFD_RELOC_FRV_GPREL12
3590
 -- : BFD_RELOC_FRV_GPRELU12
3591
 -- : BFD_RELOC_FRV_GPREL32
3592
 -- : BFD_RELOC_FRV_GPRELHI
3593
 -- : BFD_RELOC_FRV_GPRELLO
3594
 -- : BFD_RELOC_FRV_GOT12
3595
 -- : BFD_RELOC_FRV_GOTHI
3596
 -- : BFD_RELOC_FRV_GOTLO
3597
 -- : BFD_RELOC_FRV_FUNCDESC
3598
 -- : BFD_RELOC_FRV_FUNCDESC_GOT12
3599
 -- : BFD_RELOC_FRV_FUNCDESC_GOTHI
3600
 -- : BFD_RELOC_FRV_FUNCDESC_GOTLO
3601
 -- : BFD_RELOC_FRV_FUNCDESC_VALUE
3602
 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFF12
3603
 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFHI
3604
 -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
3605
 -- : BFD_RELOC_FRV_GOTOFF12
3606
 -- : BFD_RELOC_FRV_GOTOFFHI
3607
 -- : BFD_RELOC_FRV_GOTOFFLO
3608
 -- : BFD_RELOC_FRV_GETTLSOFF
3609
 -- : BFD_RELOC_FRV_TLSDESC_VALUE
3610
 -- : BFD_RELOC_FRV_GOTTLSDESC12
3611
 -- : BFD_RELOC_FRV_GOTTLSDESCHI
3612
 -- : BFD_RELOC_FRV_GOTTLSDESCLO
3613
 -- : BFD_RELOC_FRV_TLSMOFF12
3614
 -- : BFD_RELOC_FRV_TLSMOFFHI
3615
 -- : BFD_RELOC_FRV_TLSMOFFLO
3616
 -- : BFD_RELOC_FRV_GOTTLSOFF12
3617
 -- : BFD_RELOC_FRV_GOTTLSOFFHI
3618
 -- : BFD_RELOC_FRV_GOTTLSOFFLO
3619
 -- : BFD_RELOC_FRV_TLSOFF
3620
 -- : BFD_RELOC_FRV_TLSDESC_RELAX
3621
 -- : BFD_RELOC_FRV_GETTLSOFF_RELAX
3622
 -- : BFD_RELOC_FRV_TLSOFF_RELAX
3623
 -- : BFD_RELOC_FRV_TLSMOFF
3624
     Fujitsu Frv Relocations.
3625
 
3626
 -- : BFD_RELOC_MN10300_GOTOFF24
3627
     This is a 24bit GOT-relative reloc for the mn10300.
3628
 
3629
 -- : BFD_RELOC_MN10300_GOT32
3630
     This is a 32bit GOT-relative reloc for the mn10300, offset by two
3631
     bytes in the instruction.
3632
 
3633
 -- : BFD_RELOC_MN10300_GOT24
3634
     This is a 24bit GOT-relative reloc for the mn10300, offset by two
3635
     bytes in the instruction.
3636
 
3637
 -- : BFD_RELOC_MN10300_GOT16
3638
     This is a 16bit GOT-relative reloc for the mn10300, offset by two
3639
     bytes in the instruction.
3640
 
3641
 -- : BFD_RELOC_MN10300_COPY
3642
     Copy symbol at runtime.
3643
 
3644
 -- : BFD_RELOC_MN10300_GLOB_DAT
3645
     Create GOT entry.
3646
 
3647
 -- : BFD_RELOC_MN10300_JMP_SLOT
3648
     Create PLT entry.
3649
 
3650
 -- : BFD_RELOC_MN10300_RELATIVE
3651
     Adjust by program base.
3652
 
3653
 -- : BFD_RELOC_MN10300_SYM_DIFF
3654
     Together with another reloc targeted at the same location, allows
3655
     for a value that is the difference of two symbols in the same
3656
     section.
3657
 
3658
 -- : BFD_RELOC_MN10300_ALIGN
3659
     The addend of this reloc is an alignment power that must be
3660
     honoured at the offset's location, regardless of linker relaxation.
3661
 
3662
 -- : BFD_RELOC_386_GOT32
3663
 -- : BFD_RELOC_386_PLT32
3664
 -- : BFD_RELOC_386_COPY
3665
 -- : BFD_RELOC_386_GLOB_DAT
3666
 -- : BFD_RELOC_386_JUMP_SLOT
3667
 -- : BFD_RELOC_386_RELATIVE
3668
 -- : BFD_RELOC_386_GOTOFF
3669
 -- : BFD_RELOC_386_GOTPC
3670
 -- : BFD_RELOC_386_TLS_TPOFF
3671
 -- : BFD_RELOC_386_TLS_IE
3672
 -- : BFD_RELOC_386_TLS_GOTIE
3673
 -- : BFD_RELOC_386_TLS_LE
3674
 -- : BFD_RELOC_386_TLS_GD
3675
 -- : BFD_RELOC_386_TLS_LDM
3676
 -- : BFD_RELOC_386_TLS_LDO_32
3677
 -- : BFD_RELOC_386_TLS_IE_32
3678
 -- : BFD_RELOC_386_TLS_LE_32
3679
 -- : BFD_RELOC_386_TLS_DTPMOD32
3680
 -- : BFD_RELOC_386_TLS_DTPOFF32
3681
 -- : BFD_RELOC_386_TLS_TPOFF32
3682
 -- : BFD_RELOC_386_TLS_GOTDESC
3683
 -- : BFD_RELOC_386_TLS_DESC_CALL
3684
 -- : BFD_RELOC_386_TLS_DESC
3685
     i386/elf relocations
3686
 
3687
 -- : BFD_RELOC_X86_64_GOT32
3688
 -- : BFD_RELOC_X86_64_PLT32
3689
 -- : BFD_RELOC_X86_64_COPY
3690
 -- : BFD_RELOC_X86_64_GLOB_DAT
3691
 -- : BFD_RELOC_X86_64_JUMP_SLOT
3692
 -- : BFD_RELOC_X86_64_RELATIVE
3693
 -- : BFD_RELOC_X86_64_GOTPCREL
3694
 -- : BFD_RELOC_X86_64_32S
3695
 -- : BFD_RELOC_X86_64_DTPMOD64
3696
 -- : BFD_RELOC_X86_64_DTPOFF64
3697
 -- : BFD_RELOC_X86_64_TPOFF64
3698
 -- : BFD_RELOC_X86_64_TLSGD
3699
 -- : BFD_RELOC_X86_64_TLSLD
3700
 -- : BFD_RELOC_X86_64_DTPOFF32
3701
 -- : BFD_RELOC_X86_64_GOTTPOFF
3702
 -- : BFD_RELOC_X86_64_TPOFF32
3703
 -- : BFD_RELOC_X86_64_GOTOFF64
3704
 -- : BFD_RELOC_X86_64_GOTPC32
3705
 -- : BFD_RELOC_X86_64_GOT64
3706
 -- : BFD_RELOC_X86_64_GOTPCREL64
3707
 -- : BFD_RELOC_X86_64_GOTPC64
3708
 -- : BFD_RELOC_X86_64_GOTPLT64
3709
 -- : BFD_RELOC_X86_64_PLTOFF64
3710
 -- : BFD_RELOC_X86_64_GOTPC32_TLSDESC
3711
 -- : BFD_RELOC_X86_64_TLSDESC_CALL
3712
 -- : BFD_RELOC_X86_64_TLSDESC
3713
     x86-64/elf relocations
3714
 
3715
 -- : BFD_RELOC_NS32K_IMM_8
3716
 -- : BFD_RELOC_NS32K_IMM_16
3717
 -- : BFD_RELOC_NS32K_IMM_32
3718
 -- : BFD_RELOC_NS32K_IMM_8_PCREL
3719
 -- : BFD_RELOC_NS32K_IMM_16_PCREL
3720
 -- : BFD_RELOC_NS32K_IMM_32_PCREL
3721
 -- : BFD_RELOC_NS32K_DISP_8
3722
 -- : BFD_RELOC_NS32K_DISP_16
3723
 -- : BFD_RELOC_NS32K_DISP_32
3724
 -- : BFD_RELOC_NS32K_DISP_8_PCREL
3725
 -- : BFD_RELOC_NS32K_DISP_16_PCREL
3726
 -- : BFD_RELOC_NS32K_DISP_32_PCREL
3727
     ns32k relocations
3728
 
3729
 -- : BFD_RELOC_PDP11_DISP_8_PCREL
3730
 -- : BFD_RELOC_PDP11_DISP_6_PCREL
3731
     PDP11 relocations
3732
 
3733
 -- : BFD_RELOC_PJ_CODE_HI16
3734
 -- : BFD_RELOC_PJ_CODE_LO16
3735
 -- : BFD_RELOC_PJ_CODE_DIR16
3736
 -- : BFD_RELOC_PJ_CODE_DIR32
3737
 -- : BFD_RELOC_PJ_CODE_REL16
3738
 -- : BFD_RELOC_PJ_CODE_REL32
3739
     Picojava relocs.  Not all of these appear in object files.
3740
 
3741
 -- : BFD_RELOC_PPC_B26
3742
 -- : BFD_RELOC_PPC_BA26
3743
 -- : BFD_RELOC_PPC_TOC16
3744
 -- : BFD_RELOC_PPC_B16
3745
 -- : BFD_RELOC_PPC_B16_BRTAKEN
3746
 -- : BFD_RELOC_PPC_B16_BRNTAKEN
3747
 -- : BFD_RELOC_PPC_BA16
3748
 -- : BFD_RELOC_PPC_BA16_BRTAKEN
3749
 -- : BFD_RELOC_PPC_BA16_BRNTAKEN
3750
 -- : BFD_RELOC_PPC_COPY
3751
 -- : BFD_RELOC_PPC_GLOB_DAT
3752
 -- : BFD_RELOC_PPC_JMP_SLOT
3753
 -- : BFD_RELOC_PPC_RELATIVE
3754
 -- : BFD_RELOC_PPC_LOCAL24PC
3755
 -- : BFD_RELOC_PPC_EMB_NADDR32
3756
 -- : BFD_RELOC_PPC_EMB_NADDR16
3757
 -- : BFD_RELOC_PPC_EMB_NADDR16_LO
3758
 -- : BFD_RELOC_PPC_EMB_NADDR16_HI
3759
 -- : BFD_RELOC_PPC_EMB_NADDR16_HA
3760
 -- : BFD_RELOC_PPC_EMB_SDAI16
3761
 -- : BFD_RELOC_PPC_EMB_SDA2I16
3762
 -- : BFD_RELOC_PPC_EMB_SDA2REL
3763
 -- : BFD_RELOC_PPC_EMB_SDA21
3764
 -- : BFD_RELOC_PPC_EMB_MRKREF
3765
 -- : BFD_RELOC_PPC_EMB_RELSEC16
3766
 -- : BFD_RELOC_PPC_EMB_RELST_LO
3767
 -- : BFD_RELOC_PPC_EMB_RELST_HI
3768
 -- : BFD_RELOC_PPC_EMB_RELST_HA
3769
 -- : BFD_RELOC_PPC_EMB_BIT_FLD
3770
 -- : BFD_RELOC_PPC_EMB_RELSDA
3771
 -- : BFD_RELOC_PPC64_HIGHER
3772
 -- : BFD_RELOC_PPC64_HIGHER_S
3773
 -- : BFD_RELOC_PPC64_HIGHEST
3774
 -- : BFD_RELOC_PPC64_HIGHEST_S
3775
 -- : BFD_RELOC_PPC64_TOC16_LO
3776
 -- : BFD_RELOC_PPC64_TOC16_HI
3777
 -- : BFD_RELOC_PPC64_TOC16_HA
3778
 -- : BFD_RELOC_PPC64_TOC
3779
 -- : BFD_RELOC_PPC64_PLTGOT16
3780
 -- : BFD_RELOC_PPC64_PLTGOT16_LO
3781
 -- : BFD_RELOC_PPC64_PLTGOT16_HI
3782
 -- : BFD_RELOC_PPC64_PLTGOT16_HA
3783
 -- : BFD_RELOC_PPC64_ADDR16_DS
3784
 -- : BFD_RELOC_PPC64_ADDR16_LO_DS
3785
 -- : BFD_RELOC_PPC64_GOT16_DS
3786
 -- : BFD_RELOC_PPC64_GOT16_LO_DS
3787
 -- : BFD_RELOC_PPC64_PLT16_LO_DS
3788
 -- : BFD_RELOC_PPC64_SECTOFF_DS
3789
 -- : BFD_RELOC_PPC64_SECTOFF_LO_DS
3790
 -- : BFD_RELOC_PPC64_TOC16_DS
3791
 -- : BFD_RELOC_PPC64_TOC16_LO_DS
3792
 -- : BFD_RELOC_PPC64_PLTGOT16_DS
3793
 -- : BFD_RELOC_PPC64_PLTGOT16_LO_DS
3794
     Power(rs6000) and PowerPC relocations.
3795
 
3796
 -- : BFD_RELOC_PPC_TLS
3797
 -- : BFD_RELOC_PPC_DTPMOD
3798
 -- : BFD_RELOC_PPC_TPREL16
3799
 -- : BFD_RELOC_PPC_TPREL16_LO
3800
 -- : BFD_RELOC_PPC_TPREL16_HI
3801
 -- : BFD_RELOC_PPC_TPREL16_HA
3802
 -- : BFD_RELOC_PPC_TPREL
3803
 -- : BFD_RELOC_PPC_DTPREL16
3804
 -- : BFD_RELOC_PPC_DTPREL16_LO
3805
 -- : BFD_RELOC_PPC_DTPREL16_HI
3806
 -- : BFD_RELOC_PPC_DTPREL16_HA
3807
 -- : BFD_RELOC_PPC_DTPREL
3808
 -- : BFD_RELOC_PPC_GOT_TLSGD16
3809
 -- : BFD_RELOC_PPC_GOT_TLSGD16_LO
3810
 -- : BFD_RELOC_PPC_GOT_TLSGD16_HI
3811
 -- : BFD_RELOC_PPC_GOT_TLSGD16_HA
3812
 -- : BFD_RELOC_PPC_GOT_TLSLD16
3813
 -- : BFD_RELOC_PPC_GOT_TLSLD16_LO
3814
 -- : BFD_RELOC_PPC_GOT_TLSLD16_HI
3815
 -- : BFD_RELOC_PPC_GOT_TLSLD16_HA
3816
 -- : BFD_RELOC_PPC_GOT_TPREL16
3817
 -- : BFD_RELOC_PPC_GOT_TPREL16_LO
3818
 -- : BFD_RELOC_PPC_GOT_TPREL16_HI
3819
 -- : BFD_RELOC_PPC_GOT_TPREL16_HA
3820
 -- : BFD_RELOC_PPC_GOT_DTPREL16
3821
 -- : BFD_RELOC_PPC_GOT_DTPREL16_LO
3822
 -- : BFD_RELOC_PPC_GOT_DTPREL16_HI
3823
 -- : BFD_RELOC_PPC_GOT_DTPREL16_HA
3824
 -- : BFD_RELOC_PPC64_TPREL16_DS
3825
 -- : BFD_RELOC_PPC64_TPREL16_LO_DS
3826
 -- : BFD_RELOC_PPC64_TPREL16_HIGHER
3827
 -- : BFD_RELOC_PPC64_TPREL16_HIGHERA
3828
 -- : BFD_RELOC_PPC64_TPREL16_HIGHEST
3829
 -- : BFD_RELOC_PPC64_TPREL16_HIGHESTA
3830
 -- : BFD_RELOC_PPC64_DTPREL16_DS
3831
 -- : BFD_RELOC_PPC64_DTPREL16_LO_DS
3832
 -- : BFD_RELOC_PPC64_DTPREL16_HIGHER
3833
 -- : BFD_RELOC_PPC64_DTPREL16_HIGHERA
3834
 -- : BFD_RELOC_PPC64_DTPREL16_HIGHEST
3835
 -- : BFD_RELOC_PPC64_DTPREL16_HIGHESTA
3836
     PowerPC and PowerPC64 thread-local storage relocations.
3837
 
3838
 -- : BFD_RELOC_I370_D12
3839
     IBM 370/390 relocations
3840
 
3841
 -- : BFD_RELOC_CTOR
3842
     The type of reloc used to build a constructor table - at the moment
3843
     probably a 32 bit wide absolute relocation, but the target can
3844
     choose.  It generally does map to one of the other relocation
3845
     types.
3846
 
3847
 -- : BFD_RELOC_ARM_PCREL_BRANCH
3848
     ARM 26 bit pc-relative branch.  The lowest two bits must be zero
3849
     and are not stored in the instruction.
3850
 
3851
 -- : BFD_RELOC_ARM_PCREL_BLX
3852
     ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
3853
     not stored in the instruction.  The 2nd lowest bit comes from a 1
3854
     bit field in the instruction.
3855
 
3856
 -- : BFD_RELOC_THUMB_PCREL_BLX
3857
     Thumb 22 bit pc-relative branch.  The lowest bit must be zero and
3858
     is not stored in the instruction.  The 2nd lowest bit comes from a
3859
     1 bit field in the instruction.
3860
 
3861
 -- : BFD_RELOC_ARM_PCREL_CALL
3862
     ARM 26-bit pc-relative branch for an unconditional BL or BLX
3863
     instruction.
3864
 
3865
 -- : BFD_RELOC_ARM_PCREL_JUMP
3866
     ARM 26-bit pc-relative branch for B or conditional BL instruction.
3867
 
3868
 -- : BFD_RELOC_THUMB_PCREL_BRANCH7
3869
 -- : BFD_RELOC_THUMB_PCREL_BRANCH9
3870
 -- : BFD_RELOC_THUMB_PCREL_BRANCH12
3871
 -- : BFD_RELOC_THUMB_PCREL_BRANCH20
3872
 -- : BFD_RELOC_THUMB_PCREL_BRANCH23
3873
 -- : BFD_RELOC_THUMB_PCREL_BRANCH25
3874
     Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.  The
3875
     lowest bit must be zero and is not stored in the instruction.
3876
     Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
3877
     "nn" one smaller in all cases.  Note further that BRANCH23
3878
     corresponds to R_ARM_THM_CALL.
3879
 
3880
 -- : BFD_RELOC_ARM_OFFSET_IMM
3881
     12-bit immediate offset, used in ARM-format ldr and str
3882
     instructions.
3883
 
3884
 -- : BFD_RELOC_ARM_THUMB_OFFSET
3885
     5-bit immediate offset, used in Thumb-format ldr and str
3886
     instructions.
3887
 
3888
 -- : BFD_RELOC_ARM_TARGET1
3889
     Pc-relative or absolute relocation depending on target.  Used for
3890
     entries in .init_array sections.
3891
 
3892
 -- : BFD_RELOC_ARM_ROSEGREL32
3893
     Read-only segment base relative address.
3894
 
3895
 -- : BFD_RELOC_ARM_SBREL32
3896
     Data segment base relative address.
3897
 
3898
 -- : BFD_RELOC_ARM_TARGET2
3899
     This reloc is used for references to RTTI data from exception
3900
     handling tables.  The actual definition depends on the target.  It
3901
     may be a pc-relative or some form of GOT-indirect relocation.
3902
 
3903
 -- : BFD_RELOC_ARM_PREL31
3904
     31-bit PC relative address.
3905
 
3906
 -- : BFD_RELOC_ARM_MOVW
3907
 -- : BFD_RELOC_ARM_MOVT
3908
 -- : BFD_RELOC_ARM_MOVW_PCREL
3909
 -- : BFD_RELOC_ARM_MOVT_PCREL
3910
 -- : BFD_RELOC_ARM_THUMB_MOVW
3911
 -- : BFD_RELOC_ARM_THUMB_MOVT
3912
 -- : BFD_RELOC_ARM_THUMB_MOVW_PCREL
3913
 -- : BFD_RELOC_ARM_THUMB_MOVT_PCREL
3914
     Low and High halfword relocations for MOVW and MOVT instructions.
3915
 
3916
 -- : BFD_RELOC_ARM_JUMP_SLOT
3917
 -- : BFD_RELOC_ARM_GLOB_DAT
3918
 -- : BFD_RELOC_ARM_GOT32
3919
 -- : BFD_RELOC_ARM_PLT32
3920
 -- : BFD_RELOC_ARM_RELATIVE
3921
 -- : BFD_RELOC_ARM_GOTOFF
3922
 -- : BFD_RELOC_ARM_GOTPC
3923
     Relocations for setting up GOTs and PLTs for shared libraries.
3924
 
3925
 -- : BFD_RELOC_ARM_TLS_GD32
3926
 -- : BFD_RELOC_ARM_TLS_LDO32
3927
 -- : BFD_RELOC_ARM_TLS_LDM32
3928
 -- : BFD_RELOC_ARM_TLS_DTPOFF32
3929
 -- : BFD_RELOC_ARM_TLS_DTPMOD32
3930
 -- : BFD_RELOC_ARM_TLS_TPOFF32
3931
 -- : BFD_RELOC_ARM_TLS_IE32
3932
 -- : BFD_RELOC_ARM_TLS_LE32
3933
     ARM thread-local storage relocations.
3934
 
3935
 -- : BFD_RELOC_ARM_ALU_PC_G0_NC
3936
 -- : BFD_RELOC_ARM_ALU_PC_G0
3937
 -- : BFD_RELOC_ARM_ALU_PC_G1_NC
3938
 -- : BFD_RELOC_ARM_ALU_PC_G1
3939
 -- : BFD_RELOC_ARM_ALU_PC_G2
3940
 -- : BFD_RELOC_ARM_LDR_PC_G0
3941
 -- : BFD_RELOC_ARM_LDR_PC_G1
3942
 -- : BFD_RELOC_ARM_LDR_PC_G2
3943
 -- : BFD_RELOC_ARM_LDRS_PC_G0
3944
 -- : BFD_RELOC_ARM_LDRS_PC_G1
3945
 -- : BFD_RELOC_ARM_LDRS_PC_G2
3946
 -- : BFD_RELOC_ARM_LDC_PC_G0
3947
 -- : BFD_RELOC_ARM_LDC_PC_G1
3948
 -- : BFD_RELOC_ARM_LDC_PC_G2
3949
 -- : BFD_RELOC_ARM_ALU_SB_G0_NC
3950
 -- : BFD_RELOC_ARM_ALU_SB_G0
3951
 -- : BFD_RELOC_ARM_ALU_SB_G1_NC
3952
 -- : BFD_RELOC_ARM_ALU_SB_G1
3953
 -- : BFD_RELOC_ARM_ALU_SB_G2
3954
 -- : BFD_RELOC_ARM_LDR_SB_G0
3955
 -- : BFD_RELOC_ARM_LDR_SB_G1
3956
 -- : BFD_RELOC_ARM_LDR_SB_G2
3957
 -- : BFD_RELOC_ARM_LDRS_SB_G0
3958
 -- : BFD_RELOC_ARM_LDRS_SB_G1
3959
 -- : BFD_RELOC_ARM_LDRS_SB_G2
3960
 -- : BFD_RELOC_ARM_LDC_SB_G0
3961
 -- : BFD_RELOC_ARM_LDC_SB_G1
3962
 -- : BFD_RELOC_ARM_LDC_SB_G2
3963
     ARM group relocations.
3964
 
3965
 -- : BFD_RELOC_ARM_V4BX
3966
     Annotation of BX instructions.
3967
 
3968
 -- : BFD_RELOC_ARM_IMMEDIATE
3969
 -- : BFD_RELOC_ARM_ADRL_IMMEDIATE
3970
 -- : BFD_RELOC_ARM_T32_IMMEDIATE
3971
 -- : BFD_RELOC_ARM_T32_ADD_IMM
3972
 -- : BFD_RELOC_ARM_T32_IMM12
3973
 -- : BFD_RELOC_ARM_T32_ADD_PC12
3974
 -- : BFD_RELOC_ARM_SHIFT_IMM
3975
 -- : BFD_RELOC_ARM_SMC
3976
 -- : BFD_RELOC_ARM_SWI
3977
 -- : BFD_RELOC_ARM_MULTI
3978
 -- : BFD_RELOC_ARM_CP_OFF_IMM
3979
 -- : BFD_RELOC_ARM_CP_OFF_IMM_S2
3980
 -- : BFD_RELOC_ARM_T32_CP_OFF_IMM
3981
 -- : BFD_RELOC_ARM_T32_CP_OFF_IMM_S2
3982
 -- : BFD_RELOC_ARM_ADR_IMM
3983
 -- : BFD_RELOC_ARM_LDR_IMM
3984
 -- : BFD_RELOC_ARM_LITERAL
3985
 -- : BFD_RELOC_ARM_IN_POOL
3986
 -- : BFD_RELOC_ARM_OFFSET_IMM8
3987
 -- : BFD_RELOC_ARM_T32_OFFSET_U8
3988
 -- : BFD_RELOC_ARM_T32_OFFSET_IMM
3989
 -- : BFD_RELOC_ARM_HWLITERAL
3990
 -- : BFD_RELOC_ARM_THUMB_ADD
3991
 -- : BFD_RELOC_ARM_THUMB_IMM
3992
 -- : BFD_RELOC_ARM_THUMB_SHIFT
3993
     These relocs are only used within the ARM assembler.  They are not
3994
     (at present) written to any object files.
3995
 
3996
 -- : BFD_RELOC_SH_PCDISP8BY2
3997
 -- : BFD_RELOC_SH_PCDISP12BY2
3998
 -- : BFD_RELOC_SH_IMM3
3999
 -- : BFD_RELOC_SH_IMM3U
4000
 -- : BFD_RELOC_SH_DISP12
4001
 -- : BFD_RELOC_SH_DISP12BY2
4002
 -- : BFD_RELOC_SH_DISP12BY4
4003
 -- : BFD_RELOC_SH_DISP12BY8
4004
 -- : BFD_RELOC_SH_DISP20
4005
 -- : BFD_RELOC_SH_DISP20BY8
4006
 -- : BFD_RELOC_SH_IMM4
4007
 -- : BFD_RELOC_SH_IMM4BY2
4008
 -- : BFD_RELOC_SH_IMM4BY4
4009
 -- : BFD_RELOC_SH_IMM8
4010
 -- : BFD_RELOC_SH_IMM8BY2
4011
 -- : BFD_RELOC_SH_IMM8BY4
4012
 -- : BFD_RELOC_SH_PCRELIMM8BY2
4013
 -- : BFD_RELOC_SH_PCRELIMM8BY4
4014
 -- : BFD_RELOC_SH_SWITCH16
4015
 -- : BFD_RELOC_SH_SWITCH32
4016
 -- : BFD_RELOC_SH_USES
4017
 -- : BFD_RELOC_SH_COUNT
4018
 -- : BFD_RELOC_SH_ALIGN
4019
 -- : BFD_RELOC_SH_CODE
4020
 -- : BFD_RELOC_SH_DATA
4021
 -- : BFD_RELOC_SH_LABEL
4022
 -- : BFD_RELOC_SH_LOOP_START
4023
 -- : BFD_RELOC_SH_LOOP_END
4024
 -- : BFD_RELOC_SH_COPY
4025
 -- : BFD_RELOC_SH_GLOB_DAT
4026
 -- : BFD_RELOC_SH_JMP_SLOT
4027
 -- : BFD_RELOC_SH_RELATIVE
4028
 -- : BFD_RELOC_SH_GOTPC
4029
 -- : BFD_RELOC_SH_GOT_LOW16
4030
 -- : BFD_RELOC_SH_GOT_MEDLOW16
4031
 -- : BFD_RELOC_SH_GOT_MEDHI16
4032
 -- : BFD_RELOC_SH_GOT_HI16
4033
 -- : BFD_RELOC_SH_GOTPLT_LOW16
4034
 -- : BFD_RELOC_SH_GOTPLT_MEDLOW16
4035
 -- : BFD_RELOC_SH_GOTPLT_MEDHI16
4036
 -- : BFD_RELOC_SH_GOTPLT_HI16
4037
 -- : BFD_RELOC_SH_PLT_LOW16
4038
 -- : BFD_RELOC_SH_PLT_MEDLOW16
4039
 -- : BFD_RELOC_SH_PLT_MEDHI16
4040
 -- : BFD_RELOC_SH_PLT_HI16
4041
 -- : BFD_RELOC_SH_GOTOFF_LOW16
4042
 -- : BFD_RELOC_SH_GOTOFF_MEDLOW16
4043
 -- : BFD_RELOC_SH_GOTOFF_MEDHI16
4044
 -- : BFD_RELOC_SH_GOTOFF_HI16
4045
 -- : BFD_RELOC_SH_GOTPC_LOW16
4046
 -- : BFD_RELOC_SH_GOTPC_MEDLOW16
4047
 -- : BFD_RELOC_SH_GOTPC_MEDHI16
4048
 -- : BFD_RELOC_SH_GOTPC_HI16
4049
 -- : BFD_RELOC_SH_COPY64
4050
 -- : BFD_RELOC_SH_GLOB_DAT64
4051
 -- : BFD_RELOC_SH_JMP_SLOT64
4052
 -- : BFD_RELOC_SH_RELATIVE64
4053
 -- : BFD_RELOC_SH_GOT10BY4
4054
 -- : BFD_RELOC_SH_GOT10BY8
4055
 -- : BFD_RELOC_SH_GOTPLT10BY4
4056
 -- : BFD_RELOC_SH_GOTPLT10BY8
4057
 -- : BFD_RELOC_SH_GOTPLT32
4058
 -- : BFD_RELOC_SH_SHMEDIA_CODE
4059
 -- : BFD_RELOC_SH_IMMU5
4060
 -- : BFD_RELOC_SH_IMMS6
4061
 -- : BFD_RELOC_SH_IMMS6BY32
4062
 -- : BFD_RELOC_SH_IMMU6
4063
 -- : BFD_RELOC_SH_IMMS10
4064
 -- : BFD_RELOC_SH_IMMS10BY2
4065
 -- : BFD_RELOC_SH_IMMS10BY4
4066
 -- : BFD_RELOC_SH_IMMS10BY8
4067
 -- : BFD_RELOC_SH_IMMS16
4068
 -- : BFD_RELOC_SH_IMMU16
4069
 -- : BFD_RELOC_SH_IMM_LOW16
4070
 -- : BFD_RELOC_SH_IMM_LOW16_PCREL
4071
 -- : BFD_RELOC_SH_IMM_MEDLOW16
4072
 -- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL
4073
 -- : BFD_RELOC_SH_IMM_MEDHI16
4074
 -- : BFD_RELOC_SH_IMM_MEDHI16_PCREL
4075
 -- : BFD_RELOC_SH_IMM_HI16
4076
 -- : BFD_RELOC_SH_IMM_HI16_PCREL
4077
 -- : BFD_RELOC_SH_PT_16
4078
 -- : BFD_RELOC_SH_TLS_GD_32
4079
 -- : BFD_RELOC_SH_TLS_LD_32
4080
 -- : BFD_RELOC_SH_TLS_LDO_32
4081
 -- : BFD_RELOC_SH_TLS_IE_32
4082
 -- : BFD_RELOC_SH_TLS_LE_32
4083
 -- : BFD_RELOC_SH_TLS_DTPMOD32
4084
 -- : BFD_RELOC_SH_TLS_DTPOFF32
4085
 -- : BFD_RELOC_SH_TLS_TPOFF32
4086
     Renesas / SuperH SH relocs.  Not all of these appear in object
4087
     files.
4088
 
4089
 -- : BFD_RELOC_ARC_B22_PCREL
4090
     ARC Cores relocs.  ARC 22 bit pc-relative branch.  The lowest two
4091
     bits must be zero and are not stored in the instruction.  The high
4092
     20 bits are installed in bits 26 through 7 of the instruction.
4093
 
4094
 -- : BFD_RELOC_ARC_B26
4095
     ARC 26 bit absolute branch.  The lowest two bits must be zero and
4096
     are not stored in the instruction.  The high 24 bits are installed
4097
     in bits 23 through 0.
4098
 
4099
 -- : BFD_RELOC_BFIN_16_IMM
4100
     ADI Blackfin 16 bit immediate absolute reloc.
4101
 
4102
 -- : BFD_RELOC_BFIN_16_HIGH
4103
     ADI Blackfin 16 bit immediate absolute reloc higher 16 bits.
4104
 
4105
 -- : BFD_RELOC_BFIN_4_PCREL
4106
     ADI Blackfin 'a' part of LSETUP.
4107
 
4108
 -- : BFD_RELOC_BFIN_5_PCREL
4109
     ADI Blackfin.
4110
 
4111
 -- : BFD_RELOC_BFIN_16_LOW
4112
     ADI Blackfin 16 bit immediate absolute reloc lower 16 bits.
4113
 
4114
 -- : BFD_RELOC_BFIN_10_PCREL
4115
     ADI Blackfin.
4116
 
4117
 -- : BFD_RELOC_BFIN_11_PCREL
4118
     ADI Blackfin 'b' part of LSETUP.
4119
 
4120
 -- : BFD_RELOC_BFIN_12_PCREL_JUMP
4121
     ADI Blackfin.
4122
 
4123
 -- : BFD_RELOC_BFIN_12_PCREL_JUMP_S
4124
     ADI Blackfin Short jump, pcrel.
4125
 
4126
 -- : BFD_RELOC_BFIN_24_PCREL_CALL_X
4127
     ADI Blackfin Call.x not implemented.
4128
 
4129
 -- : BFD_RELOC_BFIN_24_PCREL_JUMP_L
4130
     ADI Blackfin Long Jump pcrel.
4131
 
4132
 -- : BFD_RELOC_BFIN_GOT17M4
4133
 -- : BFD_RELOC_BFIN_GOTHI
4134
 -- : BFD_RELOC_BFIN_GOTLO
4135
 -- : BFD_RELOC_BFIN_FUNCDESC
4136
 -- : BFD_RELOC_BFIN_FUNCDESC_GOT17M4
4137
 -- : BFD_RELOC_BFIN_FUNCDESC_GOTHI
4138
 -- : BFD_RELOC_BFIN_FUNCDESC_GOTLO
4139
 -- : BFD_RELOC_BFIN_FUNCDESC_VALUE
4140
 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4
4141
 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI
4142
 -- : BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO
4143
 -- : BFD_RELOC_BFIN_GOTOFF17M4
4144
 -- : BFD_RELOC_BFIN_GOTOFFHI
4145
 -- : BFD_RELOC_BFIN_GOTOFFLO
4146
     ADI Blackfin FD-PIC relocations.
4147
 
4148
 -- : BFD_RELOC_BFIN_GOT
4149
     ADI Blackfin GOT relocation.
4150
 
4151
 -- : BFD_RELOC_BFIN_PLTPC
4152
     ADI Blackfin PLTPC relocation.
4153
 
4154
 -- : BFD_ARELOC_BFIN_PUSH
4155
     ADI Blackfin arithmetic relocation.
4156
 
4157
 -- : BFD_ARELOC_BFIN_CONST
4158
     ADI Blackfin arithmetic relocation.
4159
 
4160
 -- : BFD_ARELOC_BFIN_ADD
4161
     ADI Blackfin arithmetic relocation.
4162
 
4163
 -- : BFD_ARELOC_BFIN_SUB
4164
     ADI Blackfin arithmetic relocation.
4165
 
4166
 -- : BFD_ARELOC_BFIN_MULT
4167
     ADI Blackfin arithmetic relocation.
4168
 
4169
 -- : BFD_ARELOC_BFIN_DIV
4170
     ADI Blackfin arithmetic relocation.
4171
 
4172
 -- : BFD_ARELOC_BFIN_MOD
4173
     ADI Blackfin arithmetic relocation.
4174
 
4175
 -- : BFD_ARELOC_BFIN_LSHIFT
4176
     ADI Blackfin arithmetic relocation.
4177
 
4178
 -- : BFD_ARELOC_BFIN_RSHIFT
4179
     ADI Blackfin arithmetic relocation.
4180
 
4181
 -- : BFD_ARELOC_BFIN_AND
4182
     ADI Blackfin arithmetic relocation.
4183
 
4184
 -- : BFD_ARELOC_BFIN_OR
4185
     ADI Blackfin arithmetic relocation.
4186
 
4187
 -- : BFD_ARELOC_BFIN_XOR
4188
     ADI Blackfin arithmetic relocation.
4189
 
4190
 -- : BFD_ARELOC_BFIN_LAND
4191
     ADI Blackfin arithmetic relocation.
4192
 
4193
 -- : BFD_ARELOC_BFIN_LOR
4194
     ADI Blackfin arithmetic relocation.
4195
 
4196
 -- : BFD_ARELOC_BFIN_LEN
4197
     ADI Blackfin arithmetic relocation.
4198
 
4199
 -- : BFD_ARELOC_BFIN_NEG
4200
     ADI Blackfin arithmetic relocation.
4201
 
4202
 -- : BFD_ARELOC_BFIN_COMP
4203
     ADI Blackfin arithmetic relocation.
4204
 
4205
 -- : BFD_ARELOC_BFIN_PAGE
4206
     ADI Blackfin arithmetic relocation.
4207
 
4208
 -- : BFD_ARELOC_BFIN_HWPAGE
4209
     ADI Blackfin arithmetic relocation.
4210
 
4211
 -- : BFD_ARELOC_BFIN_ADDR
4212
     ADI Blackfin arithmetic relocation.
4213
 
4214
 -- : BFD_RELOC_D10V_10_PCREL_R
4215
     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
4216
     bits assumed to be 0.
4217
 
4218
 -- : BFD_RELOC_D10V_10_PCREL_L
4219
     Mitsubishi D10V relocs.  This is a 10-bit reloc with the right 2
4220
     bits assumed to be 0.  This is the same as the previous reloc
4221
     except it is in the left container, i.e., shifted left 15 bits.
4222
 
4223
 -- : BFD_RELOC_D10V_18
4224
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
4225
 
4226
 -- : BFD_RELOC_D10V_18_PCREL
4227
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
4228
 
4229
 -- : BFD_RELOC_D30V_6
4230
     Mitsubishi D30V relocs.  This is a 6-bit absolute reloc.
4231
 
4232
 -- : BFD_RELOC_D30V_9_PCREL
4233
     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
4234
     be 0.
4235
 
4236
 -- : BFD_RELOC_D30V_9_PCREL_R
4237
     This is a 6-bit pc-relative reloc with the right 3 bits assumed to
4238
     be 0. Same as the previous reloc but on the right side of the
4239
     container.
4240
 
4241
 -- : BFD_RELOC_D30V_15
4242
     This is a 12-bit absolute reloc with the right 3 bitsassumed to be
4243
     0.
4244
 
4245
 -- : BFD_RELOC_D30V_15_PCREL
4246
     This is a 12-bit pc-relative reloc with the right 3 bits assumed
4247
     to be 0.
4248
 
4249
 -- : BFD_RELOC_D30V_15_PCREL_R
4250
     This is a 12-bit pc-relative reloc with the right 3 bits assumed
4251
     to be 0. Same as the previous reloc but on the right side of the
4252
     container.
4253
 
4254
 -- : BFD_RELOC_D30V_21
4255
     This is an 18-bit absolute reloc with the right 3 bits assumed to
4256
     be 0.
4257
 
4258
 -- : BFD_RELOC_D30V_21_PCREL
4259
     This is an 18-bit pc-relative reloc with the right 3 bits assumed
4260
     to be 0.
4261
 
4262
 -- : BFD_RELOC_D30V_21_PCREL_R
4263
     This is an 18-bit pc-relative reloc with the right 3 bits assumed
4264
     to be 0. Same as the previous reloc but on the right side of the
4265
     container.
4266
 
4267
 -- : BFD_RELOC_D30V_32
4268
     This is a 32-bit absolute reloc.
4269
 
4270
 -- : BFD_RELOC_D30V_32_PCREL
4271
     This is a 32-bit pc-relative reloc.
4272
 
4273
 -- : BFD_RELOC_DLX_HI16_S
4274
     DLX relocs
4275
 
4276
 -- : BFD_RELOC_DLX_LO16
4277
     DLX relocs
4278
 
4279
 -- : BFD_RELOC_DLX_JMP26
4280
     DLX relocs
4281
 
4282
 -- : BFD_RELOC_M32C_HI8
4283
 -- : BFD_RELOC_M32C_RL_JUMP
4284
 -- : BFD_RELOC_M32C_RL_1ADDR
4285
 -- : BFD_RELOC_M32C_RL_2ADDR
4286
     Renesas M16C/M32C Relocations.
4287
 
4288
 -- : BFD_RELOC_M32R_24
4289
     Renesas M32R (formerly Mitsubishi M32R) relocs.  This is a 24 bit
4290
     absolute address.
4291
 
4292
 -- : BFD_RELOC_M32R_10_PCREL
4293
     This is a 10-bit pc-relative reloc with the right 2 bits assumed
4294
     to be 0.
4295
 
4296
 -- : BFD_RELOC_M32R_18_PCREL
4297
     This is an 18-bit reloc with the right 2 bits assumed to be 0.
4298
 
4299
 -- : BFD_RELOC_M32R_26_PCREL
4300
     This is a 26-bit reloc with the right 2 bits assumed to be 0.
4301
 
4302
 -- : BFD_RELOC_M32R_HI16_ULO
4303
     This is a 16-bit reloc containing the high 16 bits of an address
4304
     used when the lower 16 bits are treated as unsigned.
4305
 
4306
 -- : BFD_RELOC_M32R_HI16_SLO
4307
     This is a 16-bit reloc containing the high 16 bits of an address
4308
     used when the lower 16 bits are treated as signed.
4309
 
4310
 -- : BFD_RELOC_M32R_LO16
4311
     This is a 16-bit reloc containing the lower 16 bits of an address.
4312
 
4313
 -- : BFD_RELOC_M32R_SDA16
4314
     This is a 16-bit reloc containing the small data area offset for
4315
     use in add3, load, and store instructions.
4316
 
4317
 -- : BFD_RELOC_M32R_GOT24
4318
 -- : BFD_RELOC_M32R_26_PLTREL
4319
 -- : BFD_RELOC_M32R_COPY
4320
 -- : BFD_RELOC_M32R_GLOB_DAT
4321
 -- : BFD_RELOC_M32R_JMP_SLOT
4322
 -- : BFD_RELOC_M32R_RELATIVE
4323
 -- : BFD_RELOC_M32R_GOTOFF
4324
 -- : BFD_RELOC_M32R_GOTOFF_HI_ULO
4325
 -- : BFD_RELOC_M32R_GOTOFF_HI_SLO
4326
 -- : BFD_RELOC_M32R_GOTOFF_LO
4327
 -- : BFD_RELOC_M32R_GOTPC24
4328
 -- : BFD_RELOC_M32R_GOT16_HI_ULO
4329
 -- : BFD_RELOC_M32R_GOT16_HI_SLO
4330
 -- : BFD_RELOC_M32R_GOT16_LO
4331
 -- : BFD_RELOC_M32R_GOTPC_HI_ULO
4332
 -- : BFD_RELOC_M32R_GOTPC_HI_SLO
4333
 -- : BFD_RELOC_M32R_GOTPC_LO
4334
     For PIC.
4335
 
4336
 -- : BFD_RELOC_V850_9_PCREL
4337
     This is a 9-bit reloc
4338
 
4339
 -- : BFD_RELOC_V850_22_PCREL
4340
     This is a 22-bit reloc
4341
 
4342
 -- : BFD_RELOC_V850_SDA_16_16_OFFSET
4343
     This is a 16 bit offset from the short data area pointer.
4344
 
4345
 -- : BFD_RELOC_V850_SDA_15_16_OFFSET
4346
     This is a 16 bit offset (of which only 15 bits are used) from the
4347
     short data area pointer.
4348
 
4349
 -- : BFD_RELOC_V850_ZDA_16_16_OFFSET
4350
     This is a 16 bit offset from the zero data area pointer.
4351
 
4352
 -- : BFD_RELOC_V850_ZDA_15_16_OFFSET
4353
     This is a 16 bit offset (of which only 15 bits are used) from the
4354
     zero data area pointer.
4355
 
4356
 -- : BFD_RELOC_V850_TDA_6_8_OFFSET
4357
     This is an 8 bit offset (of which only 6 bits are used) from the
4358
     tiny data area pointer.
4359
 
4360
 -- : BFD_RELOC_V850_TDA_7_8_OFFSET
4361
     This is an 8bit offset (of which only 7 bits are used) from the
4362
     tiny data area pointer.
4363
 
4364
 -- : BFD_RELOC_V850_TDA_7_7_OFFSET
4365
     This is a 7 bit offset from the tiny data area pointer.
4366
 
4367
 -- : BFD_RELOC_V850_TDA_16_16_OFFSET
4368
     This is a 16 bit offset from the tiny data area pointer.
4369
 
4370
 -- : BFD_RELOC_V850_TDA_4_5_OFFSET
4371
     This is a 5 bit offset (of which only 4 bits are used) from the
4372
     tiny data area pointer.
4373
 
4374
 -- : BFD_RELOC_V850_TDA_4_4_OFFSET
4375
     This is a 4 bit offset from the tiny data area pointer.
4376
 
4377
 -- : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
4378
     This is a 16 bit offset from the short data area pointer, with the
4379
     bits placed non-contiguously in the instruction.
4380
 
4381
 -- : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
4382
     This is a 16 bit offset from the zero data area pointer, with the
4383
     bits placed non-contiguously in the instruction.
4384
 
4385
 -- : BFD_RELOC_V850_CALLT_6_7_OFFSET
4386
     This is a 6 bit offset from the call table base pointer.
4387
 
4388
 -- : BFD_RELOC_V850_CALLT_16_16_OFFSET
4389
     This is a 16 bit offset from the call table base pointer.
4390
 
4391
 -- : BFD_RELOC_V850_LONGCALL
4392
     Used for relaxing indirect function calls.
4393
 
4394
 -- : BFD_RELOC_V850_LONGJUMP
4395
     Used for relaxing indirect jumps.
4396
 
4397
 -- : BFD_RELOC_V850_ALIGN
4398
     Used to maintain alignment whilst relaxing.
4399
 
4400
 -- : BFD_RELOC_V850_LO16_SPLIT_OFFSET
4401
     This is a variation of BFD_RELOC_LO16 that can be used in v850e
4402
     ld.bu instructions.
4403
 
4404
 -- : BFD_RELOC_MN10300_32_PCREL
4405
     This is a 32bit pcrel reloc for the mn10300, offset by two bytes
4406
     in the instruction.
4407
 
4408
 -- : BFD_RELOC_MN10300_16_PCREL
4409
     This is a 16bit pcrel reloc for the mn10300, offset by two bytes
4410
     in the instruction.
4411
 
4412
 -- : BFD_RELOC_TIC30_LDP
4413
     This is a 8bit DP reloc for the tms320c30, where the most
4414
     significant 8 bits of a 24 bit word are placed into the least
4415
     significant 8 bits of the opcode.
4416
 
4417
 -- : BFD_RELOC_TIC54X_PARTLS7
4418
     This is a 7bit reloc for the tms320c54x, where the least
4419
     significant 7 bits of a 16 bit word are placed into the least
4420
     significant 7 bits of the opcode.
4421
 
4422
 -- : BFD_RELOC_TIC54X_PARTMS9
4423
     This is a 9bit DP reloc for the tms320c54x, where the most
4424
     significant 9 bits of a 16 bit word are placed into the least
4425
     significant 9 bits of the opcode.
4426
 
4427
 -- : BFD_RELOC_TIC54X_23
4428
     This is an extended address 23-bit reloc for the tms320c54x.
4429
 
4430
 -- : BFD_RELOC_TIC54X_16_OF_23
4431
     This is a 16-bit reloc for the tms320c54x, where the least
4432
     significant 16 bits of a 23-bit extended address are placed into
4433
     the opcode.
4434
 
4435
 -- : BFD_RELOC_TIC54X_MS7_OF_23
4436
     This is a reloc for the tms320c54x, where the most significant 7
4437
     bits of a 23-bit extended address are placed into the opcode.
4438
 
4439
 -- : BFD_RELOC_FR30_48
4440
     This is a 48 bit reloc for the FR30 that stores 32 bits.
4441
 
4442
 -- : BFD_RELOC_FR30_20
4443
     This is a 32 bit reloc for the FR30 that stores 20 bits split up
4444
     into two sections.
4445
 
4446
 -- : BFD_RELOC_FR30_6_IN_4
4447
     This is a 16 bit reloc for the FR30 that stores a 6 bit word
4448
     offset in 4 bits.
4449
 
4450
 -- : BFD_RELOC_FR30_8_IN_8
4451
     This is a 16 bit reloc for the FR30 that stores an 8 bit byte
4452
     offset into 8 bits.
4453
 
4454
 -- : BFD_RELOC_FR30_9_IN_8
4455
     This is a 16 bit reloc for the FR30 that stores a 9 bit short
4456
     offset into 8 bits.
4457
 
4458
 -- : BFD_RELOC_FR30_10_IN_8
4459
     This is a 16 bit reloc for the FR30 that stores a 10 bit word
4460
     offset into 8 bits.
4461
 
4462
 -- : BFD_RELOC_FR30_9_PCREL
4463
     This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
4464
     short offset into 8 bits.
4465
 
4466
 -- : BFD_RELOC_FR30_12_PCREL
4467
     This is a 16 bit reloc for the FR30 that stores a 12 bit pc
4468
     relative short offset into 11 bits.
4469
 
4470
 -- : BFD_RELOC_MCORE_PCREL_IMM8BY4
4471
 -- : BFD_RELOC_MCORE_PCREL_IMM11BY2
4472
 -- : BFD_RELOC_MCORE_PCREL_IMM4BY2
4473
 -- : BFD_RELOC_MCORE_PCREL_32
4474
 -- : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
4475
 -- : BFD_RELOC_MCORE_RVA
4476
     Motorola Mcore relocations.
4477
 
4478
 -- : BFD_RELOC_MEP_8
4479
 -- : BFD_RELOC_MEP_16
4480
 -- : BFD_RELOC_MEP_32
4481
 -- : BFD_RELOC_MEP_PCREL8A2
4482
 -- : BFD_RELOC_MEP_PCREL12A2
4483
 -- : BFD_RELOC_MEP_PCREL17A2
4484
 -- : BFD_RELOC_MEP_PCREL24A2
4485
 -- : BFD_RELOC_MEP_PCABS24A2
4486
 -- : BFD_RELOC_MEP_LOW16
4487
 -- : BFD_RELOC_MEP_HI16U
4488
 -- : BFD_RELOC_MEP_HI16S
4489
 -- : BFD_RELOC_MEP_GPREL
4490
 -- : BFD_RELOC_MEP_TPREL
4491
 -- : BFD_RELOC_MEP_TPREL7
4492
 -- : BFD_RELOC_MEP_TPREL7A2
4493
 -- : BFD_RELOC_MEP_TPREL7A4
4494
 -- : BFD_RELOC_MEP_UIMM24
4495
 -- : BFD_RELOC_MEP_ADDR24A4
4496
 -- : BFD_RELOC_MEP_GNU_VTINHERIT
4497
 -- : BFD_RELOC_MEP_GNU_VTENTRY
4498
     Toshiba Media Processor Relocations.
4499
 
4500
 -- : BFD_RELOC_MMIX_GETA
4501
 -- : BFD_RELOC_MMIX_GETA_1
4502
 -- : BFD_RELOC_MMIX_GETA_2
4503
 -- : BFD_RELOC_MMIX_GETA_3
4504
     These are relocations for the GETA instruction.
4505
 
4506
 -- : BFD_RELOC_MMIX_CBRANCH
4507
 -- : BFD_RELOC_MMIX_CBRANCH_J
4508
 -- : BFD_RELOC_MMIX_CBRANCH_1
4509
 -- : BFD_RELOC_MMIX_CBRANCH_2
4510
 -- : BFD_RELOC_MMIX_CBRANCH_3
4511
     These are relocations for a conditional branch instruction.
4512
 
4513
 -- : BFD_RELOC_MMIX_PUSHJ
4514
 -- : BFD_RELOC_MMIX_PUSHJ_1
4515
 -- : BFD_RELOC_MMIX_PUSHJ_2
4516
 -- : BFD_RELOC_MMIX_PUSHJ_3
4517
 -- : BFD_RELOC_MMIX_PUSHJ_STUBBABLE
4518
     These are relocations for the PUSHJ instruction.
4519
 
4520
 -- : BFD_RELOC_MMIX_JMP
4521
 -- : BFD_RELOC_MMIX_JMP_1
4522
 -- : BFD_RELOC_MMIX_JMP_2
4523
 -- : BFD_RELOC_MMIX_JMP_3
4524
     These are relocations for the JMP instruction.
4525
 
4526
 -- : BFD_RELOC_MMIX_ADDR19
4527
     This is a relocation for a relative address as in a GETA
4528
     instruction or a branch.
4529
 
4530
 -- : BFD_RELOC_MMIX_ADDR27
4531
     This is a relocation for a relative address as in a JMP
4532
     instruction.
4533
 
4534
 -- : BFD_RELOC_MMIX_REG_OR_BYTE
4535
     This is a relocation for an instruction field that may be a general
4536
     register or a value 0..255.
4537
 
4538
 -- : BFD_RELOC_MMIX_REG
4539
     This is a relocation for an instruction field that may be a general
4540
     register.
4541
 
4542
 -- : BFD_RELOC_MMIX_BASE_PLUS_OFFSET
4543
     This is a relocation for two instruction fields holding a register
4544
     and an offset, the equivalent of the relocation.
4545
 
4546
 -- : BFD_RELOC_MMIX_LOCAL
4547
     This relocation is an assertion that the expression is not
4548
     allocated as a global register.  It does not modify contents.
4549
 
4550
 -- : BFD_RELOC_AVR_7_PCREL
4551
     This is a 16 bit reloc for the AVR that stores 8 bit pc relative
4552
     short offset into 7 bits.
4553
 
4554
 -- : BFD_RELOC_AVR_13_PCREL
4555
     This is a 16 bit reloc for the AVR that stores 13 bit pc relative
4556
     short offset into 12 bits.
4557
 
4558
 -- : BFD_RELOC_AVR_16_PM
4559
     This is a 16 bit reloc for the AVR that stores 17 bit value
4560
     (usually program memory address) into 16 bits.
4561
 
4562
 -- : BFD_RELOC_AVR_LO8_LDI
4563
     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4564
     data memory address) into 8 bit immediate value of LDI insn.
4565
 
4566
 -- : BFD_RELOC_AVR_HI8_LDI
4567
     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
4568
     bit of data memory address) into 8 bit immediate value of LDI insn.
4569
 
4570
 -- : BFD_RELOC_AVR_HH8_LDI
4571
     This is a 16 bit reloc for the AVR that stores 8 bit value (most
4572
     high 8 bit of program memory address) into 8 bit immediate value
4573
     of LDI insn.
4574
 
4575
 -- : BFD_RELOC_AVR_MS8_LDI
4576
     This is a 16 bit reloc for the AVR that stores 8 bit value (most
4577
     high 8 bit of 32 bit value) into 8 bit immediate value of LDI insn.
4578
 
4579
 -- : BFD_RELOC_AVR_LO8_LDI_NEG
4580
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4581
     (usually data memory address) into 8 bit immediate value of SUBI
4582
     insn.
4583
 
4584
 -- : BFD_RELOC_AVR_HI8_LDI_NEG
4585
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4586
     (high 8 bit of data memory address) into 8 bit immediate value of
4587
     SUBI insn.
4588
 
4589
 -- : BFD_RELOC_AVR_HH8_LDI_NEG
4590
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4591
     (most high 8 bit of program memory address) into 8 bit immediate
4592
     value of LDI or SUBI insn.
4593
 
4594
 -- : BFD_RELOC_AVR_MS8_LDI_NEG
4595
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4596
     (msb of 32 bit value) into 8 bit immediate value of LDI insn.
4597
 
4598
 -- : BFD_RELOC_AVR_LO8_LDI_PM
4599
     This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4600
     command address) into 8 bit immediate value of LDI insn.
4601
 
4602
 -- : BFD_RELOC_AVR_LO8_LDI_GS
4603
     This is a 16 bit reloc for the AVR that stores 8 bit value
4604
     (command address) into 8 bit immediate value of LDI insn. If the
4605
     address is beyond the 128k boundary, the linker inserts a jump
4606
     stub for this reloc in the lower 128k.
4607
 
4608
 -- : BFD_RELOC_AVR_HI8_LDI_PM
4609
     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
4610
     bit of command address) into 8 bit immediate value of LDI insn.
4611
 
4612
 -- : BFD_RELOC_AVR_HI8_LDI_GS
4613
     This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
4614
     bit of command address) into 8 bit immediate value of LDI insn.
4615
     If the address is beyond the 128k boundary, the linker inserts a
4616
     jump stub for this reloc below 128k.
4617
 
4618
 -- : BFD_RELOC_AVR_HH8_LDI_PM
4619
     This is a 16 bit reloc for the AVR that stores 8 bit value (most
4620
     high 8 bit of command address) into 8 bit immediate value of LDI
4621
     insn.
4622
 
4623
 -- : BFD_RELOC_AVR_LO8_LDI_PM_NEG
4624
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4625
     (usually command address) into 8 bit immediate value of SUBI insn.
4626
 
4627
 -- : BFD_RELOC_AVR_HI8_LDI_PM_NEG
4628
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4629
     (high 8 bit of 16 bit command address) into 8 bit immediate value
4630
     of SUBI insn.
4631
 
4632
 -- : BFD_RELOC_AVR_HH8_LDI_PM_NEG
4633
     This is a 16 bit reloc for the AVR that stores negated 8 bit value
4634
     (high 6 bit of 22 bit command address) into 8 bit immediate value
4635
     of SUBI insn.
4636
 
4637
 -- : BFD_RELOC_AVR_CALL
4638
     This is a 32 bit reloc for the AVR that stores 23 bit value into
4639
     22 bits.
4640
 
4641
 -- : BFD_RELOC_AVR_LDI
4642
     This is a 16 bit reloc for the AVR that stores all needed bits for
4643
     absolute addressing with ldi with overflow check to linktime
4644
 
4645
 -- : BFD_RELOC_AVR_6
4646
     This is a 6 bit reloc for the AVR that stores offset for ldd/std
4647
     instructions
4648
 
4649
 -- : BFD_RELOC_AVR_6_ADIW
4650
     This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
4651
     instructions
4652
 
4653
 -- : BFD_RELOC_390_12
4654
     Direct 12 bit.
4655
 
4656
 -- : BFD_RELOC_390_GOT12
4657
     12 bit GOT offset.
4658
 
4659
 -- : BFD_RELOC_390_PLT32
4660
     32 bit PC relative PLT address.
4661
 
4662
 -- : BFD_RELOC_390_COPY
4663
     Copy symbol at runtime.
4664
 
4665
 -- : BFD_RELOC_390_GLOB_DAT
4666
     Create GOT entry.
4667
 
4668
 -- : BFD_RELOC_390_JMP_SLOT
4669
     Create PLT entry.
4670
 
4671
 -- : BFD_RELOC_390_RELATIVE
4672
     Adjust by program base.
4673
 
4674
 -- : BFD_RELOC_390_GOTPC
4675
     32 bit PC relative offset to GOT.
4676
 
4677
 -- : BFD_RELOC_390_GOT16
4678
     16 bit GOT offset.
4679
 
4680
 -- : BFD_RELOC_390_PC16DBL
4681
     PC relative 16 bit shifted by 1.
4682
 
4683
 -- : BFD_RELOC_390_PLT16DBL
4684
     16 bit PC rel. PLT shifted by 1.
4685
 
4686
 -- : BFD_RELOC_390_PC32DBL
4687
     PC relative 32 bit shifted by 1.
4688
 
4689
 -- : BFD_RELOC_390_PLT32DBL
4690
     32 bit PC rel. PLT shifted by 1.
4691
 
4692
 -- : BFD_RELOC_390_GOTPCDBL
4693
     32 bit PC rel. GOT shifted by 1.
4694
 
4695
 -- : BFD_RELOC_390_GOT64
4696
     64 bit GOT offset.
4697
 
4698
 -- : BFD_RELOC_390_PLT64
4699
     64 bit PC relative PLT address.
4700
 
4701
 -- : BFD_RELOC_390_GOTENT
4702
     32 bit rel. offset to GOT entry.
4703
 
4704
 -- : BFD_RELOC_390_GOTOFF64
4705
     64 bit offset to GOT.
4706
 
4707
 -- : BFD_RELOC_390_GOTPLT12
4708
     12-bit offset to symbol-entry within GOT, with PLT handling.
4709
 
4710
 -- : BFD_RELOC_390_GOTPLT16
4711
     16-bit offset to symbol-entry within GOT, with PLT handling.
4712
 
4713
 -- : BFD_RELOC_390_GOTPLT32
4714
     32-bit offset to symbol-entry within GOT, with PLT handling.
4715
 
4716
 -- : BFD_RELOC_390_GOTPLT64
4717
     64-bit offset to symbol-entry within GOT, with PLT handling.
4718
 
4719
 -- : BFD_RELOC_390_GOTPLTENT
4720
     32-bit rel. offset to symbol-entry within GOT, with PLT handling.
4721
 
4722
 -- : BFD_RELOC_390_PLTOFF16
4723
     16-bit rel. offset from the GOT to a PLT entry.
4724
 
4725
 -- : BFD_RELOC_390_PLTOFF32
4726
     32-bit rel. offset from the GOT to a PLT entry.
4727
 
4728
 -- : BFD_RELOC_390_PLTOFF64
4729
     64-bit rel. offset from the GOT to a PLT entry.
4730
 
4731
 -- : BFD_RELOC_390_TLS_LOAD
4732
 -- : BFD_RELOC_390_TLS_GDCALL
4733
 -- : BFD_RELOC_390_TLS_LDCALL
4734
 -- : BFD_RELOC_390_TLS_GD32
4735
 -- : BFD_RELOC_390_TLS_GD64
4736
 -- : BFD_RELOC_390_TLS_GOTIE12
4737
 -- : BFD_RELOC_390_TLS_GOTIE32
4738
 -- : BFD_RELOC_390_TLS_GOTIE64
4739
 -- : BFD_RELOC_390_TLS_LDM32
4740
 -- : BFD_RELOC_390_TLS_LDM64
4741
 -- : BFD_RELOC_390_TLS_IE32
4742
 -- : BFD_RELOC_390_TLS_IE64
4743
 -- : BFD_RELOC_390_TLS_IEENT
4744
 -- : BFD_RELOC_390_TLS_LE32
4745
 -- : BFD_RELOC_390_TLS_LE64
4746
 -- : BFD_RELOC_390_TLS_LDO32
4747
 -- : BFD_RELOC_390_TLS_LDO64
4748
 -- : BFD_RELOC_390_TLS_DTPMOD
4749
 -- : BFD_RELOC_390_TLS_DTPOFF
4750
 -- : BFD_RELOC_390_TLS_TPOFF
4751
     s390 tls relocations.
4752
 
4753
 -- : BFD_RELOC_390_20
4754
 -- : BFD_RELOC_390_GOT20
4755
 -- : BFD_RELOC_390_GOTPLT20
4756
 -- : BFD_RELOC_390_TLS_GOTIE20
4757
     Long displacement extension.
4758
 
4759
 -- : BFD_RELOC_SCORE_DUMMY1
4760
     Score relocations
4761
 
4762
 -- : BFD_RELOC_SCORE_GPREL15
4763
     Low 16 bit for load/store
4764
 
4765
 -- : BFD_RELOC_SCORE_DUMMY2
4766
 -- : BFD_RELOC_SCORE_JMP
4767
     This is a 24-bit reloc with the right 1 bit assumed to be 0
4768
 
4769
 -- : BFD_RELOC_SCORE_BRANCH
4770
     This is a 19-bit reloc with the right 1 bit assumed to be 0
4771
 
4772
 -- : BFD_RELOC_SCORE16_JMP
4773
     This is a 11-bit reloc with the right 1 bit assumed to be 0
4774
 
4775
 -- : BFD_RELOC_SCORE16_BRANCH
4776
     This is a 8-bit reloc with the right 1 bit assumed to be 0
4777
 
4778
 -- : BFD_RELOC_SCORE_GOT15
4779
 -- : BFD_RELOC_SCORE_GOT_LO16
4780
 -- : BFD_RELOC_SCORE_CALL15
4781
 -- : BFD_RELOC_SCORE_DUMMY_HI16
4782
     Undocumented Score relocs
4783
 
4784
 -- : BFD_RELOC_IP2K_FR9
4785
     Scenix IP2K - 9-bit register number / data address
4786
 
4787
 -- : BFD_RELOC_IP2K_BANK
4788
     Scenix IP2K - 4-bit register/data bank number
4789
 
4790
 -- : BFD_RELOC_IP2K_ADDR16CJP
4791
     Scenix IP2K - low 13 bits of instruction word address
4792
 
4793
 -- : BFD_RELOC_IP2K_PAGE3
4794
     Scenix IP2K - high 3 bits of instruction word address
4795
 
4796
 -- : BFD_RELOC_IP2K_LO8DATA
4797
 -- : BFD_RELOC_IP2K_HI8DATA
4798
 -- : BFD_RELOC_IP2K_EX8DATA
4799
     Scenix IP2K - ext/low/high 8 bits of data address
4800
 
4801
 -- : BFD_RELOC_IP2K_LO8INSN
4802
 -- : BFD_RELOC_IP2K_HI8INSN
4803
     Scenix IP2K - low/high 8 bits of instruction word address
4804
 
4805
 -- : BFD_RELOC_IP2K_PC_SKIP
4806
     Scenix IP2K - even/odd PC modifier to modify snb pcl.0
4807
 
4808
 -- : BFD_RELOC_IP2K_TEXT
4809
     Scenix IP2K - 16 bit word address in text section.
4810
 
4811
 -- : BFD_RELOC_IP2K_FR_OFFSET
4812
     Scenix IP2K - 7-bit sp or dp offset
4813
 
4814
 -- : BFD_RELOC_VPE4KMATH_DATA
4815
 -- : BFD_RELOC_VPE4KMATH_INSN
4816
     Scenix VPE4K coprocessor - data/insn-space addressing
4817
 
4818
 -- : BFD_RELOC_VTABLE_INHERIT
4819
 -- : BFD_RELOC_VTABLE_ENTRY
4820
     These two relocations are used by the linker to determine which of
4821
     the entries in a C++ virtual function table are actually used.
4822
     When the -gc-sections option is given, the linker will zero out
4823
     the entries that are not used, so that the code for those
4824
     functions need not be included in the output.
4825
 
4826
     VTABLE_INHERIT is a zero-space relocation used to describe to the
4827
     linker the inheritance tree of a C++ virtual function table.  The
4828
     relocation's symbol should be the parent class' vtable, and the
4829
     relocation should be located at the child vtable.
4830
 
4831
     VTABLE_ENTRY is a zero-space relocation that describes the use of a
4832
     virtual function table entry.  The reloc's symbol should refer to
4833
     the table of the class mentioned in the code.  Off of that base,
4834
     an offset describes the entry that is being used.  For Rela hosts,
4835
     this offset is stored in the reloc's addend.  For Rel hosts, we
4836
     are forced to put this offset in the reloc's section offset.
4837
 
4838
 -- : BFD_RELOC_IA64_IMM14
4839
 -- : BFD_RELOC_IA64_IMM22
4840
 -- : BFD_RELOC_IA64_IMM64
4841
 -- : BFD_RELOC_IA64_DIR32MSB
4842
 -- : BFD_RELOC_IA64_DIR32LSB
4843
 -- : BFD_RELOC_IA64_DIR64MSB
4844
 -- : BFD_RELOC_IA64_DIR64LSB
4845
 -- : BFD_RELOC_IA64_GPREL22
4846
 -- : BFD_RELOC_IA64_GPREL64I
4847
 -- : BFD_RELOC_IA64_GPREL32MSB
4848
 -- : BFD_RELOC_IA64_GPREL32LSB
4849
 -- : BFD_RELOC_IA64_GPREL64MSB
4850
 -- : BFD_RELOC_IA64_GPREL64LSB
4851
 -- : BFD_RELOC_IA64_LTOFF22
4852
 -- : BFD_RELOC_IA64_LTOFF64I
4853
 -- : BFD_RELOC_IA64_PLTOFF22
4854
 -- : BFD_RELOC_IA64_PLTOFF64I
4855
 -- : BFD_RELOC_IA64_PLTOFF64MSB
4856
 -- : BFD_RELOC_IA64_PLTOFF64LSB
4857
 -- : BFD_RELOC_IA64_FPTR64I
4858
 -- : BFD_RELOC_IA64_FPTR32MSB
4859
 -- : BFD_RELOC_IA64_FPTR32LSB
4860
 -- : BFD_RELOC_IA64_FPTR64MSB
4861
 -- : BFD_RELOC_IA64_FPTR64LSB
4862
 -- : BFD_RELOC_IA64_PCREL21B
4863
 -- : BFD_RELOC_IA64_PCREL21BI
4864
 -- : BFD_RELOC_IA64_PCREL21M
4865
 -- : BFD_RELOC_IA64_PCREL21F
4866
 -- : BFD_RELOC_IA64_PCREL22
4867
 -- : BFD_RELOC_IA64_PCREL60B
4868
 -- : BFD_RELOC_IA64_PCREL64I
4869
 -- : BFD_RELOC_IA64_PCREL32MSB
4870
 -- : BFD_RELOC_IA64_PCREL32LSB
4871
 -- : BFD_RELOC_IA64_PCREL64MSB
4872
 -- : BFD_RELOC_IA64_PCREL64LSB
4873
 -- : BFD_RELOC_IA64_LTOFF_FPTR22
4874
 -- : BFD_RELOC_IA64_LTOFF_FPTR64I
4875
 -- : BFD_RELOC_IA64_LTOFF_FPTR32MSB
4876
 -- : BFD_RELOC_IA64_LTOFF_FPTR32LSB
4877
 -- : BFD_RELOC_IA64_LTOFF_FPTR64MSB
4878
 -- : BFD_RELOC_IA64_LTOFF_FPTR64LSB
4879
 -- : BFD_RELOC_IA64_SEGREL32MSB
4880
 -- : BFD_RELOC_IA64_SEGREL32LSB
4881
 -- : BFD_RELOC_IA64_SEGREL64MSB
4882
 -- : BFD_RELOC_IA64_SEGREL64LSB
4883
 -- : BFD_RELOC_IA64_SECREL32MSB
4884
 -- : BFD_RELOC_IA64_SECREL32LSB
4885
 -- : BFD_RELOC_IA64_SECREL64MSB
4886
 -- : BFD_RELOC_IA64_SECREL64LSB
4887
 -- : BFD_RELOC_IA64_REL32MSB
4888
 -- : BFD_RELOC_IA64_REL32LSB
4889
 -- : BFD_RELOC_IA64_REL64MSB
4890
 -- : BFD_RELOC_IA64_REL64LSB
4891
 -- : BFD_RELOC_IA64_LTV32MSB
4892
 -- : BFD_RELOC_IA64_LTV32LSB
4893
 -- : BFD_RELOC_IA64_LTV64MSB
4894
 -- : BFD_RELOC_IA64_LTV64LSB
4895
 -- : BFD_RELOC_IA64_IPLTMSB
4896
 -- : BFD_RELOC_IA64_IPLTLSB
4897
 -- : BFD_RELOC_IA64_COPY
4898
 -- : BFD_RELOC_IA64_LTOFF22X
4899
 -- : BFD_RELOC_IA64_LDXMOV
4900
 -- : BFD_RELOC_IA64_TPREL14
4901
 -- : BFD_RELOC_IA64_TPREL22
4902
 -- : BFD_RELOC_IA64_TPREL64I
4903
 -- : BFD_RELOC_IA64_TPREL64MSB
4904
 -- : BFD_RELOC_IA64_TPREL64LSB
4905
 -- : BFD_RELOC_IA64_LTOFF_TPREL22
4906
 -- : BFD_RELOC_IA64_DTPMOD64MSB
4907
 -- : BFD_RELOC_IA64_DTPMOD64LSB
4908
 -- : BFD_RELOC_IA64_LTOFF_DTPMOD22
4909
 -- : BFD_RELOC_IA64_DTPREL14
4910
 -- : BFD_RELOC_IA64_DTPREL22
4911
 -- : BFD_RELOC_IA64_DTPREL64I
4912
 -- : BFD_RELOC_IA64_DTPREL32MSB
4913
 -- : BFD_RELOC_IA64_DTPREL32LSB
4914
 -- : BFD_RELOC_IA64_DTPREL64MSB
4915
 -- : BFD_RELOC_IA64_DTPREL64LSB
4916
 -- : BFD_RELOC_IA64_LTOFF_DTPREL22
4917
     Intel IA64 Relocations.
4918
 
4919
 -- : BFD_RELOC_M68HC11_HI8
4920
     Motorola 68HC11 reloc.  This is the 8 bit high part of an absolute
4921
     address.
4922
 
4923
 -- : BFD_RELOC_M68HC11_LO8
4924
     Motorola 68HC11 reloc.  This is the 8 bit low part of an absolute
4925
     address.
4926
 
4927
 -- : BFD_RELOC_M68HC11_3B
4928
     Motorola 68HC11 reloc.  This is the 3 bit of a value.
4929
 
4930
 -- : BFD_RELOC_M68HC11_RL_JUMP
4931
     Motorola 68HC11 reloc.  This reloc marks the beginning of a
4932
     jump/call instruction.  It is used for linker relaxation to
4933
     correctly identify beginning of instruction and change some
4934
     branches to use PC-relative addressing mode.
4935
 
4936
 -- : BFD_RELOC_M68HC11_RL_GROUP
4937
     Motorola 68HC11 reloc.  This reloc marks a group of several
4938
     instructions that gcc generates and for which the linker
4939
     relaxation pass can modify and/or remove some of them.
4940
 
4941
 -- : BFD_RELOC_M68HC11_LO16
4942
     Motorola 68HC11 reloc.  This is the 16-bit lower part of an
4943
     address.  It is used for 'call' instruction to specify the symbol
4944
     address without any special transformation (due to memory bank
4945
     window).
4946
 
4947
 -- : BFD_RELOC_M68HC11_PAGE
4948
     Motorola 68HC11 reloc.  This is a 8-bit reloc that specifies the
4949
     page number of an address.  It is used by 'call' instruction to
4950
     specify the page number of the symbol.
4951
 
4952
 -- : BFD_RELOC_M68HC11_24
4953
     Motorola 68HC11 reloc.  This is a 24-bit reloc that represents the
4954
     address with a 16-bit value and a 8-bit page number.  The symbol
4955
     address is transformed to follow the 16K memory bank of 68HC12
4956
     (seen as mapped in the window).
4957
 
4958
 -- : BFD_RELOC_M68HC12_5B
4959
     Motorola 68HC12 reloc.  This is the 5 bits of a value.
4960
 
4961
 -- : BFD_RELOC_16C_NUM08
4962
 -- : BFD_RELOC_16C_NUM08_C
4963
 -- : BFD_RELOC_16C_NUM16
4964
 -- : BFD_RELOC_16C_NUM16_C
4965
 -- : BFD_RELOC_16C_NUM32
4966
 -- : BFD_RELOC_16C_NUM32_C
4967
 -- : BFD_RELOC_16C_DISP04
4968
 -- : BFD_RELOC_16C_DISP04_C
4969
 -- : BFD_RELOC_16C_DISP08
4970
 -- : BFD_RELOC_16C_DISP08_C
4971
 -- : BFD_RELOC_16C_DISP16
4972
 -- : BFD_RELOC_16C_DISP16_C
4973
 -- : BFD_RELOC_16C_DISP24
4974
 -- : BFD_RELOC_16C_DISP24_C
4975
 -- : BFD_RELOC_16C_DISP24a
4976
 -- : BFD_RELOC_16C_DISP24a_C
4977
 -- : BFD_RELOC_16C_REG04
4978
 -- : BFD_RELOC_16C_REG04_C
4979
 -- : BFD_RELOC_16C_REG04a
4980
 -- : BFD_RELOC_16C_REG04a_C
4981
 -- : BFD_RELOC_16C_REG14
4982
 -- : BFD_RELOC_16C_REG14_C
4983
 -- : BFD_RELOC_16C_REG16
4984
 -- : BFD_RELOC_16C_REG16_C
4985
 -- : BFD_RELOC_16C_REG20
4986
 -- : BFD_RELOC_16C_REG20_C
4987
 -- : BFD_RELOC_16C_ABS20
4988
 -- : BFD_RELOC_16C_ABS20_C
4989
 -- : BFD_RELOC_16C_ABS24
4990
 -- : BFD_RELOC_16C_ABS24_C
4991
 -- : BFD_RELOC_16C_IMM04
4992
 -- : BFD_RELOC_16C_IMM04_C
4993
 -- : BFD_RELOC_16C_IMM16
4994
 -- : BFD_RELOC_16C_IMM16_C
4995
 -- : BFD_RELOC_16C_IMM20
4996
 -- : BFD_RELOC_16C_IMM20_C
4997
 -- : BFD_RELOC_16C_IMM24
4998
 -- : BFD_RELOC_16C_IMM24_C
4999
 -- : BFD_RELOC_16C_IMM32
5000
 -- : BFD_RELOC_16C_IMM32_C
5001
     NS CR16C Relocations.
5002
 
5003
 -- : BFD_RELOC_CR16_NUM8
5004
 -- : BFD_RELOC_CR16_NUM16
5005
 -- : BFD_RELOC_CR16_NUM32
5006
 -- : BFD_RELOC_CR16_NUM32a
5007
 -- : BFD_RELOC_CR16_REGREL0
5008
 -- : BFD_RELOC_CR16_REGREL4
5009
 -- : BFD_RELOC_CR16_REGREL4a
5010
 -- : BFD_RELOC_CR16_REGREL14
5011
 -- : BFD_RELOC_CR16_REGREL14a
5012
 -- : BFD_RELOC_CR16_REGREL16
5013
 -- : BFD_RELOC_CR16_REGREL20
5014
 -- : BFD_RELOC_CR16_REGREL20a
5015
 -- : BFD_RELOC_CR16_ABS20
5016
 -- : BFD_RELOC_CR16_ABS24
5017
 -- : BFD_RELOC_CR16_IMM4
5018
 -- : BFD_RELOC_CR16_IMM8
5019
 -- : BFD_RELOC_CR16_IMM16
5020
 -- : BFD_RELOC_CR16_IMM20
5021
 -- : BFD_RELOC_CR16_IMM24
5022
 -- : BFD_RELOC_CR16_IMM32
5023
 -- : BFD_RELOC_CR16_IMM32a
5024
 -- : BFD_RELOC_CR16_DISP4
5025
 -- : BFD_RELOC_CR16_DISP8
5026
 -- : BFD_RELOC_CR16_DISP16
5027
 -- : BFD_RELOC_CR16_DISP20
5028
 -- : BFD_RELOC_CR16_DISP24
5029
 -- : BFD_RELOC_CR16_DISP24a
5030
 -- : BFD_RELOC_CR16_SWITCH8
5031
 -- : BFD_RELOC_CR16_SWITCH16
5032
 -- : BFD_RELOC_CR16_SWITCH32
5033
     NS CR16 Relocations.
5034
 
5035
 -- : BFD_RELOC_CRX_REL4
5036
 -- : BFD_RELOC_CRX_REL8
5037
 -- : BFD_RELOC_CRX_REL8_CMP
5038
 -- : BFD_RELOC_CRX_REL16
5039
 -- : BFD_RELOC_CRX_REL24
5040
 -- : BFD_RELOC_CRX_REL32
5041
 -- : BFD_RELOC_CRX_REGREL12
5042
 -- : BFD_RELOC_CRX_REGREL22
5043
 -- : BFD_RELOC_CRX_REGREL28
5044
 -- : BFD_RELOC_CRX_REGREL32
5045
 -- : BFD_RELOC_CRX_ABS16
5046
 -- : BFD_RELOC_CRX_ABS32
5047
 -- : BFD_RELOC_CRX_NUM8
5048
 -- : BFD_RELOC_CRX_NUM16
5049
 -- : BFD_RELOC_CRX_NUM32
5050
 -- : BFD_RELOC_CRX_IMM16
5051
 -- : BFD_RELOC_CRX_IMM32
5052
 -- : BFD_RELOC_CRX_SWITCH8
5053
 -- : BFD_RELOC_CRX_SWITCH16
5054
 -- : BFD_RELOC_CRX_SWITCH32
5055
     NS CRX Relocations.
5056
 
5057
 -- : BFD_RELOC_CRIS_BDISP8
5058
 -- : BFD_RELOC_CRIS_UNSIGNED_5
5059
 -- : BFD_RELOC_CRIS_SIGNED_6
5060
 -- : BFD_RELOC_CRIS_UNSIGNED_6
5061
 -- : BFD_RELOC_CRIS_SIGNED_8
5062
 -- : BFD_RELOC_CRIS_UNSIGNED_8
5063
 -- : BFD_RELOC_CRIS_SIGNED_16
5064
 -- : BFD_RELOC_CRIS_UNSIGNED_16
5065
 -- : BFD_RELOC_CRIS_LAPCQ_OFFSET
5066
 -- : BFD_RELOC_CRIS_UNSIGNED_4
5067
     These relocs are only used within the CRIS assembler.  They are not
5068
     (at present) written to any object files.
5069
 
5070
 -- : BFD_RELOC_CRIS_COPY
5071
 -- : BFD_RELOC_CRIS_GLOB_DAT
5072
 -- : BFD_RELOC_CRIS_JUMP_SLOT
5073
 -- : BFD_RELOC_CRIS_RELATIVE
5074
     Relocs used in ELF shared libraries for CRIS.
5075
 
5076
 -- : BFD_RELOC_CRIS_32_GOT
5077
     32-bit offset to symbol-entry within GOT.
5078
 
5079
 -- : BFD_RELOC_CRIS_16_GOT
5080
     16-bit offset to symbol-entry within GOT.
5081
 
5082
 -- : BFD_RELOC_CRIS_32_GOTPLT
5083
     32-bit offset to symbol-entry within GOT, with PLT handling.
5084
 
5085
 -- : BFD_RELOC_CRIS_16_GOTPLT
5086
     16-bit offset to symbol-entry within GOT, with PLT handling.
5087
 
5088
 -- : BFD_RELOC_CRIS_32_GOTREL
5089
     32-bit offset to symbol, relative to GOT.
5090
 
5091
 -- : BFD_RELOC_CRIS_32_PLT_GOTREL
5092
     32-bit offset to symbol with PLT entry, relative to GOT.
5093
 
5094
 -- : BFD_RELOC_CRIS_32_PLT_PCREL
5095
     32-bit offset to symbol with PLT entry, relative to this
5096
     relocation.
5097
 
5098
 -- : BFD_RELOC_860_COPY
5099
 -- : BFD_RELOC_860_GLOB_DAT
5100
 -- : BFD_RELOC_860_JUMP_SLOT
5101
 -- : BFD_RELOC_860_RELATIVE
5102
 -- : BFD_RELOC_860_PC26
5103
 -- : BFD_RELOC_860_PLT26
5104
 -- : BFD_RELOC_860_PC16
5105
 -- : BFD_RELOC_860_LOW0
5106
 -- : BFD_RELOC_860_SPLIT0
5107
 -- : BFD_RELOC_860_LOW1
5108
 -- : BFD_RELOC_860_SPLIT1
5109
 -- : BFD_RELOC_860_LOW2
5110
 -- : BFD_RELOC_860_SPLIT2
5111
 -- : BFD_RELOC_860_LOW3
5112
 -- : BFD_RELOC_860_LOGOT0
5113
 -- : BFD_RELOC_860_SPGOT0
5114
 -- : BFD_RELOC_860_LOGOT1
5115
 -- : BFD_RELOC_860_SPGOT1
5116
 -- : BFD_RELOC_860_LOGOTOFF0
5117
 -- : BFD_RELOC_860_SPGOTOFF0
5118
 -- : BFD_RELOC_860_LOGOTOFF1
5119
 -- : BFD_RELOC_860_SPGOTOFF1
5120
 -- : BFD_RELOC_860_LOGOTOFF2
5121
 -- : BFD_RELOC_860_LOGOTOFF3
5122
 -- : BFD_RELOC_860_LOPC
5123
 -- : BFD_RELOC_860_HIGHADJ
5124
 -- : BFD_RELOC_860_HAGOT
5125
 -- : BFD_RELOC_860_HAGOTOFF
5126
 -- : BFD_RELOC_860_HAPC
5127
 -- : BFD_RELOC_860_HIGH
5128
 -- : BFD_RELOC_860_HIGOT
5129
 -- : BFD_RELOC_860_HIGOTOFF
5130
     Intel i860 Relocations.
5131
 
5132
 -- : BFD_RELOC_OPENRISC_ABS_26
5133
 -- : BFD_RELOC_OPENRISC_REL_26
5134
     OpenRISC Relocations.
5135
 
5136
 -- : BFD_RELOC_H8_DIR16A8
5137
 -- : BFD_RELOC_H8_DIR16R8
5138
 -- : BFD_RELOC_H8_DIR24A8
5139
 -- : BFD_RELOC_H8_DIR24R8
5140
 -- : BFD_RELOC_H8_DIR32A16
5141
     H8 elf Relocations.
5142
 
5143
 -- : BFD_RELOC_XSTORMY16_REL_12
5144
 -- : BFD_RELOC_XSTORMY16_12
5145
 -- : BFD_RELOC_XSTORMY16_24
5146
 -- : BFD_RELOC_XSTORMY16_FPTR16
5147
     Sony Xstormy16 Relocations.
5148
 
5149
 -- : BFD_RELOC_RELC
5150
     Self-describing complex relocations.
5151
 
5152
 -- : BFD_RELOC_XC16X_PAG
5153
 -- : BFD_RELOC_XC16X_POF
5154
 -- : BFD_RELOC_XC16X_SEG
5155
 -- : BFD_RELOC_XC16X_SOF
5156
     Infineon Relocations.
5157
 
5158
 -- : BFD_RELOC_VAX_GLOB_DAT
5159
 -- : BFD_RELOC_VAX_JMP_SLOT
5160
 -- : BFD_RELOC_VAX_RELATIVE
5161
     Relocations used by VAX ELF.
5162
 
5163
 -- : BFD_RELOC_MT_PC16
5164
     Morpho MT - 16 bit immediate relocation.
5165
 
5166
 -- : BFD_RELOC_MT_HI16
5167
     Morpho MT - Hi 16 bits of an address.
5168
 
5169
 -- : BFD_RELOC_MT_LO16
5170
     Morpho MT - Low 16 bits of an address.
5171
 
5172
 -- : BFD_RELOC_MT_GNU_VTINHERIT
5173
     Morpho MT - Used to tell the linker which vtable entries are used.
5174
 
5175
 -- : BFD_RELOC_MT_GNU_VTENTRY
5176
     Morpho MT - Used to tell the linker which vtable entries are used.
5177
 
5178
 -- : BFD_RELOC_MT_PCINSN8
5179
     Morpho MT - 8 bit immediate relocation.
5180
 
5181
 -- : BFD_RELOC_MSP430_10_PCREL
5182
 -- : BFD_RELOC_MSP430_16_PCREL
5183
 -- : BFD_RELOC_MSP430_16
5184
 -- : BFD_RELOC_MSP430_16_PCREL_BYTE
5185
 -- : BFD_RELOC_MSP430_16_BYTE
5186
 -- : BFD_RELOC_MSP430_2X_PCREL
5187
 -- : BFD_RELOC_MSP430_RL_PCREL
5188
     msp430 specific relocation codes
5189
 
5190
 -- : BFD_RELOC_IQ2000_OFFSET_16
5191
 -- : BFD_RELOC_IQ2000_OFFSET_21
5192
 -- : BFD_RELOC_IQ2000_UHI16
5193
     IQ2000 Relocations.
5194
 
5195
 -- : BFD_RELOC_XTENSA_RTLD
5196
     Special Xtensa relocation used only by PLT entries in ELF shared
5197
     objects to indicate that the runtime linker should set the value
5198
     to one of its own internal functions or data structures.
5199
 
5200
 -- : BFD_RELOC_XTENSA_GLOB_DAT
5201
 -- : BFD_RELOC_XTENSA_JMP_SLOT
5202
 -- : BFD_RELOC_XTENSA_RELATIVE
5203
     Xtensa relocations for ELF shared objects.
5204
 
5205
 -- : BFD_RELOC_XTENSA_PLT
5206
     Xtensa relocation used in ELF object files for symbols that may
5207
     require PLT entries.  Otherwise, this is just a generic 32-bit
5208
     relocation.
5209
 
5210
 -- : BFD_RELOC_XTENSA_DIFF8
5211
 -- : BFD_RELOC_XTENSA_DIFF16
5212
 -- : BFD_RELOC_XTENSA_DIFF32
5213
     Xtensa relocations to mark the difference of two local symbols.
5214
     These are only needed to support linker relaxation and can be
5215
     ignored when not relaxing.  The field is set to the value of the
5216
     difference assuming no relaxation.  The relocation encodes the
5217
     position of the first symbol so the linker can determine whether
5218
     to adjust the field value.
5219
 
5220
 -- : BFD_RELOC_XTENSA_SLOT0_OP
5221
 -- : BFD_RELOC_XTENSA_SLOT1_OP
5222
 -- : BFD_RELOC_XTENSA_SLOT2_OP
5223
 -- : BFD_RELOC_XTENSA_SLOT3_OP
5224
 -- : BFD_RELOC_XTENSA_SLOT4_OP
5225
 -- : BFD_RELOC_XTENSA_SLOT5_OP
5226
 -- : BFD_RELOC_XTENSA_SLOT6_OP
5227
 -- : BFD_RELOC_XTENSA_SLOT7_OP
5228
 -- : BFD_RELOC_XTENSA_SLOT8_OP
5229
 -- : BFD_RELOC_XTENSA_SLOT9_OP
5230
 -- : BFD_RELOC_XTENSA_SLOT10_OP
5231
 -- : BFD_RELOC_XTENSA_SLOT11_OP
5232
 -- : BFD_RELOC_XTENSA_SLOT12_OP
5233
 -- : BFD_RELOC_XTENSA_SLOT13_OP
5234
 -- : BFD_RELOC_XTENSA_SLOT14_OP
5235
     Generic Xtensa relocations for instruction operands.  Only the slot
5236
     number is encoded in the relocation.  The relocation applies to the
5237
     last PC-relative immediate operand, or if there are no PC-relative
5238
     immediates, to the last immediate operand.
5239
 
5240
 -- : BFD_RELOC_XTENSA_SLOT0_ALT
5241
 -- : BFD_RELOC_XTENSA_SLOT1_ALT
5242
 -- : BFD_RELOC_XTENSA_SLOT2_ALT
5243
 -- : BFD_RELOC_XTENSA_SLOT3_ALT
5244
 -- : BFD_RELOC_XTENSA_SLOT4_ALT
5245
 -- : BFD_RELOC_XTENSA_SLOT5_ALT
5246
 -- : BFD_RELOC_XTENSA_SLOT6_ALT
5247
 -- : BFD_RELOC_XTENSA_SLOT7_ALT
5248
 -- : BFD_RELOC_XTENSA_SLOT8_ALT
5249
 -- : BFD_RELOC_XTENSA_SLOT9_ALT
5250
 -- : BFD_RELOC_XTENSA_SLOT10_ALT
5251
 -- : BFD_RELOC_XTENSA_SLOT11_ALT
5252
 -- : BFD_RELOC_XTENSA_SLOT12_ALT
5253
 -- : BFD_RELOC_XTENSA_SLOT13_ALT
5254
 -- : BFD_RELOC_XTENSA_SLOT14_ALT
5255
     Alternate Xtensa relocations.  Only the slot is encoded in the
5256
     relocation.  The meaning of these relocations is opcode-specific.
5257
 
5258
 -- : BFD_RELOC_XTENSA_OP0
5259
 -- : BFD_RELOC_XTENSA_OP1
5260
 -- : BFD_RELOC_XTENSA_OP2
5261
     Xtensa relocations for backward compatibility.  These have all been
5262
     replaced by BFD_RELOC_XTENSA_SLOT0_OP.
5263
 
5264
 -- : BFD_RELOC_XTENSA_ASM_EXPAND
5265
     Xtensa relocation to mark that the assembler expanded the
5266
     instructions from an original target.  The expansion size is
5267
     encoded in the reloc size.
5268
 
5269
 -- : BFD_RELOC_XTENSA_ASM_SIMPLIFY
5270
     Xtensa relocation to mark that the linker should simplify
5271
     assembler-expanded instructions.  This is commonly used internally
5272
     by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND.
5273
 
5274
 -- : BFD_RELOC_Z80_DISP8
5275
     8 bit signed offset in (ix+d) or (iy+d).
5276
 
5277
 -- : BFD_RELOC_Z8K_DISP7
5278
     DJNZ offset.
5279
 
5280
 -- : BFD_RELOC_Z8K_CALLR
5281
     CALR offset.
5282
 
5283
 -- : BFD_RELOC_Z8K_IMM4L
5284
     4 bit value.
5285
 
5286
 
5287
     typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
5288
 
5289
2.10.2.2 `bfd_reloc_type_lookup'
5290
................................
5291
 
5292
*Synopsis*
5293
     reloc_howto_type *bfd_reloc_type_lookup
5294
        (bfd *abfd, bfd_reloc_code_real_type code);
5295
     reloc_howto_type *bfd_reloc_name_lookup
5296
        (bfd *abfd, const char *reloc_name);
5297
   *Description*
5298
Return a pointer to a howto structure which, when invoked, will perform
5299
the relocation CODE on data from the architecture noted.
5300
 
5301
2.10.2.3 `bfd_default_reloc_type_lookup'
5302
........................................
5303
 
5304
*Synopsis*
5305
     reloc_howto_type *bfd_default_reloc_type_lookup
5306
        (bfd *abfd, bfd_reloc_code_real_type  code);
5307
   *Description*
5308
Provides a default relocation lookup routine for any architecture.
5309
 
5310
2.10.2.4 `bfd_get_reloc_code_name'
5311
..................................
5312
 
5313
*Synopsis*
5314
     const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
5315
   *Description*
5316
Provides a printable name for the supplied relocation code.  Useful
5317
mainly for printing error messages.
5318
 
5319
2.10.2.5 `bfd_generic_relax_section'
5320
....................................
5321
 
5322
*Synopsis*
5323
     bfd_boolean bfd_generic_relax_section
5324
        (bfd *abfd,
5325
         asection *section,
5326
         struct bfd_link_info *,
5327
         bfd_boolean *);
5328
   *Description*
5329
Provides default handling for relaxing for back ends which don't do
5330
relaxing.
5331
 
5332
2.10.2.6 `bfd_generic_gc_sections'
5333
..................................
5334
 
5335
*Synopsis*
5336
     bfd_boolean bfd_generic_gc_sections
5337
        (bfd *, struct bfd_link_info *);
5338
   *Description*
5339
Provides default handling for relaxing for back ends which don't do
5340
section gc - i.e., does nothing.
5341
 
5342
2.10.2.7 `bfd_generic_merge_sections'
5343
.....................................
5344
 
5345
*Synopsis*
5346
     bfd_boolean bfd_generic_merge_sections
5347
        (bfd *, struct bfd_link_info *);
5348
   *Description*
5349
Provides default handling for SEC_MERGE section merging for back ends
5350
which don't have SEC_MERGE support - i.e., does nothing.
5351
 
5352
2.10.2.8 `bfd_generic_get_relocated_section_contents'
5353
.....................................................
5354
 
5355
*Synopsis*
5356
     bfd_byte *bfd_generic_get_relocated_section_contents
5357
        (bfd *abfd,
5358
         struct bfd_link_info *link_info,
5359
         struct bfd_link_order *link_order,
5360
         bfd_byte *data,
5361
         bfd_boolean relocatable,
5362
         asymbol **symbols);
5363
   *Description*
5364
Provides default handling of relocation effort for back ends which
5365
can't be bothered to do it efficiently.
5366
 
5367

5368
File: bfd.info,  Node: Core Files,  Next: Targets,  Prev: Relocations,  Up: BFD front end
5369
 
5370
2.11 Core files
5371
===============
5372
 
5373
2.11.1 Core file functions
5374
--------------------------
5375
 
5376
*Description*
5377
These are functions pertaining to core files.
5378
 
5379
2.11.1.1 `bfd_core_file_failing_command'
5380
........................................
5381
 
5382
*Synopsis*
5383
     const char *bfd_core_file_failing_command (bfd *abfd);
5384
   *Description*
5385
Return a read-only string explaining which program was running when it
5386
failed and produced the core file ABFD.
5387
 
5388
2.11.1.2 `bfd_core_file_failing_signal'
5389
.......................................
5390
 
5391
*Synopsis*
5392
     int bfd_core_file_failing_signal (bfd *abfd);
5393
   *Description*
5394
Returns the signal number which caused the core dump which generated
5395
the file the BFD ABFD is attached to.
5396
 
5397
2.11.1.3 `core_file_matches_executable_p'
5398
.........................................
5399
 
5400
*Synopsis*
5401
     bfd_boolean core_file_matches_executable_p
5402
        (bfd *core_bfd, bfd *exec_bfd);
5403
   *Description*
5404
Return `TRUE' if the core file attached to CORE_BFD was generated by a
5405
run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
5406
 
5407
2.11.1.4 `generic_core_file_matches_executable_p'
5408
.................................................
5409
 
5410
*Synopsis*
5411
     bfd_boolean generic_core_file_matches_executable_p
5412
        (bfd *core_bfd, bfd *exec_bfd);
5413
   *Description*
5414
Return TRUE if the core file attached to CORE_BFD was generated by a
5415
run of the executable file attached to EXEC_BFD.  The match is based on
5416
executable basenames only.
5417
 
5418
   Note: When not able to determine the core file failing command or
5419
the executable name, we still return TRUE even though we're not sure
5420
that core file and executable match.  This is to avoid generating a
5421
false warning in situations where we really don't know whether they
5422
match or not.
5423
 
5424

5425
File: bfd.info,  Node: Targets,  Next: Architectures,  Prev: Core Files,  Up: BFD front end
5426
 
5427
2.12 Targets
5428
============
5429
 
5430
*Description*
5431
Each port of BFD to a different machine requires the creation of a
5432
target back end. All the back end provides to the root part of BFD is a
5433
structure containing pointers to functions which perform certain low
5434
level operations on files. BFD translates the applications's requests
5435
through a pointer into calls to the back end routines.
5436
 
5437
   When a file is opened with `bfd_openr', its format and target are
5438
unknown. BFD uses various mechanisms to determine how to interpret the
5439
file. The operations performed are:
5440
 
5441
   * Create a BFD by calling the internal routine `_bfd_new_bfd', then
5442
     call `bfd_find_target' with the target string supplied to
5443
     `bfd_openr' and the new BFD pointer.
5444
 
5445
   * If a null target string was provided to `bfd_find_target', look up
5446
     the environment variable `GNUTARGET' and use that as the target
5447
     string.
5448
 
5449
   * If the target string is still `NULL', or the target string is
5450
     `default', then use the first item in the target vector as the
5451
     target type, and set `target_defaulted' in the BFD to cause
5452
     `bfd_check_format' to loop through all the targets.  *Note
5453
     bfd_target::.  *Note Formats::.
5454
 
5455
   * Otherwise, inspect the elements in the target vector one by one,
5456
     until a match on target name is found. When found, use it.
5457
 
5458
   * Otherwise return the error `bfd_error_invalid_target' to
5459
     `bfd_openr'.
5460
 
5461
   * `bfd_openr' attempts to open the file using `bfd_open_file', and
5462
     returns the BFD.
5463
   Once the BFD has been opened and the target selected, the file
5464
format may be determined. This is done by calling `bfd_check_format' on
5465
the BFD with a suggested format.  If `target_defaulted' has been set,
5466
each possible target type is tried to see if it recognizes the
5467
specified format.  `bfd_check_format' returns `TRUE' when the caller
5468
guesses right.
5469
 
5470
* Menu:
5471
 
5472
* bfd_target::
5473
 
5474

5475
File: bfd.info,  Node: bfd_target,  Prev: Targets,  Up: Targets
5476
 
5477
2.12.1 bfd_target
5478
-----------------
5479
 
5480
*Description*
5481
This structure contains everything that BFD knows about a target. It
5482
includes things like its byte order, name, and which routines to call
5483
to do various operations.
5484
 
5485
   Every BFD points to a target structure with its `xvec' member.
5486
 
5487
   The macros below are used to dispatch to functions through the
5488
`bfd_target' vector. They are used in a number of macros further down
5489
in `bfd.h', and are also used when calling various routines by hand
5490
inside the BFD implementation.  The ARGLIST argument must be
5491
parenthesized; it contains all the arguments to the called function.
5492
 
5493
   They make the documentation (more) unpleasant to read, so if someone
5494
wants to fix this and not break the above, please do.
5495
     #define BFD_SEND(bfd, message, arglist) \
5496
       ((*((bfd)->xvec->message)) arglist)
5497
 
5498
     #ifdef DEBUG_BFD_SEND
5499
     #undef BFD_SEND
5500
     #define BFD_SEND(bfd, message, arglist) \
5501
       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
5502
         ((*((bfd)->xvec->message)) arglist) : \
5503
         (bfd_assert (__FILE__,__LINE__), NULL))
5504
     #endif
5505
   For operations which index on the BFD format:
5506
     #define BFD_SEND_FMT(bfd, message, arglist) \
5507
       (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
5508
 
5509
     #ifdef DEBUG_BFD_SEND
5510
     #undef BFD_SEND_FMT
5511
     #define BFD_SEND_FMT(bfd, message, arglist) \
5512
       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
5513
        (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
5514
        (bfd_assert (__FILE__,__LINE__), NULL))
5515
     #endif
5516
   This is the structure which defines the type of BFD this is.  The
5517
`xvec' member of the struct `bfd' itself points here.  Each module that
5518
implements access to a different target under BFD, defines one of these.
5519
 
5520
   FIXME, these names should be rationalised with the names of the
5521
entry points which call them. Too bad we can't have one macro to define
5522
them both!
5523
     enum bfd_flavour
5524
     {
5525
       bfd_target_unknown_flavour,
5526
       bfd_target_aout_flavour,
5527
       bfd_target_coff_flavour,
5528
       bfd_target_ecoff_flavour,
5529
       bfd_target_xcoff_flavour,
5530
       bfd_target_elf_flavour,
5531
       bfd_target_ieee_flavour,
5532
       bfd_target_nlm_flavour,
5533
       bfd_target_oasys_flavour,
5534
       bfd_target_tekhex_flavour,
5535
       bfd_target_srec_flavour,
5536
       bfd_target_ihex_flavour,
5537
       bfd_target_som_flavour,
5538
       bfd_target_os9k_flavour,
5539
       bfd_target_versados_flavour,
5540
       bfd_target_msdos_flavour,
5541
       bfd_target_ovax_flavour,
5542
       bfd_target_evax_flavour,
5543
       bfd_target_mmo_flavour,
5544
       bfd_target_mach_o_flavour,
5545
       bfd_target_pef_flavour,
5546
       bfd_target_pef_xlib_flavour,
5547
       bfd_target_sym_flavour
5548
     };
5549
 
5550
     enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
5551
 
5552
     /* Forward declaration.  */
5553
     typedef struct bfd_link_info _bfd_link_info;
5554
 
5555
     typedef struct bfd_target
5556
     {
5557
       /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
5558
       char *name;
5559
 
5560
      /* The "flavour" of a back end is a general indication about
5561
         the contents of a file.  */
5562
       enum bfd_flavour flavour;
5563
 
5564
       /* The order of bytes within the data area of a file.  */
5565
       enum bfd_endian byteorder;
5566
 
5567
      /* The order of bytes within the header parts of a file.  */
5568
       enum bfd_endian header_byteorder;
5569
 
5570
       /* A mask of all the flags which an executable may have set -
5571
          from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'.  */
5572
       flagword object_flags;
5573
 
5574
      /* A mask of all the flags which a section may have set - from
5575
         the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'.  */
5576
       flagword section_flags;
5577
 
5578
      /* The character normally found at the front of a symbol.
5579
         (if any), perhaps `_'.  */
5580
       char symbol_leading_char;
5581
 
5582
      /* The pad character for file names within an archive header.  */
5583
       char ar_pad_char;
5584
 
5585
       /* The maximum number of characters in an archive header.  */
5586
       unsigned short ar_max_namelen;
5587
 
5588
       /* Entries for byte swapping for data. These are different from the
5589
          other entry points, since they don't take a BFD as the first argument.
5590
          Certain other handlers could do the same.  */
5591
       bfd_uint64_t   (*bfd_getx64) (const void *);
5592
       bfd_int64_t    (*bfd_getx_signed_64) (const void *);
5593
       void           (*bfd_putx64) (bfd_uint64_t, void *);
5594
       bfd_vma        (*bfd_getx32) (const void *);
5595
       bfd_signed_vma (*bfd_getx_signed_32) (const void *);
5596
       void           (*bfd_putx32) (bfd_vma, void *);
5597
       bfd_vma        (*bfd_getx16) (const void *);
5598
       bfd_signed_vma (*bfd_getx_signed_16) (const void *);
5599
       void           (*bfd_putx16) (bfd_vma, void *);
5600
 
5601
       /* Byte swapping for the headers.  */
5602
       bfd_uint64_t   (*bfd_h_getx64) (const void *);
5603
       bfd_int64_t    (*bfd_h_getx_signed_64) (const void *);
5604
       void           (*bfd_h_putx64) (bfd_uint64_t, void *);
5605
       bfd_vma        (*bfd_h_getx32) (const void *);
5606
       bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
5607
       void           (*bfd_h_putx32) (bfd_vma, void *);
5608
       bfd_vma        (*bfd_h_getx16) (const void *);
5609
       bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
5610
       void           (*bfd_h_putx16) (bfd_vma, void *);
5611
 
5612
       /* Format dependent routines: these are vectors of entry points
5613
          within the target vector structure, one for each format to check.  */
5614
 
5615
       /* Check the format of a file being read.  Return a `bfd_target *' or zero.  */
5616
       const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
5617
 
5618
       /* Set the format of a file being written.  */
5619
       bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
5620
 
5621
       /* Write cached information into a file being written, at `bfd_close'.  */
5622
       bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
5623
   The general target vector.  These vectors are initialized using the
5624
BFD_JUMP_TABLE macros.
5625
 
5626
       /* Generic entry points.  */
5627
     #define BFD_JUMP_TABLE_GENERIC(NAME) \
5628
       NAME##_close_and_cleanup, \
5629
       NAME##_bfd_free_cached_info, \
5630
       NAME##_new_section_hook, \
5631
       NAME##_get_section_contents, \
5632
       NAME##_get_section_contents_in_window
5633
 
5634
       /* Called when the BFD is being closed to do any necessary cleanup.  */
5635
       bfd_boolean (*_close_and_cleanup) (bfd *);
5636
       /* Ask the BFD to free all cached information.  */
5637
       bfd_boolean (*_bfd_free_cached_info) (bfd *);
5638
       /* Called when a new section is created.  */
5639
       bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
5640
       /* Read the contents of a section.  */
5641
       bfd_boolean (*_bfd_get_section_contents)
5642
         (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
5643
       bfd_boolean (*_bfd_get_section_contents_in_window)
5644
         (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
5645
 
5646
       /* Entry points to copy private data.  */
5647
     #define BFD_JUMP_TABLE_COPY(NAME) \
5648
       NAME##_bfd_copy_private_bfd_data, \
5649
       NAME##_bfd_merge_private_bfd_data, \
5650
       _bfd_generic_init_private_section_data, \
5651
       NAME##_bfd_copy_private_section_data, \
5652
       NAME##_bfd_copy_private_symbol_data, \
5653
       NAME##_bfd_copy_private_header_data, \
5654
       NAME##_bfd_set_private_flags, \
5655
       NAME##_bfd_print_private_bfd_data
5656
 
5657
       /* Called to copy BFD general private data from one object file
5658
          to another.  */
5659
       bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
5660
       /* Called to merge BFD general private data from one object file
5661
          to a common output file when linking.  */
5662
       bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
5663
       /* Called to initialize BFD private section data from one object file
5664
          to another.  */
5665
     #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
5666
       BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info))
5667
       bfd_boolean (*_bfd_init_private_section_data)
5668
         (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
5669
       /* Called to copy BFD private section data from one object file
5670
          to another.  */
5671
       bfd_boolean (*_bfd_copy_private_section_data)
5672
         (bfd *, sec_ptr, bfd *, sec_ptr);
5673
       /* Called to copy BFD private symbol data from one symbol
5674
          to another.  */
5675
       bfd_boolean (*_bfd_copy_private_symbol_data)
5676
         (bfd *, asymbol *, bfd *, asymbol *);
5677
       /* Called to copy BFD private header data from one object file
5678
          to another.  */
5679
       bfd_boolean (*_bfd_copy_private_header_data)
5680
         (bfd *, bfd *);
5681
       /* Called to set private backend flags.  */
5682
       bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
5683
 
5684
       /* Called to print private BFD data.  */
5685
       bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
5686
 
5687
       /* Core file entry points.  */
5688
     #define BFD_JUMP_TABLE_CORE(NAME) \
5689
       NAME##_core_file_failing_command, \
5690
       NAME##_core_file_failing_signal, \
5691
       NAME##_core_file_matches_executable_p
5692
 
5693
       char *      (*_core_file_failing_command) (bfd *);
5694
       int         (*_core_file_failing_signal) (bfd *);
5695
       bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
5696
 
5697
       /* Archive entry points.  */
5698
     #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
5699
       NAME##_slurp_armap, \
5700
       NAME##_slurp_extended_name_table, \
5701
       NAME##_construct_extended_name_table, \
5702
       NAME##_truncate_arname, \
5703
       NAME##_write_armap, \
5704
       NAME##_read_ar_hdr, \
5705
       NAME##_openr_next_archived_file, \
5706
       NAME##_get_elt_at_index, \
5707
       NAME##_generic_stat_arch_elt, \
5708
       NAME##_update_armap_timestamp
5709
 
5710
       bfd_boolean (*_bfd_slurp_armap) (bfd *);
5711
       bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
5712
       bfd_boolean (*_bfd_construct_extended_name_table)
5713
         (bfd *, char **, bfd_size_type *, const char **);
5714
       void        (*_bfd_truncate_arname) (bfd *, const char *, char *);
5715
       bfd_boolean (*write_armap)
5716
         (bfd *, unsigned int, struct orl *, unsigned int, int);
5717
       void *      (*_bfd_read_ar_hdr_fn) (bfd *);
5718
       bfd *       (*openr_next_archived_file) (bfd *, bfd *);
5719
     #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
5720
       bfd *       (*_bfd_get_elt_at_index) (bfd *, symindex);
5721
       int         (*_bfd_stat_arch_elt) (bfd *, struct stat *);
5722
       bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
5723
 
5724
       /* Entry points used for symbols.  */
5725
     #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
5726
       NAME##_get_symtab_upper_bound, \
5727
       NAME##_canonicalize_symtab, \
5728
       NAME##_make_empty_symbol, \
5729
       NAME##_print_symbol, \
5730
       NAME##_get_symbol_info, \
5731
       NAME##_bfd_is_local_label_name, \
5732
       NAME##_bfd_is_target_special_symbol, \
5733
       NAME##_get_lineno, \
5734
       NAME##_find_nearest_line, \
5735
       _bfd_generic_find_line, \
5736
       NAME##_find_inliner_info, \
5737
       NAME##_bfd_make_debug_symbol, \
5738
       NAME##_read_minisymbols, \
5739
       NAME##_minisymbol_to_symbol
5740
 
5741
       long        (*_bfd_get_symtab_upper_bound) (bfd *);
5742
       long        (*_bfd_canonicalize_symtab)
5743
         (bfd *, struct bfd_symbol **);
5744
       struct bfd_symbol *
5745
                   (*_bfd_make_empty_symbol) (bfd *);
5746
       void        (*_bfd_print_symbol)
5747
         (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
5748
     #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
5749
       void        (*_bfd_get_symbol_info)
5750
         (bfd *, struct bfd_symbol *, symbol_info *);
5751
     #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
5752
       bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
5753
       bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
5754
       alent *     (*_get_lineno) (bfd *, struct bfd_symbol *);
5755
       bfd_boolean (*_bfd_find_nearest_line)
5756
         (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
5757
          const char **, const char **, unsigned int *);
5758
       bfd_boolean (*_bfd_find_line)
5759
         (bfd *, struct bfd_symbol **, struct bfd_symbol *,
5760
          const char **, unsigned int *);
5761
       bfd_boolean (*_bfd_find_inliner_info)
5762
         (bfd *, const char **, const char **, unsigned int *);
5763
      /* Back-door to allow format-aware applications to create debug symbols
5764
         while using BFD for everything else.  Currently used by the assembler
5765
         when creating COFF files.  */
5766
       asymbol *   (*_bfd_make_debug_symbol)
5767
         (bfd *, void *, unsigned long size);
5768
     #define bfd_read_minisymbols(b, d, m, s) \
5769
       BFD_SEND (b, _read_minisymbols, (b, d, m, s))
5770
       long        (*_read_minisymbols)
5771
         (bfd *, bfd_boolean, void **, unsigned int *);
5772
     #define bfd_minisymbol_to_symbol(b, d, m, f) \
5773
       BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
5774
       asymbol *   (*_minisymbol_to_symbol)
5775
         (bfd *, bfd_boolean, const void *, asymbol *);
5776
 
5777
       /* Routines for relocs.  */
5778
     #define BFD_JUMP_TABLE_RELOCS(NAME) \
5779
       NAME##_get_reloc_upper_bound, \
5780
       NAME##_canonicalize_reloc, \
5781
       NAME##_bfd_reloc_type_lookup, \
5782
       NAME##_bfd_reloc_name_lookup
5783
 
5784
       long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
5785
       long        (*_bfd_canonicalize_reloc)
5786
         (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
5787
       /* See documentation on reloc types.  */
5788
       reloc_howto_type *
5789
                   (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
5790
       reloc_howto_type *
5791
                   (*reloc_name_lookup) (bfd *, const char *);
5792
 
5793
 
5794
       /* Routines used when writing an object file.  */
5795
     #define BFD_JUMP_TABLE_WRITE(NAME) \
5796
       NAME##_set_arch_mach, \
5797
       NAME##_set_section_contents
5798
 
5799
       bfd_boolean (*_bfd_set_arch_mach)
5800
         (bfd *, enum bfd_architecture, unsigned long);
5801
       bfd_boolean (*_bfd_set_section_contents)
5802
         (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
5803
 
5804
       /* Routines used by the linker.  */
5805
     #define BFD_JUMP_TABLE_LINK(NAME) \
5806
       NAME##_sizeof_headers, \
5807
       NAME##_bfd_get_relocated_section_contents, \
5808
       NAME##_bfd_relax_section, \
5809
       NAME##_bfd_link_hash_table_create, \
5810
       NAME##_bfd_link_hash_table_free, \
5811
       NAME##_bfd_link_add_symbols, \
5812
       NAME##_bfd_link_just_syms, \
5813
       NAME##_bfd_final_link, \
5814
       NAME##_bfd_link_split_section, \
5815
       NAME##_bfd_gc_sections, \
5816
       NAME##_bfd_merge_sections, \
5817
       NAME##_bfd_is_group_section, \
5818
       NAME##_bfd_discard_group, \
5819
       NAME##_section_already_linked \
5820
 
5821
       int         (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
5822
       bfd_byte *  (*_bfd_get_relocated_section_contents)
5823
         (bfd *, struct bfd_link_info *, struct bfd_link_order *,
5824
          bfd_byte *, bfd_boolean, struct bfd_symbol **);
5825
 
5826
       bfd_boolean (*_bfd_relax_section)
5827
         (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
5828
 
5829
       /* Create a hash table for the linker.  Different backends store
5830
          different information in this table.  */
5831
       struct bfd_link_hash_table *
5832
                   (*_bfd_link_hash_table_create) (bfd *);
5833
 
5834
       /* Release the memory associated with the linker hash table.  */
5835
       void        (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
5836
 
5837
       /* Add symbols from this object file into the hash table.  */
5838
       bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
5839
 
5840
       /* Indicate that we are only retrieving symbol values from this section.  */
5841
       void        (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
5842
 
5843
       /* Do a link based on the link_order structures attached to each
5844
          section of the BFD.  */
5845
       bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
5846
 
5847
       /* Should this section be split up into smaller pieces during linking.  */
5848
       bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
5849
 
5850
       /* Remove sections that are not referenced from the output.  */
5851
       bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
5852
 
5853
       /* Attempt to merge SEC_MERGE sections.  */
5854
       bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
5855
 
5856
       /* Is this section a member of a group?  */
5857
       bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
5858
 
5859
       /* Discard members of a group.  */
5860
       bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
5861
 
5862
       /* Check if SEC has been already linked during a reloceatable or
5863
          final link.  */
5864
       void (*_section_already_linked) (bfd *, struct bfd_section *,
5865
                                        struct bfd_link_info *);
5866
 
5867
       /* Routines to handle dynamic symbols and relocs.  */
5868
     #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
5869
       NAME##_get_dynamic_symtab_upper_bound, \
5870
       NAME##_canonicalize_dynamic_symtab, \
5871
       NAME##_get_synthetic_symtab, \
5872
       NAME##_get_dynamic_reloc_upper_bound, \
5873
       NAME##_canonicalize_dynamic_reloc
5874
 
5875
       /* Get the amount of memory required to hold the dynamic symbols.  */
5876
       long        (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
5877
       /* Read in the dynamic symbols.  */
5878
       long        (*_bfd_canonicalize_dynamic_symtab)
5879
         (bfd *, struct bfd_symbol **);
5880
       /* Create synthetized symbols.  */
5881
       long        (*_bfd_get_synthetic_symtab)
5882
         (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
5883
          struct bfd_symbol **);
5884
       /* Get the amount of memory required to hold the dynamic relocs.  */
5885
       long        (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
5886
       /* Read in the dynamic relocs.  */
5887
       long        (*_bfd_canonicalize_dynamic_reloc)
5888
         (bfd *, arelent **, struct bfd_symbol **);
5889
   A pointer to an alternative bfd_target in case the current one is not
5890
satisfactory.  This can happen when the target cpu supports both big
5891
and little endian code, and target chosen by the linker has the wrong
5892
endianness.  The function open_output() in ld/ldlang.c uses this field
5893
to find an alternative output format that is suitable.
5894
       /* Opposite endian version of this target.  */
5895
       const struct bfd_target * alternative_target;
5896
 
5897
       /* Data for use by back-end routines, which isn't
5898
          generic enough to belong in this structure.  */
5899
       const void *backend_data;
5900
 
5901
     } bfd_target;
5902
 
5903
2.12.1.1 `bfd_set_default_target'
5904
.................................
5905
 
5906
*Synopsis*
5907
     bfd_boolean bfd_set_default_target (const char *name);
5908
   *Description*
5909
Set the default target vector to use when recognizing a BFD.  This
5910
takes the name of the target, which may be a BFD target name or a
5911
configuration triplet.
5912
 
5913
2.12.1.2 `bfd_find_target'
5914
..........................
5915
 
5916
*Synopsis*
5917
     const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
5918
   *Description*
5919
Return a pointer to the transfer vector for the object target named
5920
TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
5921
environment variable `GNUTARGET'; if that is null or not defined, then
5922
choose the first entry in the target list.  Passing in the string
5923
"default" or setting the environment variable to "default" will cause
5924
the first entry in the target list to be returned, and
5925
"target_defaulted" will be set in the BFD if ABFD isn't `NULL'.  This
5926
causes `bfd_check_format' to loop over all the targets to find the one
5927
that matches the file being read.
5928
 
5929
2.12.1.3 `bfd_target_list'
5930
..........................
5931
 
5932
*Synopsis*
5933
     const char ** bfd_target_list (void);
5934
   *Description*
5935
Return a freshly malloced NULL-terminated vector of the names of all
5936
the valid BFD targets. Do not modify the names.
5937
 
5938
2.12.1.4 `bfd_seach_for_target'
5939
...............................
5940
 
5941
*Synopsis*
5942
     const bfd_target *bfd_search_for_target
5943
        (int (*search_func) (const bfd_target *, void *),
5944
         void *);
5945
   *Description*
5946
Return a pointer to the first transfer vector in the list of transfer
5947
vectors maintained by BFD that produces a non-zero result when passed
5948
to the function SEARCH_FUNC.  The parameter DATA is passed, unexamined,
5949
to the search function.
5950
 
5951

5952
File: bfd.info,  Node: Architectures,  Next: Opening and Closing,  Prev: Targets,  Up: BFD front end
5953
 
5954
2.13 Architectures
5955
==================
5956
 
5957
BFD keeps one atom in a BFD describing the architecture of the data
5958
attached to the BFD: a pointer to a `bfd_arch_info_type'.
5959
 
5960
   Pointers to structures can be requested independently of a BFD so
5961
that an architecture's information can be interrogated without access
5962
to an open BFD.
5963
 
5964
   The architecture information is provided by each architecture
5965
package.  The set of default architectures is selected by the macro
5966
`SELECT_ARCHITECTURES'.  This is normally set up in the
5967
`config/TARGET.mt' file of your choice.  If the name is not defined,
5968
then all the architectures supported are included.
5969
 
5970
   When BFD starts up, all the architectures are called with an
5971
initialize method.  It is up to the architecture back end to insert as
5972
many items into the list of architectures as it wants to; generally
5973
this would be one for each machine and one for the default case (an
5974
item with a machine field of 0).
5975
 
5976
   BFD's idea of an architecture is implemented in `archures.c'.
5977
 
5978
2.13.1 bfd_architecture
5979
-----------------------
5980
 
5981
*Description*
5982
This enum gives the object file's CPU architecture, in a global
5983
sense--i.e., what processor family does it belong to?  Another field
5984
indicates which processor within the family is in use.  The machine
5985
gives a number which distinguishes different versions of the
5986
architecture, containing, for example, 2 and 3 for Intel i960 KA and
5987
i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
5988
     enum bfd_architecture
5989
     {
5990
       bfd_arch_unknown,   /* File arch not known.  */
5991
       bfd_arch_obscure,   /* Arch known, not one of these.  */
5992
       bfd_arch_m68k,      /* Motorola 68xxx */
5993
     #define bfd_mach_m68000 1
5994
     #define bfd_mach_m68008 2
5995
     #define bfd_mach_m68010 3
5996
     #define bfd_mach_m68020 4
5997
     #define bfd_mach_m68030 5
5998
     #define bfd_mach_m68040 6
5999
     #define bfd_mach_m68060 7
6000
     #define bfd_mach_cpu32  8
6001
     #define bfd_mach_fido   9
6002
     #define bfd_mach_mcf_isa_a_nodiv 10
6003
     #define bfd_mach_mcf_isa_a 11
6004
     #define bfd_mach_mcf_isa_a_mac 12
6005
     #define bfd_mach_mcf_isa_a_emac 13
6006
     #define bfd_mach_mcf_isa_aplus 14
6007
     #define bfd_mach_mcf_isa_aplus_mac 15
6008
     #define bfd_mach_mcf_isa_aplus_emac 16
6009
     #define bfd_mach_mcf_isa_b_nousp 17
6010
     #define bfd_mach_mcf_isa_b_nousp_mac 18
6011
     #define bfd_mach_mcf_isa_b_nousp_emac 19
6012
     #define bfd_mach_mcf_isa_b 20
6013
     #define bfd_mach_mcf_isa_b_mac 21
6014
     #define bfd_mach_mcf_isa_b_emac 22
6015
     #define bfd_mach_mcf_isa_b_float 23
6016
     #define bfd_mach_mcf_isa_b_float_mac 24
6017
     #define bfd_mach_mcf_isa_b_float_emac 25
6018
     #define bfd_mach_mcf_isa_c 26
6019
     #define bfd_mach_mcf_isa_c_mac 27
6020
     #define bfd_mach_mcf_isa_c_emac 28
6021
     #define bfd_mach_mcf_isa_c_nodiv 29
6022
     #define bfd_mach_mcf_isa_c_nodiv_mac 30
6023
     #define bfd_mach_mcf_isa_c_nodiv_emac 31
6024
       bfd_arch_vax,       /* DEC Vax */
6025
       bfd_arch_i960,      /* Intel 960 */
6026
         /* The order of the following is important.
6027
            lower number indicates a machine type that
6028
            only accepts a subset of the instructions
6029
            available to machines with higher numbers.
6030
            The exception is the "ca", which is
6031
            incompatible with all other machines except
6032
            "core".  */
6033
 
6034
     #define bfd_mach_i960_core      1
6035
     #define bfd_mach_i960_ka_sa     2
6036
     #define bfd_mach_i960_kb_sb     3
6037
     #define bfd_mach_i960_mc        4
6038
     #define bfd_mach_i960_xa        5
6039
     #define bfd_mach_i960_ca        6
6040
     #define bfd_mach_i960_jx        7
6041
     #define bfd_mach_i960_hx        8
6042
 
6043
       bfd_arch_or32,      /* OpenRISC 32 */
6044
 
6045
       bfd_arch_sparc,     /* SPARC */
6046
     #define bfd_mach_sparc                 1
6047
     /* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
6048
     #define bfd_mach_sparc_sparclet        2
6049
     #define bfd_mach_sparc_sparclite       3
6050
     #define bfd_mach_sparc_v8plus          4
6051
     #define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns.  */
6052
     #define bfd_mach_sparc_sparclite_le    6
6053
     #define bfd_mach_sparc_v9              7
6054
     #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
6055
     #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
6056
     #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
6057
     /* Nonzero if MACH has the v9 instruction set.  */
6058
     #define bfd_mach_sparc_v9_p(mach) \
6059
       ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
6060
        && (mach) != bfd_mach_sparc_sparclite_le)
6061
     /* Nonzero if MACH is a 64 bit sparc architecture.  */
6062
     #define bfd_mach_sparc_64bit_p(mach) \
6063
       ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
6064
       bfd_arch_spu,       /* PowerPC SPU */
6065
     #define bfd_mach_spu           256
6066
       bfd_arch_mips,      /* MIPS Rxxxx */
6067
     #define bfd_mach_mips3000              3000
6068
     #define bfd_mach_mips3900              3900
6069
     #define bfd_mach_mips4000              4000
6070
     #define bfd_mach_mips4010              4010
6071
     #define bfd_mach_mips4100              4100
6072
     #define bfd_mach_mips4111              4111
6073
     #define bfd_mach_mips4120              4120
6074
     #define bfd_mach_mips4300              4300
6075
     #define bfd_mach_mips4400              4400
6076
     #define bfd_mach_mips4600              4600
6077
     #define bfd_mach_mips4650              4650
6078
     #define bfd_mach_mips5000              5000
6079
     #define bfd_mach_mips5400              5400
6080
     #define bfd_mach_mips5500              5500
6081
     #define bfd_mach_mips6000              6000
6082
     #define bfd_mach_mips7000              7000
6083
     #define bfd_mach_mips8000              8000
6084
     #define bfd_mach_mips9000              9000
6085
     #define bfd_mach_mips10000             10000
6086
     #define bfd_mach_mips12000             12000
6087
     #define bfd_mach_mips16                16
6088
     #define bfd_mach_mips5                 5
6089
     #define bfd_mach_mips_loongson_2e      3001
6090
     #define bfd_mach_mips_loongson_2f      3002
6091
     #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
6092
     #define bfd_mach_mips_octeon           6501
6093
     #define bfd_mach_mipsisa32             32
6094
     #define bfd_mach_mipsisa32r2           33
6095
     #define bfd_mach_mipsisa64             64
6096
     #define bfd_mach_mipsisa64r2           65
6097
       bfd_arch_i386,      /* Intel 386 */
6098
     #define bfd_mach_i386_i386 1
6099
     #define bfd_mach_i386_i8086 2
6100
     #define bfd_mach_i386_i386_intel_syntax 3
6101
     #define bfd_mach_x86_64 64
6102
     #define bfd_mach_x86_64_intel_syntax 65
6103
       bfd_arch_we32k,     /* AT&T WE32xxx */
6104
       bfd_arch_tahoe,     /* CCI/Harris Tahoe */
6105
       bfd_arch_i860,      /* Intel 860 */
6106
       bfd_arch_i370,      /* IBM 360/370 Mainframes */
6107
       bfd_arch_romp,      /* IBM ROMP PC/RT */
6108
       bfd_arch_convex,    /* Convex */
6109
       bfd_arch_m88k,      /* Motorola 88xxx */
6110
       bfd_arch_m98k,      /* Motorola 98xxx */
6111
       bfd_arch_pyramid,   /* Pyramid Technology */
6112
       bfd_arch_h8300,     /* Renesas H8/300 (formerly Hitachi H8/300) */
6113
     #define bfd_mach_h8300    1
6114
     #define bfd_mach_h8300h   2
6115
     #define bfd_mach_h8300s   3
6116
     #define bfd_mach_h8300hn  4
6117
     #define bfd_mach_h8300sn  5
6118
     #define bfd_mach_h8300sx  6
6119
     #define bfd_mach_h8300sxn 7
6120
       bfd_arch_pdp11,     /* DEC PDP-11 */
6121
       bfd_arch_powerpc,   /* PowerPC */
6122
     #define bfd_mach_ppc           32
6123
     #define bfd_mach_ppc64         64
6124
     #define bfd_mach_ppc_403       403
6125
     #define bfd_mach_ppc_403gc     4030
6126
     #define bfd_mach_ppc_505       505
6127
     #define bfd_mach_ppc_601       601
6128
     #define bfd_mach_ppc_602       602
6129
     #define bfd_mach_ppc_603       603
6130
     #define bfd_mach_ppc_ec603e    6031
6131
     #define bfd_mach_ppc_604       604
6132
     #define bfd_mach_ppc_620       620
6133
     #define bfd_mach_ppc_630       630
6134
     #define bfd_mach_ppc_750       750
6135
     #define bfd_mach_ppc_860       860
6136
     #define bfd_mach_ppc_a35       35
6137
     #define bfd_mach_ppc_rs64ii    642
6138
     #define bfd_mach_ppc_rs64iii   643
6139
     #define bfd_mach_ppc_7400      7400
6140
     #define bfd_mach_ppc_e500      500
6141
     #define bfd_mach_ppc_e500mc    5001
6142
       bfd_arch_rs6000,    /* IBM RS/6000 */
6143
     #define bfd_mach_rs6k          6000
6144
     #define bfd_mach_rs6k_rs1      6001
6145
     #define bfd_mach_rs6k_rsc      6003
6146
     #define bfd_mach_rs6k_rs2      6002
6147
       bfd_arch_hppa,      /* HP PA RISC */
6148
     #define bfd_mach_hppa10        10
6149
     #define bfd_mach_hppa11        11
6150
     #define bfd_mach_hppa20        20
6151
     #define bfd_mach_hppa20w       25
6152
       bfd_arch_d10v,      /* Mitsubishi D10V */
6153
     #define bfd_mach_d10v          1
6154
     #define bfd_mach_d10v_ts2      2
6155
     #define bfd_mach_d10v_ts3      3
6156
       bfd_arch_d30v,      /* Mitsubishi D30V */
6157
       bfd_arch_dlx,       /* DLX */
6158
       bfd_arch_m68hc11,   /* Motorola 68HC11 */
6159
       bfd_arch_m68hc12,   /* Motorola 68HC12 */
6160
     #define bfd_mach_m6812_default 0
6161
     #define bfd_mach_m6812         1
6162
     #define bfd_mach_m6812s        2
6163
       bfd_arch_z8k,       /* Zilog Z8000 */
6164
     #define bfd_mach_z8001         1
6165
     #define bfd_mach_z8002         2
6166
       bfd_arch_h8500,     /* Renesas H8/500 (formerly Hitachi H8/500) */
6167
       bfd_arch_sh,        /* Renesas / SuperH SH (formerly Hitachi SH) */
6168
     #define bfd_mach_sh            1
6169
     #define bfd_mach_sh2        0x20
6170
     #define bfd_mach_sh_dsp     0x2d
6171
     #define bfd_mach_sh2a       0x2a
6172
     #define bfd_mach_sh2a_nofpu 0x2b
6173
     #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
6174
     #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
6175
     #define bfd_mach_sh2a_or_sh4  0x2a3
6176
     #define bfd_mach_sh2a_or_sh3e 0x2a4
6177
     #define bfd_mach_sh2e       0x2e
6178
     #define bfd_mach_sh3        0x30
6179
     #define bfd_mach_sh3_nommu  0x31
6180
     #define bfd_mach_sh3_dsp    0x3d
6181
     #define bfd_mach_sh3e       0x3e
6182
     #define bfd_mach_sh4        0x40
6183
     #define bfd_mach_sh4_nofpu  0x41
6184
     #define bfd_mach_sh4_nommu_nofpu  0x42
6185
     #define bfd_mach_sh4a       0x4a
6186
     #define bfd_mach_sh4a_nofpu 0x4b
6187
     #define bfd_mach_sh4al_dsp  0x4d
6188
     #define bfd_mach_sh5        0x50
6189
       bfd_arch_alpha,     /* Dec Alpha */
6190
     #define bfd_mach_alpha_ev4  0x10
6191
     #define bfd_mach_alpha_ev5  0x20
6192
     #define bfd_mach_alpha_ev6  0x30
6193
       bfd_arch_arm,       /* Advanced Risc Machines ARM.  */
6194
     #define bfd_mach_arm_unknown   0
6195
     #define bfd_mach_arm_2         1
6196
     #define bfd_mach_arm_2a        2
6197
     #define bfd_mach_arm_3         3
6198
     #define bfd_mach_arm_3M        4
6199
     #define bfd_mach_arm_4         5
6200
     #define bfd_mach_arm_4T        6
6201
     #define bfd_mach_arm_5         7
6202
     #define bfd_mach_arm_5T        8
6203
     #define bfd_mach_arm_5TE       9
6204
     #define bfd_mach_arm_XScale    10
6205
     #define bfd_mach_arm_ep9312    11
6206
     #define bfd_mach_arm_iWMMXt    12
6207
     #define bfd_mach_arm_iWMMXt2   13
6208
       bfd_arch_ns32k,     /* National Semiconductors ns32000 */
6209
       bfd_arch_w65,       /* WDC 65816 */
6210
       bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
6211
       bfd_arch_tic4x,     /* Texas Instruments TMS320C3X/4X */
6212
     #define bfd_mach_tic3x         30
6213
     #define bfd_mach_tic4x         40
6214
       bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
6215
       bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
6216
       bfd_arch_v850,      /* NEC V850 */
6217
     #define bfd_mach_v850          1
6218
     #define bfd_mach_v850e         'E'
6219
     #define bfd_mach_v850e1        '1'
6220
       bfd_arch_arc,       /* ARC Cores */
6221
     #define bfd_mach_arc_5         5
6222
     #define bfd_mach_arc_6         6
6223
     #define bfd_mach_arc_7         7
6224
     #define bfd_mach_arc_8         8
6225
      bfd_arch_m32c,     /* Renesas M16C/M32C.  */
6226
     #define bfd_mach_m16c        0x75
6227
     #define bfd_mach_m32c        0x78
6228
       bfd_arch_m32r,      /* Renesas M32R (formerly Mitsubishi M32R/D) */
6229
     #define bfd_mach_m32r          1 /* For backwards compatibility.  */
6230
     #define bfd_mach_m32rx         'x'
6231
     #define bfd_mach_m32r2         '2'
6232
       bfd_arch_mn10200,   /* Matsushita MN10200 */
6233
       bfd_arch_mn10300,   /* Matsushita MN10300 */
6234
     #define bfd_mach_mn10300               300
6235
     #define bfd_mach_am33          330
6236
     #define bfd_mach_am33_2        332
6237
       bfd_arch_fr30,
6238
     #define bfd_mach_fr30          0x46523330
6239
       bfd_arch_frv,
6240
     #define bfd_mach_frv           1
6241
     #define bfd_mach_frvsimple     2
6242
     #define bfd_mach_fr300         300
6243
     #define bfd_mach_fr400         400
6244
     #define bfd_mach_fr450         450
6245
     #define bfd_mach_frvtomcat     499     /* fr500 prototype */
6246
     #define bfd_mach_fr500         500
6247
     #define bfd_mach_fr550         550
6248
       bfd_arch_mcore,
6249
       bfd_arch_mep,
6250
     #define bfd_mach_mep           1
6251
     #define bfd_mach_mep_h1        0x6831
6252
       bfd_arch_ia64,      /* HP/Intel ia64 */
6253
     #define bfd_mach_ia64_elf64    64
6254
     #define bfd_mach_ia64_elf32    32
6255
       bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
6256
     #define bfd_mach_ip2022        1
6257
     #define bfd_mach_ip2022ext     2
6258
      bfd_arch_iq2000,     /* Vitesse IQ2000.  */
6259
     #define bfd_mach_iq2000        1
6260
     #define bfd_mach_iq10          2
6261
       bfd_arch_mt,
6262
     #define bfd_mach_ms1           1
6263
     #define bfd_mach_mrisc2        2
6264
     #define bfd_mach_ms2           3
6265
       bfd_arch_pj,
6266
       bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
6267
     #define bfd_mach_avr1          1
6268
     #define bfd_mach_avr2          2
6269
     #define bfd_mach_avr3          3
6270
     #define bfd_mach_avr4          4
6271
     #define bfd_mach_avr5          5
6272
     #define bfd_mach_avr6          6
6273
       bfd_arch_bfin,        /* ADI Blackfin */
6274
     #define bfd_mach_bfin          1
6275
       bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
6276
     #define bfd_mach_cr16          1
6277
       bfd_arch_cr16c,       /* National Semiconductor CompactRISC. */
6278
     #define bfd_mach_cr16c         1
6279
       bfd_arch_crx,       /*  National Semiconductor CRX.  */
6280
     #define bfd_mach_crx           1
6281
       bfd_arch_cris,      /* Axis CRIS */
6282
     #define bfd_mach_cris_v0_v10   255
6283
     #define bfd_mach_cris_v32      32
6284
     #define bfd_mach_cris_v10_v32  1032
6285
       bfd_arch_s390,      /* IBM s390 */
6286
     #define bfd_mach_s390_31       31
6287
     #define bfd_mach_s390_64       64
6288
       bfd_arch_score,     /* Sunplus score */
6289
       bfd_arch_openrisc,  /* OpenRISC */
6290
       bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
6291
       bfd_arch_xstormy16,
6292
     #define bfd_mach_xstormy16     1
6293
       bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
6294
     #define bfd_mach_msp11          11
6295
     #define bfd_mach_msp110         110
6296
     #define bfd_mach_msp12          12
6297
     #define bfd_mach_msp13          13
6298
     #define bfd_mach_msp14          14
6299
     #define bfd_mach_msp15          15
6300
     #define bfd_mach_msp16          16
6301
     #define bfd_mach_msp21          21
6302
     #define bfd_mach_msp31          31
6303
     #define bfd_mach_msp32          32
6304
     #define bfd_mach_msp33          33
6305
     #define bfd_mach_msp41          41
6306
     #define bfd_mach_msp42          42
6307
     #define bfd_mach_msp43          43
6308
     #define bfd_mach_msp44          44
6309
       bfd_arch_xc16x,     /* Infineon's XC16X Series.               */
6310
     #define bfd_mach_xc16x         1
6311
     #define bfd_mach_xc16xl        2
6312
     #define bfd_mach_xc16xs         3
6313
       bfd_arch_xtensa,    /* Tensilica's Xtensa cores.  */
6314
     #define bfd_mach_xtensa        1
6315
        bfd_arch_maxq,     /* Dallas MAXQ 10/20 */
6316
     #define bfd_mach_maxq10    10
6317
     #define bfd_mach_maxq20    20
6318
       bfd_arch_z80,
6319
     #define bfd_mach_z80strict      1 /* No undocumented opcodes.  */
6320
     #define bfd_mach_z80            3 /* With ixl, ixh, iyl, and iyh.  */
6321
     #define bfd_mach_z80full        7 /* All undocumented instructions.  */
6322
     #define bfd_mach_r800           11 /* R800: successor with multiplication.  */
6323
       bfd_arch_last
6324
       };
6325
 
6326
2.13.2 bfd_arch_info
6327
--------------------
6328
 
6329
*Description*
6330
This structure contains information on architectures for use within BFD.
6331
 
6332
     typedef struct bfd_arch_info
6333
     {
6334
       int bits_per_word;
6335
       int bits_per_address;
6336
       int bits_per_byte;
6337
       enum bfd_architecture arch;
6338
       unsigned long mach;
6339
       const char *arch_name;
6340
       const char *printable_name;
6341
       unsigned int section_align_power;
6342
       /* TRUE if this is the default machine for the architecture.
6343
          The default arch should be the first entry for an arch so that
6344
          all the entries for that arch can be accessed via `next'.  */
6345
       bfd_boolean the_default;
6346
       const struct bfd_arch_info * (*compatible)
6347
         (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
6348
 
6349
       bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
6350
 
6351
       const struct bfd_arch_info *next;
6352
     }
6353
     bfd_arch_info_type;
6354
 
6355
2.13.2.1 `bfd_printable_name'
6356
.............................
6357
 
6358
*Synopsis*
6359
     const char *bfd_printable_name (bfd *abfd);
6360
   *Description*
6361
Return a printable string representing the architecture and machine
6362
from the pointer to the architecture info structure.
6363
 
6364
2.13.2.2 `bfd_scan_arch'
6365
........................
6366
 
6367
*Synopsis*
6368
     const bfd_arch_info_type *bfd_scan_arch (const char *string);
6369
   *Description*
6370
Figure out if BFD supports any cpu which could be described with the
6371
name STRING.  Return a pointer to an `arch_info' structure if a machine
6372
is found, otherwise NULL.
6373
 
6374
2.13.2.3 `bfd_arch_list'
6375
........................
6376
 
6377
*Synopsis*
6378
     const char **bfd_arch_list (void);
6379
   *Description*
6380
Return a freshly malloced NULL-terminated vector of the names of all
6381
the valid BFD architectures.  Do not modify the names.
6382
 
6383
2.13.2.4 `bfd_arch_get_compatible'
6384
..................................
6385
 
6386
*Synopsis*
6387
     const bfd_arch_info_type *bfd_arch_get_compatible
6388
        (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
6389
   *Description*
6390
Determine whether two BFDs' architectures and machine types are
6391
compatible.  Calculates the lowest common denominator between the two
6392
architectures and machine types implied by the BFDs and returns a
6393
pointer to an `arch_info' structure describing the compatible machine.
6394
 
6395
2.13.2.5 `bfd_default_arch_struct'
6396
..................................
6397
 
6398
*Description*
6399
The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
6400
has been initialized to a fairly generic state.  A BFD starts life by
6401
pointing to this structure, until the correct back end has determined
6402
the real architecture of the file.
6403
     extern const bfd_arch_info_type bfd_default_arch_struct;
6404
 
6405
2.13.2.6 `bfd_set_arch_info'
6406
............................
6407
 
6408
*Synopsis*
6409
     void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
6410
   *Description*
6411
Set the architecture info of ABFD to ARG.
6412
 
6413
2.13.2.7 `bfd_default_set_arch_mach'
6414
....................................
6415
 
6416
*Synopsis*
6417
     bfd_boolean bfd_default_set_arch_mach
6418
        (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
6419
   *Description*
6420
Set the architecture and machine type in BFD ABFD to ARCH and MACH.
6421
Find the correct pointer to a structure and insert it into the
6422
`arch_info' pointer.
6423
 
6424
2.13.2.8 `bfd_get_arch'
6425
.......................
6426
 
6427
*Synopsis*
6428
     enum bfd_architecture bfd_get_arch (bfd *abfd);
6429
   *Description*
6430
Return the enumerated type which describes the BFD ABFD's architecture.
6431
 
6432
2.13.2.9 `bfd_get_mach'
6433
.......................
6434
 
6435
*Synopsis*
6436
     unsigned long bfd_get_mach (bfd *abfd);
6437
   *Description*
6438
Return the long type which describes the BFD ABFD's machine.
6439
 
6440
2.13.2.10 `bfd_arch_bits_per_byte'
6441
..................................
6442
 
6443
*Synopsis*
6444
     unsigned int bfd_arch_bits_per_byte (bfd *abfd);
6445
   *Description*
6446
Return the number of bits in one of the BFD ABFD's architecture's bytes.
6447
 
6448
2.13.2.11 `bfd_arch_bits_per_address'
6449
.....................................
6450
 
6451
*Synopsis*
6452
     unsigned int bfd_arch_bits_per_address (bfd *abfd);
6453
   *Description*
6454
Return the number of bits in one of the BFD ABFD's architecture's
6455
addresses.
6456
 
6457
2.13.2.12 `bfd_default_compatible'
6458
..................................
6459
 
6460
*Synopsis*
6461
     const bfd_arch_info_type *bfd_default_compatible
6462
        (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
6463
   *Description*
6464
The default function for testing for compatibility.
6465
 
6466
2.13.2.13 `bfd_default_scan'
6467
............................
6468
 
6469
*Synopsis*
6470
     bfd_boolean bfd_default_scan
6471
        (const struct bfd_arch_info *info, const char *string);
6472
   *Description*
6473
The default function for working out whether this is an architecture
6474
hit and a machine hit.
6475
 
6476
2.13.2.14 `bfd_get_arch_info'
6477
.............................
6478
 
6479
*Synopsis*
6480
     const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
6481
   *Description*
6482
Return the architecture info struct in ABFD.
6483
 
6484
2.13.2.15 `bfd_lookup_arch'
6485
...........................
6486
 
6487
*Synopsis*
6488
     const bfd_arch_info_type *bfd_lookup_arch
6489
        (enum bfd_architecture arch, unsigned long machine);
6490
   *Description*
6491
Look for the architecture info structure which matches the arguments
6492
ARCH and MACHINE. A machine of 0 matches the machine/architecture
6493
structure which marks itself as the default.
6494
 
6495
2.13.2.16 `bfd_printable_arch_mach'
6496
...................................
6497
 
6498
*Synopsis*
6499
     const char *bfd_printable_arch_mach
6500
        (enum bfd_architecture arch, unsigned long machine);
6501
   *Description*
6502
Return a printable string representing the architecture and machine
6503
type.
6504
 
6505
   This routine is depreciated.
6506
 
6507
2.13.2.17 `bfd_octets_per_byte'
6508
...............................
6509
 
6510
*Synopsis*
6511
     unsigned int bfd_octets_per_byte (bfd *abfd);
6512
   *Description*
6513
Return the number of octets (8-bit quantities) per target byte (minimum
6514
addressable unit).  In most cases, this will be one, but some DSP
6515
targets have 16, 32, or even 48 bits per byte.
6516
 
6517
2.13.2.18 `bfd_arch_mach_octets_per_byte'
6518
.........................................
6519
 
6520
*Synopsis*
6521
     unsigned int bfd_arch_mach_octets_per_byte
6522
        (enum bfd_architecture arch, unsigned long machine);
6523
   *Description*
6524
See bfd_octets_per_byte.
6525
 
6526
   This routine is provided for those cases where a bfd * is not
6527
available
6528
 
6529

6530
File: bfd.info,  Node: Opening and Closing,  Next: Internal,  Prev: Architectures,  Up: BFD front end
6531
 
6532
2.14 Opening and closing BFDs
6533
=============================
6534
 
6535
2.14.1 Functions for opening and closing
6536
----------------------------------------
6537
 
6538
2.14.1.1 `bfd_fopen'
6539
....................
6540
 
6541
*Synopsis*
6542
     bfd *bfd_fopen (const char *filename, const char *target,
6543
         const char *mode, int fd);
6544
   *Description*
6545
Open the file FILENAME with the target TARGET.  Return a pointer to the
6546
created BFD.  If FD is not -1, then `fdopen' is used to open the file;
6547
otherwise, `fopen' is used.  MODE is passed directly to `fopen' or
6548
`fdopen'.
6549
 
6550
   Calls `bfd_find_target', so TARGET is interpreted as by that
6551
function.
6552
 
6553
   The new BFD is marked as cacheable iff FD is -1.
6554
 
6555
   If `NULL' is returned then an error has occured.   Possible errors
6556
are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
6557
error.
6558
 
6559
2.14.1.2 `bfd_openr'
6560
....................
6561
 
6562
*Synopsis*
6563
     bfd *bfd_openr (const char *filename, const char *target);
6564
   *Description*
6565
Open the file FILENAME (using `fopen') with the target TARGET.  Return
6566
a pointer to the created BFD.
6567
 
6568
   Calls `bfd_find_target', so TARGET is interpreted as by that
6569
function.
6570
 
6571
   If `NULL' is returned then an error has occured.   Possible errors
6572
are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
6573
error.
6574
 
6575
2.14.1.3 `bfd_fdopenr'
6576
......................
6577
 
6578
*Synopsis*
6579
     bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
6580
   *Description*
6581
`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'.  It
6582
opens a BFD on a file already described by the FD supplied.
6583
 
6584
   When the file is later `bfd_close'd, the file descriptor will be
6585
closed.  If the caller desires that this file descriptor be cached by
6586
BFD (opened as needed, closed as needed to free descriptors for other
6587
opens), with the supplied FD used as an initial file descriptor (but
6588
subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
6589
returned BFD.  The default is to assume no caching; the file descriptor
6590
will remain open until `bfd_close', and will not be affected by BFD
6591
operations on other files.
6592
 
6593
   Possible errors are `bfd_error_no_memory',
6594
`bfd_error_invalid_target' and `bfd_error_system_call'.
6595
 
6596
2.14.1.4 `bfd_openstreamr'
6597
..........................
6598
 
6599
*Synopsis*
6600
     bfd *bfd_openstreamr (const char *, const char *, void *);
6601
   *Description*
6602
Open a BFD for read access on an existing stdio stream.  When the BFD
6603
is passed to `bfd_close', the stream will be closed.
6604
 
6605
2.14.1.5 `bfd_openr_iovec'
6606
..........................
6607
 
6608
*Synopsis*
6609
     bfd *bfd_openr_iovec (const char *filename, const char *target,
6610
         void *(*open) (struct bfd *nbfd,
6611
         void *open_closure),
6612
         void *open_closure,
6613
         file_ptr (*pread) (struct bfd *nbfd,
6614
         void *stream,
6615
         void *buf,
6616
         file_ptr nbytes,
6617
         file_ptr offset),
6618
         int (*close) (struct bfd *nbfd,
6619
         void *stream),
6620
         int (*stat) (struct bfd *abfd,
6621
         void *stream,
6622
         struct stat *sb));
6623
   *Description*
6624
Create and return a BFD backed by a read-only STREAM.  The STREAM is
6625
created using OPEN, accessed using PREAD and destroyed using CLOSE.
6626
 
6627
   Calls `bfd_find_target', so TARGET is interpreted as by that
6628
function.
6629
 
6630
   Calls OPEN (which can call `bfd_zalloc' and `bfd_get_filename') to
6631
obtain the read-only stream backing the BFD.  OPEN either succeeds
6632
returning the non-`NULL' STREAM, or fails returning `NULL' (setting
6633
`bfd_error').
6634
 
6635
   Calls PREAD to request NBYTES of data from STREAM starting at OFFSET
6636
(e.g., via a call to `bfd_read').  PREAD either succeeds returning the
6637
number of bytes read (which can be less than NBYTES when end-of-file),
6638
or fails returning -1 (setting `bfd_error').
6639
 
6640
   Calls CLOSE when the BFD is later closed using `bfd_close'.  CLOSE
6641
either succeeds returning 0, or fails returning -1 (setting
6642
`bfd_error').
6643
 
6644
   Calls STAT to fill in a stat structure for bfd_stat, bfd_get_size,
6645
and bfd_get_mtime calls.  STAT returns 0 on success, or returns -1 on
6646
failure (setting `bfd_error').
6647
 
6648
   If `bfd_openr_iovec' returns `NULL' then an error has occurred.
6649
Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target'
6650
and `bfd_error_system_call'.
6651
 
6652
2.14.1.6 `bfd_openw'
6653
....................
6654
 
6655
*Synopsis*
6656
     bfd *bfd_openw (const char *filename, const char *target);
6657
   *Description*
6658
Create a BFD, associated with file FILENAME, using the file format
6659
TARGET, and return a pointer to it.
6660
 
6661
   Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
6662
`bfd_error_invalid_target'.
6663
 
6664
2.14.1.7 `bfd_close'
6665
....................
6666
 
6667
*Synopsis*
6668
     bfd_boolean bfd_close (bfd *abfd);
6669
   *Description*
6670
Close a BFD. If the BFD was open for writing, then pending operations
6671
are completed and the file written out and closed.  If the created file
6672
is executable, then `chmod' is called to mark it as such.
6673
 
6674
   All memory attached to the BFD is released.
6675
 
6676
   The file descriptor associated with the BFD is closed (even if it
6677
was passed in to BFD by `bfd_fdopenr').
6678
 
6679
   *Returns*
6680
`TRUE' is returned if all is ok, otherwise `FALSE'.
6681
 
6682
2.14.1.8 `bfd_close_all_done'
6683
.............................
6684
 
6685
*Synopsis*
6686
     bfd_boolean bfd_close_all_done (bfd *);
6687
   *Description*
6688
Close a BFD.  Differs from `bfd_close' since it does not complete any
6689
pending operations.  This routine would be used if the application had
6690
just used BFD for swapping and didn't want to use any of the writing
6691
code.
6692
 
6693
   If the created file is executable, then `chmod' is called to mark it
6694
as such.
6695
 
6696
   All memory attached to the BFD is released.
6697
 
6698
   *Returns*
6699
`TRUE' is returned if all is ok, otherwise `FALSE'.
6700
 
6701
2.14.1.9 `bfd_create'
6702
.....................
6703
 
6704
*Synopsis*
6705
     bfd *bfd_create (const char *filename, bfd *templ);
6706
   *Description*
6707
Create a new BFD in the manner of `bfd_openw', but without opening a
6708
file. The new BFD takes the target from the target used by TEMPLATE.
6709
The format is always set to `bfd_object'.
6710
 
6711
2.14.1.10 `bfd_make_writable'
6712
.............................
6713
 
6714
*Synopsis*
6715
     bfd_boolean bfd_make_writable (bfd *abfd);
6716
   *Description*
6717
Takes a BFD as created by `bfd_create' and converts it into one like as
6718
returned by `bfd_openw'.  It does this by converting the BFD to
6719
BFD_IN_MEMORY.  It's assumed that you will call `bfd_make_readable' on
6720
this bfd later.
6721
 
6722
   *Returns*
6723
`TRUE' is returned if all is ok, otherwise `FALSE'.
6724
 
6725
2.14.1.11 `bfd_make_readable'
6726
.............................
6727
 
6728
*Synopsis*
6729
     bfd_boolean bfd_make_readable (bfd *abfd);
6730
   *Description*
6731
Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
6732
converts it into one like as returned by `bfd_openr'.  It does this by
6733
writing the contents out to the memory buffer, then reversing the
6734
direction.
6735
 
6736
   *Returns*
6737
`TRUE' is returned if all is ok, otherwise `FALSE'.
6738
 
6739
2.14.1.12 `bfd_alloc'
6740
.....................
6741
 
6742
*Synopsis*
6743
     void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
6744
   *Description*
6745
Allocate a block of WANTED bytes of memory attached to `abfd' and
6746
return a pointer to it.
6747
 
6748
2.14.1.13 `bfd_alloc2'
6749
......................
6750
 
6751
*Synopsis*
6752
     void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
6753
   *Description*
6754
Allocate a block of NMEMB elements of SIZE bytes each of memory
6755
attached to `abfd' and return a pointer to it.
6756
 
6757
2.14.1.14 `bfd_zalloc'
6758
......................
6759
 
6760
*Synopsis*
6761
     void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
6762
   *Description*
6763
Allocate a block of WANTED bytes of zeroed memory attached to `abfd'
6764
and return a pointer to it.
6765
 
6766
2.14.1.15 `bfd_zalloc2'
6767
.......................
6768
 
6769
*Synopsis*
6770
     void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
6771
   *Description*
6772
Allocate a block of NMEMB elements of SIZE bytes each of zeroed memory
6773
attached to `abfd' and return a pointer to it.
6774
 
6775
2.14.1.16 `bfd_calc_gnu_debuglink_crc32'
6776
........................................
6777
 
6778
*Synopsis*
6779
     unsigned long bfd_calc_gnu_debuglink_crc32
6780
        (unsigned long crc, const unsigned char *buf, bfd_size_type len);
6781
   *Description*
6782
Computes a CRC value as used in the .gnu_debuglink section.  Advances
6783
the previously computed CRC value by computing and adding in the crc32
6784
for LEN bytes of BUF.
6785
 
6786
   *Returns*
6787
Return the updated CRC32 value.
6788
 
6789
2.14.1.17 `get_debug_link_info'
6790
...............................
6791
 
6792
*Synopsis*
6793
     char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
6794
   *Description*
6795
fetch the filename and CRC32 value for any separate debuginfo
6796
associated with ABFD. Return NULL if no such info found, otherwise
6797
return filename and update CRC32_OUT.
6798
 
6799
2.14.1.18 `separate_debug_file_exists'
6800
......................................
6801
 
6802
*Synopsis*
6803
     bfd_boolean separate_debug_file_exists
6804
        (char *name, unsigned long crc32);
6805
   *Description*
6806
Checks to see if NAME is a file and if its contents match CRC32.
6807
 
6808
2.14.1.19 `find_separate_debug_file'
6809
....................................
6810
 
6811
*Synopsis*
6812
     char *find_separate_debug_file (bfd *abfd);
6813
   *Description*
6814
Searches ABFD for a reference to separate debugging information, scans
6815
various locations in the filesystem, including the file tree rooted at
6816
DEBUG_FILE_DIRECTORY, and returns a filename of such debugging
6817
information if the file is found and has matching CRC32.  Returns NULL
6818
if no reference to debugging file exists, or file cannot be found.
6819
 
6820
2.14.1.20 `bfd_follow_gnu_debuglink'
6821
....................................
6822
 
6823
*Synopsis*
6824
     char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
6825
   *Description*
6826
Takes a BFD and searches it for a .gnu_debuglink section.  If this
6827
section is found, it examines the section for the name and checksum of
6828
a '.debug' file containing auxiliary debugging information.  It then
6829
searches the filesystem for this .debug file in some standard
6830
locations, including the directory tree rooted at DIR, and if found
6831
returns the full filename.
6832
 
6833
   If DIR is NULL, it will search a default path configured into libbfd
6834
at build time.  [XXX this feature is not currently implemented].
6835
 
6836
   *Returns*
6837
`NULL' on any errors or failure to locate the .debug file, otherwise a
6838
pointer to a heap-allocated string containing the filename.  The caller
6839
is responsible for freeing this string.
6840
 
6841
2.14.1.21 `bfd_create_gnu_debuglink_section'
6842
............................................
6843
 
6844
*Synopsis*
6845
     struct bfd_section *bfd_create_gnu_debuglink_section
6846
        (bfd *abfd, const char *filename);
6847
   *Description*
6848
Takes a BFD and adds a .gnu_debuglink section to it.  The section is
6849
sized to be big enough to contain a link to the specified FILENAME.
6850
 
6851
   *Returns*
6852
A pointer to the new section is returned if all is ok.  Otherwise
6853
`NULL' is returned and bfd_error is set.
6854
 
6855
2.14.1.22 `bfd_fill_in_gnu_debuglink_section'
6856
.............................................
6857
 
6858
*Synopsis*
6859
     bfd_boolean bfd_fill_in_gnu_debuglink_section
6860
        (bfd *abfd, struct bfd_section *sect, const char *filename);
6861
   *Description*
6862
Takes a BFD and containing a .gnu_debuglink section SECT and fills in
6863
the contents of the section to contain a link to the specified
6864
FILENAME.  The filename should be relative to the current directory.
6865
 
6866
   *Returns*
6867
`TRUE' is returned if all is ok.  Otherwise `FALSE' is returned and
6868
bfd_error is set.
6869
 
6870

6871
File: bfd.info,  Node: Internal,  Next: File Caching,  Prev: Opening and Closing,  Up: BFD front end
6872
 
6873
2.15 Implementation details
6874
===========================
6875
 
6876
2.15.1 Internal functions
6877
-------------------------
6878
 
6879
*Description*
6880
These routines are used within BFD.  They are not intended for export,
6881
but are documented here for completeness.
6882
 
6883
2.15.1.1 `bfd_write_bigendian_4byte_int'
6884
........................................
6885
 
6886
*Synopsis*
6887
     bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
6888
   *Description*
6889
Write a 4 byte integer I to the output BFD ABFD, in big endian order
6890
regardless of what else is going on.  This is useful in archives.
6891
 
6892
2.15.1.2 `bfd_put_size'
6893
.......................
6894
 
6895
2.15.1.3 `bfd_get_size'
6896
.......................
6897
 
6898
*Description*
6899
These macros as used for reading and writing raw data in sections; each
6900
access (except for bytes) is vectored through the target format of the
6901
BFD and mangled accordingly. The mangling performs any necessary endian
6902
translations and removes alignment restrictions.  Note that types
6903
accepted and returned by these macros are identical so they can be
6904
swapped around in macros--for example, `libaout.h' defines `GET_WORD'
6905
to either `bfd_get_32' or `bfd_get_64'.
6906
 
6907
   In the put routines, VAL must be a `bfd_vma'.  If we are on a system
6908
without prototypes, the caller is responsible for making sure that is
6909
true, with a cast if necessary.  We don't cast them in the macro
6910
definitions because that would prevent `lint' or `gcc -Wall' from
6911
detecting sins such as passing a pointer.  To detect calling these with
6912
less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
6913
`bfd_vma''s.
6914
 
6915
     /* Byte swapping macros for user section data.  */
6916
 
6917
     #define bfd_put_8(abfd, val, ptr) \
6918
       ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
6919
     #define bfd_put_signed_8 \
6920
       bfd_put_8
6921
     #define bfd_get_8(abfd, ptr) \
6922
       (*(unsigned char *) (ptr) & 0xff)
6923
     #define bfd_get_signed_8(abfd, ptr) \
6924
       (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
6925
 
6926
     #define bfd_put_16(abfd, val, ptr) \
6927
       BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
6928
     #define bfd_put_signed_16 \
6929
       bfd_put_16
6930
     #define bfd_get_16(abfd, ptr) \
6931
       BFD_SEND (abfd, bfd_getx16, (ptr))
6932
     #define bfd_get_signed_16(abfd, ptr) \
6933
       BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
6934
 
6935
     #define bfd_put_32(abfd, val, ptr) \
6936
       BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
6937
     #define bfd_put_signed_32 \
6938
       bfd_put_32
6939
     #define bfd_get_32(abfd, ptr) \
6940
       BFD_SEND (abfd, bfd_getx32, (ptr))
6941
     #define bfd_get_signed_32(abfd, ptr) \
6942
       BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
6943
 
6944
     #define bfd_put_64(abfd, val, ptr) \
6945
       BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
6946
     #define bfd_put_signed_64 \
6947
       bfd_put_64
6948
     #define bfd_get_64(abfd, ptr) \
6949
       BFD_SEND (abfd, bfd_getx64, (ptr))
6950
     #define bfd_get_signed_64(abfd, ptr) \
6951
       BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
6952
 
6953
     #define bfd_get(bits, abfd, ptr)                       \
6954
       ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
6955
        : (bits) == 16 ? bfd_get_16 (abfd, ptr)             \
6956
        : (bits) == 32 ? bfd_get_32 (abfd, ptr)             \
6957
        : (bits) == 64 ? bfd_get_64 (abfd, ptr)             \
6958
        : (abort (), (bfd_vma) - 1))
6959
 
6960
     #define bfd_put(bits, abfd, val, ptr)                  \
6961
       ((bits) == 8 ? bfd_put_8  (abfd, val, ptr)           \
6962
        : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)                \
6963
        : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)                \
6964
        : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)                \
6965
        : (abort (), (void) 0))
6966
 
6967
2.15.1.4 `bfd_h_put_size'
6968
.........................
6969
 
6970
*Description*
6971
These macros have the same function as their `bfd_get_x' brethren,
6972
except that they are used for removing information for the header
6973
records of object files. Believe it or not, some object files keep
6974
their header records in big endian order and their data in little
6975
endian order.
6976
 
6977
     /* Byte swapping macros for file header data.  */
6978
 
6979
     #define bfd_h_put_8(abfd, val, ptr) \
6980
       bfd_put_8 (abfd, val, ptr)
6981
     #define bfd_h_put_signed_8(abfd, val, ptr) \
6982
       bfd_put_8 (abfd, val, ptr)
6983
     #define bfd_h_get_8(abfd, ptr) \
6984
       bfd_get_8 (abfd, ptr)
6985
     #define bfd_h_get_signed_8(abfd, ptr) \
6986
       bfd_get_signed_8 (abfd, ptr)
6987
 
6988
     #define bfd_h_put_16(abfd, val, ptr) \
6989
       BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
6990
     #define bfd_h_put_signed_16 \
6991
       bfd_h_put_16
6992
     #define bfd_h_get_16(abfd, ptr) \
6993
       BFD_SEND (abfd, bfd_h_getx16, (ptr))
6994
     #define bfd_h_get_signed_16(abfd, ptr) \
6995
       BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
6996
 
6997
     #define bfd_h_put_32(abfd, val, ptr) \
6998
       BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
6999
     #define bfd_h_put_signed_32 \
7000
       bfd_h_put_32
7001
     #define bfd_h_get_32(abfd, ptr) \
7002
       BFD_SEND (abfd, bfd_h_getx32, (ptr))
7003
     #define bfd_h_get_signed_32(abfd, ptr) \
7004
       BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
7005
 
7006
     #define bfd_h_put_64(abfd, val, ptr) \
7007
       BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
7008
     #define bfd_h_put_signed_64 \
7009
       bfd_h_put_64
7010
     #define bfd_h_get_64(abfd, ptr) \
7011
       BFD_SEND (abfd, bfd_h_getx64, (ptr))
7012
     #define bfd_h_get_signed_64(abfd, ptr) \
7013
       BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
7014
 
7015
     /* Aliases for the above, which should eventually go away.  */
7016
 
7017
     #define H_PUT_64  bfd_h_put_64
7018
     #define H_PUT_32  bfd_h_put_32
7019
     #define H_PUT_16  bfd_h_put_16
7020
     #define H_PUT_8   bfd_h_put_8
7021
     #define H_PUT_S64 bfd_h_put_signed_64
7022
     #define H_PUT_S32 bfd_h_put_signed_32
7023
     #define H_PUT_S16 bfd_h_put_signed_16
7024
     #define H_PUT_S8  bfd_h_put_signed_8
7025
     #define H_GET_64  bfd_h_get_64
7026
     #define H_GET_32  bfd_h_get_32
7027
     #define H_GET_16  bfd_h_get_16
7028
     #define H_GET_8   bfd_h_get_8
7029
     #define H_GET_S64 bfd_h_get_signed_64
7030
     #define H_GET_S32 bfd_h_get_signed_32
7031
     #define H_GET_S16 bfd_h_get_signed_16
7032
     #define H_GET_S8  bfd_h_get_signed_8
7033
 
7034
2.15.1.5 `bfd_log2'
7035
...................
7036
 
7037
*Synopsis*
7038
     unsigned int bfd_log2 (bfd_vma x);
7039
   *Description*
7040
Return the log base 2 of the value supplied, rounded up.  E.g., an X of
7041
1025 returns 11.  A X of 0 returns 0.
7042
 
7043

7044
File: bfd.info,  Node: File Caching,  Next: Linker Functions,  Prev: Internal,  Up: BFD front end
7045
 
7046
2.16 File caching
7047
=================
7048
 
7049
The file caching mechanism is embedded within BFD and allows the
7050
application to open as many BFDs as it wants without regard to the
7051
underlying operating system's file descriptor limit (often as low as 20
7052
open files).  The module in `cache.c' maintains a least recently used
7053
list of `BFD_CACHE_MAX_OPEN' files, and exports the name
7054
`bfd_cache_lookup', which runs around and makes sure that the required
7055
BFD is open. If not, then it chooses a file to close, closes it and
7056
opens the one wanted, returning its file handle.
7057
 
7058
2.16.1 Caching functions
7059
------------------------
7060
 
7061
2.16.1.1 `bfd_cache_init'
7062
.........................
7063
 
7064
*Synopsis*
7065
     bfd_boolean bfd_cache_init (bfd *abfd);
7066
   *Description*
7067
Add a newly opened BFD to the cache.
7068
 
7069
2.16.1.2 `bfd_cache_close'
7070
..........................
7071
 
7072
*Synopsis*
7073
     bfd_boolean bfd_cache_close (bfd *abfd);
7074
   *Description*
7075
Remove the BFD ABFD from the cache. If the attached file is open, then
7076
close it too.
7077
 
7078
   *Returns*
7079
`FALSE' is returned if closing the file fails, `TRUE' is returned if
7080
all is well.
7081
 
7082
2.16.1.3 `bfd_cache_close_all'
7083
..............................
7084
 
7085
*Synopsis*
7086
     bfd_boolean bfd_cache_close_all (void);
7087
   *Description*
7088
Remove all BFDs from the cache. If the attached file is open, then
7089
close it too.
7090
 
7091
   *Returns*
7092
`FALSE' is returned if closing one of the file fails, `TRUE' is
7093
returned if all is well.
7094
 
7095
2.16.1.4 `bfd_open_file'
7096
........................
7097
 
7098
*Synopsis*
7099
     FILE* bfd_open_file (bfd *abfd);
7100
   *Description*
7101
Call the OS to open a file for ABFD.  Return the `FILE *' (possibly
7102
`NULL') that results from this operation.  Set up the BFD so that
7103
future accesses know the file is open. If the `FILE *' returned is
7104
`NULL', then it won't have been put in the cache, so it won't have to
7105
be removed from it.
7106
 
7107

7108
File: bfd.info,  Node: Linker Functions,  Next: Hash Tables,  Prev: File Caching,  Up: BFD front end
7109
 
7110
2.17 Linker Functions
7111
=====================
7112
 
7113
The linker uses three special entry points in the BFD target vector.
7114
It is not necessary to write special routines for these entry points
7115
when creating a new BFD back end, since generic versions are provided.
7116
However, writing them can speed up linking and make it use
7117
significantly less runtime memory.
7118
 
7119
   The first routine creates a hash table used by the other routines.
7120
The second routine adds the symbols from an object file to the hash
7121
table.  The third routine takes all the object files and links them
7122
together to create the output file.  These routines are designed so
7123
that the linker proper does not need to know anything about the symbols
7124
in the object files that it is linking.  The linker merely arranges the
7125
sections as directed by the linker script and lets BFD handle the
7126
details of symbols and relocs.
7127
 
7128
   The second routine and third routines are passed a pointer to a
7129
`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
7130
information relevant to the link, including the linker hash table
7131
(which was created by the first routine) and a set of callback
7132
functions to the linker proper.
7133
 
7134
   The generic linker routines are in `linker.c', and use the header
7135
file `genlink.h'.  As of this writing, the only back ends which have
7136
implemented versions of these routines are a.out (in `aoutx.h') and
7137
ECOFF (in `ecoff.c').  The a.out routines are used as examples
7138
throughout this section.
7139
 
7140
* Menu:
7141
 
7142
* Creating a Linker Hash Table::
7143
* Adding Symbols to the Hash Table::
7144
* Performing the Final Link::
7145
 
7146

7147
File: bfd.info,  Node: Creating a Linker Hash Table,  Next: Adding Symbols to the Hash Table,  Prev: Linker Functions,  Up: Linker Functions
7148
 
7149
2.17.1 Creating a linker hash table
7150
-----------------------------------
7151
 
7152
The linker routines must create a hash table, which must be derived
7153
from `struct bfd_link_hash_table' described in `bfdlink.c'.  *Note Hash
7154
Tables::, for information on how to create a derived hash table.  This
7155
entry point is called using the target vector of the linker output file.
7156
 
7157
   The `_bfd_link_hash_table_create' entry point must allocate and
7158
initialize an instance of the desired hash table.  If the back end does
7159
not require any additional information to be stored with the entries in
7160
the hash table, the entry point may simply create a `struct
7161
bfd_link_hash_table'.  Most likely, however, some additional
7162
information will be needed.
7163
 
7164
   For example, with each entry in the hash table the a.out linker
7165
keeps the index the symbol has in the final output file (this index
7166
number is used so that when doing a relocatable link the symbol index
7167
used in the output file can be quickly filled in when copying over a
7168
reloc).  The a.out linker code defines the required structures and
7169
functions for a hash table derived from `struct bfd_link_hash_table'.
7170
The a.out linker hash table is created by the function
7171
`NAME(aout,link_hash_table_create)'; it simply allocates space for the
7172
hash table, initializes it, and returns a pointer to it.
7173
 
7174
   When writing the linker routines for a new back end, you will
7175
generally not know exactly which fields will be required until you have
7176
finished.  You should simply create a new hash table which defines no
7177
additional fields, and then simply add fields as they become necessary.
7178
 
7179

7180
File: bfd.info,  Node: Adding Symbols to the Hash Table,  Next: Performing the Final Link,  Prev: Creating a Linker Hash Table,  Up: Linker Functions
7181
 
7182
2.17.2 Adding symbols to the hash table
7183
---------------------------------------
7184
 
7185
The linker proper will call the `_bfd_link_add_symbols' entry point for
7186
each object file or archive which is to be linked (typically these are
7187
the files named on the command line, but some may also come from the
7188
linker script).  The entry point is responsible for examining the file.
7189
For an object file, BFD must add any relevant symbol information to
7190
the hash table.  For an archive, BFD must determine which elements of
7191
the archive should be used and adding them to the link.
7192
 
7193
   The a.out version of this entry point is
7194
`NAME(aout,link_add_symbols)'.
7195
 
7196
* Menu:
7197
 
7198
* Differing file formats::
7199
* Adding symbols from an object file::
7200
* Adding symbols from an archive::
7201
 
7202

7203
File: bfd.info,  Node: Differing file formats,  Next: Adding symbols from an object file,  Prev: Adding Symbols to the Hash Table,  Up: Adding Symbols to the Hash Table
7204
 
7205
2.17.2.1 Differing file formats
7206
...............................
7207
 
7208
Normally all the files involved in a link will be of the same format,
7209
but it is also possible to link together different format object files,
7210
and the back end must support that.  The `_bfd_link_add_symbols' entry
7211
point is called via the target vector of the file to be added.  This
7212
has an important consequence: the function may not assume that the hash
7213
table is the type created by the corresponding
7214
`_bfd_link_hash_table_create' vector.  All the `_bfd_link_add_symbols'
7215
function can assume about the hash table is that it is derived from
7216
`struct bfd_link_hash_table'.
7217
 
7218
   Sometimes the `_bfd_link_add_symbols' function must store some
7219
information in the hash table entry to be used by the `_bfd_final_link'
7220
function.  In such a case the output bfd xvec must be checked to make
7221
sure that the hash table was created by an object file of the same
7222
format.
7223
 
7224
   The `_bfd_final_link' routine must be prepared to handle a hash
7225
entry without any extra information added by the
7226
`_bfd_link_add_symbols' function.  A hash entry without extra
7227
information will also occur when the linker script directs the linker
7228
to create a symbol.  Note that, regardless of how a hash table entry is
7229
added, all the fields will be initialized to some sort of null value by
7230
the hash table entry initialization function.
7231
 
7232
   See `ecoff_link_add_externals' for an example of how to check the
7233
output bfd before saving information (in this case, the ECOFF external
7234
symbol debugging information) in a hash table entry.
7235
 
7236

7237
File: bfd.info,  Node: Adding symbols from an object file,  Next: Adding symbols from an archive,  Prev: Differing file formats,  Up: Adding Symbols to the Hash Table
7238
 
7239
2.17.2.2 Adding symbols from an object file
7240
...........................................
7241
 
7242
When the `_bfd_link_add_symbols' routine is passed an object file, it
7243
must add all externally visible symbols in that object file to the hash
7244
table.  The actual work of adding the symbol to the hash table is
7245
normally handled by the function `_bfd_generic_link_add_one_symbol'.
7246
The `_bfd_link_add_symbols' routine is responsible for reading all the
7247
symbols from the object file and passing the correct information to
7248
`_bfd_generic_link_add_one_symbol'.
7249
 
7250
   The `_bfd_link_add_symbols' routine should not use
7251
`bfd_canonicalize_symtab' to read the symbols.  The point of providing
7252
this routine is to avoid the overhead of converting the symbols into
7253
generic `asymbol' structures.
7254
 
7255
   `_bfd_generic_link_add_one_symbol' handles the details of combining
7256
common symbols, warning about multiple definitions, and so forth.  It
7257
takes arguments which describe the symbol to add, notably symbol flags,
7258
a section, and an offset.  The symbol flags include such things as
7259
`BSF_WEAK' or `BSF_INDIRECT'.  The section is a section in the object
7260
file, or something like `bfd_und_section_ptr' for an undefined symbol
7261
or `bfd_com_section_ptr' for a common symbol.
7262
 
7263
   If the `_bfd_final_link' routine is also going to need to read the
7264
symbol information, the `_bfd_link_add_symbols' routine should save it
7265
somewhere attached to the object file BFD.  However, the information
7266
should only be saved if the `keep_memory' field of the `info' argument
7267
is TRUE, so that the `-no-keep-memory' linker switch is effective.
7268
 
7269
   The a.out function which adds symbols from an object file is
7270
`aout_link_add_object_symbols', and most of the interesting work is in
7271
`aout_link_add_symbols'.  The latter saves pointers to the hash tables
7272
entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
7273
number, so that the `_bfd_final_link' routine does not have to call the
7274
hash table lookup routine to locate the entry.
7275
 
7276

7277
File: bfd.info,  Node: Adding symbols from an archive,  Prev: Adding symbols from an object file,  Up: Adding Symbols to the Hash Table
7278
 
7279
2.17.2.3 Adding symbols from an archive
7280
.......................................
7281
 
7282
When the `_bfd_link_add_symbols' routine is passed an archive, it must
7283
look through the symbols defined by the archive and decide which
7284
elements of the archive should be included in the link.  For each such
7285
element it must call the `add_archive_element' linker callback, and it
7286
must add the symbols from the object file to the linker hash table.
7287
 
7288
   In most cases the work of looking through the symbols in the archive
7289
should be done by the `_bfd_generic_link_add_archive_symbols' function.
7290
This function builds a hash table from the archive symbol table and
7291
looks through the list of undefined symbols to see which elements
7292
should be included.  `_bfd_generic_link_add_archive_symbols' is passed
7293
a function to call to make the final decision about adding an archive
7294
element to the link and to do the actual work of adding the symbols to
7295
the linker hash table.
7296
 
7297
   The function passed to `_bfd_generic_link_add_archive_symbols' must
7298
read the symbols of the archive element and decide whether the archive
7299
element should be included in the link.  If the element is to be
7300
included, the `add_archive_element' linker callback routine must be
7301
called with the element as an argument, and the elements symbols must
7302
be added to the linker hash table just as though the element had itself
7303
been passed to the `_bfd_link_add_symbols' function.
7304
 
7305
   When the a.out `_bfd_link_add_symbols' function receives an archive,
7306
it calls `_bfd_generic_link_add_archive_symbols' passing
7307
`aout_link_check_archive_element' as the function argument.
7308
`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
7309
If the latter decides to add the element (an element is only added if
7310
it provides a real, non-common, definition for a previously undefined
7311
or common symbol) it calls the `add_archive_element' callback and then
7312
`aout_link_check_archive_element' calls `aout_link_add_symbols' to
7313
actually add the symbols to the linker hash table.
7314
 
7315
   The ECOFF back end is unusual in that it does not normally call
7316
`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
7317
contain a hash table of symbols.  The ECOFF back end searches the
7318
archive itself to avoid the overhead of creating a new hash table.
7319
 
7320

7321
File: bfd.info,  Node: Performing the Final Link,  Prev: Adding Symbols to the Hash Table,  Up: Linker Functions
7322
 
7323
2.17.3 Performing the final link
7324
--------------------------------
7325
 
7326
When all the input files have been processed, the linker calls the
7327
`_bfd_final_link' entry point of the output BFD.  This routine is
7328
responsible for producing the final output file, which has several
7329
aspects.  It must relocate the contents of the input sections and copy
7330
the data into the output sections.  It must build an output symbol
7331
table including any local symbols from the input files and the global
7332
symbols from the hash table.  When producing relocatable output, it must
7333
modify the input relocs and write them into the output file.  There may
7334
also be object format dependent work to be done.
7335
 
7336
   The linker will also call the `write_object_contents' entry point
7337
when the BFD is closed.  The two entry points must work together in
7338
order to produce the correct output file.
7339
 
7340
   The details of how this works are inevitably dependent upon the
7341
specific object file format.  The a.out `_bfd_final_link' routine is
7342
`NAME(aout,final_link)'.
7343
 
7344
* Menu:
7345
 
7346
* Information provided by the linker::
7347
* Relocating the section contents::
7348
* Writing the symbol table::
7349
 
7350

7351
File: bfd.info,  Node: Information provided by the linker,  Next: Relocating the section contents,  Prev: Performing the Final Link,  Up: Performing the Final Link
7352
 
7353
2.17.3.1 Information provided by the linker
7354
...........................................
7355
 
7356
Before the linker calls the `_bfd_final_link' entry point, it sets up
7357
some data structures for the function to use.
7358
 
7359
   The `input_bfds' field of the `bfd_link_info' structure will point
7360
to a list of all the input files included in the link.  These files are
7361
linked through the `link_next' field of the `bfd' structure.
7362
 
7363
   Each section in the output file will have a list of `link_order'
7364
structures attached to the `map_head.link_order' field (the
7365
`link_order' structure is defined in `bfdlink.h').  These structures
7366
describe how to create the contents of the output section in terms of
7367
the contents of various input sections, fill constants, and,
7368
eventually, other types of information.  They also describe relocs that
7369
must be created by the BFD backend, but do not correspond to any input
7370
file; this is used to support -Ur, which builds constructors while
7371
generating a relocatable object file.
7372
 
7373

7374
File: bfd.info,  Node: Relocating the section contents,  Next: Writing the symbol table,  Prev: Information provided by the linker,  Up: Performing the Final Link
7375
 
7376
2.17.3.2 Relocating the section contents
7377
........................................
7378
 
7379
The `_bfd_final_link' function should look through the `link_order'
7380
structures attached to each section of the output file.  Each
7381
`link_order' structure should either be handled specially, or it should
7382
be passed to the function `_bfd_default_link_order' which will do the
7383
right thing (`_bfd_default_link_order' is defined in `linker.c').
7384
 
7385
   For efficiency, a `link_order' of type `bfd_indirect_link_order'
7386
whose associated section belongs to a BFD of the same format as the
7387
output BFD must be handled specially.  This type of `link_order'
7388
describes part of an output section in terms of a section belonging to
7389
one of the input files.  The `_bfd_final_link' function should read the
7390
contents of the section and any associated relocs, apply the relocs to
7391
the section contents, and write out the modified section contents.  If
7392
performing a relocatable link, the relocs themselves must also be
7393
modified and written out.
7394
 
7395
   The functions `_bfd_relocate_contents' and
7396
`_bfd_final_link_relocate' provide some general support for performing
7397
the actual relocations, notably overflow checking.  Their arguments
7398
include information about the symbol the relocation is against and a
7399
`reloc_howto_type' argument which describes the relocation to perform.
7400
These functions are defined in `reloc.c'.
7401
 
7402
   The a.out function which handles reading, relocating, and writing
7403
section contents is `aout_link_input_section'.  The actual relocation
7404
is done in `aout_link_input_section_std' and
7405
`aout_link_input_section_ext'.
7406
 
7407

7408
File: bfd.info,  Node: Writing the symbol table,  Prev: Relocating the section contents,  Up: Performing the Final Link
7409
 
7410
2.17.3.3 Writing the symbol table
7411
.................................
7412
 
7413
The `_bfd_final_link' function must gather all the symbols in the input
7414
files and write them out.  It must also write out all the symbols in
7415
the global hash table.  This must be controlled by the `strip' and
7416
`discard' fields of the `bfd_link_info' structure.
7417
 
7418
   The local symbols of the input files will not have been entered into
7419
the linker hash table.  The `_bfd_final_link' routine must consider
7420
each input file and include the symbols in the output file.  It may be
7421
convenient to do this when looking through the `link_order' structures,
7422
or it may be done by stepping through the `input_bfds' list.
7423
 
7424
   The `_bfd_final_link' routine must also traverse the global hash
7425
table to gather all the externally visible symbols.  It is possible
7426
that most of the externally visible symbols may be written out when
7427
considering the symbols of each input file, but it is still necessary
7428
to traverse the hash table since the linker script may have defined
7429
some symbols that are not in any of the input files.
7430
 
7431
   The `strip' field of the `bfd_link_info' structure controls which
7432
symbols are written out.  The possible values are listed in
7433
`bfdlink.h'.  If the value is `strip_some', then the `keep_hash' field
7434
of the `bfd_link_info' structure is a hash table of symbols to keep;
7435
each symbol should be looked up in this hash table, and only symbols
7436
which are present should be included in the output file.
7437
 
7438
   If the `strip' field of the `bfd_link_info' structure permits local
7439
symbols to be written out, the `discard' field is used to further
7440
controls which local symbols are included in the output file.  If the
7441
value is `discard_l', then all local symbols which begin with a certain
7442
prefix are discarded; this is controlled by the
7443
`bfd_is_local_label_name' entry point.
7444
 
7445
   The a.out backend handles symbols by calling
7446
`aout_link_write_symbols' on each input BFD and then traversing the
7447
global hash table with the function `aout_link_write_other_symbol'.  It
7448
builds a string table while writing out the symbols, which is written
7449
to the output file at the end of `NAME(aout,final_link)'.
7450
 
7451
2.17.3.4 `bfd_link_split_section'
7452
.................................
7453
 
7454
*Synopsis*
7455
     bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
7456
   *Description*
7457
Return nonzero if SEC should be split during a reloceatable or final
7458
link.
7459
     #define bfd_link_split_section(abfd, sec) \
7460
            BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
7461
 
7462
2.17.3.5 `bfd_section_already_linked'
7463
.....................................
7464
 
7465
*Synopsis*
7466
     void bfd_section_already_linked (bfd *abfd, asection *sec,
7467
         struct bfd_link_info *info);
7468
   *Description*
7469
Check if SEC has been already linked during a reloceatable or final
7470
link.
7471
     #define bfd_section_already_linked(abfd, sec, info) \
7472
            BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
7473
 
7474

7475
File: bfd.info,  Node: Hash Tables,  Prev: Linker Functions,  Up: BFD front end
7476
 
7477
2.18 Hash Tables
7478
================
7479
 
7480
BFD provides a simple set of hash table functions.  Routines are
7481
provided to initialize a hash table, to free a hash table, to look up a
7482
string in a hash table and optionally create an entry for it, and to
7483
traverse a hash table.  There is currently no routine to delete an
7484
string from a hash table.
7485
 
7486
   The basic hash table does not permit any data to be stored with a
7487
string.  However, a hash table is designed to present a base class from
7488
which other types of hash tables may be derived.  These derived types
7489
may store additional information with the string.  Hash tables were
7490
implemented in this way, rather than simply providing a data pointer in
7491
a hash table entry, because they were designed for use by the linker
7492
back ends.  The linker may create thousands of hash table entries, and
7493
the overhead of allocating private data and storing and following
7494
pointers becomes noticeable.
7495
 
7496
   The basic hash table code is in `hash.c'.
7497
 
7498
* Menu:
7499
 
7500
* Creating and Freeing a Hash Table::
7501
* Looking Up or Entering a String::
7502
* Traversing a Hash Table::
7503
* Deriving a New Hash Table Type::
7504
 
7505

7506
File: bfd.info,  Node: Creating and Freeing a Hash Table,  Next: Looking Up or Entering a String,  Prev: Hash Tables,  Up: Hash Tables
7507
 
7508
2.18.1 Creating and freeing a hash table
7509
----------------------------------------
7510
 
7511
To create a hash table, create an instance of a `struct bfd_hash_table'
7512
(defined in `bfd.h') and call `bfd_hash_table_init' (if you know
7513
approximately how many entries you will need, the function
7514
`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
7515
`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
7516
 
7517
   The function `bfd_hash_table_init' take as an argument a function to
7518
use to create new entries.  For a basic hash table, use the function
7519
`bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why
7520
you would want to use a different value for this argument.
7521
 
7522
   `bfd_hash_table_init' will create an objalloc which will be used to
7523
allocate new entries.  You may allocate memory on this objalloc using
7524
`bfd_hash_allocate'.
7525
 
7526
   Use `bfd_hash_table_free' to free up all the memory that has been
7527
allocated for a hash table.  This will not free up the `struct
7528
bfd_hash_table' itself, which you must provide.
7529
 
7530
   Use `bfd_hash_set_default_size' to set the default size of hash
7531
table to use.
7532
 
7533

7534
File: bfd.info,  Node: Looking Up or Entering a String,  Next: Traversing a Hash Table,  Prev: Creating and Freeing a Hash Table,  Up: Hash Tables
7535
 
7536
2.18.2 Looking up or entering a string
7537
--------------------------------------
7538
 
7539
The function `bfd_hash_lookup' is used both to look up a string in the
7540
hash table and to create a new entry.
7541
 
7542
   If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
7543
string.  If the string is found, it will returns a pointer to a `struct
7544
bfd_hash_entry'.  If the string is not found in the table
7545
`bfd_hash_lookup' will return `NULL'.  You should not modify any of the
7546
fields in the returns `struct bfd_hash_entry'.
7547
 
7548
   If the CREATE argument is `TRUE', the string will be entered into
7549
the hash table if it is not already there.  Either way a pointer to a
7550
`struct bfd_hash_entry' will be returned, either to the existing
7551
structure or to a newly created one.  In this case, a `NULL' return
7552
means that an error occurred.
7553
 
7554
   If the CREATE argument is `TRUE', and a new entry is created, the
7555
COPY argument is used to decide whether to copy the string onto the
7556
hash table objalloc or not.  If COPY is passed as `FALSE', you must be
7557
careful not to deallocate or modify the string as long as the hash table
7558
exists.
7559
 
7560

7561
File: bfd.info,  Node: Traversing a Hash Table,  Next: Deriving a New Hash Table Type,  Prev: Looking Up or Entering a String,  Up: Hash Tables
7562
 
7563
2.18.3 Traversing a hash table
7564
------------------------------
7565
 
7566
The function `bfd_hash_traverse' may be used to traverse a hash table,
7567
calling a function on each element.  The traversal is done in a random
7568
order.
7569
 
7570
   `bfd_hash_traverse' takes as arguments a function and a generic
7571
`void *' pointer.  The function is called with a hash table entry (a
7572
`struct bfd_hash_entry *') and the generic pointer passed to
7573
`bfd_hash_traverse'.  The function must return a `boolean' value, which
7574
indicates whether to continue traversing the hash table.  If the
7575
function returns `FALSE', `bfd_hash_traverse' will stop the traversal
7576
and return immediately.
7577
 
7578

7579
File: bfd.info,  Node: Deriving a New Hash Table Type,  Prev: Traversing a Hash Table,  Up: Hash Tables
7580
 
7581
2.18.4 Deriving a new hash table type
7582
-------------------------------------
7583
 
7584
Many uses of hash tables want to store additional information which
7585
each entry in the hash table.  Some also find it convenient to store
7586
additional information with the hash table itself.  This may be done
7587
using a derived hash table.
7588
 
7589
   Since C is not an object oriented language, creating a derived hash
7590
table requires sticking together some boilerplate routines with a few
7591
differences specific to the type of hash table you want to create.
7592
 
7593
   An example of a derived hash table is the linker hash table.  The
7594
structures for this are defined in `bfdlink.h'.  The functions are in
7595
`linker.c'.
7596
 
7597
   You may also derive a hash table from an already derived hash table.
7598
For example, the a.out linker backend code uses a hash table derived
7599
from the linker hash table.
7600
 
7601
* Menu:
7602
 
7603
* Define the Derived Structures::
7604
* Write the Derived Creation Routine::
7605
* Write Other Derived Routines::
7606
 
7607

7608
File: bfd.info,  Node: Define the Derived Structures,  Next: Write the Derived Creation Routine,  Prev: Deriving a New Hash Table Type,  Up: Deriving a New Hash Table Type
7609
 
7610
2.18.4.1 Define the derived structures
7611
......................................
7612
 
7613
You must define a structure for an entry in the hash table, and a
7614
structure for the hash table itself.
7615
 
7616
   The first field in the structure for an entry in the hash table must
7617
be of the type used for an entry in the hash table you are deriving
7618
from.  If you are deriving from a basic hash table this is `struct
7619
bfd_hash_entry', which is defined in `bfd.h'.  The first field in the
7620
structure for the hash table itself must be of the type of the hash
7621
table you are deriving from itself.  If you are deriving from a basic
7622
hash table, this is `struct bfd_hash_table'.
7623
 
7624
   For example, the linker hash table defines `struct
7625
bfd_link_hash_entry' (in `bfdlink.h').  The first field, `root', is of
7626
type `struct bfd_hash_entry'.  Similarly, the first field in `struct
7627
bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
7628
 
7629

7630
File: bfd.info,  Node: Write the Derived Creation Routine,  Next: Write Other Derived Routines,  Prev: Define the Derived Structures,  Up: Deriving a New Hash Table Type
7631
 
7632
2.18.4.2 Write the derived creation routine
7633
...........................................
7634
 
7635
You must write a routine which will create and initialize an entry in
7636
the hash table.  This routine is passed as the function argument to
7637
`bfd_hash_table_init'.
7638
 
7639
   In order to permit other hash tables to be derived from the hash
7640
table you are creating, this routine must be written in a standard way.
7641
 
7642
   The first argument to the creation routine is a pointer to a hash
7643
table entry.  This may be `NULL', in which case the routine should
7644
allocate the right amount of space.  Otherwise the space has already
7645
been allocated by a hash table type derived from this one.
7646
 
7647
   After allocating space, the creation routine must call the creation
7648
routine of the hash table type it is derived from, passing in a pointer
7649
to the space it just allocated.  This will initialize any fields used
7650
by the base hash table.
7651
 
7652
   Finally the creation routine must initialize any local fields for
7653
the new hash table type.
7654
 
7655
   Here is a boilerplate example of a creation routine.  FUNCTION_NAME
7656
is the name of the routine.  ENTRY_TYPE is the type of an entry in the
7657
hash table you are creating.  BASE_NEWFUNC is the name of the creation
7658
routine of the hash table type your hash table is derived from.
7659
 
7660
     struct bfd_hash_entry *
7661
     FUNCTION_NAME (struct bfd_hash_entry *entry,
7662
                          struct bfd_hash_table *table,
7663
                          const char *string)
7664
     {
7665
       struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
7666
 
7667
      /* Allocate the structure if it has not already been allocated by a
7668
         derived class.  */
7669
       if (ret == NULL)
7670
         {
7671
           ret = bfd_hash_allocate (table, sizeof (* ret));
7672
           if (ret == NULL)
7673
             return NULL;
7674
         }
7675
 
7676
      /* Call the allocation method of the base class.  */
7677
       ret = ((ENTRY_TYPE *)
7678
             BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
7679
 
7680
      /* Initialize the local fields here.  */
7681
 
7682
       return (struct bfd_hash_entry *) ret;
7683
     }
7684
   *Description*
7685
The creation routine for the linker hash table, which is in `linker.c',
7686
looks just like this example.  FUNCTION_NAME is
7687
`_bfd_link_hash_newfunc'.  ENTRY_TYPE is `struct bfd_link_hash_entry'.
7688
BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
7689
hash table.
7690
 
7691
   `_bfd_link_hash_newfunc' also initializes the local fields in a
7692
linker hash table entry: `type', `written' and `next'.
7693
 
7694

7695
File: bfd.info,  Node: Write Other Derived Routines,  Prev: Write the Derived Creation Routine,  Up: Deriving a New Hash Table Type
7696
 
7697
2.18.4.3 Write other derived routines
7698
.....................................
7699
 
7700
You will want to write other routines for your new hash table, as well.
7701
 
7702
   You will want an initialization routine which calls the
7703
initialization routine of the hash table you are deriving from and
7704
initializes any other local fields.  For the linker hash table, this is
7705
`_bfd_link_hash_table_init' in `linker.c'.
7706
 
7707
   You will want a lookup routine which calls the lookup routine of the
7708
hash table you are deriving from and casts the result.  The linker hash
7709
table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
7710
additional argument which it uses to decide how to return the looked up
7711
value).
7712
 
7713
   You may want a traversal routine.  This should just call the
7714
traversal routine of the hash table you are deriving from with
7715
appropriate casts.  The linker hash table uses `bfd_link_hash_traverse'
7716
in `linker.c'.
7717
 
7718
   These routines may simply be defined as macros.  For example, the
7719
a.out backend linker hash table, which is derived from the linker hash
7720
table, uses macros for the lookup and traversal routines.  These are
7721
`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
7722
 
7723

7724
File: bfd.info,  Node: BFD back ends,  Next: GNU Free Documentation License,  Prev: BFD front end,  Up: Top
7725
 
7726
3 BFD back ends
7727
***************
7728
 
7729
* Menu:
7730
 
7731
* What to Put Where::
7732
* aout ::       a.out backends
7733
* coff ::       coff backends
7734
* elf  ::       elf backends
7735
* mmo  ::       mmo backend
7736
 
7737

7738
File: bfd.info,  Node: What to Put Where,  Next: aout,  Prev: BFD back ends,  Up: BFD back ends
7739
 
7740
3.1 What to Put Where
7741
=====================
7742
 
7743
All of BFD lives in one directory.
7744
 
7745

7746
File: bfd.info,  Node: aout,  Next: coff,  Prev: What to Put Where,  Up: BFD back ends
7747
 
7748
3.2 a.out backends
7749
==================
7750
 
7751
*Description*
7752
BFD supports a number of different flavours of a.out format, though the
7753
major differences are only the sizes of the structures on disk, and the
7754
shape of the relocation information.
7755
 
7756
   The support is split into a basic support file `aoutx.h' and other
7757
files which derive functions from the base. One derivation file is
7758
`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
7759
support for sun3, sun4, 386 and 29k a.out files, to create a target
7760
jump vector for a specific target.
7761
 
7762
   This information is further split out into more specific files for
7763
each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
7764
the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
7765
format.
7766
 
7767
   The base file `aoutx.h' defines general mechanisms for reading and
7768
writing records to and from disk and various other methods which BFD
7769
requires. It is included by `aout32.c' and `aout64.c' to form the names
7770
`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
7771
 
7772
   As an example, this is what goes on to make the back end for a sun4,
7773
from `aout32.c':
7774
 
7775
            #define ARCH_SIZE 32
7776
            #include "aoutx.h"
7777
 
7778
   Which exports names:
7779
 
7780
            ...
7781
            aout_32_canonicalize_reloc
7782
            aout_32_find_nearest_line
7783
            aout_32_get_lineno
7784
            aout_32_get_reloc_upper_bound
7785
            ...
7786
 
7787
   from `sunos.c':
7788
 
7789
            #define TARGET_NAME "a.out-sunos-big"
7790
            #define VECNAME    sunos_big_vec
7791
            #include "aoutf1.h"
7792
 
7793
   requires all the names from `aout32.c', and produces the jump vector
7794
 
7795
            sunos_big_vec
7796
 
7797
   The file `host-aout.c' is a special case.  It is for a large set of
7798
hosts that use "more or less standard" a.out files, and for which
7799
cross-debugging is not interesting.  It uses the standard 32-bit a.out
7800
support routines, but determines the file offsets and addresses of the
7801
text, data, and BSS sections, the machine architecture and machine
7802
type, and the entry point address, in a host-dependent manner.  Once
7803
these values have been determined, generic code is used to handle the
7804
object file.
7805
 
7806
   When porting it to run on a new system, you must supply:
7807
 
7808
             HOST_PAGE_SIZE
7809
             HOST_SEGMENT_SIZE
7810
             HOST_MACHINE_ARCH       (optional)
7811
             HOST_MACHINE_MACHINE    (optional)
7812
             HOST_TEXT_START_ADDR
7813
             HOST_STACK_END_ADDR
7814
 
7815
   in the file `../include/sys/h-XXX.h' (for your host).  These values,
7816
plus the structures and macros defined in `a.out.h' on your host
7817
system, will produce a BFD target that will access ordinary a.out files
7818
on your host. To configure a new machine to use `host-aout.c', specify:
7819
 
7820
            TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
7821
            TDEPFILES= host-aout.o trad-core.o
7822
 
7823
   in the `config/XXX.mt' file, and modify `configure.in' to use the
7824
`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
7825
is selected.
7826
 
7827
3.2.1 Relocations
7828
-----------------
7829
 
7830
*Description*
7831
The file `aoutx.h' provides for both the _standard_ and _extended_
7832
forms of a.out relocation records.
7833
 
7834
   The standard records contain only an address, a symbol index, and a
7835
type field. The extended records (used on 29ks and sparcs) also have a
7836
full integer for an addend.
7837
 
7838
3.2.2 Internal entry points
7839
---------------------------
7840
 
7841
*Description*
7842
`aoutx.h' exports several routines for accessing the contents of an
7843
a.out file, which are gathered and exported in turn by various format
7844
specific files (eg sunos.c).
7845
 
7846
3.2.2.1 `aout_SIZE_swap_exec_header_in'
7847
.......................................
7848
 
7849
*Synopsis*
7850
     void aout_SIZE_swap_exec_header_in,
7851
        (bfd *abfd,
7852
         struct external_exec *bytes,
7853
         struct internal_exec *execp);
7854
   *Description*
7855
Swap the information in an executable header RAW_BYTES taken from a raw
7856
byte stream memory image into the internal exec header structure EXECP.
7857
 
7858
3.2.2.2 `aout_SIZE_swap_exec_header_out'
7859
........................................
7860
 
7861
*Synopsis*
7862
     void aout_SIZE_swap_exec_header_out
7863
        (bfd *abfd,
7864
         struct internal_exec *execp,
7865
         struct external_exec *raw_bytes);
7866
   *Description*
7867
Swap the information in an internal exec header structure EXECP into
7868
the buffer RAW_BYTES ready for writing to disk.
7869
 
7870
3.2.2.3 `aout_SIZE_some_aout_object_p'
7871
......................................
7872
 
7873
*Synopsis*
7874
     const bfd_target *aout_SIZE_some_aout_object_p
7875
        (bfd *abfd,
7876
         struct internal_exec *execp,
7877
         const bfd_target *(*callback_to_real_object_p) (bfd *));
7878
   *Description*
7879
Some a.out variant thinks that the file open in ABFD checking is an
7880
a.out file.  Do some more checking, and set up for access if it really
7881
is.  Call back to the calling environment's "finish up" function just
7882
before returning, to handle any last-minute setup.
7883
 
7884
3.2.2.4 `aout_SIZE_mkobject'
7885
............................
7886
 
7887
*Synopsis*
7888
     bfd_boolean aout_SIZE_mkobject, (bfd *abfd);
7889
   *Description*
7890
Initialize BFD ABFD for use with a.out files.
7891
 
7892
3.2.2.5 `aout_SIZE_machine_type'
7893
................................
7894
 
7895
*Synopsis*
7896
     enum machine_type  aout_SIZE_machine_type
7897
        (enum bfd_architecture arch,
7898
         unsigned long machine,
7899
         bfd_boolean *unknown);
7900
   *Description*
7901
Keep track of machine architecture and machine type for a.out's. Return
7902
the `machine_type' for a particular architecture and machine, or
7903
`M_UNKNOWN' if that exact architecture and machine can't be represented
7904
in a.out format.
7905
 
7906
   If the architecture is understood, machine type 0 (default) is
7907
always understood.
7908
 
7909
3.2.2.6 `aout_SIZE_set_arch_mach'
7910
.................................
7911
 
7912
*Synopsis*
7913
     bfd_boolean aout_SIZE_set_arch_mach,
7914
        (bfd *,
7915
         enum bfd_architecture arch,
7916
         unsigned long machine);
7917
   *Description*
7918
Set the architecture and the machine of the BFD ABFD to the values ARCH
7919
and MACHINE.  Verify that ABFD's format can support the architecture
7920
required.
7921
 
7922
3.2.2.7 `aout_SIZE_new_section_hook'
7923
....................................
7924
 
7925
*Synopsis*
7926
     bfd_boolean aout_SIZE_new_section_hook,
7927
        (bfd *abfd,
7928
         asection *newsect);
7929
   *Description*
7930
Called by the BFD in response to a `bfd_make_section' request.
7931
 
7932

7933
File: bfd.info,  Node: coff,  Next: elf,  Prev: aout,  Up: BFD back ends
7934
 
7935
3.3 coff backends
7936
=================
7937
 
7938
BFD supports a number of different flavours of coff format.  The major
7939
differences between formats are the sizes and alignments of fields in
7940
structures on disk, and the occasional extra field.
7941
 
7942
   Coff in all its varieties is implemented with a few common files and
7943
a number of implementation specific files. For example, The 88k bcs
7944
coff format is implemented in the file `coff-m88k.c'. This file
7945
`#include's `coff/m88k.h' which defines the external structure of the
7946
coff format for the 88k, and `coff/internal.h' which defines the
7947
internal structure. `coff-m88k.c' also defines the relocations used by
7948
the 88k format *Note Relocations::.
7949
 
7950
   The Intel i960 processor version of coff is implemented in
7951
`coff-i960.c'. This file has the same structure as `coff-m88k.c',
7952
except that it includes `coff/i960.h' rather than `coff-m88k.h'.
7953
 
7954
3.3.1 Porting to a new version of coff
7955
--------------------------------------
7956
 
7957
The recommended method is to select from the existing implementations
7958
the version of coff which is most like the one you want to use.  For
7959
example, we'll say that i386 coff is the one you select, and that your
7960
coff flavour is called foo.  Copy `i386coff.c' to `foocoff.c', copy
7961
`../include/coff/i386.h' to `../include/coff/foo.h', and add the lines
7962
to `targets.c' and `Makefile.in' so that your new back end is used.
7963
Alter the shapes of the structures in `../include/coff/foo.h' so that
7964
they match what you need. You will probably also have to add `#ifdef's
7965
to the code in `coff/internal.h' and `coffcode.h' if your version of
7966
coff is too wild.
7967
 
7968
   You can verify that your new BFD backend works quite simply by
7969
building `objdump' from the `binutils' directory, and making sure that
7970
its version of what's going on and your host system's idea (assuming it
7971
has the pretty standard coff dump utility, usually called `att-dump' or
7972
just `dump') are the same.  Then clean up your code, and send what
7973
you've done to Cygnus. Then your stuff will be in the next release, and
7974
you won't have to keep integrating it.
7975
 
7976
3.3.2 How the coff backend works
7977
--------------------------------
7978
 
7979
3.3.2.1 File layout
7980
...................
7981
 
7982
The Coff backend is split into generic routines that are applicable to
7983
any Coff target and routines that are specific to a particular target.
7984
The target-specific routines are further split into ones which are
7985
basically the same for all Coff targets except that they use the
7986
external symbol format or use different values for certain constants.
7987
 
7988
   The generic routines are in `coffgen.c'.  These routines work for
7989
any Coff target.  They use some hooks into the target specific code;
7990
the hooks are in a `bfd_coff_backend_data' structure, one of which
7991
exists for each target.
7992
 
7993
   The essentially similar target-specific routines are in
7994
`coffcode.h'.  This header file includes executable C code.  The
7995
various Coff targets first include the appropriate Coff header file,
7996
make any special defines that are needed, and then include `coffcode.h'.
7997
 
7998
   Some of the Coff targets then also have additional routines in the
7999
target source file itself.
8000
 
8001
   For example, `coff-i960.c' includes `coff/internal.h' and
8002
`coff/i960.h'.  It then defines a few constants, such as `I960', and
8003
includes `coffcode.h'.  Since the i960 has complex relocation types,
8004
`coff-i960.c' also includes some code to manipulate the i960 relocs.
8005
This code is not in `coffcode.h' because it would not be used by any
8006
other target.
8007
 
8008
3.3.2.2 Bit twiddling
8009
.....................
8010
 
8011
Each flavour of coff supported in BFD has its own header file
8012
describing the external layout of the structures. There is also an
8013
internal description of the coff layout, in `coff/internal.h'. A major
8014
function of the coff backend is swapping the bytes and twiddling the
8015
bits to translate the external form of the structures into the normal
8016
internal form. This is all performed in the `bfd_swap'_thing_direction
8017
routines. Some elements are different sizes between different versions
8018
of coff; it is the duty of the coff version specific include file to
8019
override the definitions of various packing routines in `coffcode.h'.
8020
E.g., the size of line number entry in coff is sometimes 16 bits, and
8021
sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
8022
will select the correct one. No doubt, some day someone will find a
8023
version of coff which has a varying field size not catered to at the
8024
moment. To port BFD, that person will have to add more `#defines'.
8025
Three of the bit twiddling routines are exported to `gdb';
8026
`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
8027
reads the symbol table on its own, but uses BFD to fix things up.  More
8028
of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
8029
`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
8030
`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
8031
`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
8032
table and reloc drudgery itself, thereby saving the internal BFD
8033
overhead, but uses BFD to swap things on the way out, making cross
8034
ports much safer.  Doing so also allows BFD (and thus the linker) to
8035
use the same header files as `gas', which makes one avenue to disaster
8036
disappear.
8037
 
8038
3.3.2.3 Symbol reading
8039
......................
8040
 
8041
The simple canonical form for symbols used by BFD is not rich enough to
8042
keep all the information available in a coff symbol table. The back end
8043
gets around this problem by keeping the original symbol table around,
8044
"behind the scenes".
8045
 
8046
   When a symbol table is requested (through a call to
8047
`bfd_canonicalize_symtab'), a request gets through to
8048
`coff_get_normalized_symtab'. This reads the symbol table from the coff
8049
file and swaps all the structures inside into the internal form. It
8050
also fixes up all the pointers in the table (represented in the file by
8051
offsets from the first symbol in the table) into physical pointers to
8052
elements in the new internal table. This involves some work since the
8053
meanings of fields change depending upon context: a field that is a
8054
pointer to another structure in the symbol table at one moment may be
8055
the size in bytes of a structure at the next.  Another pass is made
8056
over the table. All symbols which mark file names (`C_FILE' symbols)
8057
are modified so that the internal string points to the value in the
8058
auxent (the real filename) rather than the normal text associated with
8059
the symbol (`".file"').
8060
 
8061
   At this time the symbol names are moved around. Coff stores all
8062
symbols less than nine characters long physically within the symbol
8063
table; longer strings are kept at the end of the file in the string
8064
table. This pass moves all strings into memory and replaces them with
8065
pointers to the strings.
8066
 
8067
   The symbol table is massaged once again, this time to create the
8068
canonical table used by the BFD application. Each symbol is inspected
8069
in turn, and a decision made (using the `sclass' field) about the
8070
various flags to set in the `asymbol'.  *Note Symbols::. The generated
8071
canonical table shares strings with the hidden internal symbol table.
8072
 
8073
   Any linenumbers are read from the coff file too, and attached to the
8074
symbols which own the functions the linenumbers belong to.
8075
 
8076
3.3.2.4 Symbol writing
8077
......................
8078
 
8079
Writing a symbol to a coff file which didn't come from a coff file will
8080
lose any debugging information. The `asymbol' structure remembers the
8081
BFD from which the symbol was taken, and on output the back end makes
8082
sure that the same destination target as source target is present.
8083
 
8084
   When the symbols have come from a coff file then all the debugging
8085
information is preserved.
8086
 
8087
   Symbol tables are provided for writing to the back end in a vector
8088
of pointers to pointers. This allows applications like the linker to
8089
accumulate and output large symbol tables without having to do too much
8090
byte copying.
8091
 
8092
   This function runs through the provided symbol table and patches
8093
each symbol marked as a file place holder (`C_FILE') to point to the
8094
next file place holder in the list. It also marks each `offset' field
8095
in the list with the offset from the first symbol of the current symbol.
8096
 
8097
   Another function of this procedure is to turn the canonical value
8098
form of BFD into the form used by coff. Internally, BFD expects symbol
8099
values to be offsets from a section base; so a symbol physically at
8100
0x120, but in a section starting at 0x100, would have the value 0x20.
8101
Coff expects symbols to contain their final value, so symbols have
8102
their values changed at this point to reflect their sum with their
8103
owning section.  This transformation uses the `output_section' field of
8104
the `asymbol''s `asection' *Note Sections::.
8105
 
8106
   * `coff_mangle_symbols'
8107
   This routine runs though the provided symbol table and uses the
8108
offsets generated by the previous pass and the pointers generated when
8109
the symbol table was read in to create the structured hierarchy
8110
required by coff. It changes each pointer to a symbol into the index
8111
into the symbol table of the asymbol.
8112
 
8113
   * `coff_write_symbols'
8114
   This routine runs through the symbol table and patches up the
8115
symbols from their internal form into the coff way, calls the bit
8116
twiddlers, and writes out the table to the file.
8117
 
8118
3.3.2.5 `coff_symbol_type'
8119
..........................
8120
 
8121
*Description*
8122
The hidden information for an `asymbol' is described in a
8123
`combined_entry_type':
8124
 
8125
 
8126
     typedef struct coff_ptr_struct
8127
     {
8128
       /* Remembers the offset from the first symbol in the file for
8129
          this symbol. Generated by coff_renumber_symbols. */
8130
       unsigned int offset;
8131
 
8132
       /* Should the value of this symbol be renumbered.  Used for
8133
          XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
8134
       unsigned int fix_value : 1;
8135
 
8136
       /* Should the tag field of this symbol be renumbered.
8137
          Created by coff_pointerize_aux. */
8138
       unsigned int fix_tag : 1;
8139
 
8140
       /* Should the endidx field of this symbol be renumbered.
8141
          Created by coff_pointerize_aux. */
8142
       unsigned int fix_end : 1;
8143
 
8144
       /* Should the x_csect.x_scnlen field be renumbered.
8145
          Created by coff_pointerize_aux. */
8146
       unsigned int fix_scnlen : 1;
8147
 
8148
       /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
8149
          index into the line number entries.  Set by coff_slurp_symbol_table.  */
8150
       unsigned int fix_line : 1;
8151
 
8152
       /* The container for the symbol structure as read and translated
8153
          from the file. */
8154
       union
8155
       {
8156
         union internal_auxent auxent;
8157
         struct internal_syment syment;
8158
       } u;
8159
     } combined_entry_type;
8160
 
8161
 
8162
     /* Each canonical asymbol really looks like this: */
8163
 
8164
     typedef struct coff_symbol_struct
8165
     {
8166
       /* The actual symbol which the rest of BFD works with */
8167
       asymbol symbol;
8168
 
8169
       /* A pointer to the hidden information for this symbol */
8170
       combined_entry_type *native;
8171
 
8172
       /* A pointer to the linenumber information for this symbol */
8173
       struct lineno_cache_entry *lineno;
8174
 
8175
       /* Have the line numbers been relocated yet ? */
8176
       bfd_boolean done_lineno;
8177
     } coff_symbol_type;
8178
 
8179
3.3.2.6 `bfd_coff_backend_data'
8180
...............................
8181
 
8182
     /* COFF symbol classifications.  */
8183
 
8184
     enum coff_symbol_classification
8185
     {
8186
       /* Global symbol.  */
8187
       COFF_SYMBOL_GLOBAL,
8188
       /* Common symbol.  */
8189
       COFF_SYMBOL_COMMON,
8190
       /* Undefined symbol.  */
8191
       COFF_SYMBOL_UNDEFINED,
8192
       /* Local symbol.  */
8193
       COFF_SYMBOL_LOCAL,
8194
       /* PE section symbol.  */
8195
       COFF_SYMBOL_PE_SECTION
8196
     };
8197
Special entry points for gdb to swap in coff symbol table parts:
8198
     typedef struct
8199
     {
8200
       void (*_bfd_coff_swap_aux_in)
8201
         (bfd *, void *, int, int, int, int, void *);
8202
 
8203
       void (*_bfd_coff_swap_sym_in)
8204
         (bfd *, void *, void *);
8205
 
8206
       void (*_bfd_coff_swap_lineno_in)
8207
         (bfd *, void *, void *);
8208
 
8209
       unsigned int (*_bfd_coff_swap_aux_out)
8210
         (bfd *, void *, int, int, int, int, void *);
8211
 
8212
       unsigned int (*_bfd_coff_swap_sym_out)
8213
         (bfd *, void *, void *);
8214
 
8215
       unsigned int (*_bfd_coff_swap_lineno_out)
8216
         (bfd *, void *, void *);
8217
 
8218
       unsigned int (*_bfd_coff_swap_reloc_out)
8219
         (bfd *, void *, void *);
8220
 
8221
       unsigned int (*_bfd_coff_swap_filehdr_out)
8222
         (bfd *, void *, void *);
8223
 
8224
       unsigned int (*_bfd_coff_swap_aouthdr_out)
8225
         (bfd *, void *, void *);
8226
 
8227
       unsigned int (*_bfd_coff_swap_scnhdr_out)
8228
         (bfd *, void *, void *);
8229
 
8230
       unsigned int _bfd_filhsz;
8231
       unsigned int _bfd_aoutsz;
8232
       unsigned int _bfd_scnhsz;
8233
       unsigned int _bfd_symesz;
8234
       unsigned int _bfd_auxesz;
8235
       unsigned int _bfd_relsz;
8236
       unsigned int _bfd_linesz;
8237
       unsigned int _bfd_filnmlen;
8238
       bfd_boolean _bfd_coff_long_filenames;
8239
       bfd_boolean _bfd_coff_long_section_names;
8240
       unsigned int _bfd_coff_default_section_alignment_power;
8241
       bfd_boolean _bfd_coff_force_symnames_in_strings;
8242
       unsigned int _bfd_coff_debug_string_prefix_length;
8243
 
8244
       void (*_bfd_coff_swap_filehdr_in)
8245
         (bfd *, void *, void *);
8246
 
8247
       void (*_bfd_coff_swap_aouthdr_in)
8248
         (bfd *, void *, void *);
8249
 
8250
       void (*_bfd_coff_swap_scnhdr_in)
8251
         (bfd *, void *, void *);
8252
 
8253
       void (*_bfd_coff_swap_reloc_in)
8254
         (bfd *abfd, void *, void *);
8255
 
8256
       bfd_boolean (*_bfd_coff_bad_format_hook)
8257
         (bfd *, void *);
8258
 
8259
       bfd_boolean (*_bfd_coff_set_arch_mach_hook)
8260
         (bfd *, void *);
8261
 
8262
       void * (*_bfd_coff_mkobject_hook)
8263
         (bfd *, void *, void *);
8264
 
8265
       bfd_boolean (*_bfd_styp_to_sec_flags_hook)
8266
         (bfd *, void *, const char *, asection *, flagword *);
8267
 
8268
       void (*_bfd_set_alignment_hook)
8269
         (bfd *, asection *, void *);
8270
 
8271
       bfd_boolean (*_bfd_coff_slurp_symbol_table)
8272
         (bfd *);
8273
 
8274
       bfd_boolean (*_bfd_coff_symname_in_debug)
8275
         (bfd *, struct internal_syment *);
8276
 
8277
       bfd_boolean (*_bfd_coff_pointerize_aux_hook)
8278
         (bfd *, combined_entry_type *, combined_entry_type *,
8279
                 unsigned int, combined_entry_type *);
8280
 
8281
       bfd_boolean (*_bfd_coff_print_aux)
8282
         (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
8283
                 combined_entry_type *, unsigned int);
8284
 
8285
       void (*_bfd_coff_reloc16_extra_cases)
8286
         (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
8287
                bfd_byte *, unsigned int *, unsigned int *);
8288
 
8289
       int (*_bfd_coff_reloc16_estimate)
8290
         (bfd *, asection *, arelent *, unsigned int,
8291
                 struct bfd_link_info *);
8292
 
8293
       enum coff_symbol_classification (*_bfd_coff_classify_symbol)
8294
         (bfd *, struct internal_syment *);
8295
 
8296
       bfd_boolean (*_bfd_coff_compute_section_file_positions)
8297
         (bfd *);
8298
 
8299
       bfd_boolean (*_bfd_coff_start_final_link)
8300
         (bfd *, struct bfd_link_info *);
8301
 
8302
       bfd_boolean (*_bfd_coff_relocate_section)
8303
         (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
8304
                 struct internal_reloc *, struct internal_syment *, asection **);
8305
 
8306
       reloc_howto_type *(*_bfd_coff_rtype_to_howto)
8307
         (bfd *, asection *, struct internal_reloc *,
8308
                 struct coff_link_hash_entry *, struct internal_syment *,
8309
                 bfd_vma *);
8310
 
8311
       bfd_boolean (*_bfd_coff_adjust_symndx)
8312
         (bfd *, struct bfd_link_info *, bfd *, asection *,
8313
                 struct internal_reloc *, bfd_boolean *);
8314
 
8315
       bfd_boolean (*_bfd_coff_link_add_one_symbol)
8316
         (struct bfd_link_info *, bfd *, const char *, flagword,
8317
                 asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
8318
                 struct bfd_link_hash_entry **);
8319
 
8320
       bfd_boolean (*_bfd_coff_link_output_has_begun)
8321
         (bfd *, struct coff_final_link_info *);
8322
 
8323
       bfd_boolean (*_bfd_coff_final_link_postscript)
8324
         (bfd *, struct coff_final_link_info *);
8325
 
8326
     } bfd_coff_backend_data;
8327
 
8328
     #define coff_backend_info(abfd) \
8329
       ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
8330
 
8331
     #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
8332
       ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
8333
 
8334
     #define bfd_coff_swap_sym_in(a,e,i) \
8335
       ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
8336
 
8337
     #define bfd_coff_swap_lineno_in(a,e,i) \
8338
       ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
8339
 
8340
     #define bfd_coff_swap_reloc_out(abfd, i, o) \
8341
       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
8342
 
8343
     #define bfd_coff_swap_lineno_out(abfd, i, o) \
8344
       ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
8345
 
8346
     #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
8347
       ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
8348
 
8349
     #define bfd_coff_swap_sym_out(abfd, i,o) \
8350
       ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
8351
 
8352
     #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
8353
       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
8354
 
8355
     #define bfd_coff_swap_filehdr_out(abfd, i,o) \
8356
       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
8357
 
8358
     #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
8359
       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
8360
 
8361
     #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
8362
     #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
8363
     #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
8364
     #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
8365
     #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
8366
     #define bfd_coff_relsz(abfd)  (coff_backend_info (abfd)->_bfd_relsz)
8367
     #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
8368
     #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
8369
     #define bfd_coff_long_filenames(abfd) \
8370
       (coff_backend_info (abfd)->_bfd_coff_long_filenames)
8371
     #define bfd_coff_long_section_names(abfd) \
8372
       (coff_backend_info (abfd)->_bfd_coff_long_section_names)
8373
     #define bfd_coff_default_section_alignment_power(abfd) \
8374
       (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
8375
     #define bfd_coff_swap_filehdr_in(abfd, i,o) \
8376
       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
8377
 
8378
     #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
8379
       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
8380
 
8381
     #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
8382
       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
8383
 
8384
     #define bfd_coff_swap_reloc_in(abfd, i, o) \
8385
       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
8386
 
8387
     #define bfd_coff_bad_format_hook(abfd, filehdr) \
8388
       ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
8389
 
8390
     #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
8391
       ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
8392
     #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
8393
       ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
8394
        (abfd, filehdr, aouthdr))
8395
 
8396
     #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
8397
       ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
8398
        (abfd, scnhdr, name, section, flags_ptr))
8399
 
8400
     #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
8401
       ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
8402
 
8403
     #define bfd_coff_slurp_symbol_table(abfd)\
8404
       ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
8405
 
8406
     #define bfd_coff_symname_in_debug(abfd, sym)\
8407
       ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
8408
 
8409
     #define bfd_coff_force_symnames_in_strings(abfd)\
8410
       (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
8411
 
8412
     #define bfd_coff_debug_string_prefix_length(abfd)\
8413
       (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
8414
 
8415
     #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
8416
       ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
8417
        (abfd, file, base, symbol, aux, indaux))
8418
 
8419
     #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
8420
                                          reloc, data, src_ptr, dst_ptr)\
8421
       ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
8422
        (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
8423
 
8424
     #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
8425
       ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
8426
        (abfd, section, reloc, shrink, link_info))
8427
 
8428
     #define bfd_coff_classify_symbol(abfd, sym)\
8429
       ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
8430
        (abfd, sym))
8431
 
8432
     #define bfd_coff_compute_section_file_positions(abfd)\
8433
       ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
8434
        (abfd))
8435
 
8436
     #define bfd_coff_start_final_link(obfd, info)\
8437
       ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
8438
        (obfd, info))
8439
     #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
8440
       ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
8441
        (obfd, info, ibfd, o, con, rel, isyms, secs))
8442
     #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
8443
       ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
8444
        (abfd, sec, rel, h, sym, addendp))
8445
     #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
8446
       ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
8447
        (obfd, info, ibfd, sec, rel, adjustedp))
8448
     #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
8449
                                          value, string, cp, coll, hashp)\
8450
       ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
8451
        (info, abfd, name, flags, section, value, string, cp, coll, hashp))
8452
 
8453
     #define bfd_coff_link_output_has_begun(a,p) \
8454
       ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
8455
     #define bfd_coff_final_link_postscript(a,p) \
8456
       ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
8457
 
8458
3.3.2.7 Writing relocations
8459
...........................
8460
 
8461
To write relocations, the back end steps though the canonical
8462
relocation table and create an `internal_reloc'. The symbol index to
8463
use is removed from the `offset' field in the symbol table supplied.
8464
The address comes directly from the sum of the section base address and
8465
the relocation offset; the type is dug directly from the howto field.
8466
Then the `internal_reloc' is swapped into the shape of an
8467
`external_reloc' and written out to disk.
8468
 
8469
3.3.2.8 Reading linenumbers
8470
...........................
8471
 
8472
Creating the linenumber table is done by reading in the entire coff
8473
linenumber table, and creating another table for internal use.
8474
 
8475
   A coff linenumber table is structured so that each function is
8476
marked as having a line number of 0. Each line within the function is
8477
an offset from the first line in the function. The base of the line
8478
number information for the table is stored in the symbol associated
8479
with the function.
8480
 
8481
   Note: The PE format uses line number 0 for a flag indicating a new
8482
source file.
8483
 
8484
   The information is copied from the external to the internal table,
8485
and each symbol which marks a function is marked by pointing its...
8486
 
8487
   How does this work ?
8488
 
8489
3.3.2.9 Reading relocations
8490
...........................
8491
 
8492
Coff relocations are easily transformed into the internal BFD form
8493
(`arelent').
8494
 
8495
   Reading a coff relocation table is done in the following stages:
8496
 
8497
   * Read the entire coff relocation table into memory.
8498
 
8499
   * Process each relocation in turn; first swap it from the external
8500
     to the internal form.
8501
 
8502
   * Turn the symbol referenced in the relocation's symbol index into a
8503
     pointer into the canonical symbol table.  This table is the same
8504
     as the one returned by a call to `bfd_canonicalize_symtab'. The
8505
     back end will call that routine and save the result if a
8506
     canonicalization hasn't been done.
8507
 
8508
   * The reloc index is turned into a pointer to a howto structure, in
8509
     a back end specific way. For instance, the 386 and 960 use the
8510
     `r_type' to directly produce an index into a howto table vector;
8511
     the 88k subtracts a number from the `r_type' field and creates an
8512
     addend field.
8513
 
8514

8515
File: bfd.info,  Node: elf,  Next: mmo,  Prev: coff,  Up: BFD back ends
8516
 
8517
3.4 ELF backends
8518
================
8519
 
8520
BFD support for ELF formats is being worked on.  Currently, the best
8521
supported back ends are for sparc and i386 (running svr4 or Solaris 2).
8522
 
8523
   Documentation of the internals of the support code still needs to be
8524
written.  The code is changing quickly enough that we haven't bothered
8525
yet.
8526
 
8527
3.4.0.1 `bfd_elf_find_section'
8528
..............................
8529
 
8530
*Synopsis*
8531
     struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
8532
   *Description*
8533
Helper functions for GDB to locate the string tables.  Since BFD hides
8534
string tables from callers, GDB needs to use an internal hook to find
8535
them.  Sun's .stabstr, in particular, isn't even pointed to by the
8536
.stab section, so ordinary mechanisms wouldn't work to find it, even if
8537
we had some.
8538
 
8539

8540
File: bfd.info,  Node: mmo,  Prev: elf,  Up: BFD back ends
8541
 
8542
3.5 mmo backend
8543
===============
8544
 
8545
The mmo object format is used exclusively together with Professor
8546
Donald E. Knuth's educational 64-bit processor MMIX.  The simulator
8547
`mmix' which is available at
8548
`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'
8549
understands this format.  That package also includes a combined
8550
assembler and linker called `mmixal'.  The mmo format has no advantages
8551
feature-wise compared to e.g. ELF.  It is a simple non-relocatable
8552
object format with no support for archives or debugging information,
8553
except for symbol value information and line numbers (which is not yet
8554
implemented in BFD).  See
8555
`http://www-cs-faculty.stanford.edu/~knuth/mmix.html' for more
8556
information about MMIX.  The ELF format is used for intermediate object
8557
files in the BFD implementation.
8558
 
8559
* Menu:
8560
 
8561
* File layout::
8562
* Symbol-table::
8563
* mmo section mapping::
8564
 
8565

8566
File: bfd.info,  Node: File layout,  Next: Symbol-table,  Prev: mmo,  Up: mmo
8567
 
8568
3.5.1 File layout
8569
-----------------
8570
 
8571
The mmo file contents is not partitioned into named sections as with
8572
e.g. ELF.  Memory areas is formed by specifying the location of the
8573
data that follows.  Only the memory area `0x0000...00' to `0x01ff...ff'
8574
is executable, so it is used for code (and constants) and the area
8575
`0x2000...00' to `0x20ff...ff' is used for writable data.  *Note mmo
8576
section mapping::.
8577
 
8578
   There is provision for specifying "special data" of 65536 different
8579
types.  We use type 80 (decimal), arbitrarily chosen the same as the
8580
ELF `e_machine' number for MMIX, filling it with section information
8581
normally found in ELF objects. *Note mmo section mapping::.
8582
 
8583
   Contents is entered as 32-bit words, xor:ed over previous contents,
8584
always zero-initialized.  A word that starts with the byte `0x98' forms
8585
a command called a `lopcode', where the next byte distinguished between
8586
the thirteen lopcodes.  The two remaining bytes, called the `Y' and `Z'
8587
fields, or the `YZ' field (a 16-bit big-endian number), are used for
8588
various purposes different for each lopcode.  As documented in
8589
`http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz', the
8590
lopcodes are:
8591
 
8592
`lop_quote'
8593
     0x98000001.  The next word is contents, regardless of whether it
8594
     starts with 0x98 or not.
8595
 
8596
`lop_loc'
8597
     0x9801YYZZ, where `Z' is 1 or 2.  This is a location directive,
8598
     setting the location for the next data to the next 32-bit word
8599
     (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56.  Normally
8600
     `Y' is 0 for the text segment and 2 for the data segment.
8601
 
8602
`lop_skip'
8603
     0x9802YYZZ.  Increase the current location by `YZ' bytes.
8604
 
8605
`lop_fixo'
8606
     0x9803YYZZ, where `Z' is 1 or 2.  Store the current location as 64
8607
     bits into the location pointed to by the next 32-bit (Z = 1) or
8608
     64-bit (Z = 2) word, plus Y * 2^56.
8609
 
8610
`lop_fixr'
8611
     0x9804YYZZ.  `YZ' is stored into the current location plus 2 - 4 *
8612
     YZ.
8613
 
8614
`lop_fixrx'
8615
     0x980500ZZ.  `Z' is 16 or 24.  A value `L' derived from the
8616
     following 32-bit word are used in a manner similar to `YZ' in
8617
     lop_fixr: it is xor:ed into the current location minus 4 * L.  The
8618
     first byte of the word is 0 or 1.  If it is 1, then L = (LOWEST 24
8619
     BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
8620
 
8621
`lop_file'
8622
     0x9806YYZZ.  `Y' is the file number, `Z' is count of 32-bit words.
8623
     Set the file number to `Y' and the line counter to 0.  The next Z
8624
     * 4 bytes contain the file name, padded with zeros if the count is
8625
     not a multiple of four.  The same `Y' may occur multiple times,
8626
     but `Z' must be 0 for all but the first occurrence.
8627
 
8628
`lop_line'
8629
     0x9807YYZZ.  `YZ' is the line number.  Together with lop_file, it
8630
     forms the source location for the next 32-bit word.  Note that for
8631
     each non-lopcode 32-bit word, line numbers are assumed incremented
8632
     by one.
8633
 
8634
`lop_spec'
8635
     0x9808YYZZ.  `YZ' is the type number.  Data until the next lopcode
8636
     other than lop_quote forms special data of type `YZ'.  *Note mmo
8637
     section mapping::.
8638
 
8639
     Other types than 80, (or type 80 with a content that does not
8640
     parse) is stored in sections named `.MMIX.spec_data.N' where N is
8641
     the `YZ'-type.  The flags for such a sections say not to allocate
8642
     or load the data.  The vma is 0.  Contents of multiple occurrences
8643
     of special data N is concatenated to the data of the previous
8644
     lop_spec Ns.  The location in data or code at which the lop_spec
8645
     occurred is lost.
8646
 
8647
`lop_pre'
8648
     0x980901ZZ.  The first lopcode in a file.  The `Z' field forms the
8649
     length of header information in 32-bit words, where the first word
8650
     tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
8651
 
8652
`lop_post'
8653
     0x980a00ZZ.  Z > 32.  This lopcode follows after all
8654
     content-generating lopcodes in a program.  The `Z' field denotes
8655
     the value of `rG' at the beginning of the program.  The following
8656
     256 - Z big-endian 64-bit words are loaded into global registers
8657
     `$G' ... `$255'.
8658
 
8659
`lop_stab'
8660
     0x980b0000.  The next-to-last lopcode in a program.  Must follow
8661
     immediately after the lop_post lopcode and its data.  After this
8662
     lopcode follows all symbols in a compressed format (*note
8663
     Symbol-table::).
8664
 
8665
`lop_end'
8666
     0x980cYYZZ.  The last lopcode in a program.  It must follow the
8667
     lop_stab lopcode and its data.  The `YZ' field contains the number
8668
     of 32-bit words of symbol table information after the preceding
8669
     lop_stab lopcode.
8670
 
8671
   Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
8672
`lop_fixo' are not generated by BFD, but are handled.  They are
8673
generated by `mmixal'.
8674
 
8675
   This trivial one-label, one-instruction file:
8676
 
8677
      :Main TRAP 1,2,3
8678
 
8679
   can be represented this way in mmo:
8680
 
8681
      0x98090101 - lop_pre, one 32-bit word with timestamp.
8682
      
8683
      0x98010002 - lop_loc, text segment, using a 64-bit address.
8684
                   Note that mmixal does not emit this for the file above.
8685
      0x00000000 - Address, high 32 bits.
8686
      0x00000000 - Address, low 32 bits.
8687
      0x98060002 - lop_file, 2 32-bit words for file-name.
8688
      0x74657374 - "test"
8689
      0x2e730000 - ".s\0\0"
8690
      0x98070001 - lop_line, line 1.
8691
      0x00010203 - TRAP 1,2,3
8692
      0x980a00ff - lop_post, setting $255 to 0.
8693
      0x00000000
8694
      0x00000000
8695
      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
8696
      0x203a4040   *Note Symbol-table::.
8697
      0x10404020
8698
      0x4d206120
8699
      0x69016e00
8700
      0x81000000
8701
      0x980c0005 - lop_end; symbol table contained five 32-bit words.
8702
 
8703

8704
File: bfd.info,  Node: Symbol-table,  Next: mmo section mapping,  Prev: File layout,  Up: mmo
8705
 
8706
3.5.2 Symbol table format
8707
-------------------------
8708
 
8709
From mmixal.w (or really, the generated mmixal.tex) in
8710
`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'):
8711
"Symbols are stored and retrieved by means of a `ternary search trie',
8712
following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on
8713
Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C'
8714
(Reading, Mass.  Addison-Wesley, 1998), `15.4'.)  Each trie node stores
8715
a character, and there are branches to subtries for the cases where a
8716
given character is less than, equal to, or greater than the character
8717
in the trie.  There also is a pointer to a symbol table entry if a
8718
symbol ends at the current node."
8719
 
8720
   So it's a tree encoded as a stream of bytes.  The stream of bytes
8721
acts on a single virtual global symbol, adding and removing characters
8722
and signalling complete symbol points.  Here, we read the stream and
8723
create symbols at the completion points.
8724
 
8725
   First, there's a control byte `m'.  If any of the listed bits in `m'
8726
is nonzero, we execute what stands at the right, in the listed order:
8727
 
8728
      (MMO3_LEFT)
8729
      0x40 - Traverse left trie.
8730
             (Read a new command byte and recurse.)
8731
 
8732
      (MMO3_SYMBITS)
8733
      0x2f - Read the next byte as a character and store it in the
8734
             current character position; increment character position.
8735
             Test the bits of `m':
8736
 
8737
             (MMO3_WCHAR)
8738
             0x80 - The character is 16-bit (so read another byte,
8739
                    merge into current character.
8740
 
8741
             (MMO3_TYPEBITS)
8742
             0xf  - We have a complete symbol; parse the type, value
8743
                    and serial number and do what should be done
8744
                    with a symbol.  The type and length information
8745
                    is in j = (m & 0xf).
8746
 
8747
                    (MMO3_REGQUAL_BITS)
8748
                    j == 0xf: A register variable.  The following
8749
                              byte tells which register.
8750
                    j <= 8:   An absolute symbol.  Read j bytes as the
8751
                              big-endian number the symbol equals.
8752
                              A j = 2 with two zero bytes denotes an
8753
                              unknown symbol.
8754
                    j > 8:    As with j <= 8, but add (0x20 << 56)
8755
                              to the value in the following j - 8
8756
                              bytes.
8757
 
8758
                    Then comes the serial number, as a variant of
8759
                    uleb128, but better named ubeb128:
8760
                    Read bytes and shift the previous value left 7
8761
                    (multiply by 128).  Add in the new byte, repeat
8762
                    until a byte has bit 7 set.  The serial number
8763
                    is the computed value minus 128.
8764
 
8765
             (MMO3_MIDDLE)
8766
             0x20 - Traverse middle trie.  (Read a new command byte
8767
                    and recurse.)  Decrement character position.
8768
 
8769
      (MMO3_RIGHT)
8770
      0x10 - Traverse right trie.  (Read a new command byte and
8771
             recurse.)
8772
 
8773
   Let's look again at the `lop_stab' for the trivial file (*note File
8774
layout::).
8775
 
8776
      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
8777
      0x203a4040
8778
      0x10404020
8779
      0x4d206120
8780
      0x69016e00
8781
      0x81000000
8782
 
8783
   This forms the trivial trie (note that the path between ":" and "M"
8784
is redundant):
8785
 
8786
      203a     ":"
8787
      40       /
8788
      40      /
8789
      10      \
8790
      40      /
8791
      40     /
8792
      204d  "M"
8793
      2061  "a"
8794
      2069  "i"
8795
      016e  "n" is the last character in a full symbol, and
8796
            with a value represented in one byte.
8797
      00    The value is 0.
8798
      81    The serial number is 1.
8799
 
8800

8801
File: bfd.info,  Node: mmo section mapping,  Prev: Symbol-table,  Up: mmo
8802
 
8803
3.5.3 mmo section mapping
8804
-------------------------
8805
 
8806
The implementation in BFD uses special data type 80 (decimal) to
8807
encapsulate and describe named sections, containing e.g. debug
8808
information.  If needed, any datum in the encapsulation will be quoted
8809
using lop_quote.  First comes a 32-bit word holding the number of
8810
32-bit words containing the zero-terminated zero-padded segment name.
8811
After the name there's a 32-bit word holding flags describing the
8812
section type.  Then comes a 64-bit big-endian word with the section
8813
length (in bytes), then another with the section start address.
8814
Depending on the type of section, the contents might follow,
8815
zero-padded to 32-bit boundary.  For a loadable section (such as data
8816
or code), the contents might follow at some later point, not
8817
necessarily immediately, as a lop_loc with the same start address as in
8818
the section description, followed by the contents.  This in effect
8819
forms a descriptor that must be emitted before the actual contents.
8820
Sections described this way must not overlap.
8821
 
8822
   For areas that don't have such descriptors, synthetic sections are
8823
formed by BFD.  Consecutive contents in the two memory areas
8824
`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
8825
entered in sections named `.text' and `.data' respectively.  If an area
8826
is not otherwise described, but would together with a neighboring lower
8827
area be less than `0x40000000' bytes long, it is joined with the lower
8828
area and the gap is zero-filled.  For other cases, a new section is
8829
formed, named `.MMIX.sec.N'.  Here, N is a number, a running count
8830
through the mmo file, starting at 0.
8831
 
8832
   A loadable section specified as:
8833
 
8834
      .section secname,"ax"
8835
      TETRA 1,2,3,4,-1,-2009
8836
      BYTE 80
8837
 
8838
   and linked to address `0x4', is represented by the sequence:
8839
 
8840
      0x98080050 - lop_spec 80
8841
      0x00000002 - two 32-bit words for the section name
8842
      0x7365636e - "secn"
8843
      0x616d6500 - "ame\0"
8844
      0x00000033 - flags CODE, READONLY, LOAD, ALLOC
8845
      0x00000000 - high 32 bits of section length
8846
      0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
8847
      0x00000000 - high 32 bits of section address
8848
      0x00000004 - section address is 4
8849
      0x98010002 - 64 bits with address of following data
8850
      0x00000000 - high 32 bits of address
8851
      0x00000004 - low 32 bits: data starts at address 4
8852
      0x00000001 - 1
8853
      0x00000002 - 2
8854
      0x00000003 - 3
8855
      0x00000004 - 4
8856
      0xffffffff - -1
8857
      0xfffff827 - -2009
8858
      0x50000000 - 80 as a byte, padded with zeros.
8859
 
8860
   Note that the lop_spec wrapping does not include the section
8861
contents.  Compare this to a non-loaded section specified as:
8862
 
8863
      .section thirdsec
8864
      TETRA 200001,100002
8865
      BYTE 38,40
8866
 
8867
   This, when linked to address `0x200000000000001c', is represented by:
8868
 
8869
      0x98080050 - lop_spec 80
8870
      0x00000002 - two 32-bit words for the section name
8871
      0x7365636e - "thir"
8872
      0x616d6500 - "dsec"
8873
      0x00000010 - flag READONLY
8874
      0x00000000 - high 32 bits of section length
8875
      0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
8876
      0x20000000 - high 32 bits of address
8877
      0x0000001c - low 32 bits of address 0x200000000000001c
8878
      0x00030d41 - 200001
8879
      0x000186a2 - 100002
8880
      0x26280000 - 38, 40 as bytes, padded with zeros
8881
 
8882
   For the latter example, the section contents must not be loaded in
8883
memory, and is therefore specified as part of the special data.  The
8884
address is usually unimportant but might provide information for e.g.
8885
the DWARF 2 debugging format.
8886
 
8887

8888
File: bfd.info,  Node: GNU Free Documentation License,  Next: BFD Index,  Prev: BFD back ends,  Up: Top
8889
 
8890
Appendix A GNU Free Documentation License
8891
*****************************************
8892
 
8893
                        Version 1.1, March 2000
8894
 
8895
     Copyright (C) 2000, 2003 Free Software Foundation, Inc.
8896
     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
8897
 
8898
     Everyone is permitted to copy and distribute verbatim copies
8899
     of this license document, but changing it is not allowed.
8900
 
8901
 
8902
  0. PREAMBLE
8903
 
8904
     The purpose of this License is to make a manual, textbook, or other
8905
     written document "free" in the sense of freedom: to assure everyone
8906
     the effective freedom to copy and redistribute it, with or without
8907
     modifying it, either commercially or noncommercially.  Secondarily,
8908
     this License preserves for the author and publisher a way to get
8909
     credit for their work, while not being considered responsible for
8910
     modifications made by others.
8911
 
8912
     This License is a kind of "copyleft", which means that derivative
8913
     works of the document must themselves be free in the same sense.
8914
     It complements the GNU General Public License, which is a copyleft
8915
     license designed for free software.
8916
 
8917
     We have designed this License in order to use it for manuals for
8918
     free software, because free software needs free documentation: a
8919
     free program should come with manuals providing the same freedoms
8920
     that the software does.  But this License is not limited to
8921
     software manuals; it can be used for any textual work, regardless
8922
     of subject matter or whether it is published as a printed book.
8923
     We recommend this License principally for works whose purpose is
8924
     instruction or reference.
8925
 
8926
 
8927
  1. APPLICABILITY AND DEFINITIONS
8928
 
8929
     This License applies to any manual or other work that contains a
8930
     notice placed by the copyright holder saying it can be distributed
8931
     under the terms of this License.  The "Document", below, refers to
8932
     any such manual or work.  Any member of the public is a licensee,
8933
     and is addressed as "you."
8934
 
8935
     A "Modified Version" of the Document means any work containing the
8936
     Document or a portion of it, either copied verbatim, or with
8937
     modifications and/or translated into another language.
8938
 
8939
     A "Secondary Section" is a named appendix or a front-matter
8940
     section of the Document that deals exclusively with the
8941
     relationship of the publishers or authors of the Document to the
8942
     Document's overall subject (or to related matters) and contains
8943
     nothing that could fall directly within that overall subject.
8944
     (For example, if the Document is in part a textbook of
8945
     mathematics, a Secondary Section may not explain any mathematics.)
8946
     The relationship could be a matter of historical connection with
8947
     the subject or with related matters, or of legal, commercial,
8948
     philosophical, ethical or political position regarding them.
8949
 
8950
     The "Invariant Sections" are certain Secondary Sections whose
8951
     titles are designated, as being those of Invariant Sections, in
8952
     the notice that says that the Document is released under this
8953
     License.
8954
 
8955
     The "Cover Texts" are certain short passages of text that are
8956
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
8957
     that says that the Document is released under this License.
8958
 
8959
     A "Transparent" copy of the Document means a machine-readable copy,
8960
     represented in a format whose specification is available to the
8961
     general public, whose contents can be viewed and edited directly
8962
     and straightforwardly with generic text editors or (for images
8963
     composed of pixels) generic paint programs or (for drawings) some
8964
     widely available drawing editor, and that is suitable for input to
8965
     text formatters or for automatic translation to a variety of
8966
     formats suitable for input to text formatters.  A copy made in an
8967
     otherwise Transparent file format whose markup has been designed
8968
     to thwart or discourage subsequent modification by readers is not
8969
     Transparent.  A copy that is not "Transparent" is called "Opaque."
8970
 
8971
     Examples of suitable formats for Transparent copies include plain
8972
     ASCII without markup, Texinfo input format, LaTeX input format,
8973
     SGML or XML using a publicly available DTD, and
8974
     standard-conforming simple HTML designed for human modification.
8975
     Opaque formats include PostScript, PDF, proprietary formats that
8976
     can be read and edited only by proprietary word processors, SGML
8977
     or XML for which the DTD and/or processing tools are not generally
8978
     available, and the machine-generated HTML produced by some word
8979
     processors for output purposes only.
8980
 
8981
     The "Title Page" means, for a printed book, the title page itself,
8982
     plus such following pages as are needed to hold, legibly, the
8983
     material this License requires to appear in the title page.  For
8984
     works in formats which do not have any title page as such, "Title
8985
     Page" means the text near the most prominent appearance of the
8986
     work's title, preceding the beginning of the body of the text.
8987
 
8988
  2. VERBATIM COPYING
8989
 
8990
     You may copy and distribute the Document in any medium, either
8991
     commercially or noncommercially, provided that this License, the
8992
     copyright notices, and the license notice saying this License
8993
     applies to the Document are reproduced in all copies, and that you
8994
     add no other conditions whatsoever to those of this License.  You
8995
     may not use technical measures to obstruct or control the reading
8996
     or further copying of the copies you make or distribute.  However,
8997
     you may accept compensation in exchange for copies.  If you
8998
     distribute a large enough number of copies you must also follow
8999
     the conditions in section 3.
9000
 
9001
     You may also lend copies, under the same conditions stated above,
9002
     and you may publicly display copies.
9003
 
9004
  3. COPYING IN QUANTITY
9005
 
9006
     If you publish printed copies of the Document numbering more than
9007
     100, and the Document's license notice requires Cover Texts, you
9008
     must enclose the copies in covers that carry, clearly and legibly,
9009
     all these Cover Texts: Front-Cover Texts on the front cover, and
9010
     Back-Cover Texts on the back cover.  Both covers must also clearly
9011
     and legibly identify you as the publisher of these copies.  The
9012
     front cover must present the full title with all words of the
9013
     title equally prominent and visible.  You may add other material
9014
     on the covers in addition.  Copying with changes limited to the
9015
     covers, as long as they preserve the title of the Document and
9016
     satisfy these conditions, can be treated as verbatim copying in
9017
     other respects.
9018
 
9019
     If the required texts for either cover are too voluminous to fit
9020
     legibly, you should put the first ones listed (as many as fit
9021
     reasonably) on the actual cover, and continue the rest onto
9022
     adjacent pages.
9023
 
9024
     If you publish or distribute Opaque copies of the Document
9025
     numbering more than 100, you must either include a
9026
     machine-readable Transparent copy along with each Opaque copy, or
9027
     state in or with each Opaque copy a publicly-accessible
9028
     computer-network location containing a complete Transparent copy
9029
     of the Document, free of added material, which the general
9030
     network-using public has access to download anonymously at no
9031
     charge using public-standard network protocols.  If you use the
9032
     latter option, you must take reasonably prudent steps, when you
9033
     begin distribution of Opaque copies in quantity, to ensure that
9034
     this Transparent copy will remain thus accessible at the stated
9035
     location until at least one year after the last time you
9036
     distribute an Opaque copy (directly or through your agents or
9037
     retailers) of that edition to the public.
9038
 
9039
     It is requested, but not required, that you contact the authors of
9040
     the Document well before redistributing any large number of
9041
     copies, to give them a chance to provide you with an updated
9042
     version of the Document.
9043
 
9044
  4. MODIFICATIONS
9045
 
9046
     You may copy and distribute a Modified Version of the Document
9047
     under the conditions of sections 2 and 3 above, provided that you
9048
     release the Modified Version under precisely this License, with
9049
     the Modified Version filling the role of the Document, thus
9050
     licensing distribution and modification of the Modified Version to
9051
     whoever possesses a copy of it.  In addition, you must do these
9052
     things in the Modified Version:
9053
 
9054
     A. Use in the Title Page (and on the covers, if any) a title
9055
     distinct    from that of the Document, and from those of previous
9056
     versions    (which should, if there were any, be listed in the
9057
     History section    of the Document).  You may use the same title
9058
     as a previous version    if the original publisher of that version
9059
     gives permission.
9060
     B. List on the Title Page, as authors, one or more persons or
9061
     entities    responsible for authorship of the modifications in the
9062
     Modified    Version, together with at least five of the principal
9063
     authors of the    Document (all of its principal authors, if it
9064
     has less than five).
9065
     C. State on the Title page the name of the publisher of the
9066
     Modified Version, as the publisher.
9067
     D. Preserve all the copyright notices of the Document.
9068
     E. Add an appropriate copyright notice for your modifications
9069
     adjacent to the other copyright notices.
9070
     F. Include, immediately after the copyright notices, a license
9071
     notice    giving the public permission to use the Modified Version
9072
     under the    terms of this License, in the form shown in the
9073
     Addendum below.
9074
     G. Preserve in that license notice the full lists of Invariant
9075
     Sections    and required Cover Texts given in the Document's
9076
     license notice.
9077
     H. Include an unaltered copy of this License.
9078
     I. Preserve the section entitled "History", and its title, and add
9079
     to    it an item stating at least the title, year, new authors, and
9080
       publisher of the Modified Version as given on the Title Page.
9081
     If    there is no section entitled "History" in the Document,
9082
     create one    stating the title, year, authors, and publisher of
9083
     the Document as    given on its Title Page, then add an item
9084
     describing the Modified    Version as stated in the previous
9085
     sentence.
9086
     J. Preserve the network location, if any, given in the Document for
9087
       public access to a Transparent copy of the Document, and
9088
     likewise    the network locations given in the Document for
9089
     previous versions    it was based on.  These may be placed in the
9090
     "History" section.     You may omit a network location for a work
9091
     that was published at    least four years before the Document
9092
     itself, or if the original    publisher of the version it refers
9093
     to gives permission.
9094
     K. In any section entitled "Acknowledgements" or "Dedications",
9095
     preserve the section's title, and preserve in the section all the
9096
      substance and tone of each of the contributor acknowledgements
9097
     and/or dedications given therein.
9098
     L. Preserve all the Invariant Sections of the Document,
9099
     unaltered in their text and in their titles.  Section numbers
9100
     or the equivalent are not considered part of the section titles.
9101
     M. Delete any section entitled "Endorsements."  Such a section
9102
     may not be included in the Modified Version.
9103
     N. Do not retitle any existing section as "Endorsements"    or to
9104
     conflict in title with any Invariant Section.
9105
 
9106
     If the Modified Version includes new front-matter sections or
9107
     appendices that qualify as Secondary Sections and contain no
9108
     material copied from the Document, you may at your option
9109
     designate some or all of these sections as invariant.  To do this,
9110
     add their titles to the list of Invariant Sections in the Modified
9111
     Version's license notice.  These titles must be distinct from any
9112
     other section titles.
9113
 
9114
     You may add a section entitled "Endorsements", provided it contains
9115
     nothing but endorsements of your Modified Version by various
9116
     parties-for example, statements of peer review or that the text has
9117
     been approved by an organization as the authoritative definition
9118
     of a standard.
9119
 
9120
     You may add a passage of up to five words as a Front-Cover Text,
9121
     and a passage of up to 25 words as a Back-Cover Text, to the end
9122
     of the list of Cover Texts in the Modified Version.  Only one
9123
     passage of Front-Cover Text and one of Back-Cover Text may be
9124
     added by (or through arrangements made by) any one entity.  If the
9125
     Document already includes a cover text for the same cover,
9126
     previously added by you or by arrangement made by the same entity
9127
     you are acting on behalf of, you may not add another; but you may
9128
     replace the old one, on explicit permission from the previous
9129
     publisher that added the old one.
9130
 
9131
     The author(s) and publisher(s) of the Document do not by this
9132
     License give permission to use their names for publicity for or to
9133
     assert or imply endorsement of any Modified Version.
9134
 
9135
  5. COMBINING DOCUMENTS
9136
 
9137
     You may combine the Document with other documents released under
9138
     this License, under the terms defined in section 4 above for
9139
     modified versions, provided that you include in the combination
9140
     all of the Invariant Sections of all of the original documents,
9141
     unmodified, and list them all as Invariant Sections of your
9142
     combined work in its license notice.
9143
 
9144
     The combined work need only contain one copy of this License, and
9145
     multiple identical Invariant Sections may be replaced with a single
9146
     copy.  If there are multiple Invariant Sections with the same name
9147
     but different contents, make the title of each such section unique
9148
     by adding at the end of it, in parentheses, the name of the
9149
     original author or publisher of that section if known, or else a
9150
     unique number.  Make the same adjustment to the section titles in
9151
     the list of Invariant Sections in the license notice of the
9152
     combined work.
9153
 
9154
     In the combination, you must combine any sections entitled
9155
     "History" in the various original documents, forming one section
9156
     entitled "History"; likewise combine any sections entitled
9157
     "Acknowledgements", and any sections entitled "Dedications."  You
9158
     must delete all sections entitled "Endorsements."
9159
 
9160
  6. COLLECTIONS OF DOCUMENTS
9161
 
9162
     You may make a collection consisting of the Document and other
9163
     documents released under this License, and replace the individual
9164
     copies of this License in the various documents with a single copy
9165
     that is included in the collection, provided that you follow the
9166
     rules of this License for verbatim copying of each of the
9167
     documents in all other respects.
9168
 
9169
     You may extract a single document from such a collection, and
9170
     distribute it individually under this License, provided you insert
9171
     a copy of this License into the extracted document, and follow
9172
     this License in all other respects regarding verbatim copying of
9173
     that document.
9174
 
9175
  7. AGGREGATION WITH INDEPENDENT WORKS
9176
 
9177
     A compilation of the Document or its derivatives with other
9178
     separate and independent documents or works, in or on a volume of
9179
     a storage or distribution medium, does not as a whole count as a
9180
     Modified Version of the Document, provided no compilation
9181
     copyright is claimed for the compilation.  Such a compilation is
9182
     called an "aggregate", and this License does not apply to the
9183
     other self-contained works thus compiled with the Document, on
9184
     account of their being thus compiled, if they are not themselves
9185
     derivative works of the Document.
9186
 
9187
     If the Cover Text requirement of section 3 is applicable to these
9188
     copies of the Document, then if the Document is less than one
9189
     quarter of the entire aggregate, the Document's Cover Texts may be
9190
     placed on covers that surround only the Document within the
9191
     aggregate.  Otherwise they must appear on covers around the whole
9192
     aggregate.
9193
 
9194
  8. TRANSLATION
9195
 
9196
     Translation is considered a kind of modification, so you may
9197
     distribute translations of the Document under the terms of section
9198
     4.  Replacing Invariant Sections with translations requires special
9199
     permission from their copyright holders, but you may include
9200
     translations of some or all Invariant Sections in addition to the
9201
     original versions of these Invariant Sections.  You may include a
9202
     translation of this License provided that you also include the
9203
     original English version of this License.  In case of a
9204
     disagreement between the translation and the original English
9205
     version of this License, the original English version will prevail.
9206
 
9207
  9. TERMINATION
9208
 
9209
     You may not copy, modify, sublicense, or distribute the Document
9210
     except as expressly provided for under this License.  Any other
9211
     attempt to copy, modify, sublicense or distribute the Document is
9212
     void, and will automatically terminate your rights under this
9213
     License.  However, parties who have received copies, or rights,
9214
     from you under this License will not have their licenses
9215
     terminated so long as such parties remain in full compliance.
9216
 
9217
 10. FUTURE REVISIONS OF THIS LICENSE
9218
 
9219
     The Free Software Foundation may publish new, revised versions of
9220
     the GNU Free Documentation License from time to time.  Such new
9221
     versions will be similar in spirit to the present version, but may
9222
     differ in detail to address new problems or concerns.  See
9223
     http://www.gnu.org/copyleft/.
9224
 
9225
     Each version of the License is given a distinguishing version
9226
     number.  If the Document specifies that a particular numbered
9227
     version of this License "or any later version" applies to it, you
9228
     have the option of following the terms and conditions either of
9229
     that specified version or of any later version that has been
9230
     published (not as a draft) by the Free Software Foundation.  If
9231
     the Document does not specify a version number of this License,
9232
     you may choose any version ever published (not as a draft) by the
9233
     Free Software Foundation.
9234
 
9235
 
9236
ADDENDUM: How to use this License for your documents
9237
====================================================
9238
 
9239
To use this License in a document you have written, include a copy of
9240
the License in the document and put the following copyright and license
9241
notices just after the title page:
9242
 
9243
     Copyright (C)  YEAR  YOUR NAME.
9244
     Permission is granted to copy, distribute and/or modify this document
9245
     under the terms of the GNU Free Documentation License, Version 1.1
9246
     or any later version published by the Free Software Foundation;
9247
     with the Invariant Sections being LIST THEIR TITLES, with the
9248
     Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
9249
     A copy of the license is included in the section entitled "GNU
9250
     Free Documentation License."
9251
 
9252
   If you have no Invariant Sections, write "with no Invariant Sections"
9253
instead of saying which ones are invariant.  If you have no Front-Cover
9254
Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
9255
LIST"; likewise for Back-Cover Texts.
9256
 
9257
   If your document contains nontrivial examples of program code, we
9258
recommend releasing these examples in parallel under your choice of
9259
free software license, such as the GNU General Public License, to
9260
permit their use in free software.
9261
 
9262

9263
File: bfd.info,  Node: BFD Index,  Prev: GNU Free Documentation License,  Up: Top
9264
 
9265
BFD Index
9266
*********
9267
 
9268
 
9269
* Menu:
9270
9271
* _bfd_final_link_relocate:              Relocating the section contents.
9272
                                                             (line   22)
9273
* _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
9274
                                                             (line   12)
9275
* _bfd_generic_link_add_one_symbol:      Adding symbols from an object file.
9276
                                                             (line   19)
9277
* _bfd_generic_make_empty_symbol:        symbol handling functions.
9278
                                                             (line   92)
9279
* _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
9280
                                                             (line    6)
9281
* _bfd_link_final_link in target vector: Performing the Final Link.
9282
                                                             (line    6)
9283
* _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
9284
                                                             (line    6)
9285
* _bfd_relocate_contents:                Relocating the section contents.
9286
                                                             (line   22)
9287
* aout_SIZE_machine_type:                aout.               (line  147)
9288
* aout_SIZE_mkobject:                    aout.               (line  139)
9289
* aout_SIZE_new_section_hook:            aout.               (line  177)
9290
* aout_SIZE_set_arch_mach:               aout.               (line  164)
9291
* aout_SIZE_some_aout_object_p:          aout.               (line  125)
9292
* aout_SIZE_swap_exec_header_in:         aout.               (line  101)
9293
* aout_SIZE_swap_exec_header_out:        aout.               (line  113)
9294
* arelent_chain:                         typedef arelent.    (line  339)
9295
* BFD:                                   Overview.           (line    6)
9296
* BFD canonical format:                  Canonical format.   (line   11)
9297
* bfd_alloc:                             Opening and Closing.
9298
                                                             (line  210)
9299
* bfd_alloc2:                            Opening and Closing.
9300
                                                             (line  219)
9301
* bfd_alt_mach_code:                     BFD front end.      (line  680)
9302
* bfd_arch_bits_per_address:             Architectures.      (line  497)
9303
* bfd_arch_bits_per_byte:                Architectures.      (line  489)
9304
* bfd_arch_get_compatible:               Architectures.      (line  432)
9305
* bfd_arch_list:                         Architectures.      (line  423)
9306
* bfd_arch_mach_octets_per_byte:         Architectures.      (line  566)
9307
* BFD_ARELOC_BFIN_ADD:                   howto manager.      (line  961)
9308
* BFD_ARELOC_BFIN_ADDR:                  howto manager.      (line 1012)
9309
* BFD_ARELOC_BFIN_AND:                   howto manager.      (line  982)
9310
* BFD_ARELOC_BFIN_COMP:                  howto manager.      (line 1003)
9311
* BFD_ARELOC_BFIN_CONST:                 howto manager.      (line  958)
9312
* BFD_ARELOC_BFIN_DIV:                   howto manager.      (line  970)
9313
* BFD_ARELOC_BFIN_HWPAGE:                howto manager.      (line 1009)
9314
* BFD_ARELOC_BFIN_LAND:                  howto manager.      (line  991)
9315
* BFD_ARELOC_BFIN_LEN:                   howto manager.      (line  997)
9316
* BFD_ARELOC_BFIN_LOR:                   howto manager.      (line  994)
9317
* BFD_ARELOC_BFIN_LSHIFT:                howto manager.      (line  976)
9318
* BFD_ARELOC_BFIN_MOD:                   howto manager.      (line  973)
9319
* BFD_ARELOC_BFIN_MULT:                  howto manager.      (line  967)
9320
* BFD_ARELOC_BFIN_NEG:                   howto manager.      (line 1000)
9321
* BFD_ARELOC_BFIN_OR:                    howto manager.      (line  985)
9322
* BFD_ARELOC_BFIN_PAGE:                  howto manager.      (line 1006)
9323
* BFD_ARELOC_BFIN_PUSH:                  howto manager.      (line  955)
9324
* BFD_ARELOC_BFIN_RSHIFT:                howto manager.      (line  979)
9325
* BFD_ARELOC_BFIN_SUB:                   howto manager.      (line  964)
9326
* BFD_ARELOC_BFIN_XOR:                   howto manager.      (line  988)
9327
* bfd_cache_close:                       File Caching.       (line   26)
9328
* bfd_cache_close_all:                   File Caching.       (line   39)
9329
* bfd_cache_init:                        File Caching.       (line   18)
9330
* bfd_calc_gnu_debuglink_crc32:          Opening and Closing.
9331
                                                             (line  246)
9332
* bfd_canonicalize_reloc:                BFD front end.      (line  399)
9333
* bfd_canonicalize_symtab:               symbol handling functions.
9334
                                                             (line   50)
9335
* bfd_check_format:                      Formats.            (line   21)
9336
* bfd_check_format_matches:              Formats.            (line   52)
9337
* bfd_check_overflow:                    typedef arelent.    (line  351)
9338
* bfd_close:                             Opening and Closing.
9339
                                                             (line  135)
9340
* bfd_close_all_done:                    Opening and Closing.
9341
                                                             (line  153)
9342
* bfd_coff_backend_data:                 coff.               (line  246)
9343
* bfd_copy_private_bfd_data:             BFD front end.      (line  538)
9344
* bfd_copy_private_header_data:          BFD front end.      (line  520)
9345
* bfd_copy_private_section_data:         section prototypes. (line  255)
9346
* bfd_copy_private_symbol_data:          symbol handling functions.
9347
                                                             (line  140)
9348
* bfd_core_file_failing_command:         Core Files.         (line   12)
9349
* bfd_core_file_failing_signal:          Core Files.         (line   21)
9350
* bfd_create:                            Opening and Closing.
9351
                                                             (line  172)
9352
* bfd_create_gnu_debuglink_section:      Opening and Closing.
9353
                                                             (line  312)
9354
* bfd_decode_symclass:                   symbol handling functions.
9355
                                                             (line  111)
9356
* bfd_default_arch_struct:               Architectures.      (line  444)
9357
* bfd_default_compatible:                Architectures.      (line  506)
9358
* bfd_default_reloc_type_lookup:         howto manager.      (line 2101)
9359
* bfd_default_scan:                      Architectures.      (line  515)
9360
* bfd_default_set_arch_mach:             Architectures.      (line  462)
9361
* bfd_demangle:                          BFD front end.      (line  778)
9362
* bfd_elf_find_section:                  elf.                (line   13)
9363
* bfd_emul_get_commonpagesize:           BFD front end.      (line  758)
9364
* bfd_emul_get_maxpagesize:              BFD front end.      (line  738)
9365
* bfd_emul_set_commonpagesize:           BFD front end.      (line  769)
9366
* bfd_emul_set_maxpagesize:              BFD front end.      (line  749)
9367
* bfd_errmsg:                            BFD front end.      (line  324)
9368
* bfd_fdopenr:                           Opening and Closing.
9369
                                                             (line   46)
9370
* bfd_fill_in_gnu_debuglink_section:     Opening and Closing.
9371
                                                             (line  326)
9372
* bfd_find_target:                       bfd_target.         (line  439)
9373
* bfd_follow_gnu_debuglink:              Opening and Closing.
9374
                                                             (line  291)
9375
* bfd_fopen:                             Opening and Closing.
9376
                                                             (line    9)
9377
* bfd_format_string:                     Formats.            (line   79)
9378
* bfd_generic_discard_group:             section prototypes. (line  281)
9379
* bfd_generic_gc_sections:               howto manager.      (line 2132)
9380
* bfd_generic_get_relocated_section_contents: howto manager. (line 2152)
9381
* bfd_generic_is_group_section:          section prototypes. (line  273)
9382
* bfd_generic_merge_sections:            howto manager.      (line 2142)
9383
* bfd_generic_relax_section:             howto manager.      (line 2119)
9384
* bfd_get_arch:                          Architectures.      (line  473)
9385
* bfd_get_arch_info:                     Architectures.      (line  525)
9386
* bfd_get_arch_size:                     BFD front end.      (line  443)
9387
* bfd_get_error:                         BFD front end.      (line  305)
9388
* bfd_get_error_handler:                 BFD front end.      (line  375)
9389
* bfd_get_gp_size:                       BFD front end.      (line  484)
9390
* bfd_get_mach:                          Architectures.      (line  481)
9391
* bfd_get_mtime:                         BFD front end.      (line  819)
9392
* bfd_get_next_mapent:                   Archives.           (line   52)
9393
* bfd_get_reloc_code_name:               howto manager.      (line 2110)
9394
* bfd_get_reloc_size:                    typedef arelent.    (line  330)
9395
* bfd_get_reloc_upper_bound:             BFD front end.      (line  389)
9396
* bfd_get_section_by_name:               section prototypes. (line   17)
9397
* bfd_get_section_by_name_if:            section prototypes. (line   31)
9398
* bfd_get_section_contents:              section prototypes. (line  228)
9399
* bfd_get_sign_extend_vma:               BFD front end.      (line  456)
9400
* bfd_get_size <1>:                      Internal.           (line   25)
9401
* bfd_get_size:                          BFD front end.      (line  828)
9402
* bfd_get_symtab_upper_bound:            symbol handling functions.
9403
                                                             (line    6)
9404
* bfd_get_unique_section_name:           section prototypes. (line   50)
9405
* bfd_h_put_size:                        Internal.           (line   97)
9406
* bfd_hash_allocate:                     Creating and Freeing a Hash Table.
9407
                                                             (line   17)
9408
* bfd_hash_lookup:                       Looking Up or Entering a String.
9409
                                                             (line    6)
9410
* bfd_hash_newfunc:                      Creating and Freeing a Hash Table.
9411
                                                             (line   12)
9412
* bfd_hash_set_default_size:             Creating and Freeing a Hash Table.
9413
                                                             (line   25)
9414
* bfd_hash_table_free:                   Creating and Freeing a Hash Table.
9415
                                                             (line   21)
9416
* bfd_hash_table_init:                   Creating and Freeing a Hash Table.
9417
                                                             (line    6)
9418
* bfd_hash_table_init_n:                 Creating and Freeing a Hash Table.
9419
                                                             (line    6)
9420
* bfd_hash_traverse:                     Traversing a Hash Table.
9421
                                                             (line    6)
9422
* bfd_init:                              Initialization.     (line   11)
9423
* bfd_install_relocation:                typedef arelent.    (line  392)
9424
* bfd_is_local_label:                    symbol handling functions.
9425
                                                             (line   17)
9426
* bfd_is_local_label_name:               symbol handling functions.
9427
                                                             (line   26)
9428
* bfd_is_target_special_symbol:          symbol handling functions.
9429
                                                             (line   38)
9430
* bfd_is_undefined_symclass:             symbol handling functions.
9431
                                                             (line  120)
9432
* bfd_link_split_section:                Writing the symbol table.
9433
                                                             (line   44)
9434
* bfd_log2:                              Internal.           (line  164)
9435
* bfd_lookup_arch:                       Architectures.      (line  533)
9436
* bfd_make_debug_symbol:                 symbol handling functions.
9437
                                                             (line  102)
9438
* bfd_make_empty_symbol:                 symbol handling functions.
9439
                                                             (line   78)
9440
* bfd_make_readable:                     Opening and Closing.
9441
                                                             (line  196)
9442
* bfd_make_section:                      section prototypes. (line  129)
9443
* bfd_make_section_anyway:               section prototypes. (line  100)
9444
* bfd_make_section_anyway_with_flags:    section prototypes. (line   82)
9445
* bfd_make_section_old_way:              section prototypes. (line   62)
9446
* bfd_make_section_with_flags:           section prototypes. (line  116)
9447
* bfd_make_writable:                     Opening and Closing.
9448
                                                             (line  182)
9449
* bfd_malloc_and_get_section:            section prototypes. (line  245)
9450
* bfd_map_over_sections:                 section prototypes. (line  155)
9451
* bfd_merge_private_bfd_data:            BFD front end.      (line  554)
9452
* bfd_octets_per_byte:                   Architectures.      (line  556)
9453
* bfd_open_file:                         File Caching.       (line   52)
9454
* bfd_openr:                             Opening and Closing.
9455
                                                             (line   30)
9456
* bfd_openr_iovec:                       Opening and Closing.
9457
                                                             (line   76)
9458
* bfd_openr_next_archived_file:          Archives.           (line   78)
9459
* bfd_openstreamr:                       Opening and Closing.
9460
                                                             (line   67)
9461
* bfd_openw:                             Opening and Closing.
9462
                                                             (line  123)
9463
* bfd_perform_relocation:                typedef arelent.    (line  367)
9464
* bfd_perror:                            BFD front end.      (line  333)
9465
* bfd_preserve_finish:                   BFD front end.      (line  728)
9466
* bfd_preserve_restore:                  BFD front end.      (line  718)
9467
* bfd_preserve_save:                     BFD front end.      (line  702)
9468
* bfd_print_symbol_vandf:                symbol handling functions.
9469
                                                             (line   70)
9470
* bfd_printable_arch_mach:               Architectures.      (line  544)
9471
* bfd_printable_name:                    Architectures.      (line  404)
9472
* bfd_put_size:                          Internal.           (line   22)
9473
* BFD_RELOC_12_PCREL:                    howto manager.      (line   39)
9474
* BFD_RELOC_14:                          howto manager.      (line   31)
9475
* BFD_RELOC_16:                          howto manager.      (line   30)
9476
* BFD_RELOC_16_BASEREL:                  howto manager.      (line   80)
9477
* BFD_RELOC_16_GOT_PCREL:                howto manager.      (line   52)
9478
* BFD_RELOC_16_GOTOFF:                   howto manager.      (line   55)
9479
* BFD_RELOC_16_PCREL:                    howto manager.      (line   38)
9480
* BFD_RELOC_16_PCREL_S2:                 howto manager.      (line   92)
9481
* BFD_RELOC_16_PLT_PCREL:                howto manager.      (line   63)
9482
* BFD_RELOC_16_PLTOFF:                   howto manager.      (line   67)
9483
* BFD_RELOC_16C_ABS20:                   howto manager.      (line 1788)
9484
* BFD_RELOC_16C_ABS20_C:                 howto manager.      (line 1789)
9485
* BFD_RELOC_16C_ABS24:                   howto manager.      (line 1790)
9486
* BFD_RELOC_16C_ABS24_C:                 howto manager.      (line 1791)
9487
* BFD_RELOC_16C_DISP04:                  howto manager.      (line 1768)
9488
* BFD_RELOC_16C_DISP04_C:                howto manager.      (line 1769)
9489
* BFD_RELOC_16C_DISP08:                  howto manager.      (line 1770)
9490
* BFD_RELOC_16C_DISP08_C:                howto manager.      (line 1771)
9491
* BFD_RELOC_16C_DISP16:                  howto manager.      (line 1772)
9492
* BFD_RELOC_16C_DISP16_C:                howto manager.      (line 1773)
9493
* BFD_RELOC_16C_DISP24:                  howto manager.      (line 1774)
9494
* BFD_RELOC_16C_DISP24_C:                howto manager.      (line 1775)
9495
* BFD_RELOC_16C_DISP24a:                 howto manager.      (line 1776)
9496
* BFD_RELOC_16C_DISP24a_C:               howto manager.      (line 1777)
9497
* BFD_RELOC_16C_IMM04:                   howto manager.      (line 1792)
9498
* BFD_RELOC_16C_IMM04_C:                 howto manager.      (line 1793)
9499
* BFD_RELOC_16C_IMM16:                   howto manager.      (line 1794)
9500
* BFD_RELOC_16C_IMM16_C:                 howto manager.      (line 1795)
9501
* BFD_RELOC_16C_IMM20:                   howto manager.      (line 1796)
9502
* BFD_RELOC_16C_IMM20_C:                 howto manager.      (line 1797)
9503
* BFD_RELOC_16C_IMM24:                   howto manager.      (line 1798)
9504
* BFD_RELOC_16C_IMM24_C:                 howto manager.      (line 1799)
9505
* BFD_RELOC_16C_IMM32:                   howto manager.      (line 1800)
9506
* BFD_RELOC_16C_IMM32_C:                 howto manager.      (line 1801)
9507
* BFD_RELOC_16C_NUM08:                   howto manager.      (line 1762)
9508
* BFD_RELOC_16C_NUM08_C:                 howto manager.      (line 1763)
9509
* BFD_RELOC_16C_NUM16:                   howto manager.      (line 1764)
9510
* BFD_RELOC_16C_NUM16_C:                 howto manager.      (line 1765)
9511
* BFD_RELOC_16C_NUM32:                   howto manager.      (line 1766)
9512
* BFD_RELOC_16C_NUM32_C:                 howto manager.      (line 1767)
9513
* BFD_RELOC_16C_REG04:                   howto manager.      (line 1778)
9514
* BFD_RELOC_16C_REG04_C:                 howto manager.      (line 1779)
9515
* BFD_RELOC_16C_REG04a:                  howto manager.      (line 1780)
9516
* BFD_RELOC_16C_REG04a_C:                howto manager.      (line 1781)
9517
* BFD_RELOC_16C_REG14:                   howto manager.      (line 1782)
9518
* BFD_RELOC_16C_REG14_C:                 howto manager.      (line 1783)
9519
* BFD_RELOC_16C_REG16:                   howto manager.      (line 1784)
9520
* BFD_RELOC_16C_REG16_C:                 howto manager.      (line 1785)
9521
* BFD_RELOC_16C_REG20:                   howto manager.      (line 1786)
9522
* BFD_RELOC_16C_REG20_C:                 howto manager.      (line 1787)
9523
* BFD_RELOC_23_PCREL_S2:                 howto manager.      (line   93)
9524
* BFD_RELOC_24:                          howto manager.      (line   29)
9525
* BFD_RELOC_24_PCREL:                    howto manager.      (line   37)
9526
* BFD_RELOC_24_PLT_PCREL:                howto manager.      (line   62)
9527
* BFD_RELOC_26:                          howto manager.      (line   28)
9528
* BFD_RELOC_32:                          howto manager.      (line   27)
9529
* BFD_RELOC_32_BASEREL:                  howto manager.      (line   79)
9530
* BFD_RELOC_32_GOT_PCREL:                howto manager.      (line   51)
9531
* BFD_RELOC_32_GOTOFF:                   howto manager.      (line   54)
9532
* BFD_RELOC_32_PCREL:                    howto manager.      (line   36)
9533
* BFD_RELOC_32_PCREL_S2:                 howto manager.      (line   91)
9534
* BFD_RELOC_32_PLT_PCREL:                howto manager.      (line   61)
9535
* BFD_RELOC_32_PLTOFF:                   howto manager.      (line   66)
9536
* BFD_RELOC_32_SECREL:                   howto manager.      (line   48)
9537
* BFD_RELOC_386_COPY:                    howto manager.      (line  465)
9538
* BFD_RELOC_386_GLOB_DAT:                howto manager.      (line  466)
9539
* BFD_RELOC_386_GOT32:                   howto manager.      (line  463)
9540
* BFD_RELOC_386_GOTOFF:                  howto manager.      (line  469)
9541
* BFD_RELOC_386_GOTPC:                   howto manager.      (line  470)
9542
* BFD_RELOC_386_JUMP_SLOT:               howto manager.      (line  467)
9543
* BFD_RELOC_386_PLT32:                   howto manager.      (line  464)
9544
* BFD_RELOC_386_RELATIVE:                howto manager.      (line  468)
9545
* BFD_RELOC_386_TLS_DESC:                howto manager.      (line  485)
9546
* BFD_RELOC_386_TLS_DESC_CALL:           howto manager.      (line  484)
9547
* BFD_RELOC_386_TLS_DTPMOD32:            howto manager.      (line  480)
9548
* BFD_RELOC_386_TLS_DTPOFF32:            howto manager.      (line  481)
9549
* BFD_RELOC_386_TLS_GD:                  howto manager.      (line  475)
9550
* BFD_RELOC_386_TLS_GOTDESC:             howto manager.      (line  483)
9551
* BFD_RELOC_386_TLS_GOTIE:               howto manager.      (line  473)
9552
* BFD_RELOC_386_TLS_IE:                  howto manager.      (line  472)
9553
* BFD_RELOC_386_TLS_IE_32:               howto manager.      (line  478)
9554
* BFD_RELOC_386_TLS_LDM:                 howto manager.      (line  476)
9555
* BFD_RELOC_386_TLS_LDO_32:              howto manager.      (line  477)
9556
* BFD_RELOC_386_TLS_LE:                  howto manager.      (line  474)
9557
* BFD_RELOC_386_TLS_LE_32:               howto manager.      (line  479)
9558
* BFD_RELOC_386_TLS_TPOFF:               howto manager.      (line  471)
9559
* BFD_RELOC_386_TLS_TPOFF32:             howto manager.      (line  482)
9560
* BFD_RELOC_390_12:                      howto manager.      (line 1454)
9561
* BFD_RELOC_390_20:                      howto manager.      (line 1554)
9562
* BFD_RELOC_390_COPY:                    howto manager.      (line 1463)
9563
* BFD_RELOC_390_GLOB_DAT:                howto manager.      (line 1466)
9564
* BFD_RELOC_390_GOT12:                   howto manager.      (line 1457)
9565
* BFD_RELOC_390_GOT16:                   howto manager.      (line 1478)
9566
* BFD_RELOC_390_GOT20:                   howto manager.      (line 1555)
9567
* BFD_RELOC_390_GOT64:                   howto manager.      (line 1496)
9568
* BFD_RELOC_390_GOTENT:                  howto manager.      (line 1502)
9569
* BFD_RELOC_390_GOTOFF64:                howto manager.      (line 1505)
9570
* BFD_RELOC_390_GOTPC:                   howto manager.      (line 1475)
9571
* BFD_RELOC_390_GOTPCDBL:                howto manager.      (line 1493)
9572
* BFD_RELOC_390_GOTPLT12:                howto manager.      (line 1508)
9573
* BFD_RELOC_390_GOTPLT16:                howto manager.      (line 1511)
9574
* BFD_RELOC_390_GOTPLT20:                howto manager.      (line 1556)
9575
* BFD_RELOC_390_GOTPLT32:                howto manager.      (line 1514)
9576
* BFD_RELOC_390_GOTPLT64:                howto manager.      (line 1517)
9577
* BFD_RELOC_390_GOTPLTENT:               howto manager.      (line 1520)
9578
* BFD_RELOC_390_JMP_SLOT:                howto manager.      (line 1469)
9579
* BFD_RELOC_390_PC16DBL:                 howto manager.      (line 1481)
9580
* BFD_RELOC_390_PC32DBL:                 howto manager.      (line 1487)
9581
* BFD_RELOC_390_PLT16DBL:                howto manager.      (line 1484)
9582
* BFD_RELOC_390_PLT32:                   howto manager.      (line 1460)
9583
* BFD_RELOC_390_PLT32DBL:                howto manager.      (line 1490)
9584
* BFD_RELOC_390_PLT64:                   howto manager.      (line 1499)
9585
* BFD_RELOC_390_PLTOFF16:                howto manager.      (line 1523)
9586
* BFD_RELOC_390_PLTOFF32:                howto manager.      (line 1526)
9587
* BFD_RELOC_390_PLTOFF64:                howto manager.      (line 1529)
9588
* BFD_RELOC_390_RELATIVE:                howto manager.      (line 1472)
9589
* BFD_RELOC_390_TLS_DTPMOD:              howto manager.      (line 1549)
9590
* BFD_RELOC_390_TLS_DTPOFF:              howto manager.      (line 1550)
9591
* BFD_RELOC_390_TLS_GD32:                howto manager.      (line 1535)
9592
* BFD_RELOC_390_TLS_GD64:                howto manager.      (line 1536)
9593
* BFD_RELOC_390_TLS_GDCALL:              howto manager.      (line 1533)
9594
* BFD_RELOC_390_TLS_GOTIE12:             howto manager.      (line 1537)
9595
* BFD_RELOC_390_TLS_GOTIE20:             howto manager.      (line 1557)
9596
* BFD_RELOC_390_TLS_GOTIE32:             howto manager.      (line 1538)
9597
* BFD_RELOC_390_TLS_GOTIE64:             howto manager.      (line 1539)
9598
* BFD_RELOC_390_TLS_IE32:                howto manager.      (line 1542)
9599
* BFD_RELOC_390_TLS_IE64:                howto manager.      (line 1543)
9600
* BFD_RELOC_390_TLS_IEENT:               howto manager.      (line 1544)
9601
* BFD_RELOC_390_TLS_LDCALL:              howto manager.      (line 1534)
9602
* BFD_RELOC_390_TLS_LDM32:               howto manager.      (line 1540)
9603
* BFD_RELOC_390_TLS_LDM64:               howto manager.      (line 1541)
9604
* BFD_RELOC_390_TLS_LDO32:               howto manager.      (line 1547)
9605
* BFD_RELOC_390_TLS_LDO64:               howto manager.      (line 1548)
9606
* BFD_RELOC_390_TLS_LE32:                howto manager.      (line 1545)
9607
* BFD_RELOC_390_TLS_LE64:                howto manager.      (line 1546)
9608
* BFD_RELOC_390_TLS_LOAD:                howto manager.      (line 1532)
9609
* BFD_RELOC_390_TLS_TPOFF:               howto manager.      (line 1551)
9610
* BFD_RELOC_64:                          howto manager.      (line   26)
9611
* BFD_RELOC_64_PCREL:                    howto manager.      (line   35)
9612
* BFD_RELOC_64_PLT_PCREL:                howto manager.      (line   60)
9613
* BFD_RELOC_64_PLTOFF:                   howto manager.      (line   65)
9614
* BFD_RELOC_68K_GLOB_DAT:                howto manager.      (line   74)
9615
* BFD_RELOC_68K_JMP_SLOT:                howto manager.      (line   75)
9616
* BFD_RELOC_68K_RELATIVE:                howto manager.      (line   76)
9617
* BFD_RELOC_8:                           howto manager.      (line   32)
9618
* BFD_RELOC_860_COPY:                    howto manager.      (line 1899)
9619
* BFD_RELOC_860_GLOB_DAT:                howto manager.      (line 1900)
9620
* BFD_RELOC_860_HAGOT:                   howto manager.      (line 1925)
9621
* BFD_RELOC_860_HAGOTOFF:                howto manager.      (line 1926)
9622
* BFD_RELOC_860_HAPC:                    howto manager.      (line 1927)
9623
* BFD_RELOC_860_HIGH:                    howto manager.      (line 1928)
9624
* BFD_RELOC_860_HIGHADJ:                 howto manager.      (line 1924)
9625
* BFD_RELOC_860_HIGOT:                   howto manager.      (line 1929)
9626
* BFD_RELOC_860_HIGOTOFF:                howto manager.      (line 1930)
9627
* BFD_RELOC_860_JUMP_SLOT:               howto manager.      (line 1901)
9628
* BFD_RELOC_860_LOGOT0:                  howto manager.      (line 1913)
9629
* BFD_RELOC_860_LOGOT1:                  howto manager.      (line 1915)
9630
* BFD_RELOC_860_LOGOTOFF0:               howto manager.      (line 1917)
9631
* BFD_RELOC_860_LOGOTOFF1:               howto manager.      (line 1919)
9632
* BFD_RELOC_860_LOGOTOFF2:               howto manager.      (line 1921)
9633
* BFD_RELOC_860_LOGOTOFF3:               howto manager.      (line 1922)
9634
* BFD_RELOC_860_LOPC:                    howto manager.      (line 1923)
9635
* BFD_RELOC_860_LOW0:                    howto manager.      (line 1906)
9636
* BFD_RELOC_860_LOW1:                    howto manager.      (line 1908)
9637
* BFD_RELOC_860_LOW2:                    howto manager.      (line 1910)
9638
* BFD_RELOC_860_LOW3:                    howto manager.      (line 1912)
9639
* BFD_RELOC_860_PC16:                    howto manager.      (line 1905)
9640
* BFD_RELOC_860_PC26:                    howto manager.      (line 1903)
9641
* BFD_RELOC_860_PLT26:                   howto manager.      (line 1904)
9642
* BFD_RELOC_860_RELATIVE:                howto manager.      (line 1902)
9643
* BFD_RELOC_860_SPGOT0:                  howto manager.      (line 1914)
9644
* BFD_RELOC_860_SPGOT1:                  howto manager.      (line 1916)
9645
* BFD_RELOC_860_SPGOTOFF0:               howto manager.      (line 1918)
9646
* BFD_RELOC_860_SPGOTOFF1:               howto manager.      (line 1920)
9647
* BFD_RELOC_860_SPLIT0:                  howto manager.      (line 1907)
9648
* BFD_RELOC_860_SPLIT1:                  howto manager.      (line 1909)
9649
* BFD_RELOC_860_SPLIT2:                  howto manager.      (line 1911)
9650
* BFD_RELOC_8_BASEREL:                   howto manager.      (line   84)
9651
* BFD_RELOC_8_FFnn:                      howto manager.      (line   88)
9652
* BFD_RELOC_8_GOT_PCREL:                 howto manager.      (line   53)
9653
* BFD_RELOC_8_GOTOFF:                    howto manager.      (line   59)
9654
* BFD_RELOC_8_PCREL:                     howto manager.      (line   40)
9655
* BFD_RELOC_8_PLT_PCREL:                 howto manager.      (line   64)
9656
* BFD_RELOC_8_PLTOFF:                    howto manager.      (line   71)
9657
* BFD_RELOC_ALPHA_BRSGP:                 howto manager.      (line  280)
9658
* BFD_RELOC_ALPHA_CODEADDR:              howto manager.      (line  271)
9659
* BFD_RELOC_ALPHA_DTPMOD64:              howto manager.      (line  287)
9660
* BFD_RELOC_ALPHA_DTPREL16:              howto manager.      (line  292)
9661
* BFD_RELOC_ALPHA_DTPREL64:              howto manager.      (line  289)
9662
* BFD_RELOC_ALPHA_DTPREL_HI16:           howto manager.      (line  290)
9663
* BFD_RELOC_ALPHA_DTPREL_LO16:           howto manager.      (line  291)
9664
* BFD_RELOC_ALPHA_ELF_LITERAL:           howto manager.      (line  236)
9665
* BFD_RELOC_ALPHA_GOTDTPREL16:           howto manager.      (line  288)
9666
* BFD_RELOC_ALPHA_GOTTPREL16:            howto manager.      (line  293)
9667
* BFD_RELOC_ALPHA_GPDISP:                howto manager.      (line  230)
9668
* BFD_RELOC_ALPHA_GPDISP_HI16:           howto manager.      (line  216)
9669
* BFD_RELOC_ALPHA_GPDISP_LO16:           howto manager.      (line  224)
9670
* BFD_RELOC_ALPHA_GPREL_HI16:            howto manager.      (line  275)
9671
* BFD_RELOC_ALPHA_GPREL_LO16:            howto manager.      (line  276)
9672
* BFD_RELOC_ALPHA_HINT:                  howto manager.      (line  262)
9673
* BFD_RELOC_ALPHA_LINKAGE:               howto manager.      (line  267)
9674
* BFD_RELOC_ALPHA_LITERAL:               howto manager.      (line  235)
9675
* BFD_RELOC_ALPHA_LITUSE:                howto manager.      (line  237)
9676
* BFD_RELOC_ALPHA_TLSGD:                 howto manager.      (line  285)
9677
* BFD_RELOC_ALPHA_TLSLDM:                howto manager.      (line  286)
9678
* BFD_RELOC_ALPHA_TPREL16:               howto manager.      (line  297)
9679
* BFD_RELOC_ALPHA_TPREL64:               howto manager.      (line  294)
9680
* BFD_RELOC_ALPHA_TPREL_HI16:            howto manager.      (line  295)
9681
* BFD_RELOC_ALPHA_TPREL_LO16:            howto manager.      (line  296)
9682
* BFD_RELOC_ARC_B22_PCREL:               howto manager.      (line  890)
9683
* BFD_RELOC_ARC_B26:                     howto manager.      (line  895)
9684
* BFD_RELOC_ARM_ADR_IMM:                 howto manager.      (line  783)
9685
* BFD_RELOC_ARM_ADRL_IMMEDIATE:          howto manager.      (line  770)
9686
* BFD_RELOC_ARM_ALU_PC_G0:               howto manager.      (line  737)
9687
* BFD_RELOC_ARM_ALU_PC_G0_NC:            howto manager.      (line  736)
9688
* BFD_RELOC_ARM_ALU_PC_G1:               howto manager.      (line  739)
9689
* BFD_RELOC_ARM_ALU_PC_G1_NC:            howto manager.      (line  738)
9690
* BFD_RELOC_ARM_ALU_PC_G2:               howto manager.      (line  740)
9691
* BFD_RELOC_ARM_ALU_SB_G0:               howto manager.      (line  751)
9692
* BFD_RELOC_ARM_ALU_SB_G0_NC:            howto manager.      (line  750)
9693
* BFD_RELOC_ARM_ALU_SB_G1:               howto manager.      (line  753)
9694
* BFD_RELOC_ARM_ALU_SB_G1_NC:            howto manager.      (line  752)
9695
* BFD_RELOC_ARM_ALU_SB_G2:               howto manager.      (line  754)
9696
* BFD_RELOC_ARM_CP_OFF_IMM:              howto manager.      (line  779)
9697
* BFD_RELOC_ARM_CP_OFF_IMM_S2:           howto manager.      (line  780)
9698
* BFD_RELOC_ARM_GLOB_DAT:                howto manager.      (line  718)
9699
* BFD_RELOC_ARM_GOT32:                   howto manager.      (line  719)
9700
* BFD_RELOC_ARM_GOTOFF:                  howto manager.      (line  722)
9701
* BFD_RELOC_ARM_GOTPC:                   howto manager.      (line  723)
9702
* BFD_RELOC_ARM_HWLITERAL:               howto manager.      (line  790)
9703
* BFD_RELOC_ARM_IMMEDIATE:               howto manager.      (line  769)
9704
* BFD_RELOC_ARM_IN_POOL:                 howto manager.      (line  786)
9705
* BFD_RELOC_ARM_JUMP_SLOT:               howto manager.      (line  717)
9706
* BFD_RELOC_ARM_LDC_PC_G0:               howto manager.      (line  747)
9707
* BFD_RELOC_ARM_LDC_PC_G1:               howto manager.      (line  748)
9708
* BFD_RELOC_ARM_LDC_PC_G2:               howto manager.      (line  749)
9709
* BFD_RELOC_ARM_LDC_SB_G0:               howto manager.      (line  761)
9710
* BFD_RELOC_ARM_LDC_SB_G1:               howto manager.      (line  762)
9711
* BFD_RELOC_ARM_LDC_SB_G2:               howto manager.      (line  763)
9712
* BFD_RELOC_ARM_LDR_IMM:                 howto manager.      (line  784)
9713
* BFD_RELOC_ARM_LDR_PC_G0:               howto manager.      (line  741)
9714
* BFD_RELOC_ARM_LDR_PC_G1:               howto manager.      (line  742)
9715
* BFD_RELOC_ARM_LDR_PC_G2:               howto manager.      (line  743)
9716
* BFD_RELOC_ARM_LDR_SB_G0:               howto manager.      (line  755)
9717
* BFD_RELOC_ARM_LDR_SB_G1:               howto manager.      (line  756)
9718
* BFD_RELOC_ARM_LDR_SB_G2:               howto manager.      (line  757)
9719
* BFD_RELOC_ARM_LDRS_PC_G0:              howto manager.      (line  744)
9720
* BFD_RELOC_ARM_LDRS_PC_G1:              howto manager.      (line  745)
9721
* BFD_RELOC_ARM_LDRS_PC_G2:              howto manager.      (line  746)
9722
* BFD_RELOC_ARM_LDRS_SB_G0:              howto manager.      (line  758)
9723
* BFD_RELOC_ARM_LDRS_SB_G1:              howto manager.      (line  759)
9724
* BFD_RELOC_ARM_LDRS_SB_G2:              howto manager.      (line  760)
9725
* BFD_RELOC_ARM_LITERAL:                 howto manager.      (line  785)
9726
* BFD_RELOC_ARM_MOVT:                    howto manager.      (line  708)
9727
* BFD_RELOC_ARM_MOVT_PCREL:              howto manager.      (line  710)
9728
* BFD_RELOC_ARM_MOVW:                    howto manager.      (line  707)
9729
* BFD_RELOC_ARM_MOVW_PCREL:              howto manager.      (line  709)
9730
* BFD_RELOC_ARM_MULTI:                   howto manager.      (line  778)
9731
* BFD_RELOC_ARM_OFFSET_IMM:              howto manager.      (line  681)
9732
* BFD_RELOC_ARM_OFFSET_IMM8:             howto manager.      (line  787)
9733
* BFD_RELOC_ARM_PCREL_BLX:               howto manager.      (line  652)
9734
* BFD_RELOC_ARM_PCREL_BRANCH:            howto manager.      (line  648)
9735
* BFD_RELOC_ARM_PCREL_CALL:              howto manager.      (line  662)
9736
* BFD_RELOC_ARM_PCREL_JUMP:              howto manager.      (line  666)
9737
* BFD_RELOC_ARM_PLT32:                   howto manager.      (line  720)
9738
* BFD_RELOC_ARM_PREL31:                  howto manager.      (line  704)
9739
* BFD_RELOC_ARM_RELATIVE:                howto manager.      (line  721)
9740
* BFD_RELOC_ARM_ROSEGREL32:              howto manager.      (line  693)
9741
* BFD_RELOC_ARM_SBREL32:                 howto manager.      (line  696)
9742
* BFD_RELOC_ARM_SHIFT_IMM:               howto manager.      (line  775)
9743
* BFD_RELOC_ARM_SMC:                     howto manager.      (line  776)
9744
* BFD_RELOC_ARM_SWI:                     howto manager.      (line  777)
9745
* BFD_RELOC_ARM_T32_ADD_IMM:             howto manager.      (line  772)
9746
* BFD_RELOC_ARM_T32_ADD_PC12:            howto manager.      (line  774)
9747
* BFD_RELOC_ARM_T32_CP_OFF_IMM:          howto manager.      (line  781)
9748
* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2:       howto manager.      (line  782)
9749
* BFD_RELOC_ARM_T32_IMM12:               howto manager.      (line  773)
9750
* BFD_RELOC_ARM_T32_IMMEDIATE:           howto manager.      (line  771)
9751
* BFD_RELOC_ARM_T32_OFFSET_IMM:          howto manager.      (line  789)
9752
* BFD_RELOC_ARM_T32_OFFSET_U8:           howto manager.      (line  788)
9753
* BFD_RELOC_ARM_TARGET1:                 howto manager.      (line  689)
9754
* BFD_RELOC_ARM_TARGET2:                 howto manager.      (line  699)
9755
* BFD_RELOC_ARM_THUMB_ADD:               howto manager.      (line  791)
9756
* BFD_RELOC_ARM_THUMB_IMM:               howto manager.      (line  792)
9757
* BFD_RELOC_ARM_THUMB_MOVT:              howto manager.      (line  712)
9758
* BFD_RELOC_ARM_THUMB_MOVT_PCREL:        howto manager.      (line  714)
9759
* BFD_RELOC_ARM_THUMB_MOVW:              howto manager.      (line  711)
9760
* BFD_RELOC_ARM_THUMB_MOVW_PCREL:        howto manager.      (line  713)
9761
* BFD_RELOC_ARM_THUMB_OFFSET:            howto manager.      (line  685)
9762
* BFD_RELOC_ARM_THUMB_SHIFT:             howto manager.      (line  793)
9763
* BFD_RELOC_ARM_TLS_DTPMOD32:            howto manager.      (line  730)
9764
* BFD_RELOC_ARM_TLS_DTPOFF32:            howto manager.      (line  729)
9765
* BFD_RELOC_ARM_TLS_GD32:                howto manager.      (line  726)
9766
* BFD_RELOC_ARM_TLS_IE32:                howto manager.      (line  732)
9767
* BFD_RELOC_ARM_TLS_LDM32:               howto manager.      (line  728)
9768
* BFD_RELOC_ARM_TLS_LDO32:               howto manager.      (line  727)
9769
* BFD_RELOC_ARM_TLS_LE32:                howto manager.      (line  733)
9770
* BFD_RELOC_ARM_TLS_TPOFF32:             howto manager.      (line  731)
9771
* BFD_RELOC_ARM_V4BX:                    howto manager.      (line  766)
9772
* BFD_RELOC_AVR_13_PCREL:                howto manager.      (line 1355)
9773
* BFD_RELOC_AVR_16_PM:                   howto manager.      (line 1359)
9774
* BFD_RELOC_AVR_6:                       howto manager.      (line 1446)
9775
* BFD_RELOC_AVR_6_ADIW:                  howto manager.      (line 1450)
9776
* BFD_RELOC_AVR_7_PCREL:                 howto manager.      (line 1351)
9777
* BFD_RELOC_AVR_CALL:                    howto manager.      (line 1438)
9778
* BFD_RELOC_AVR_HH8_LDI:                 howto manager.      (line 1371)
9779
* BFD_RELOC_AVR_HH8_LDI_NEG:             howto manager.      (line 1390)
9780
* BFD_RELOC_AVR_HH8_LDI_PM:              howto manager.      (line 1419)
9781
* BFD_RELOC_AVR_HH8_LDI_PM_NEG:          howto manager.      (line 1433)
9782
* BFD_RELOC_AVR_HI8_LDI:                 howto manager.      (line 1367)
9783
* BFD_RELOC_AVR_HI8_LDI_GS:              howto manager.      (line 1413)
9784
* BFD_RELOC_AVR_HI8_LDI_NEG:             howto manager.      (line 1385)
9785
* BFD_RELOC_AVR_HI8_LDI_PM:              howto manager.      (line 1409)
9786
* BFD_RELOC_AVR_HI8_LDI_PM_NEG:          howto manager.      (line 1428)
9787
* BFD_RELOC_AVR_LDI:                     howto manager.      (line 1442)
9788
* BFD_RELOC_AVR_LO8_LDI:                 howto manager.      (line 1363)
9789
* BFD_RELOC_AVR_LO8_LDI_GS:              howto manager.      (line 1403)
9790
* BFD_RELOC_AVR_LO8_LDI_NEG:             howto manager.      (line 1380)
9791
* BFD_RELOC_AVR_LO8_LDI_PM:              howto manager.      (line 1399)
9792
* BFD_RELOC_AVR_LO8_LDI_PM_NEG:          howto manager.      (line 1424)
9793
* BFD_RELOC_AVR_MS8_LDI:                 howto manager.      (line 1376)
9794
* BFD_RELOC_AVR_MS8_LDI_NEG:             howto manager.      (line 1395)
9795
* BFD_RELOC_BFIN_10_PCREL:               howto manager.      (line  915)
9796
* BFD_RELOC_BFIN_11_PCREL:               howto manager.      (line  918)
9797
* BFD_RELOC_BFIN_12_PCREL_JUMP:          howto manager.      (line  921)
9798
* BFD_RELOC_BFIN_12_PCREL_JUMP_S:        howto manager.      (line  924)
9799
* BFD_RELOC_BFIN_16_HIGH:                howto manager.      (line  903)
9800
* BFD_RELOC_BFIN_16_IMM:                 howto manager.      (line  900)
9801
* BFD_RELOC_BFIN_16_LOW:                 howto manager.      (line  912)
9802
* BFD_RELOC_BFIN_24_PCREL_CALL_X:        howto manager.      (line  927)
9803
* BFD_RELOC_BFIN_24_PCREL_JUMP_L:        howto manager.      (line  930)
9804
* BFD_RELOC_BFIN_4_PCREL:                howto manager.      (line  906)
9805
* BFD_RELOC_BFIN_5_PCREL:                howto manager.      (line  909)
9806
* BFD_RELOC_BFIN_FUNCDESC:               howto manager.      (line  936)
9807
* BFD_RELOC_BFIN_FUNCDESC_GOT17M4:       howto manager.      (line  937)
9808
* BFD_RELOC_BFIN_FUNCDESC_GOTHI:         howto manager.      (line  938)
9809
* BFD_RELOC_BFIN_FUNCDESC_GOTLO:         howto manager.      (line  939)
9810
* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4:    howto manager.      (line  941)
9811
* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI:      howto manager.      (line  942)
9812
* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO:      howto manager.      (line  943)
9813
* BFD_RELOC_BFIN_FUNCDESC_VALUE:         howto manager.      (line  940)
9814
* BFD_RELOC_BFIN_GOT:                    howto manager.      (line  949)
9815
* BFD_RELOC_BFIN_GOT17M4:                howto manager.      (line  933)
9816
* BFD_RELOC_BFIN_GOTHI:                  howto manager.      (line  934)
9817
* BFD_RELOC_BFIN_GOTLO:                  howto manager.      (line  935)
9818
* BFD_RELOC_BFIN_GOTOFF17M4:             howto manager.      (line  944)
9819
* BFD_RELOC_BFIN_GOTOFFHI:               howto manager.      (line  945)
9820
* BFD_RELOC_BFIN_GOTOFFLO:               howto manager.      (line  946)
9821
* BFD_RELOC_BFIN_PLTPC:                  howto manager.      (line  952)
9822
* bfd_reloc_code_type:                   howto manager.      (line   10)
9823
* BFD_RELOC_CR16_ABS20:                  howto manager.      (line 1816)
9824
* BFD_RELOC_CR16_ABS24:                  howto manager.      (line 1817)
9825
* BFD_RELOC_CR16_DISP16:                 howto manager.      (line 1827)
9826
* BFD_RELOC_CR16_DISP20:                 howto manager.      (line 1828)
9827
* BFD_RELOC_CR16_DISP24:                 howto manager.      (line 1829)
9828
* BFD_RELOC_CR16_DISP24a:                howto manager.      (line 1830)
9829
* BFD_RELOC_CR16_DISP4:                  howto manager.      (line 1825)
9830
* BFD_RELOC_CR16_DISP8:                  howto manager.      (line 1826)
9831
* BFD_RELOC_CR16_IMM16:                  howto manager.      (line 1820)
9832
* BFD_RELOC_CR16_IMM20:                  howto manager.      (line 1821)
9833
* BFD_RELOC_CR16_IMM24:                  howto manager.      (line 1822)
9834
* BFD_RELOC_CR16_IMM32:                  howto manager.      (line 1823)
9835
* BFD_RELOC_CR16_IMM32a:                 howto manager.      (line 1824)
9836
* BFD_RELOC_CR16_IMM4:                   howto manager.      (line 1818)
9837
* BFD_RELOC_CR16_IMM8:                   howto manager.      (line 1819)
9838
* BFD_RELOC_CR16_NUM16:                  howto manager.      (line 1805)
9839
* BFD_RELOC_CR16_NUM32:                  howto manager.      (line 1806)
9840
* BFD_RELOC_CR16_NUM32a:                 howto manager.      (line 1807)
9841
* BFD_RELOC_CR16_NUM8:                   howto manager.      (line 1804)
9842
* BFD_RELOC_CR16_REGREL0:                howto manager.      (line 1808)
9843
* BFD_RELOC_CR16_REGREL14:               howto manager.      (line 1811)
9844
* BFD_RELOC_CR16_REGREL14a:              howto manager.      (line 1812)
9845
* BFD_RELOC_CR16_REGREL16:               howto manager.      (line 1813)
9846
* BFD_RELOC_CR16_REGREL20:               howto manager.      (line 1814)
9847
* BFD_RELOC_CR16_REGREL20a:              howto manager.      (line 1815)
9848
* BFD_RELOC_CR16_REGREL4:                howto manager.      (line 1809)
9849
* BFD_RELOC_CR16_REGREL4a:               howto manager.      (line 1810)
9850
* BFD_RELOC_CR16_SWITCH16:               howto manager.      (line 1832)
9851
* BFD_RELOC_CR16_SWITCH32:               howto manager.      (line 1833)
9852
* BFD_RELOC_CR16_SWITCH8:                howto manager.      (line 1831)
9853
* BFD_RELOC_CRIS_16_GOT:                 howto manager.      (line 1880)
9854
* BFD_RELOC_CRIS_16_GOTPLT:              howto manager.      (line 1886)
9855
* BFD_RELOC_CRIS_32_GOT:                 howto manager.      (line 1877)
9856
* BFD_RELOC_CRIS_32_GOTPLT:              howto manager.      (line 1883)
9857
* BFD_RELOC_CRIS_32_GOTREL:              howto manager.      (line 1889)
9858
* BFD_RELOC_CRIS_32_PLT_GOTREL:          howto manager.      (line 1892)
9859
* BFD_RELOC_CRIS_32_PLT_PCREL:           howto manager.      (line 1895)
9860
* BFD_RELOC_CRIS_BDISP8:                 howto manager.      (line 1858)
9861
* BFD_RELOC_CRIS_COPY:                   howto manager.      (line 1871)
9862
* BFD_RELOC_CRIS_GLOB_DAT:               howto manager.      (line 1872)
9863
* BFD_RELOC_CRIS_JUMP_SLOT:              howto manager.      (line 1873)
9864
* BFD_RELOC_CRIS_LAPCQ_OFFSET:           howto manager.      (line 1866)
9865
* BFD_RELOC_CRIS_RELATIVE:               howto manager.      (line 1874)
9866
* BFD_RELOC_CRIS_SIGNED_16:              howto manager.      (line 1864)
9867
* BFD_RELOC_CRIS_SIGNED_6:               howto manager.      (line 1860)
9868
* BFD_RELOC_CRIS_SIGNED_8:               howto manager.      (line 1862)
9869
* BFD_RELOC_CRIS_UNSIGNED_16:            howto manager.      (line 1865)
9870
* BFD_RELOC_CRIS_UNSIGNED_4:             howto manager.      (line 1867)
9871
* BFD_RELOC_CRIS_UNSIGNED_5:             howto manager.      (line 1859)
9872
* BFD_RELOC_CRIS_UNSIGNED_6:             howto manager.      (line 1861)
9873
* BFD_RELOC_CRIS_UNSIGNED_8:             howto manager.      (line 1863)
9874
* BFD_RELOC_CRX_ABS16:                   howto manager.      (line 1846)
9875
* BFD_RELOC_CRX_ABS32:                   howto manager.      (line 1847)
9876
* BFD_RELOC_CRX_IMM16:                   howto manager.      (line 1851)
9877
* BFD_RELOC_CRX_IMM32:                   howto manager.      (line 1852)
9878
* BFD_RELOC_CRX_NUM16:                   howto manager.      (line 1849)
9879
* BFD_RELOC_CRX_NUM32:                   howto manager.      (line 1850)
9880
* BFD_RELOC_CRX_NUM8:                    howto manager.      (line 1848)
9881
* BFD_RELOC_CRX_REGREL12:                howto manager.      (line 1842)
9882
* BFD_RELOC_CRX_REGREL22:                howto manager.      (line 1843)
9883
* BFD_RELOC_CRX_REGREL28:                howto manager.      (line 1844)
9884
* BFD_RELOC_CRX_REGREL32:                howto manager.      (line 1845)
9885
* BFD_RELOC_CRX_REL16:                   howto manager.      (line 1839)
9886
* BFD_RELOC_CRX_REL24:                   howto manager.      (line 1840)
9887
* BFD_RELOC_CRX_REL32:                   howto manager.      (line 1841)
9888
* BFD_RELOC_CRX_REL4:                    howto manager.      (line 1836)
9889
* BFD_RELOC_CRX_REL8:                    howto manager.      (line 1837)
9890
* BFD_RELOC_CRX_REL8_CMP:                howto manager.      (line 1838)
9891
* BFD_RELOC_CRX_SWITCH16:                howto manager.      (line 1854)
9892
* BFD_RELOC_CRX_SWITCH32:                howto manager.      (line 1855)
9893
* BFD_RELOC_CRX_SWITCH8:                 howto manager.      (line 1853)
9894
* BFD_RELOC_CTOR:                        howto manager.      (line  642)
9895
* BFD_RELOC_D10V_10_PCREL_L:             howto manager.      (line 1019)
9896
* BFD_RELOC_D10V_10_PCREL_R:             howto manager.      (line 1015)
9897
* BFD_RELOC_D10V_18:                     howto manager.      (line 1024)
9898
* BFD_RELOC_D10V_18_PCREL:               howto manager.      (line 1027)
9899
* BFD_RELOC_D30V_15:                     howto manager.      (line 1042)
9900
* BFD_RELOC_D30V_15_PCREL:               howto manager.      (line 1046)
9901
* BFD_RELOC_D30V_15_PCREL_R:             howto manager.      (line 1050)
9902
* BFD_RELOC_D30V_21:                     howto manager.      (line 1055)
9903
* BFD_RELOC_D30V_21_PCREL:               howto manager.      (line 1059)
9904
* BFD_RELOC_D30V_21_PCREL_R:             howto manager.      (line 1063)
9905
* BFD_RELOC_D30V_32:                     howto manager.      (line 1068)
9906
* BFD_RELOC_D30V_32_PCREL:               howto manager.      (line 1071)
9907
* BFD_RELOC_D30V_6:                      howto manager.      (line 1030)
9908
* BFD_RELOC_D30V_9_PCREL:                howto manager.      (line 1033)
9909
* BFD_RELOC_D30V_9_PCREL_R:              howto manager.      (line 1037)
9910
* BFD_RELOC_DLX_HI16_S:                  howto manager.      (line 1074)
9911
* BFD_RELOC_DLX_JMP26:                   howto manager.      (line 1080)
9912
* BFD_RELOC_DLX_LO16:                    howto manager.      (line 1077)
9913
* BFD_RELOC_FR30_10_IN_8:                howto manager.      (line 1259)
9914
* BFD_RELOC_FR30_12_PCREL:               howto manager.      (line 1267)
9915
* BFD_RELOC_FR30_20:                     howto manager.      (line 1243)
9916
* BFD_RELOC_FR30_48:                     howto manager.      (line 1240)
9917
* BFD_RELOC_FR30_6_IN_4:                 howto manager.      (line 1247)
9918
* BFD_RELOC_FR30_8_IN_8:                 howto manager.      (line 1251)
9919
* BFD_RELOC_FR30_9_IN_8:                 howto manager.      (line 1255)
9920
* BFD_RELOC_FR30_9_PCREL:                howto manager.      (line 1263)
9921
* BFD_RELOC_FRV_FUNCDESC:                howto manager.      (line  398)
9922
* BFD_RELOC_FRV_FUNCDESC_GOT12:          howto manager.      (line  399)
9923
* BFD_RELOC_FRV_FUNCDESC_GOTHI:          howto manager.      (line  400)
9924
* BFD_RELOC_FRV_FUNCDESC_GOTLO:          howto manager.      (line  401)
9925
* BFD_RELOC_FRV_FUNCDESC_GOTOFF12:       howto manager.      (line  403)
9926
* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:       howto manager.      (line  404)
9927
* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:       howto manager.      (line  405)
9928
* BFD_RELOC_FRV_FUNCDESC_VALUE:          howto manager.      (line  402)
9929
* BFD_RELOC_FRV_GETTLSOFF:               howto manager.      (line  409)
9930
* BFD_RELOC_FRV_GETTLSOFF_RELAX:         howto manager.      (line  422)
9931
* BFD_RELOC_FRV_GOT12:                   howto manager.      (line  395)
9932
* BFD_RELOC_FRV_GOTHI:                   howto manager.      (line  396)
9933
* BFD_RELOC_FRV_GOTLO:                   howto manager.      (line  397)
9934
* BFD_RELOC_FRV_GOTOFF12:                howto manager.      (line  406)
9935
* BFD_RELOC_FRV_GOTOFFHI:                howto manager.      (line  407)
9936
* BFD_RELOC_FRV_GOTOFFLO:                howto manager.      (line  408)
9937
* BFD_RELOC_FRV_GOTTLSDESC12:            howto manager.      (line  411)
9938
* BFD_RELOC_FRV_GOTTLSDESCHI:            howto manager.      (line  412)
9939
* BFD_RELOC_FRV_GOTTLSDESCLO:            howto manager.      (line  413)
9940
* BFD_RELOC_FRV_GOTTLSOFF12:             howto manager.      (line  417)
9941
* BFD_RELOC_FRV_GOTTLSOFFHI:             howto manager.      (line  418)
9942
* BFD_RELOC_FRV_GOTTLSOFFLO:             howto manager.      (line  419)
9943
* BFD_RELOC_FRV_GPREL12:                 howto manager.      (line  390)
9944
* BFD_RELOC_FRV_GPREL32:                 howto manager.      (line  392)
9945
* BFD_RELOC_FRV_GPRELHI:                 howto manager.      (line  393)
9946
* BFD_RELOC_FRV_GPRELLO:                 howto manager.      (line  394)
9947
* BFD_RELOC_FRV_GPRELU12:                howto manager.      (line  391)
9948
* BFD_RELOC_FRV_HI16:                    howto manager.      (line  389)
9949
* BFD_RELOC_FRV_LABEL16:                 howto manager.      (line  386)
9950
* BFD_RELOC_FRV_LABEL24:                 howto manager.      (line  387)
9951
* BFD_RELOC_FRV_LO16:                    howto manager.      (line  388)
9952
* BFD_RELOC_FRV_TLSDESC_RELAX:           howto manager.      (line  421)
9953
* BFD_RELOC_FRV_TLSDESC_VALUE:           howto manager.      (line  410)
9954
* BFD_RELOC_FRV_TLSMOFF:                 howto manager.      (line  424)
9955
* BFD_RELOC_FRV_TLSMOFF12:               howto manager.      (line  414)
9956
* BFD_RELOC_FRV_TLSMOFFHI:               howto manager.      (line  415)
9957
* BFD_RELOC_FRV_TLSMOFFLO:               howto manager.      (line  416)
9958
* BFD_RELOC_FRV_TLSOFF:                  howto manager.      (line  420)
9959
* BFD_RELOC_FRV_TLSOFF_RELAX:            howto manager.      (line  423)
9960
* BFD_RELOC_GPREL16:                     howto manager.      (line  106)
9961
* BFD_RELOC_GPREL32:                     howto manager.      (line  107)
9962
* BFD_RELOC_H8_DIR16A8:                  howto manager.      (line 1937)
9963
* BFD_RELOC_H8_DIR16R8:                  howto manager.      (line 1938)
9964
* BFD_RELOC_H8_DIR24A8:                  howto manager.      (line 1939)
9965
* BFD_RELOC_H8_DIR24R8:                  howto manager.      (line 1940)
9966
* BFD_RELOC_H8_DIR32A16:                 howto manager.      (line 1941)
9967
* BFD_RELOC_HI16:                        howto manager.      (line  310)
9968
* BFD_RELOC_HI16_BASEREL:                howto manager.      (line   82)
9969
* BFD_RELOC_HI16_GOTOFF:                 howto manager.      (line   57)
9970
* BFD_RELOC_HI16_PCREL:                  howto manager.      (line  322)
9971
* BFD_RELOC_HI16_PLTOFF:                 howto manager.      (line   69)
9972
* BFD_RELOC_HI16_S:                      howto manager.      (line  313)
9973
* BFD_RELOC_HI16_S_BASEREL:              howto manager.      (line   83)
9974
* BFD_RELOC_HI16_S_GOTOFF:               howto manager.      (line   58)
9975
* BFD_RELOC_HI16_S_PCREL:                howto manager.      (line  325)
9976
* BFD_RELOC_HI16_S_PLTOFF:               howto manager.      (line   70)
9977
* BFD_RELOC_HI22:                        howto manager.      (line  101)
9978
* BFD_RELOC_I370_D12:                    howto manager.      (line  639)
9979
* BFD_RELOC_I960_CALLJ:                  howto manager.      (line  113)
9980
* BFD_RELOC_IA64_COPY:                   howto manager.      (line 1698)
9981
* BFD_RELOC_IA64_DIR32LSB:               howto manager.      (line 1643)
9982
* BFD_RELOC_IA64_DIR32MSB:               howto manager.      (line 1642)
9983
* BFD_RELOC_IA64_DIR64LSB:               howto manager.      (line 1645)
9984
* BFD_RELOC_IA64_DIR64MSB:               howto manager.      (line 1644)
9985
* BFD_RELOC_IA64_DTPMOD64LSB:            howto manager.      (line 1708)
9986
* BFD_RELOC_IA64_DTPMOD64MSB:            howto manager.      (line 1707)
9987
* BFD_RELOC_IA64_DTPREL14:               howto manager.      (line 1710)
9988
* BFD_RELOC_IA64_DTPREL22:               howto manager.      (line 1711)
9989
* BFD_RELOC_IA64_DTPREL32LSB:            howto manager.      (line 1714)
9990
* BFD_RELOC_IA64_DTPREL32MSB:            howto manager.      (line 1713)
9991
* BFD_RELOC_IA64_DTPREL64I:              howto manager.      (line 1712)
9992
* BFD_RELOC_IA64_DTPREL64LSB:            howto manager.      (line 1716)
9993
* BFD_RELOC_IA64_DTPREL64MSB:            howto manager.      (line 1715)
9994
* BFD_RELOC_IA64_FPTR32LSB:              howto manager.      (line 1660)
9995
* BFD_RELOC_IA64_FPTR32MSB:              howto manager.      (line 1659)
9996
* BFD_RELOC_IA64_FPTR64I:                howto manager.      (line 1658)
9997
* BFD_RELOC_IA64_FPTR64LSB:              howto manager.      (line 1662)
9998
* BFD_RELOC_IA64_FPTR64MSB:              howto manager.      (line 1661)
9999
* BFD_RELOC_IA64_GPREL22:                howto manager.      (line 1646)
10000
* BFD_RELOC_IA64_GPREL32LSB:             howto manager.      (line 1649)
10001
* BFD_RELOC_IA64_GPREL32MSB:             howto manager.      (line 1648)
10002
* BFD_RELOC_IA64_GPREL64I:               howto manager.      (line 1647)
10003
* BFD_RELOC_IA64_GPREL64LSB:             howto manager.      (line 1651)
10004
* BFD_RELOC_IA64_GPREL64MSB:             howto manager.      (line 1650)
10005
* BFD_RELOC_IA64_IMM14:                  howto manager.      (line 1639)
10006
* BFD_RELOC_IA64_IMM22:                  howto manager.      (line 1640)
10007
* BFD_RELOC_IA64_IMM64:                  howto manager.      (line 1641)
10008
* BFD_RELOC_IA64_IPLTLSB:                howto manager.      (line 1697)
10009
* BFD_RELOC_IA64_IPLTMSB:                howto manager.      (line 1696)
10010
* BFD_RELOC_IA64_LDXMOV:                 howto manager.      (line 1700)
10011
* BFD_RELOC_IA64_LTOFF22:                howto manager.      (line 1652)
10012
* BFD_RELOC_IA64_LTOFF22X:               howto manager.      (line 1699)
10013
* BFD_RELOC_IA64_LTOFF64I:               howto manager.      (line 1653)
10014
* BFD_RELOC_IA64_LTOFF_DTPMOD22:         howto manager.      (line 1709)
10015
* BFD_RELOC_IA64_LTOFF_DTPREL22:         howto manager.      (line 1717)
10016
* BFD_RELOC_IA64_LTOFF_FPTR22:           howto manager.      (line 1674)
10017
* BFD_RELOC_IA64_LTOFF_FPTR32LSB:        howto manager.      (line 1677)
10018
* BFD_RELOC_IA64_LTOFF_FPTR32MSB:        howto manager.      (line 1676)
10019
* BFD_RELOC_IA64_LTOFF_FPTR64I:          howto manager.      (line 1675)
10020
* BFD_RELOC_IA64_LTOFF_FPTR64LSB:        howto manager.      (line 1679)
10021
* BFD_RELOC_IA64_LTOFF_FPTR64MSB:        howto manager.      (line 1678)
10022
* BFD_RELOC_IA64_LTOFF_TPREL22:          howto manager.      (line 1706)
10023
* BFD_RELOC_IA64_LTV32LSB:               howto manager.      (line 1693)
10024
* BFD_RELOC_IA64_LTV32MSB:               howto manager.      (line 1692)
10025
* BFD_RELOC_IA64_LTV64LSB:               howto manager.      (line 1695)
10026
* BFD_RELOC_IA64_LTV64MSB:               howto manager.      (line 1694)
10027
* BFD_RELOC_IA64_PCREL21B:               howto manager.      (line 1663)
10028
* BFD_RELOC_IA64_PCREL21BI:              howto manager.      (line 1664)
10029
* BFD_RELOC_IA64_PCREL21F:               howto manager.      (line 1666)
10030
* BFD_RELOC_IA64_PCREL21M:               howto manager.      (line 1665)
10031
* BFD_RELOC_IA64_PCREL22:                howto manager.      (line 1667)
10032
* BFD_RELOC_IA64_PCREL32LSB:             howto manager.      (line 1671)
10033
* BFD_RELOC_IA64_PCREL32MSB:             howto manager.      (line 1670)
10034
* BFD_RELOC_IA64_PCREL60B:               howto manager.      (line 1668)
10035
* BFD_RELOC_IA64_PCREL64I:               howto manager.      (line 1669)
10036
* BFD_RELOC_IA64_PCREL64LSB:             howto manager.      (line 1673)
10037
* BFD_RELOC_IA64_PCREL64MSB:             howto manager.      (line 1672)
10038
* BFD_RELOC_IA64_PLTOFF22:               howto manager.      (line 1654)
10039
* BFD_RELOC_IA64_PLTOFF64I:              howto manager.      (line 1655)
10040
* BFD_RELOC_IA64_PLTOFF64LSB:            howto manager.      (line 1657)
10041
* BFD_RELOC_IA64_PLTOFF64MSB:            howto manager.      (line 1656)
10042
* BFD_RELOC_IA64_REL32LSB:               howto manager.      (line 1689)
10043
* BFD_RELOC_IA64_REL32MSB:               howto manager.      (line 1688)
10044
* BFD_RELOC_IA64_REL64LSB:               howto manager.      (line 1691)
10045
* BFD_RELOC_IA64_REL64MSB:               howto manager.      (line 1690)
10046
* BFD_RELOC_IA64_SECREL32LSB:            howto manager.      (line 1685)
10047
* BFD_RELOC_IA64_SECREL32MSB:            howto manager.      (line 1684)
10048
* BFD_RELOC_IA64_SECREL64LSB:            howto manager.      (line 1687)
10049
* BFD_RELOC_IA64_SECREL64MSB:            howto manager.      (line 1686)
10050
* BFD_RELOC_IA64_SEGREL32LSB:            howto manager.      (line 1681)
10051
* BFD_RELOC_IA64_SEGREL32MSB:            howto manager.      (line 1680)
10052
* BFD_RELOC_IA64_SEGREL64LSB:            howto manager.      (line 1683)
10053
* BFD_RELOC_IA64_SEGREL64MSB:            howto manager.      (line 1682)
10054
* BFD_RELOC_IA64_TPREL14:                howto manager.      (line 1701)
10055
* BFD_RELOC_IA64_TPREL22:                howto manager.      (line 1702)
10056
* BFD_RELOC_IA64_TPREL64I:               howto manager.      (line 1703)
10057
* BFD_RELOC_IA64_TPREL64LSB:             howto manager.      (line 1705)
10058
* BFD_RELOC_IA64_TPREL64MSB:             howto manager.      (line 1704)
10059
* BFD_RELOC_IP2K_ADDR16CJP:              howto manager.      (line 1591)
10060
* BFD_RELOC_IP2K_BANK:                   howto manager.      (line 1588)
10061
* BFD_RELOC_IP2K_EX8DATA:                howto manager.      (line 1599)
10062
* BFD_RELOC_IP2K_FR9:                    howto manager.      (line 1585)
10063
* BFD_RELOC_IP2K_FR_OFFSET:              howto manager.      (line 1612)
10064
* BFD_RELOC_IP2K_HI8DATA:                howto manager.      (line 1598)
10065
* BFD_RELOC_IP2K_HI8INSN:                howto manager.      (line 1603)
10066
* BFD_RELOC_IP2K_LO8DATA:                howto manager.      (line 1597)
10067
* BFD_RELOC_IP2K_LO8INSN:                howto manager.      (line 1602)
10068
* BFD_RELOC_IP2K_PAGE3:                  howto manager.      (line 1594)
10069
* BFD_RELOC_IP2K_PC_SKIP:                howto manager.      (line 1606)
10070
* BFD_RELOC_IP2K_TEXT:                   howto manager.      (line 1609)
10071
* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 1991)
10072
* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 1992)
10073
* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 1993)
10074
* BFD_RELOC_LO10:                        howto manager.      (line  102)
10075
* BFD_RELOC_LO16:                        howto manager.      (line  319)
10076
* BFD_RELOC_LO16_BASEREL:                howto manager.      (line   81)
10077
* BFD_RELOC_LO16_GOTOFF:                 howto manager.      (line   56)
10078
* BFD_RELOC_LO16_PCREL:                  howto manager.      (line  328)
10079
* BFD_RELOC_LO16_PLTOFF:                 howto manager.      (line   68)
10080
* BFD_RELOC_M32C_HI8:                    howto manager.      (line 1083)
10081
* BFD_RELOC_M32C_RL_1ADDR:               howto manager.      (line 1085)
10082
* BFD_RELOC_M32C_RL_2ADDR:               howto manager.      (line 1086)
10083
* BFD_RELOC_M32C_RL_JUMP:                howto manager.      (line 1084)
10084
* BFD_RELOC_M32R_10_PCREL:               howto manager.      (line 1093)
10085
* BFD_RELOC_M32R_18_PCREL:               howto manager.      (line 1097)
10086
* BFD_RELOC_M32R_24:                     howto manager.      (line 1089)
10087
* BFD_RELOC_M32R_26_PCREL:               howto manager.      (line 1100)
10088
* BFD_RELOC_M32R_26_PLTREL:              howto manager.      (line 1119)
10089
* BFD_RELOC_M32R_COPY:                   howto manager.      (line 1120)
10090
* BFD_RELOC_M32R_GLOB_DAT:               howto manager.      (line 1121)
10091
* BFD_RELOC_M32R_GOT16_HI_SLO:           howto manager.      (line 1130)
10092
* BFD_RELOC_M32R_GOT16_HI_ULO:           howto manager.      (line 1129)
10093
* BFD_RELOC_M32R_GOT16_LO:               howto manager.      (line 1131)
10094
* BFD_RELOC_M32R_GOT24:                  howto manager.      (line 1118)
10095
* BFD_RELOC_M32R_GOTOFF:                 howto manager.      (line 1124)
10096
* BFD_RELOC_M32R_GOTOFF_HI_SLO:          howto manager.      (line 1126)
10097
* BFD_RELOC_M32R_GOTOFF_HI_ULO:          howto manager.      (line 1125)
10098
* BFD_RELOC_M32R_GOTOFF_LO:              howto manager.      (line 1127)
10099
* BFD_RELOC_M32R_GOTPC24:                howto manager.      (line 1128)
10100
* BFD_RELOC_M32R_GOTPC_HI_SLO:           howto manager.      (line 1133)
10101
* BFD_RELOC_M32R_GOTPC_HI_ULO:           howto manager.      (line 1132)
10102
* BFD_RELOC_M32R_GOTPC_LO:               howto manager.      (line 1134)
10103
* BFD_RELOC_M32R_HI16_SLO:               howto manager.      (line 1107)
10104
* BFD_RELOC_M32R_HI16_ULO:               howto manager.      (line 1103)
10105
* BFD_RELOC_M32R_JMP_SLOT:               howto manager.      (line 1122)
10106
* BFD_RELOC_M32R_LO16:                   howto manager.      (line 1111)
10107
* BFD_RELOC_M32R_RELATIVE:               howto manager.      (line 1123)
10108
* BFD_RELOC_M32R_SDA16:                  howto manager.      (line 1114)
10109
* BFD_RELOC_M68HC11_24:                  howto manager.      (line 1753)
10110
* BFD_RELOC_M68HC11_3B:                  howto manager.      (line 1728)
10111
* BFD_RELOC_M68HC11_HI8:                 howto manager.      (line 1720)
10112
* BFD_RELOC_M68HC11_LO16:                howto manager.      (line 1742)
10113
* BFD_RELOC_M68HC11_LO8:                 howto manager.      (line 1724)
10114
* BFD_RELOC_M68HC11_PAGE:                howto manager.      (line 1748)
10115
* BFD_RELOC_M68HC11_RL_GROUP:            howto manager.      (line 1737)
10116
* BFD_RELOC_M68HC11_RL_JUMP:             howto manager.      (line 1731)
10117
* BFD_RELOC_M68HC12_5B:                  howto manager.      (line 1759)
10118
* BFD_RELOC_MCORE_PCREL_32:              howto manager.      (line 1274)
10119
* BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.      (line 1272)
10120
* BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.      (line 1273)
10121
* BFD_RELOC_MCORE_PCREL_IMM8BY4:         howto manager.      (line 1271)
10122
* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2:    howto manager.      (line 1275)
10123
* BFD_RELOC_MCORE_RVA:                   howto manager.      (line 1276)
10124
* BFD_RELOC_MEP_16:                      howto manager.      (line 1280)
10125
* BFD_RELOC_MEP_32:                      howto manager.      (line 1281)
10126
* BFD_RELOC_MEP_8:                       howto manager.      (line 1279)
10127
* BFD_RELOC_MEP_ADDR24A4:                howto manager.      (line 1296)
10128
* BFD_RELOC_MEP_GNU_VTENTRY:             howto manager.      (line 1298)
10129
* BFD_RELOC_MEP_GNU_VTINHERIT:           howto manager.      (line 1297)
10130
* BFD_RELOC_MEP_GPREL:                   howto manager.      (line 1290)
10131
* BFD_RELOC_MEP_HI16S:                   howto manager.      (line 1289)
10132
* BFD_RELOC_MEP_HI16U:                   howto manager.      (line 1288)
10133
* BFD_RELOC_MEP_LOW16:                   howto manager.      (line 1287)
10134
* BFD_RELOC_MEP_PCABS24A2:               howto manager.      (line 1286)
10135
* BFD_RELOC_MEP_PCREL12A2:               howto manager.      (line 1283)
10136
* BFD_RELOC_MEP_PCREL17A2:               howto manager.      (line 1284)
10137
* BFD_RELOC_MEP_PCREL24A2:               howto manager.      (line 1285)
10138
* BFD_RELOC_MEP_PCREL8A2:                howto manager.      (line 1282)
10139
* BFD_RELOC_MEP_TPREL:                   howto manager.      (line 1291)
10140
* BFD_RELOC_MEP_TPREL7:                  howto manager.      (line 1292)
10141
* BFD_RELOC_MEP_TPREL7A2:                howto manager.      (line 1293)
10142
* BFD_RELOC_MEP_TPREL7A4:                howto manager.      (line 1294)
10143
* BFD_RELOC_MEP_UIMM24:                  howto manager.      (line 1295)
10144
* BFD_RELOC_MIPS16_GPREL:                howto manager.      (line  307)
10145
* BFD_RELOC_MIPS16_HI16:                 howto manager.      (line  331)
10146
* BFD_RELOC_MIPS16_HI16_S:               howto manager.      (line  334)
10147
* BFD_RELOC_MIPS16_JMP:                  howto manager.      (line  304)
10148
* BFD_RELOC_MIPS16_LO16:                 howto manager.      (line  340)
10149
* BFD_RELOC_MIPS_CALL16:                 howto manager.      (line  347)
10150
* BFD_RELOC_MIPS_CALL_HI16:              howto manager.      (line  350)
10151
* BFD_RELOC_MIPS_CALL_LO16:              howto manager.      (line  351)
10152
* BFD_RELOC_MIPS_COPY:                   howto manager.      (line  382)
10153
* BFD_RELOC_MIPS_DELETE:                 howto manager.      (line  360)
10154
* BFD_RELOC_MIPS_GOT16:                  howto manager.      (line  346)
10155
* BFD_RELOC_MIPS_GOT_DISP:               howto manager.      (line  355)
10156
* BFD_RELOC_MIPS_GOT_HI16:               howto manager.      (line  348)
10157
* BFD_RELOC_MIPS_GOT_LO16:               howto manager.      (line  349)
10158
* BFD_RELOC_MIPS_GOT_OFST:               howto manager.      (line  354)
10159
* BFD_RELOC_MIPS_GOT_PAGE:               howto manager.      (line  353)
10160
* BFD_RELOC_MIPS_HIGHER:                 howto manager.      (line  362)
10161
* BFD_RELOC_MIPS_HIGHEST:                howto manager.      (line  361)
10162
* BFD_RELOC_MIPS_INSERT_A:               howto manager.      (line  358)
10163
* BFD_RELOC_MIPS_INSERT_B:               howto manager.      (line  359)
10164
* BFD_RELOC_MIPS_JALR:                   howto manager.      (line  366)
10165
* BFD_RELOC_MIPS_JMP:                    howto manager.      (line  300)
10166
* BFD_RELOC_MIPS_JUMP_SLOT:              howto manager.      (line  383)
10167
* BFD_RELOC_MIPS_LITERAL:                howto manager.      (line  343)
10168
* BFD_RELOC_MIPS_REL16:                  howto manager.      (line  364)
10169
* BFD_RELOC_MIPS_RELGOT:                 howto manager.      (line  365)
10170
* BFD_RELOC_MIPS_SCN_DISP:               howto manager.      (line  363)
10171
* BFD_RELOC_MIPS_SHIFT5:                 howto manager.      (line  356)
10172
* BFD_RELOC_MIPS_SHIFT6:                 howto manager.      (line  357)
10173
* BFD_RELOC_MIPS_SUB:                    howto manager.      (line  352)
10174
* BFD_RELOC_MIPS_TLS_DTPMOD32:           howto manager.      (line  367)
10175
* BFD_RELOC_MIPS_TLS_DTPMOD64:           howto manager.      (line  369)
10176
* BFD_RELOC_MIPS_TLS_DTPREL32:           howto manager.      (line  368)
10177
* BFD_RELOC_MIPS_TLS_DTPREL64:           howto manager.      (line  370)
10178
* BFD_RELOC_MIPS_TLS_DTPREL_HI16:        howto manager.      (line  373)
10179
* BFD_RELOC_MIPS_TLS_DTPREL_LO16:        howto manager.      (line  374)
10180
* BFD_RELOC_MIPS_TLS_GD:                 howto manager.      (line  371)
10181
* BFD_RELOC_MIPS_TLS_GOTTPREL:           howto manager.      (line  375)
10182
* BFD_RELOC_MIPS_TLS_LDM:                howto manager.      (line  372)
10183
* BFD_RELOC_MIPS_TLS_TPREL32:            howto manager.      (line  376)
10184
* BFD_RELOC_MIPS_TLS_TPREL64:            howto manager.      (line  377)
10185
* BFD_RELOC_MIPS_TLS_TPREL_HI16:         howto manager.      (line  378)
10186
* BFD_RELOC_MIPS_TLS_TPREL_LO16:         howto manager.      (line  379)
10187
* BFD_RELOC_MMIX_ADDR19:                 howto manager.      (line 1327)
10188
* BFD_RELOC_MMIX_ADDR27:                 howto manager.      (line 1331)
10189
* BFD_RELOC_MMIX_BASE_PLUS_OFFSET:       howto manager.      (line 1343)
10190
* BFD_RELOC_MMIX_CBRANCH:                howto manager.      (line 1307)
10191
* BFD_RELOC_MMIX_CBRANCH_1:              howto manager.      (line 1309)
10192
* BFD_RELOC_MMIX_CBRANCH_2:              howto manager.      (line 1310)
10193
* BFD_RELOC_MMIX_CBRANCH_3:              howto manager.      (line 1311)
10194
* BFD_RELOC_MMIX_CBRANCH_J:              howto manager.      (line 1308)
10195
* BFD_RELOC_MMIX_GETA:                   howto manager.      (line 1301)
10196
* BFD_RELOC_MMIX_GETA_1:                 howto manager.      (line 1302)
10197
* BFD_RELOC_MMIX_GETA_2:                 howto manager.      (line 1303)
10198
* BFD_RELOC_MMIX_GETA_3:                 howto manager.      (line 1304)
10199
* BFD_RELOC_MMIX_JMP:                    howto manager.      (line 1321)
10200
* BFD_RELOC_MMIX_JMP_1:                  howto manager.      (line 1322)
10201
* BFD_RELOC_MMIX_JMP_2:                  howto manager.      (line 1323)
10202
* BFD_RELOC_MMIX_JMP_3:                  howto manager.      (line 1324)
10203
* BFD_RELOC_MMIX_LOCAL:                  howto manager.      (line 1347)
10204
* BFD_RELOC_MMIX_PUSHJ:                  howto manager.      (line 1314)
10205
* BFD_RELOC_MMIX_PUSHJ_1:                howto manager.      (line 1315)
10206
* BFD_RELOC_MMIX_PUSHJ_2:                howto manager.      (line 1316)
10207
* BFD_RELOC_MMIX_PUSHJ_3:                howto manager.      (line 1317)
10208
* BFD_RELOC_MMIX_PUSHJ_STUBBABLE:        howto manager.      (line 1318)
10209
* BFD_RELOC_MMIX_REG:                    howto manager.      (line 1339)
10210
* BFD_RELOC_MMIX_REG_OR_BYTE:            howto manager.      (line 1335)
10211
* BFD_RELOC_MN10300_16_PCREL:            howto manager.      (line 1209)
10212
* BFD_RELOC_MN10300_32_PCREL:            howto manager.      (line 1205)
10213
* BFD_RELOC_MN10300_ALIGN:               howto manager.      (line  459)
10214
* BFD_RELOC_MN10300_COPY:                howto manager.      (line  442)
10215
* BFD_RELOC_MN10300_GLOB_DAT:            howto manager.      (line  445)
10216
* BFD_RELOC_MN10300_GOT16:               howto manager.      (line  438)
10217
* BFD_RELOC_MN10300_GOT24:               howto manager.      (line  434)
10218
* BFD_RELOC_MN10300_GOT32:               howto manager.      (line  430)
10219
* BFD_RELOC_MN10300_GOTOFF24:            howto manager.      (line  427)
10220
* BFD_RELOC_MN10300_JMP_SLOT:            howto manager.      (line  448)
10221
* BFD_RELOC_MN10300_RELATIVE:            howto manager.      (line  451)
10222
* BFD_RELOC_MN10300_SYM_DIFF:            howto manager.      (line  454)
10223
* BFD_RELOC_MSP430_10_PCREL:             howto manager.      (line 1982)
10224
* BFD_RELOC_MSP430_16:                   howto manager.      (line 1984)
10225
* BFD_RELOC_MSP430_16_BYTE:              howto manager.      (line 1986)
10226
* BFD_RELOC_MSP430_16_PCREL:             howto manager.      (line 1983)
10227
* BFD_RELOC_MSP430_16_PCREL_BYTE:        howto manager.      (line 1985)
10228
* BFD_RELOC_MSP430_2X_PCREL:             howto manager.      (line 1987)
10229
* BFD_RELOC_MSP430_RL_PCREL:             howto manager.      (line 1988)
10230
* BFD_RELOC_MT_GNU_VTENTRY:              howto manager.      (line 1976)
10231
* BFD_RELOC_MT_GNU_VTINHERIT:            howto manager.      (line 1973)
10232
* BFD_RELOC_MT_HI16:                     howto manager.      (line 1967)
10233
* BFD_RELOC_MT_LO16:                     howto manager.      (line 1970)
10234
* BFD_RELOC_MT_PC16:                     howto manager.      (line 1964)
10235
* BFD_RELOC_MT_PCINSN8:                  howto manager.      (line 1979)
10236
* BFD_RELOC_NONE:                        howto manager.      (line  116)
10237
* BFD_RELOC_NS32K_DISP_16:               howto manager.      (line  523)
10238
* BFD_RELOC_NS32K_DISP_16_PCREL:         howto manager.      (line  526)
10239
* BFD_RELOC_NS32K_DISP_32:               howto manager.      (line  524)
10240
* BFD_RELOC_NS32K_DISP_32_PCREL:         howto manager.      (line  527)
10241
* BFD_RELOC_NS32K_DISP_8:                howto manager.      (line  522)
10242
* BFD_RELOC_NS32K_DISP_8_PCREL:          howto manager.      (line  525)
10243
* BFD_RELOC_NS32K_IMM_16:                howto manager.      (line  517)
10244
* BFD_RELOC_NS32K_IMM_16_PCREL:          howto manager.      (line  520)
10245
* BFD_RELOC_NS32K_IMM_32:                howto manager.      (line  518)
10246
* BFD_RELOC_NS32K_IMM_32_PCREL:          howto manager.      (line  521)
10247
* BFD_RELOC_NS32K_IMM_8:                 howto manager.      (line  516)
10248
* BFD_RELOC_NS32K_IMM_8_PCREL:           howto manager.      (line  519)
10249
* BFD_RELOC_OPENRISC_ABS_26:             howto manager.      (line 1933)
10250
* BFD_RELOC_OPENRISC_REL_26:             howto manager.      (line 1934)
10251
* BFD_RELOC_PDP11_DISP_6_PCREL:          howto manager.      (line  531)
10252
* BFD_RELOC_PDP11_DISP_8_PCREL:          howto manager.      (line  530)
10253
* BFD_RELOC_PJ_CODE_DIR16:               howto manager.      (line  536)
10254
* BFD_RELOC_PJ_CODE_DIR32:               howto manager.      (line  537)
10255
* BFD_RELOC_PJ_CODE_HI16:                howto manager.      (line  534)
10256
* BFD_RELOC_PJ_CODE_LO16:                howto manager.      (line  535)
10257
* BFD_RELOC_PJ_CODE_REL16:               howto manager.      (line  538)
10258
* BFD_RELOC_PJ_CODE_REL32:               howto manager.      (line  539)
10259
* BFD_RELOC_PPC64_ADDR16_DS:             howto manager.      (line  584)
10260
* BFD_RELOC_PPC64_ADDR16_LO_DS:          howto manager.      (line  585)
10261
* BFD_RELOC_PPC64_DTPREL16_DS:           howto manager.      (line  631)
10262
* BFD_RELOC_PPC64_DTPREL16_HIGHER:       howto manager.      (line  633)
10263
* BFD_RELOC_PPC64_DTPREL16_HIGHERA:      howto manager.      (line  634)
10264
* BFD_RELOC_PPC64_DTPREL16_HIGHEST:      howto manager.      (line  635)
10265
* BFD_RELOC_PPC64_DTPREL16_HIGHESTA:     howto manager.      (line  636)
10266
* BFD_RELOC_PPC64_DTPREL16_LO_DS:        howto manager.      (line  632)
10267
* BFD_RELOC_PPC64_GOT16_DS:              howto manager.      (line  586)
10268
* BFD_RELOC_PPC64_GOT16_LO_DS:           howto manager.      (line  587)
10269
* BFD_RELOC_PPC64_HIGHER:                howto manager.      (line  572)
10270
* BFD_RELOC_PPC64_HIGHER_S:              howto manager.      (line  573)
10271
* BFD_RELOC_PPC64_HIGHEST:               howto manager.      (line  574)
10272
* BFD_RELOC_PPC64_HIGHEST_S:             howto manager.      (line  575)
10273
* BFD_RELOC_PPC64_PLT16_LO_DS:           howto manager.      (line  588)
10274
* BFD_RELOC_PPC64_PLTGOT16:              howto manager.      (line  580)
10275
* BFD_RELOC_PPC64_PLTGOT16_DS:           howto manager.      (line  593)
10276
* BFD_RELOC_PPC64_PLTGOT16_HA:           howto manager.      (line  583)
10277
* BFD_RELOC_PPC64_PLTGOT16_HI:           howto manager.      (line  582)
10278
* BFD_RELOC_PPC64_PLTGOT16_LO:           howto manager.      (line  581)
10279
* BFD_RELOC_PPC64_PLTGOT16_LO_DS:        howto manager.      (line  594)
10280
* BFD_RELOC_PPC64_SECTOFF_DS:            howto manager.      (line  589)
10281
* BFD_RELOC_PPC64_SECTOFF_LO_DS:         howto manager.      (line  590)
10282
* BFD_RELOC_PPC64_TOC:                   howto manager.      (line  579)
10283
* BFD_RELOC_PPC64_TOC16_DS:              howto manager.      (line  591)
10284
* BFD_RELOC_PPC64_TOC16_HA:              howto manager.      (line  578)
10285
* BFD_RELOC_PPC64_TOC16_HI:              howto manager.      (line  577)
10286
* BFD_RELOC_PPC64_TOC16_LO:              howto manager.      (line  576)
10287
* BFD_RELOC_PPC64_TOC16_LO_DS:           howto manager.      (line  592)
10288
* BFD_RELOC_PPC64_TPREL16_DS:            howto manager.      (line  625)
10289
* BFD_RELOC_PPC64_TPREL16_HIGHER:        howto manager.      (line  627)
10290
* BFD_RELOC_PPC64_TPREL16_HIGHERA:       howto manager.      (line  628)
10291
* BFD_RELOC_PPC64_TPREL16_HIGHEST:       howto manager.      (line  629)
10292
* BFD_RELOC_PPC64_TPREL16_HIGHESTA:      howto manager.      (line  630)
10293
* BFD_RELOC_PPC64_TPREL16_LO_DS:         howto manager.      (line  626)
10294
* BFD_RELOC_PPC_B16:                     howto manager.      (line  545)
10295
* BFD_RELOC_PPC_B16_BRNTAKEN:            howto manager.      (line  547)
10296
* BFD_RELOC_PPC_B16_BRTAKEN:             howto manager.      (line  546)
10297
* BFD_RELOC_PPC_B26:                     howto manager.      (line  542)
10298
* BFD_RELOC_PPC_BA16:                    howto manager.      (line  548)
10299
* BFD_RELOC_PPC_BA16_BRNTAKEN:           howto manager.      (line  550)
10300
* BFD_RELOC_PPC_BA16_BRTAKEN:            howto manager.      (line  549)
10301
* BFD_RELOC_PPC_BA26:                    howto manager.      (line  543)
10302
* BFD_RELOC_PPC_COPY:                    howto manager.      (line  551)
10303
* BFD_RELOC_PPC_DTPMOD:                  howto manager.      (line  598)
10304
* BFD_RELOC_PPC_DTPREL:                  howto manager.      (line  608)
10305
* BFD_RELOC_PPC_DTPREL16:                howto manager.      (line  604)
10306
* BFD_RELOC_PPC_DTPREL16_HA:             howto manager.      (line  607)
10307
* BFD_RELOC_PPC_DTPREL16_HI:             howto manager.      (line  606)
10308
* BFD_RELOC_PPC_DTPREL16_LO:             howto manager.      (line  605)
10309
* BFD_RELOC_PPC_EMB_BIT_FLD:             howto manager.      (line  570)
10310
* BFD_RELOC_PPC_EMB_MRKREF:              howto manager.      (line  565)
10311
* BFD_RELOC_PPC_EMB_NADDR16:             howto manager.      (line  557)
10312
* BFD_RELOC_PPC_EMB_NADDR16_HA:          howto manager.      (line  560)
10313
* BFD_RELOC_PPC_EMB_NADDR16_HI:          howto manager.      (line  559)
10314
* BFD_RELOC_PPC_EMB_NADDR16_LO:          howto manager.      (line  558)
10315
* BFD_RELOC_PPC_EMB_NADDR32:             howto manager.      (line  556)
10316
* BFD_RELOC_PPC_EMB_RELSDA:              howto manager.      (line  571)
10317
* BFD_RELOC_PPC_EMB_RELSEC16:            howto manager.      (line  566)
10318
* BFD_RELOC_PPC_EMB_RELST_HA:            howto manager.      (line  569)
10319
* BFD_RELOC_PPC_EMB_RELST_HI:            howto manager.      (line  568)
10320
* BFD_RELOC_PPC_EMB_RELST_LO:            howto manager.      (line  567)
10321
* BFD_RELOC_PPC_EMB_SDA21:               howto manager.      (line  564)
10322
* BFD_RELOC_PPC_EMB_SDA2I16:             howto manager.      (line  562)
10323
* BFD_RELOC_PPC_EMB_SDA2REL:             howto manager.      (line  563)
10324
* BFD_RELOC_PPC_EMB_SDAI16:              howto manager.      (line  561)
10325
* BFD_RELOC_PPC_GLOB_DAT:                howto manager.      (line  552)
10326
* BFD_RELOC_PPC_GOT_DTPREL16:            howto manager.      (line  621)
10327
* BFD_RELOC_PPC_GOT_DTPREL16_HA:         howto manager.      (line  624)
10328
* BFD_RELOC_PPC_GOT_DTPREL16_HI:         howto manager.      (line  623)
10329
* BFD_RELOC_PPC_GOT_DTPREL16_LO:         howto manager.      (line  622)
10330
* BFD_RELOC_PPC_GOT_TLSGD16:             howto manager.      (line  609)
10331
* BFD_RELOC_PPC_GOT_TLSGD16_HA:          howto manager.      (line  612)
10332
* BFD_RELOC_PPC_GOT_TLSGD16_HI:          howto manager.      (line  611)
10333
* BFD_RELOC_PPC_GOT_TLSGD16_LO:          howto manager.      (line  610)
10334
* BFD_RELOC_PPC_GOT_TLSLD16:             howto manager.      (line  613)
10335
* BFD_RELOC_PPC_GOT_TLSLD16_HA:          howto manager.      (line  616)
10336
* BFD_RELOC_PPC_GOT_TLSLD16_HI:          howto manager.      (line  615)
10337
* BFD_RELOC_PPC_GOT_TLSLD16_LO:          howto manager.      (line  614)
10338
* BFD_RELOC_PPC_GOT_TPREL16:             howto manager.      (line  617)
10339
* BFD_RELOC_PPC_GOT_TPREL16_HA:          howto manager.      (line  620)
10340
* BFD_RELOC_PPC_GOT_TPREL16_HI:          howto manager.      (line  619)
10341
* BFD_RELOC_PPC_GOT_TPREL16_LO:          howto manager.      (line  618)
10342
* BFD_RELOC_PPC_JMP_SLOT:                howto manager.      (line  553)
10343
* BFD_RELOC_PPC_LOCAL24PC:               howto manager.      (line  555)
10344
* BFD_RELOC_PPC_RELATIVE:                howto manager.      (line  554)
10345
* BFD_RELOC_PPC_TLS:                     howto manager.      (line  597)
10346
* BFD_RELOC_PPC_TOC16:                   howto manager.      (line  544)
10347
* BFD_RELOC_PPC_TPREL:                   howto manager.      (line  603)
10348
* BFD_RELOC_PPC_TPREL16:                 howto manager.      (line  599)
10349
* BFD_RELOC_PPC_TPREL16_HA:              howto manager.      (line  602)
10350
* BFD_RELOC_PPC_TPREL16_HI:              howto manager.      (line  601)
10351
* BFD_RELOC_PPC_TPREL16_LO:              howto manager.      (line  600)
10352
* BFD_RELOC_RELC:                        howto manager.      (line 1950)
10353
* BFD_RELOC_RVA:                         howto manager.      (line   85)
10354
* BFD_RELOC_SCORE16_BRANCH:              howto manager.      (line 1576)
10355
* BFD_RELOC_SCORE16_JMP:                 howto manager.      (line 1573)
10356
* BFD_RELOC_SCORE_BRANCH:                howto manager.      (line 1570)
10357
* BFD_RELOC_SCORE_CALL15:                howto manager.      (line 1581)
10358
* BFD_RELOC_SCORE_DUMMY1:                howto manager.      (line 1560)
10359
* BFD_RELOC_SCORE_DUMMY2:                howto manager.      (line 1566)
10360
* BFD_RELOC_SCORE_DUMMY_HI16:            howto manager.      (line 1582)
10361
* BFD_RELOC_SCORE_GOT15:                 howto manager.      (line 1579)
10362
* BFD_RELOC_SCORE_GOT_LO16:              howto manager.      (line 1580)
10363
* BFD_RELOC_SCORE_GPREL15:               howto manager.      (line 1563)
10364
* BFD_RELOC_SCORE_JMP:                   howto manager.      (line 1567)
10365
* BFD_RELOC_SH_ALIGN:                    howto manager.      (line  819)
10366
* BFD_RELOC_SH_CODE:                     howto manager.      (line  820)
10367
* BFD_RELOC_SH_COPY:                     howto manager.      (line  825)
10368
* BFD_RELOC_SH_COPY64:                   howto manager.      (line  850)
10369
* BFD_RELOC_SH_COUNT:                    howto manager.      (line  818)
10370
* BFD_RELOC_SH_DATA:                     howto manager.      (line  821)
10371
* BFD_RELOC_SH_DISP12:                   howto manager.      (line  801)
10372
* BFD_RELOC_SH_DISP12BY2:                howto manager.      (line  802)
10373
* BFD_RELOC_SH_DISP12BY4:                howto manager.      (line  803)
10374
* BFD_RELOC_SH_DISP12BY8:                howto manager.      (line  804)
10375
* BFD_RELOC_SH_DISP20:                   howto manager.      (line  805)
10376
* BFD_RELOC_SH_DISP20BY8:                howto manager.      (line  806)
10377
* BFD_RELOC_SH_GLOB_DAT:                 howto manager.      (line  826)
10378
* BFD_RELOC_SH_GLOB_DAT64:               howto manager.      (line  851)
10379
* BFD_RELOC_SH_GOT10BY4:                 howto manager.      (line  854)
10380
* BFD_RELOC_SH_GOT10BY8:                 howto manager.      (line  855)
10381
* BFD_RELOC_SH_GOT_HI16:                 howto manager.      (line  833)
10382
* BFD_RELOC_SH_GOT_LOW16:                howto manager.      (line  830)
10383
* BFD_RELOC_SH_GOT_MEDHI16:              howto manager.      (line  832)
10384
* BFD_RELOC_SH_GOT_MEDLOW16:             howto manager.      (line  831)
10385
* BFD_RELOC_SH_GOTOFF_HI16:              howto manager.      (line  845)
10386
* BFD_RELOC_SH_GOTOFF_LOW16:             howto manager.      (line  842)
10387
* BFD_RELOC_SH_GOTOFF_MEDHI16:           howto manager.      (line  844)
10388
* BFD_RELOC_SH_GOTOFF_MEDLOW16:          howto manager.      (line  843)
10389
* BFD_RELOC_SH_GOTPC:                    howto manager.      (line  829)
10390
* BFD_RELOC_SH_GOTPC_HI16:               howto manager.      (line  849)
10391
* BFD_RELOC_SH_GOTPC_LOW16:              howto manager.      (line  846)
10392
* BFD_RELOC_SH_GOTPC_MEDHI16:            howto manager.      (line  848)
10393
* BFD_RELOC_SH_GOTPC_MEDLOW16:           howto manager.      (line  847)
10394
* BFD_RELOC_SH_GOTPLT10BY4:              howto manager.      (line  856)
10395
* BFD_RELOC_SH_GOTPLT10BY8:              howto manager.      (line  857)
10396
* BFD_RELOC_SH_GOTPLT32:                 howto manager.      (line  858)
10397
* BFD_RELOC_SH_GOTPLT_HI16:              howto manager.      (line  837)
10398
* BFD_RELOC_SH_GOTPLT_LOW16:             howto manager.      (line  834)
10399
* BFD_RELOC_SH_GOTPLT_MEDHI16:           howto manager.      (line  836)
10400
* BFD_RELOC_SH_GOTPLT_MEDLOW16:          howto manager.      (line  835)
10401
* BFD_RELOC_SH_IMM3:                     howto manager.      (line  799)
10402
* BFD_RELOC_SH_IMM3U:                    howto manager.      (line  800)
10403
* BFD_RELOC_SH_IMM4:                     howto manager.      (line  807)
10404
* BFD_RELOC_SH_IMM4BY2:                  howto manager.      (line  808)
10405
* BFD_RELOC_SH_IMM4BY4:                  howto manager.      (line  809)
10406
* BFD_RELOC_SH_IMM8:                     howto manager.      (line  810)
10407
* BFD_RELOC_SH_IMM8BY2:                  howto manager.      (line  811)
10408
* BFD_RELOC_SH_IMM8BY4:                  howto manager.      (line  812)
10409
* BFD_RELOC_SH_IMM_HI16:                 howto manager.      (line  876)
10410
* BFD_RELOC_SH_IMM_HI16_PCREL:           howto manager.      (line  877)
10411
* BFD_RELOC_SH_IMM_LOW16:                howto manager.      (line  870)
10412
* BFD_RELOC_SH_IMM_LOW16_PCREL:          howto manager.      (line  871)
10413
* BFD_RELOC_SH_IMM_MEDHI16:              howto manager.      (line  874)
10414
* BFD_RELOC_SH_IMM_MEDHI16_PCREL:        howto manager.      (line  875)
10415
* BFD_RELOC_SH_IMM_MEDLOW16:             howto manager.      (line  872)
10416
* BFD_RELOC_SH_IMM_MEDLOW16_PCREL:       howto manager.      (line  873)
10417
* BFD_RELOC_SH_IMMS10:                   howto manager.      (line  864)
10418
* BFD_RELOC_SH_IMMS10BY2:                howto manager.      (line  865)
10419
* BFD_RELOC_SH_IMMS10BY4:                howto manager.      (line  866)
10420
* BFD_RELOC_SH_IMMS10BY8:                howto manager.      (line  867)
10421
* BFD_RELOC_SH_IMMS16:                   howto manager.      (line  868)
10422
* BFD_RELOC_SH_IMMS6:                    howto manager.      (line  861)
10423
* BFD_RELOC_SH_IMMS6BY32:                howto manager.      (line  862)
10424
* BFD_RELOC_SH_IMMU16:                   howto manager.      (line  869)
10425
* BFD_RELOC_SH_IMMU5:                    howto manager.      (line  860)
10426
* BFD_RELOC_SH_IMMU6:                    howto manager.      (line  863)
10427
* BFD_RELOC_SH_JMP_SLOT:                 howto manager.      (line  827)
10428
* BFD_RELOC_SH_JMP_SLOT64:               howto manager.      (line  852)
10429
* BFD_RELOC_SH_LABEL:                    howto manager.      (line  822)
10430
* BFD_RELOC_SH_LOOP_END:                 howto manager.      (line  824)
10431
* BFD_RELOC_SH_LOOP_START:               howto manager.      (line  823)
10432
* BFD_RELOC_SH_PCDISP12BY2:              howto manager.      (line  798)
10433
* BFD_RELOC_SH_PCDISP8BY2:               howto manager.      (line  797)
10434
* BFD_RELOC_SH_PCRELIMM8BY2:             howto manager.      (line  813)
10435
* BFD_RELOC_SH_PCRELIMM8BY4:             howto manager.      (line  814)
10436
* BFD_RELOC_SH_PLT_HI16:                 howto manager.      (line  841)
10437
* BFD_RELOC_SH_PLT_LOW16:                howto manager.      (line  838)
10438
* BFD_RELOC_SH_PLT_MEDHI16:              howto manager.      (line  840)
10439
* BFD_RELOC_SH_PLT_MEDLOW16:             howto manager.      (line  839)
10440
* BFD_RELOC_SH_PT_16:                    howto manager.      (line  878)
10441
* BFD_RELOC_SH_RELATIVE:                 howto manager.      (line  828)
10442
* BFD_RELOC_SH_RELATIVE64:               howto manager.      (line  853)
10443
* BFD_RELOC_SH_SHMEDIA_CODE:             howto manager.      (line  859)
10444
* BFD_RELOC_SH_SWITCH16:                 howto manager.      (line  815)
10445
* BFD_RELOC_SH_SWITCH32:                 howto manager.      (line  816)
10446
* BFD_RELOC_SH_TLS_DTPMOD32:             howto manager.      (line  884)
10447
* BFD_RELOC_SH_TLS_DTPOFF32:             howto manager.      (line  885)
10448
* BFD_RELOC_SH_TLS_GD_32:                howto manager.      (line  879)
10449
* BFD_RELOC_SH_TLS_IE_32:                howto manager.      (line  882)
10450
* BFD_RELOC_SH_TLS_LD_32:                howto manager.      (line  880)
10451
* BFD_RELOC_SH_TLS_LDO_32:               howto manager.      (line  881)
10452
* BFD_RELOC_SH_TLS_LE_32:                howto manager.      (line  883)
10453
* BFD_RELOC_SH_TLS_TPOFF32:              howto manager.      (line  886)
10454
* BFD_RELOC_SH_USES:                     howto manager.      (line  817)
10455
* BFD_RELOC_SPARC13:                     howto manager.      (line  119)
10456
* BFD_RELOC_SPARC22:                     howto manager.      (line  118)
10457
* BFD_RELOC_SPARC_10:                    howto manager.      (line  146)
10458
* BFD_RELOC_SPARC_11:                    howto manager.      (line  147)
10459
* BFD_RELOC_SPARC_5:                     howto manager.      (line  159)
10460
* BFD_RELOC_SPARC_6:                     howto manager.      (line  158)
10461
* BFD_RELOC_SPARC_64:                    howto manager.      (line  145)
10462
* BFD_RELOC_SPARC_7:                     howto manager.      (line  157)
10463
* BFD_RELOC_SPARC_BASE13:                howto manager.      (line  141)
10464
* BFD_RELOC_SPARC_BASE22:                howto manager.      (line  142)
10465
* BFD_RELOC_SPARC_COPY:                  howto manager.      (line  126)
10466
* BFD_RELOC_SPARC_DISP64:                howto manager.      (line  160)
10467
* BFD_RELOC_SPARC_GLOB_DAT:              howto manager.      (line  127)
10468
* BFD_RELOC_SPARC_GOT10:                 howto manager.      (line  120)
10469
* BFD_RELOC_SPARC_GOT13:                 howto manager.      (line  121)
10470
* BFD_RELOC_SPARC_GOT22:                 howto manager.      (line  122)
10471
* BFD_RELOC_SPARC_GOTDATA_HIX22:         howto manager.      (line  133)
10472
* BFD_RELOC_SPARC_GOTDATA_LOX10:         howto manager.      (line  134)
10473
* BFD_RELOC_SPARC_GOTDATA_OP:            howto manager.      (line  137)
10474
* BFD_RELOC_SPARC_GOTDATA_OP_HIX22:      howto manager.      (line  135)
10475
* BFD_RELOC_SPARC_GOTDATA_OP_LOX10:      howto manager.      (line  136)
10476
* BFD_RELOC_SPARC_H44:                   howto manager.      (line  165)
10477
* BFD_RELOC_SPARC_HH22:                  howto manager.      (line  149)
10478
* BFD_RELOC_SPARC_HIX22:                 howto manager.      (line  163)
10479
* BFD_RELOC_SPARC_HM10:                  howto manager.      (line  150)
10480
* BFD_RELOC_SPARC_JMP_SLOT:              howto manager.      (line  128)
10481
* BFD_RELOC_SPARC_L44:                   howto manager.      (line  167)
10482
* BFD_RELOC_SPARC_LM22:                  howto manager.      (line  151)
10483
* BFD_RELOC_SPARC_LOX10:                 howto manager.      (line  164)
10484
* BFD_RELOC_SPARC_M44:                   howto manager.      (line  166)
10485
* BFD_RELOC_SPARC_OLO10:                 howto manager.      (line  148)
10486
* BFD_RELOC_SPARC_PC10:                  howto manager.      (line  123)
10487
* BFD_RELOC_SPARC_PC22:                  howto manager.      (line  124)
10488
* BFD_RELOC_SPARC_PC_HH22:               howto manager.      (line  152)
10489
* BFD_RELOC_SPARC_PC_HM10:               howto manager.      (line  153)
10490
* BFD_RELOC_SPARC_PC_LM22:               howto manager.      (line  154)
10491
* BFD_RELOC_SPARC_PLT32:                 howto manager.      (line  161)
10492
* BFD_RELOC_SPARC_PLT64:                 howto manager.      (line  162)
10493
* BFD_RELOC_SPARC_REGISTER:              howto manager.      (line  168)
10494
* BFD_RELOC_SPARC_RELATIVE:              howto manager.      (line  129)
10495
* BFD_RELOC_SPARC_REV32:                 howto manager.      (line  171)
10496
* BFD_RELOC_SPARC_TLS_DTPMOD32:          howto manager.      (line  192)
10497
* BFD_RELOC_SPARC_TLS_DTPMOD64:          howto manager.      (line  193)
10498
* BFD_RELOC_SPARC_TLS_DTPOFF32:          howto manager.      (line  194)
10499
* BFD_RELOC_SPARC_TLS_DTPOFF64:          howto manager.      (line  195)
10500
* BFD_RELOC_SPARC_TLS_GD_ADD:            howto manager.      (line  176)
10501
* BFD_RELOC_SPARC_TLS_GD_CALL:           howto manager.      (line  177)
10502
* BFD_RELOC_SPARC_TLS_GD_HI22:           howto manager.      (line  174)
10503
* BFD_RELOC_SPARC_TLS_GD_LO10:           howto manager.      (line  175)
10504
* BFD_RELOC_SPARC_TLS_IE_ADD:            howto manager.      (line  189)
10505
* BFD_RELOC_SPARC_TLS_IE_HI22:           howto manager.      (line  185)
10506
* BFD_RELOC_SPARC_TLS_IE_LD:             howto manager.      (line  187)
10507
* BFD_RELOC_SPARC_TLS_IE_LDX:            howto manager.      (line  188)
10508
* BFD_RELOC_SPARC_TLS_IE_LO10:           howto manager.      (line  186)
10509
* BFD_RELOC_SPARC_TLS_LDM_ADD:           howto manager.      (line  180)
10510
* BFD_RELOC_SPARC_TLS_LDM_CALL:          howto manager.      (line  181)
10511
* BFD_RELOC_SPARC_TLS_LDM_HI22:          howto manager.      (line  178)
10512
* BFD_RELOC_SPARC_TLS_LDM_LO10:          howto manager.      (line  179)
10513
* BFD_RELOC_SPARC_TLS_LDO_ADD:           howto manager.      (line  184)
10514
* BFD_RELOC_SPARC_TLS_LDO_HIX22:         howto manager.      (line  182)
10515
* BFD_RELOC_SPARC_TLS_LDO_LOX10:         howto manager.      (line  183)
10516
* BFD_RELOC_SPARC_TLS_LE_HIX22:          howto manager.      (line  190)
10517
* BFD_RELOC_SPARC_TLS_LE_LOX10:          howto manager.      (line  191)
10518
* BFD_RELOC_SPARC_TLS_TPOFF32:           howto manager.      (line  196)
10519
* BFD_RELOC_SPARC_TLS_TPOFF64:           howto manager.      (line  197)
10520
* BFD_RELOC_SPARC_UA16:                  howto manager.      (line  130)
10521
* BFD_RELOC_SPARC_UA32:                  howto manager.      (line  131)
10522
* BFD_RELOC_SPARC_UA64:                  howto manager.      (line  132)
10523
* BFD_RELOC_SPARC_WDISP16:               howto manager.      (line  155)
10524
* BFD_RELOC_SPARC_WDISP19:               howto manager.      (line  156)
10525
* BFD_RELOC_SPARC_WDISP22:               howto manager.      (line  117)
10526
* BFD_RELOC_SPARC_WPLT30:                howto manager.      (line  125)
10527
* BFD_RELOC_SPU_HI16:                    howto manager.      (line  211)
10528
* BFD_RELOC_SPU_IMM10:                   howto manager.      (line  202)
10529
* BFD_RELOC_SPU_IMM10W:                  howto manager.      (line  203)
10530
* BFD_RELOC_SPU_IMM16:                   howto manager.      (line  204)
10531
* BFD_RELOC_SPU_IMM16W:                  howto manager.      (line  205)
10532
* BFD_RELOC_SPU_IMM18:                   howto manager.      (line  206)
10533
* BFD_RELOC_SPU_IMM7:                    howto manager.      (line  200)
10534
* BFD_RELOC_SPU_IMM8:                    howto manager.      (line  201)
10535
* BFD_RELOC_SPU_LO16:                    howto manager.      (line  210)
10536
* BFD_RELOC_SPU_PCREL16:                 howto manager.      (line  209)
10537
* BFD_RELOC_SPU_PCREL9a:                 howto manager.      (line  207)
10538
* BFD_RELOC_SPU_PCREL9b:                 howto manager.      (line  208)
10539
* BFD_RELOC_SPU_PPU32:                   howto manager.      (line  212)
10540
* BFD_RELOC_SPU_PPU64:                   howto manager.      (line  213)
10541
* BFD_RELOC_THUMB_PCREL_BLX:             howto manager.      (line  657)
10542
* BFD_RELOC_THUMB_PCREL_BRANCH12:        howto manager.      (line  671)
10543
* BFD_RELOC_THUMB_PCREL_BRANCH20:        howto manager.      (line  672)
10544
* BFD_RELOC_THUMB_PCREL_BRANCH23:        howto manager.      (line  673)
10545
* BFD_RELOC_THUMB_PCREL_BRANCH25:        howto manager.      (line  674)
10546
* BFD_RELOC_THUMB_PCREL_BRANCH7:         howto manager.      (line  669)
10547
* BFD_RELOC_THUMB_PCREL_BRANCH9:         howto manager.      (line  670)
10548
* BFD_RELOC_TIC30_LDP:                   howto manager.      (line 1213)
10549
* BFD_RELOC_TIC54X_16_OF_23:             howto manager.      (line 1231)
10550
* BFD_RELOC_TIC54X_23:                   howto manager.      (line 1228)
10551
* BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.      (line 1236)
10552
* BFD_RELOC_TIC54X_PARTLS7:              howto manager.      (line 1218)
10553
* BFD_RELOC_TIC54X_PARTMS9:              howto manager.      (line 1223)
10554
* bfd_reloc_type_lookup:                 howto manager.      (line 2088)
10555
* BFD_RELOC_V850_22_PCREL:               howto manager.      (line 1140)
10556
* BFD_RELOC_V850_9_PCREL:                howto manager.      (line 1137)
10557
* BFD_RELOC_V850_ALIGN:                  howto manager.      (line 1198)
10558
* BFD_RELOC_V850_CALLT_16_16_OFFSET:     howto manager.      (line 1189)
10559
* BFD_RELOC_V850_CALLT_6_7_OFFSET:       howto manager.      (line 1186)
10560
* BFD_RELOC_V850_LO16_SPLIT_OFFSET:      howto manager.      (line 1201)
10561
* BFD_RELOC_V850_LONGCALL:               howto manager.      (line 1192)
10562
* BFD_RELOC_V850_LONGJUMP:               howto manager.      (line 1195)
10563
* BFD_RELOC_V850_SDA_15_16_OFFSET:       howto manager.      (line 1146)
10564
* BFD_RELOC_V850_SDA_16_16_OFFSET:       howto manager.      (line 1143)
10565
* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.      (line 1178)
10566
* BFD_RELOC_V850_TDA_16_16_OFFSET:       howto manager.      (line 1168)
10567
* BFD_RELOC_V850_TDA_4_4_OFFSET:         howto manager.      (line 1175)
10568
* BFD_RELOC_V850_TDA_4_5_OFFSET:         howto manager.      (line 1171)
10569
* BFD_RELOC_V850_TDA_6_8_OFFSET:         howto manager.      (line 1157)
10570
* BFD_RELOC_V850_TDA_7_7_OFFSET:         howto manager.      (line 1165)
10571
* BFD_RELOC_V850_TDA_7_8_OFFSET:         howto manager.      (line 1161)
10572
* BFD_RELOC_V850_ZDA_15_16_OFFSET:       howto manager.      (line 1153)
10573
* BFD_RELOC_V850_ZDA_16_16_OFFSET:       howto manager.      (line 1150)
10574
* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.      (line 1182)
10575
* BFD_RELOC_VAX_GLOB_DAT:                howto manager.      (line 1959)
10576
* BFD_RELOC_VAX_JMP_SLOT:                howto manager.      (line 1960)
10577
* BFD_RELOC_VAX_RELATIVE:                howto manager.      (line 1961)
10578
* BFD_RELOC_VPE4KMATH_DATA:              howto manager.      (line 1615)
10579
* BFD_RELOC_VPE4KMATH_INSN:              howto manager.      (line 1616)
10580
* BFD_RELOC_VTABLE_ENTRY:                howto manager.      (line 1620)
10581
* BFD_RELOC_VTABLE_INHERIT:              howto manager.      (line 1619)
10582
* BFD_RELOC_X86_64_32S:                  howto manager.      (line  495)
10583
* BFD_RELOC_X86_64_COPY:                 howto manager.      (line  490)
10584
* BFD_RELOC_X86_64_DTPMOD64:             howto manager.      (line  496)
10585
* BFD_RELOC_X86_64_DTPOFF32:             howto manager.      (line  501)
10586
* BFD_RELOC_X86_64_DTPOFF64:             howto manager.      (line  497)
10587
* BFD_RELOC_X86_64_GLOB_DAT:             howto manager.      (line  491)
10588
* BFD_RELOC_X86_64_GOT32:                howto manager.      (line  488)
10589
* BFD_RELOC_X86_64_GOT64:                howto manager.      (line  506)
10590
* BFD_RELOC_X86_64_GOTOFF64:             howto manager.      (line  504)
10591
* BFD_RELOC_X86_64_GOTPC32:              howto manager.      (line  505)
10592
* BFD_RELOC_X86_64_GOTPC32_TLSDESC:      howto manager.      (line  511)
10593
* BFD_RELOC_X86_64_GOTPC64:              howto manager.      (line  508)
10594
* BFD_RELOC_X86_64_GOTPCREL:             howto manager.      (line  494)
10595
* BFD_RELOC_X86_64_GOTPCREL64:           howto manager.      (line  507)
10596
* BFD_RELOC_X86_64_GOTPLT64:             howto manager.      (line  509)
10597
* BFD_RELOC_X86_64_GOTTPOFF:             howto manager.      (line  502)
10598
* BFD_RELOC_X86_64_JUMP_SLOT:            howto manager.      (line  492)
10599
* BFD_RELOC_X86_64_PLT32:                howto manager.      (line  489)
10600
* BFD_RELOC_X86_64_PLTOFF64:             howto manager.      (line  510)
10601
* BFD_RELOC_X86_64_RELATIVE:             howto manager.      (line  493)
10602
* BFD_RELOC_X86_64_TLSDESC:              howto manager.      (line  513)
10603
* BFD_RELOC_X86_64_TLSDESC_CALL:         howto manager.      (line  512)
10604
* BFD_RELOC_X86_64_TLSGD:                howto manager.      (line  499)
10605
* BFD_RELOC_X86_64_TLSLD:                howto manager.      (line  500)
10606
* BFD_RELOC_X86_64_TPOFF32:              howto manager.      (line  503)
10607
* BFD_RELOC_X86_64_TPOFF64:              howto manager.      (line  498)
10608
* BFD_RELOC_XC16X_PAG:                   howto manager.      (line 1953)
10609
* BFD_RELOC_XC16X_POF:                   howto manager.      (line 1954)
10610
* BFD_RELOC_XC16X_SEG:                   howto manager.      (line 1955)
10611
* BFD_RELOC_XC16X_SOF:                   howto manager.      (line 1956)
10612
* BFD_RELOC_XSTORMY16_12:                howto manager.      (line 1945)
10613
* BFD_RELOC_XSTORMY16_24:                howto manager.      (line 1946)
10614
* BFD_RELOC_XSTORMY16_FPTR16:            howto manager.      (line 1947)
10615
* BFD_RELOC_XSTORMY16_REL_12:            howto manager.      (line 1944)
10616
* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2065)
10617
* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2070)
10618
* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2012)
10619
* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2013)
10620
* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2011)
10621
* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2001)
10622
* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2002)
10623
* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2059)
10624
* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2060)
10625
* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2061)
10626
* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2006)
10627
* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2003)
10628
* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 1996)
10629
* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2041)
10630
* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2021)
10631
* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2051)
10632
* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2031)
10633
* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2052)
10634
* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2032)
10635
* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2053)
10636
* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2033)
10637
* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2054)
10638
* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2034)
10639
* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2055)
10640
* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2035)
10641
* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2042)
10642
* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2022)
10643
* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2043)
10644
* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2023)
10645
* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2044)
10646
* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2024)
10647
* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2045)
10648
* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2025)
10649
* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2046)
10650
* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2026)
10651
* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2047)
10652
* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2027)
10653
* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2048)
10654
* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2028)
10655
* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2049)
10656
* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2029)
10657
* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2050)
10658
* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2030)
10659
* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2075)
10660
* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2081)
10661
* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2078)
10662
* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2084)
10663
* bfd_scan_arch:                         Architectures.      (line  413)
10664
* bfd_scan_vma:                          BFD front end.      (line  504)
10665
* bfd_seach_for_target:                  bfd_target.         (line  464)
10666
* bfd_section_already_linked:            Writing the symbol table.
10667
                                                             (line   55)
10668
* bfd_section_list_clear:                section prototypes. (line    8)
10669
* bfd_sections_find_if:                  section prototypes. (line  176)
10670
* bfd_set_arch_info:                     Architectures.      (line  454)
10671
* bfd_set_archive_head:                  Archives.           (line   69)
10672
* bfd_set_default_target:                bfd_target.         (line  429)
10673
* bfd_set_error:                         BFD front end.      (line  314)
10674
* bfd_set_error_handler:                 BFD front end.      (line  356)
10675
* bfd_set_error_program_name:            BFD front end.      (line  365)
10676
* bfd_set_file_flags:                    BFD front end.      (line  424)
10677
* bfd_set_format:                        Formats.            (line   68)
10678
* bfd_set_gp_size:                       BFD front end.      (line  494)
10679
* bfd_set_private_flags:                 BFD front end.      (line  571)
10680
* bfd_set_reloc:                         BFD front end.      (line  414)
10681
* bfd_set_section_contents:              section prototypes. (line  207)
10682
* bfd_set_section_flags:                 section prototypes. (line  140)
10683
* bfd_set_section_size:                  section prototypes. (line  193)
10684
* bfd_set_start_address:                 BFD front end.      (line  473)
10685
* bfd_set_symtab:                        symbol handling functions.
10686
                                                             (line   60)
10687
* bfd_symbol_info:                       symbol handling functions.
10688
                                                             (line  130)
10689
* bfd_target_list:                       bfd_target.         (line  455)
10690
* bfd_write_bigendian_4byte_int:         Internal.           (line   13)
10691
* bfd_zalloc:                            Opening and Closing.
10692
                                                             (line  228)
10693
* bfd_zalloc2:                           Opening and Closing.
10694
                                                             (line  237)
10695
* coff_symbol_type:                      coff.               (line  186)
10696
* core_file_matches_executable_p:        Core Files.         (line   30)
10697
* find_separate_debug_file:              Opening and Closing.
10698
                                                             (line  279)
10699
* generic_core_file_matches_executable_p: Core Files.        (line   40)
10700
* get_debug_link_info:                   Opening and Closing.
10701
                                                             (line  260)
10702
* Hash tables:                           Hash Tables.        (line    6)
10703
* internal object-file format:           Canonical format.   (line   11)
10704
* Linker:                                Linker Functions.   (line    6)
10705
* Other functions:                       BFD front end.      (line  586)
10706
* separate_debug_file_exists:            Opening and Closing.
10707
                                                             (line  270)
10708
* struct bfd_iovec:                      BFD front end.      (line  789)
10709
* target vector (_bfd_final_link):       Performing the Final Link.
10710
                                                             (line    6)
10711
* target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
10712
                                                             (line    6)
10713
* target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
10714
 
10715
 
10716
* what is it?:                           Overview.           (line    6)
10717
10718
10719

10720
Tag Table:
10721
Node: Top1045
10722
Node: Overview1384
10723
Node: History2435
10724
Node: How It Works3381
10725
Node: What BFD Version 2 Can Do4924
10726
Node: BFD information loss6239
10727
Node: Canonical format8771
10728
Node: BFD front end13143
10729
Node: Memory Usage43588
10730
Node: Initialization44816
10731
Node: Sections45275
10732
Node: Section Input45758
10733
Node: Section Output47123
10734
Node: typedef asection49609
10735
Node: section prototypes74190
10736
Node: Symbols83870
10737
Node: Reading Symbols85465
10738
Node: Writing Symbols86572
10739
Node: Mini Symbols88281
10740
Node: typedef asymbol89255
10741
Node: symbol handling functions94516
10742
Node: Archives99858
10743
Node: Formats103584
10744
Node: Relocations106532
10745
Node: typedef arelent107259
10746
Node: howto manager123070
10747
Node: Core Files190441
10748
Node: Targets192258
10749
Node: bfd_target194228
10750
Node: Architectures214533
10751
Node: Opening and Closing236860
10752
Node: Internal248124
10753
Node: File Caching254457
10754
Node: Linker Functions256371
10755
Node: Creating a Linker Hash Table258044
10756
Node: Adding Symbols to the Hash Table259782
10757
Node: Differing file formats260682
10758
Node: Adding symbols from an object file262407
10759
Node: Adding symbols from an archive264558
10760
Node: Performing the Final Link266972
10761
Node: Information provided by the linker268214
10762
Node: Relocating the section contents269368
10763
Node: Writing the symbol table271119
10764
Node: Hash Tables274161
10765
Node: Creating and Freeing a Hash Table275359
10766
Node: Looking Up or Entering a String276609
10767
Node: Traversing a Hash Table277862
10768
Node: Deriving a New Hash Table Type278651
10769
Node: Define the Derived Structures279717
10770
Node: Write the Derived Creation Routine280798
10771
Node: Write Other Derived Routines283422
10772
Node: BFD back ends284737
10773
Node: What to Put Where285007
10774
Node: aout285187
10775
Node: coff291505
10776
Node: elf315982
10777
Node: mmo316845
10778
Node: File layout317773
10779
Node: Symbol-table323420
10780
Node: mmo section mapping327189
10781
Node: GNU Free Documentation License330841

powered by: WebSVN 2.1.0

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