OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [bfd/] [doc/] [bfd.info] - Blame information for rev 611

Go to most recent revision | Details | Compare with Previous | View Log

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

1200
File: bfd.info,  Node: Memory Usage,  Next: Initialization,  Prev: BFD front end,  Up: BFD front end
1201
 
1202
2.4 Memory Usage
1203
================
1204
 
1205
BFD keeps all of its internal structures in obstacks. There is one
1206
obstack per open BFD file, into which the current state is stored. When
1207
a BFD is closed, the obstack is deleted, and so everything which has
1208
been allocated by BFD for the closing file is thrown away.
1209
 
1210
   BFD does not free anything created by an application, but pointers
1211
into `bfd' structures become invalid on a `bfd_close'; for example,
1212
after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
1213
still around, since it has been allocated by the application, but the
1214
data that it pointed to are lost.
1215
 
1216
   The general rule is to not close a BFD until all operations dependent
1217
upon data from the BFD have been completed, or all the data from within
1218
the file has been copied. To help with the management of memory, there
1219
is a function (`bfd_alloc_size') which returns the number of bytes in
1220
obstacks associated with the supplied BFD. This could be used to select
1221
the greediest open BFD, close it to reclaim the memory, perform some
1222
operation and reopen the BFD again, to get a fresh copy of the data
1223
structures.
1224
 
1225

1226
File: bfd.info,  Node: Initialization,  Next: Sections,  Prev: Memory Usage,  Up: BFD front end
1227
 
1228
2.5 Initialization
1229
==================
1230
 
1231
2.5.1 Initialization functions
1232
------------------------------
1233
 
1234
These are the functions that handle initializing a BFD.
1235
 
1236
2.5.1.1 `bfd_init'
1237
..................
1238
 
1239
*Synopsis*
1240
     void bfd_init (void);
1241
   *Description*
1242
This routine must be called before any other BFD function to initialize
1243
magical internal data structures.
1244
 
1245

1246
File: bfd.info,  Node: Sections,  Next: Symbols,  Prev: Initialization,  Up: BFD front end
1247
 
1248
2.6 Sections
1249
============
1250
 
1251
The raw data contained within a BFD is maintained through the section
1252
abstraction.  A single BFD may have any number of sections.  It keeps
1253
hold of them by pointing to the first; each one points to the next in
1254
the list.
1255
 
1256
   Sections are supported in BFD in `section.c'.
1257
 
1258
* Menu:
1259
 
1260
* Section Input::
1261
* Section Output::
1262
* typedef asection::
1263
* section prototypes::
1264
 
1265

1266
File: bfd.info,  Node: Section Input,  Next: Section Output,  Prev: Sections,  Up: Sections
1267
 
1268
2.6.1 Section input
1269
-------------------
1270
 
1271
When a BFD is opened for reading, the section structures are created
1272
and attached to the BFD.
1273
 
1274
   Each section has a name which describes the section in the outside
1275
world--for example, `a.out' would contain at least three sections,
1276
called `.text', `.data' and `.bss'.
1277
 
1278
   Names need not be unique; for example a COFF file may have several
1279
sections named `.data'.
1280
 
1281
   Sometimes a BFD will contain more than the "natural" number of
1282
sections. A back end may attach other sections containing constructor
1283
data, or an application may add a section (using `bfd_make_section') to
1284
the sections attached to an already open BFD. For example, the linker
1285
creates an extra section `COMMON' for each input file's BFD to hold
1286
information about common storage.
1287
 
1288
   The raw data is not necessarily read in when the section descriptor
1289
is created. Some targets may leave the data in place until a
1290
`bfd_get_section_contents' call is made. Other back ends may read in
1291
all the data at once.  For example, an S-record file has to be read
1292
once to determine the size of the data. An IEEE-695 file doesn't
1293
contain raw data in sections, but data and relocation expressions
1294
intermixed, so the data area has to be parsed to get out the data and
1295
relocations.
1296
 
1297

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

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

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

2191
File: bfd.info,  Node: Symbols,  Next: Archives,  Prev: Sections,  Up: BFD front end
2192
 
2193
2.7 Symbols
2194
===========
2195
 
2196
BFD tries to maintain as much symbol information as it can when it
2197
moves information from file to file. BFD passes information to
2198
applications though the `asymbol' structure. When the application
2199
requests the symbol table, BFD reads the table in the native form and
2200
translates parts of it into the internal format. To maintain more than
2201
the information passed to applications, some targets keep some
2202
information "behind the scenes" in a structure only the particular back
2203
end knows about. For example, the coff back end keeps the original
2204
symbol table structure as well as the canonical structure when a BFD is
2205
read in. On output, the coff back end can reconstruct the output symbol
2206
table so that no information is lost, even information unique to coff
2207
which BFD doesn't know or understand. If a coff symbol table were read,
2208
but were written through an a.out back end, all the coff specific
2209
information would be lost. The symbol table of a BFD is not necessarily
2210
read in until a canonicalize request is made. Then the BFD back end
2211
fills in a table provided by the application with pointers to the
2212
canonical information.  To output symbols, the application provides BFD
2213
with a table of pointers to pointers to `asymbol's. This allows
2214
applications like the linker to output a symbol as it was read, since
2215
the "behind the scenes" information will be still available.
2216
 
2217
* Menu:
2218
 
2219
* Reading Symbols::
2220
* Writing Symbols::
2221
* Mini Symbols::
2222
* typedef asymbol::
2223
* symbol handling functions::
2224
 
2225

2226
File: bfd.info,  Node: Reading Symbols,  Next: Writing Symbols,  Prev: Symbols,  Up: Symbols
2227
 
2228
2.7.1 Reading symbols
2229
---------------------
2230
 
2231
There are two stages to reading a symbol table from a BFD: allocating
2232
storage, and the actual reading process. This is an excerpt from an
2233
application which reads the symbol table:
2234
 
2235
              long storage_needed;
2236
              asymbol **symbol_table;
2237
              long number_of_symbols;
2238
              long i;
2239
 
2240
              storage_needed = bfd_get_symtab_upper_bound (abfd);
2241
 
2242
              if (storage_needed < 0)
2243
                FAIL
2244
 
2245
              if (storage_needed == 0)
2246
                return;
2247
 
2248
              symbol_table = xmalloc (storage_needed);
2249
                ...
2250
              number_of_symbols =
2251
                 bfd_canonicalize_symtab (abfd, symbol_table);
2252
 
2253
              if (number_of_symbols < 0)
2254
                FAIL
2255
 
2256
              for (i = 0; i < number_of_symbols; i++)
2257
                process_symbol (symbol_table[i]);
2258
 
2259
   All storage for the symbols themselves is in an objalloc connected
2260
to the BFD; it is freed when the BFD is closed.
2261
 
2262

2263
File: bfd.info,  Node: Writing Symbols,  Next: Mini Symbols,  Prev: Reading Symbols,  Up: Symbols
2264
 
2265
2.7.2 Writing symbols
2266
---------------------
2267
 
2268
Writing of a symbol table is automatic when a BFD open for writing is
2269
closed. The application attaches a vector of pointers to pointers to
2270
symbols to the BFD being written, and fills in the symbol count. The
2271
close and cleanup code reads through the table provided and performs
2272
all the necessary operations. The BFD output code must always be
2273
provided with an "owned" symbol: one which has come from another BFD,
2274
or one which has been created using `bfd_make_empty_symbol'.  Here is an
2275
example showing the creation of a symbol table with only one element:
2276
 
2277
            #include "bfd.h"
2278
            int main (void)
2279
            {
2280
              bfd *abfd;
2281
              asymbol *ptrs[2];
2282
              asymbol *new;
2283
 
2284
              abfd = bfd_openw ("foo","a.out-sunos-big");
2285
              bfd_set_format (abfd, bfd_object);
2286
              new = bfd_make_empty_symbol (abfd);
2287
              new->name = "dummy_symbol";
2288
              new->section = bfd_make_section_old_way (abfd, ".text");
2289
              new->flags = BSF_GLOBAL;
2290
              new->value = 0x12345;
2291
 
2292
              ptrs[0] = new;
2293
              ptrs[1] = 0;
2294
 
2295
              bfd_set_symtab (abfd, ptrs, 1);
2296
              bfd_close (abfd);
2297
              return 0;
2298
            }
2299
 
2300
            ./makesym
2301
            nm foo
2302
            00012345 A dummy_symbol
2303
 
2304
   Many formats cannot represent arbitrary symbol information; for
2305
instance, the `a.out' object format does not allow an arbitrary number
2306
of sections. A symbol pointing to a section which is not one  of
2307
`.text', `.data' or `.bss' cannot be described.
2308
 
2309

2310
File: bfd.info,  Node: Mini Symbols,  Next: typedef asymbol,  Prev: Writing Symbols,  Up: Symbols
2311
 
2312
2.7.3 Mini Symbols
2313
------------------
2314
 
2315
Mini symbols provide read-only access to the symbol table.  They use
2316
less memory space, but require more time to access.  They can be useful
2317
for tools like nm or objdump, which may have to handle symbol tables of
2318
extremely large executables.
2319
 
2320
   The `bfd_read_minisymbols' function will read the symbols into
2321
memory in an internal form.  It will return a `void *' pointer to a
2322
block of memory, a symbol count, and the size of each symbol.  The
2323
pointer is allocated using `malloc', and should be freed by the caller
2324
when it is no longer needed.
2325
 
2326
   The function `bfd_minisymbol_to_symbol' will take a pointer to a
2327
minisymbol, and a pointer to a structure returned by
2328
`bfd_make_empty_symbol', and return a `asymbol' structure.  The return
2329
value may or may not be the same as the value from
2330
`bfd_make_empty_symbol' which was passed in.
2331
 
2332

2333
File: bfd.info,  Node: typedef asymbol,  Next: symbol handling functions,  Prev: Mini Symbols,  Up: Symbols
2334
 
2335
2.7.4 typedef asymbol
2336
---------------------
2337
 
2338
An `asymbol' has the form:
2339
 
2340
 
2341
     typedef struct bfd_symbol
2342
     {
2343
       /* A pointer to the BFD which owns the symbol. This information
2344
          is necessary so that a back end can work out what additional
2345
          information (invisible to the application writer) is carried
2346
          with the symbol.
2347
 
2348
          This field is *almost* redundant, since you can use section->owner
2349
          instead, except that some symbols point to the global sections
2350
          bfd_{abs,com,und}_section.  This could be fixed by making
2351
          these globals be per-bfd (or per-target-flavor).  FIXME.  */
2352
       struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field.  */
2353
 
2354
       /* The text of the symbol. The name is left alone, and not copied; the
2355
          application may not alter it.  */
2356
       const char *name;
2357
 
2358
       /* The value of the symbol.  This really should be a union of a
2359
          numeric value with a pointer, since some flags indicate that
2360
          a pointer to another symbol is stored here.  */
2361
       symvalue value;
2362
 
2363
       /* Attributes of a symbol.  */
2364
     #define BSF_NO_FLAGS           0x00
2365
 
2366
       /* The symbol has local scope; `static' in `C'. The value
2367
          is the offset into the section of the data.  */
2368
     #define BSF_LOCAL              (1 << 0)
2369
 
2370
       /* The symbol has global scope; initialized data in `C'. The
2371
          value is the offset into the section of the data.  */
2372
     #define BSF_GLOBAL             (1 << 1)
2373
 
2374
       /* The symbol has global scope and is exported. The value is
2375
          the offset into the section of the data.  */
2376
     #define BSF_EXPORT     BSF_GLOBAL /* No real difference.  */
2377
 
2378
       /* A normal C symbol would be one of:
2379
          `BSF_LOCAL', `BSF_COMMON',  `BSF_UNDEFINED' or
2380
          `BSF_GLOBAL'.  */
2381
 
2382
       /* The symbol is a debugging record. The value has an arbitrary
2383
          meaning, unless BSF_DEBUGGING_RELOC is also set.  */
2384
     #define BSF_DEBUGGING          (1 << 2)
2385
 
2386
       /* The symbol denotes a function entry point.  Used in ELF,
2387
          perhaps others someday.  */
2388
     #define BSF_FUNCTION           (1 << 3)
2389
 
2390
       /* Used by the linker.  */
2391
     #define BSF_KEEP               (1 << 5)
2392
     #define BSF_KEEP_G             (1 << 6)
2393
 
2394
       /* A weak global symbol, overridable without warnings by
2395
          a regular global symbol of the same name.  */
2396
     #define BSF_WEAK               (1 << 7)
2397
 
2398
       /* This symbol was created to point to a section, e.g. ELF's
2399
          STT_SECTION symbols.  */
2400
     #define BSF_SECTION_SYM        (1 << 8)
2401
 
2402
       /* The symbol used to be a common symbol, but now it is
2403
          allocated.  */
2404
     #define BSF_OLD_COMMON         (1 << 9)
2405
 
2406
       /* In some files the type of a symbol sometimes alters its
2407
          location in an output file - ie in coff a `ISFCN' symbol
2408
          which is also `C_EXT' symbol appears where it was
2409
          declared and not at the end of a section.  This bit is set
2410
          by the target BFD part to convey this information.  */
2411
     #define BSF_NOT_AT_END         (1 << 10)
2412
 
2413
       /* Signal that the symbol is the label of constructor section.  */
2414
     #define BSF_CONSTRUCTOR        (1 << 11)
2415
 
2416
       /* Signal that the symbol is a warning symbol.  The name is a
2417
          warning.  The name of the next symbol is the one to warn about;
2418
          if a reference is made to a symbol with the same name as the next
2419
          symbol, a warning is issued by the linker.  */
2420
     #define BSF_WARNING            (1 << 12)
2421
 
2422
       /* Signal that the symbol is indirect.  This symbol is an indirect
2423
          pointer to the symbol with the same name as the next symbol.  */
2424
     #define BSF_INDIRECT           (1 << 13)
2425
 
2426
       /* BSF_FILE marks symbols that contain a file name.  This is used
2427
          for ELF STT_FILE symbols.  */
2428
     #define BSF_FILE               (1 << 14)
2429
 
2430
       /* Symbol is from dynamic linking information.  */
2431
     #define BSF_DYNAMIC            (1 << 15)
2432
 
2433
       /* The symbol denotes a data object.  Used in ELF, and perhaps
2434
          others someday.  */
2435
     #define BSF_OBJECT             (1 << 16)
2436
 
2437
       /* This symbol is a debugging symbol.  The value is the offset
2438
          into the section of the data.  BSF_DEBUGGING should be set
2439
          as well.  */
2440
     #define BSF_DEBUGGING_RELOC    (1 << 17)
2441
 
2442
       /* This symbol is thread local.  Used in ELF.  */
2443
     #define BSF_THREAD_LOCAL       (1 << 18)
2444
 
2445
       /* This symbol represents a complex relocation expression,
2446
          with the expression tree serialized in the symbol name.  */
2447
     #define BSF_RELC               (1 << 19)
2448
 
2449
       /* This symbol represents a signed complex relocation expression,
2450
          with the expression tree serialized in the symbol name.  */
2451
     #define BSF_SRELC              (1 << 20)
2452
 
2453
       /* This symbol was created by bfd_get_synthetic_symtab.  */
2454
     #define BSF_SYNTHETIC          (1 << 21)
2455
 
2456
       /* This symbol is an indirect code object.  Unrelated to BSF_INDIRECT.
2457
          The dynamic linker will compute the value of this symbol by
2458
          calling the function that it points to.  BSF_FUNCTION must
2459
          also be also set.  */
2460
     #define BSF_GNU_INDIRECT_FUNCTION (1 << 22)
2461
       /* This symbol is a globally unique data object.  The dynamic linker
2462
          will make sure that in the entire process there is just one symbol
2463
          with this name and type in use.  BSF_OBJECT must also be set.  */
2464
     #define BSF_GNU_UNIQUE         (1 << 23)
2465
 
2466
       flagword flags;
2467
 
2468
       /* A pointer to the section to which this symbol is
2469
          relative.  This will always be non NULL, there are special
2470
          sections for undefined and absolute symbols.  */
2471
       struct bfd_section *section;
2472
 
2473
       /* Back end special data.  */
2474
       union
2475
         {
2476
           void *p;
2477
           bfd_vma i;
2478
         }
2479
       udata;
2480
     }
2481
     asymbol;
2482
 
2483

2484
File: bfd.info,  Node: symbol handling functions,  Prev: typedef asymbol,  Up: Symbols
2485
 
2486
2.7.5 Symbol handling functions
2487
-------------------------------
2488
 
2489
2.7.5.1 `bfd_get_symtab_upper_bound'
2490
....................................
2491
 
2492
*Description*
2493
Return the number of bytes required to store a vector of pointers to
2494
`asymbols' for all the symbols in the BFD ABFD, including a terminal
2495
NULL pointer. If there are no symbols in the BFD, then return 0.  If an
2496
error occurs, return -1.
2497
     #define bfd_get_symtab_upper_bound(abfd) \
2498
          BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
2499
 
2500
2.7.5.2 `bfd_is_local_label'
2501
............................
2502
 
2503
*Synopsis*
2504
     bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
2505
   *Description*
2506
Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
2507
generated local label, else return FALSE.
2508
 
2509
2.7.5.3 `bfd_is_local_label_name'
2510
.................................
2511
 
2512
*Synopsis*
2513
     bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
2514
   *Description*
2515
Return TRUE if a symbol with the name NAME in the BFD ABFD is a
2516
compiler generated local label, else return FALSE.  This just checks
2517
whether the name has the form of a local label.
2518
     #define bfd_is_local_label_name(abfd, name) \
2519
       BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
2520
 
2521
2.7.5.4 `bfd_is_target_special_symbol'
2522
......................................
2523
 
2524
*Synopsis*
2525
     bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
2526
   *Description*
2527
Return TRUE iff a symbol SYM in the BFD ABFD is something special to
2528
the particular target represented by the BFD.  Such symbols should
2529
normally not be mentioned to the user.
2530
     #define bfd_is_target_special_symbol(abfd, sym) \
2531
       BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
2532
 
2533
2.7.5.5 `bfd_canonicalize_symtab'
2534
.................................
2535
 
2536
*Description*
2537
Read the symbols from the BFD ABFD, and fills in the vector LOCATION
2538
with pointers to the symbols and a trailing NULL.  Return the actual
2539
number of symbol pointers, not including the NULL.
2540
     #define bfd_canonicalize_symtab(abfd, location) \
2541
       BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
2542
 
2543
2.7.5.6 `bfd_set_symtab'
2544
........................
2545
 
2546
*Synopsis*
2547
     bfd_boolean bfd_set_symtab
2548
        (bfd *abfd, asymbol **location, unsigned int count);
2549
   *Description*
2550
Arrange that when the output BFD ABFD is closed, the table LOCATION of
2551
COUNT pointers to symbols will be written.
2552
 
2553
2.7.5.7 `bfd_print_symbol_vandf'
2554
................................
2555
 
2556
*Synopsis*
2557
     void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
2558
   *Description*
2559
Print the value and flags of the SYMBOL supplied to the stream FILE.
2560
 
2561
2.7.5.8 `bfd_make_empty_symbol'
2562
...............................
2563
 
2564
*Description*
2565
Create a new `asymbol' structure for the BFD ABFD and return a pointer
2566
to it.
2567
 
2568
   This routine is necessary because each back end has private
2569
information surrounding the `asymbol'. Building your own `asymbol' and
2570
pointing to it will not create the private information, and will cause
2571
problems later on.
2572
     #define bfd_make_empty_symbol(abfd) \
2573
       BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
2574
 
2575
2.7.5.9 `_bfd_generic_make_empty_symbol'
2576
........................................
2577
 
2578
*Synopsis*
2579
     asymbol *_bfd_generic_make_empty_symbol (bfd *);
2580
   *Description*
2581
Create a new `asymbol' structure for the BFD ABFD and return a pointer
2582
to it.  Used by core file routines, binary back-end and anywhere else
2583
where no private info is needed.
2584
 
2585
2.7.5.10 `bfd_make_debug_symbol'
2586
................................
2587
 
2588
*Description*
2589
Create a new `asymbol' structure for the BFD ABFD, to be used as a
2590
debugging symbol.  Further details of its use have yet to be worked out.
2591
     #define bfd_make_debug_symbol(abfd,ptr,size) \
2592
       BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
2593
 
2594
2.7.5.11 `bfd_decode_symclass'
2595
..............................
2596
 
2597
*Description*
2598
Return a character corresponding to the symbol class of SYMBOL, or '?'
2599
for an unknown class.
2600
 
2601
   *Synopsis*
2602
     int bfd_decode_symclass (asymbol *symbol);
2603
 
2604
2.7.5.12 `bfd_is_undefined_symclass'
2605
....................................
2606
 
2607
*Description*
2608
Returns non-zero if the class symbol returned by bfd_decode_symclass
2609
represents an undefined symbol.  Returns zero otherwise.
2610
 
2611
   *Synopsis*
2612
     bfd_boolean bfd_is_undefined_symclass (int symclass);
2613
 
2614
2.7.5.13 `bfd_symbol_info'
2615
..........................
2616
 
2617
*Description*
2618
Fill in the basic info about symbol that nm needs.  Additional info may
2619
be added by the back-ends after calling this function.
2620
 
2621
   *Synopsis*
2622
     void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
2623
 
2624
2.7.5.14 `bfd_copy_private_symbol_data'
2625
.......................................
2626
 
2627
*Synopsis*
2628
     bfd_boolean bfd_copy_private_symbol_data
2629
        (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
2630
   *Description*
2631
Copy private symbol information from ISYM in the BFD IBFD to the symbol
2632
OSYM in the BFD OBFD.  Return `TRUE' on success, `FALSE' on error.
2633
Possible error returns are:
2634
 
2635
   * `bfd_error_no_memory' - Not enough memory exists to create private
2636
     data for OSEC.
2637
 
2638
     #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
2639
       BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
2640
                 (ibfd, isymbol, obfd, osymbol))
2641
 
2642

2643
File: bfd.info,  Node: Archives,  Next: Formats,  Prev: Symbols,  Up: BFD front end
2644
 
2645
2.8 Archives
2646
============
2647
 
2648
*Description*
2649
An archive (or library) is just another BFD.  It has a symbol table,
2650
although there's not much a user program will do with it.
2651
 
2652
   The big difference between an archive BFD and an ordinary BFD is
2653
that the archive doesn't have sections.  Instead it has a chain of BFDs
2654
that are considered its contents.  These BFDs can be manipulated like
2655
any other.  The BFDs contained in an archive opened for reading will
2656
all be opened for reading.  You may put either input or output BFDs
2657
into an archive opened for output; they will be handled correctly when
2658
the archive is closed.
2659
 
2660
   Use `bfd_openr_next_archived_file' to step through the contents of
2661
an archive opened for input.  You don't have to read the entire archive
2662
if you don't want to!  Read it until you find what you want.
2663
 
2664
   Archive contents of output BFDs are chained through the `next'
2665
pointer in a BFD.  The first one is findable through the `archive_head'
2666
slot of the archive.  Set it with `bfd_set_archive_head' (q.v.).  A
2667
given BFD may be in only one open output archive at a time.
2668
 
2669
   As expected, the BFD archive code is more general than the archive
2670
code of any given environment.  BFD archives may contain files of
2671
different formats (e.g., a.out and coff) and even different
2672
architectures.  You may even place archives recursively into archives!
2673
 
2674
   This can cause unexpected confusion, since some archive formats are
2675
more expressive than others.  For instance, Intel COFF archives can
2676
preserve long filenames; SunOS a.out archives cannot.  If you move a
2677
file from the first to the second format and back again, the filename
2678
may be truncated.  Likewise, different a.out environments have different
2679
conventions as to how they truncate filenames, whether they preserve
2680
directory names in filenames, etc.  When interoperating with native
2681
tools, be sure your files are homogeneous.
2682
 
2683
   Beware: most of these formats do not react well to the presence of
2684
spaces in filenames.  We do the best we can, but can't always handle
2685
this case due to restrictions in the format of archives.  Many Unix
2686
utilities are braindead in regards to spaces and such in filenames
2687
anyway, so this shouldn't be much of a restriction.
2688
 
2689
   Archives are supported in BFD in `archive.c'.
2690
 
2691
2.8.1 Archive functions
2692
-----------------------
2693
 
2694
2.8.1.1 `bfd_get_next_mapent'
2695
.............................
2696
 
2697
*Synopsis*
2698
     symindex bfd_get_next_mapent
2699
        (bfd *abfd, symindex previous, carsym **sym);
2700
   *Description*
2701
Step through archive ABFD's symbol table (if it has one).  Successively
2702
update SYM with the next symbol's information, returning that symbol's
2703
(internal) index into the symbol table.
2704
 
2705
   Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
2706
one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
2707
 
2708
   A `carsym' is a canonical archive symbol.  The only user-visible
2709
element is its name, a null-terminated string.
2710
 
2711
2.8.1.2 `bfd_set_archive_head'
2712
..............................
2713
 
2714
*Synopsis*
2715
     bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
2716
   *Description*
2717
Set the head of the chain of BFDs contained in the archive OUTPUT to
2718
NEW_HEAD.
2719
 
2720
2.8.1.3 `bfd_openr_next_archived_file'
2721
......................................
2722
 
2723
*Synopsis*
2724
     bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
2725
   *Description*
2726
Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
2727
BFD on the first contained element and returns that.  Subsequent calls
2728
should pass the archive and the previous return value to return a
2729
created BFD to the next contained element. NULL is returned when there
2730
are no more.
2731
 
2732

2733
File: bfd.info,  Node: Formats,  Next: Relocations,  Prev: Archives,  Up: BFD front end
2734
 
2735
2.9 File formats
2736
================
2737
 
2738
A format is a BFD concept of high level file contents type. The formats
2739
supported by BFD are:
2740
 
2741
   * `bfd_object'
2742
   The BFD may contain data, symbols, relocations and debug info.
2743
 
2744
   * `bfd_archive'
2745
   The BFD contains other BFDs and an optional index.
2746
 
2747
   * `bfd_core'
2748
   The BFD contains the result of an executable core dump.
2749
 
2750
2.9.1 File format functions
2751
---------------------------
2752
 
2753
2.9.1.1 `bfd_check_format'
2754
..........................
2755
 
2756
*Synopsis*
2757
     bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
2758
   *Description*
2759
Verify if the file attached to the BFD ABFD is compatible with the
2760
format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
2761
 
2762
   If the BFD has been set to a specific target before the call, only
2763
the named target and format combination is checked. If the target has
2764
not been set, or has been set to `default', then all the known target
2765
backends is interrogated to determine a match.  If the default target
2766
matches, it is used.  If not, exactly one target must recognize the
2767
file, or an error results.
2768
 
2769
   The function returns `TRUE' on success, otherwise `FALSE' with one
2770
of the following error codes:
2771
 
2772
   * `bfd_error_invalid_operation' - if `format' is not one of
2773
     `bfd_object', `bfd_archive' or `bfd_core'.
2774
 
2775
   * `bfd_error_system_call' - if an error occured during a read - even
2776
     some file mismatches can cause bfd_error_system_calls.
2777
 
2778
   * `file_not_recognised' - none of the backends recognised the file
2779
     format.
2780
 
2781
   * `bfd_error_file_ambiguously_recognized' - more than one backend
2782
     recognised the file format.
2783
 
2784
2.9.1.2 `bfd_check_format_matches'
2785
..................................
2786
 
2787
*Synopsis*
2788
     bfd_boolean bfd_check_format_matches
2789
        (bfd *abfd, bfd_format format, char ***matching);
2790
   *Description*
2791
Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
2792
set to `bfd_error_file_ambiguously_recognized'.  In that case, if
2793
MATCHING is not NULL, it will be filled in with a NULL-terminated list
2794
of the names of the formats that matched, allocated with `malloc'.
2795
Then the user may choose a format and try again.
2796
 
2797
   When done with the list that MATCHING points to, the caller should
2798
free it.
2799
 
2800
2.9.1.3 `bfd_set_format'
2801
........................
2802
 
2803
*Synopsis*
2804
     bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
2805
   *Description*
2806
This function sets the file format of the BFD ABFD to the format
2807
FORMAT. If the target set in the BFD does not support the format
2808
requested, the format is invalid, or the BFD is not open for writing,
2809
then an error occurs.
2810
 
2811
2.9.1.4 `bfd_format_string'
2812
...........................
2813
 
2814
*Synopsis*
2815
     const char *bfd_format_string (bfd_format format);
2816
   *Description*
2817
Return a pointer to a const string `invalid', `object', `archive',
2818
`core', or `unknown', depending upon the value of FORMAT.
2819
 
2820

2821
File: bfd.info,  Node: Relocations,  Next: Core Files,  Prev: Formats,  Up: BFD front end
2822
 
2823
2.10 Relocations
2824
================
2825
 
2826
BFD maintains relocations in much the same way it maintains symbols:
2827
they are left alone until required, then read in en-masse and
2828
translated into an internal form.  A common routine
2829
`bfd_perform_relocation' acts upon the canonical form to do the fixup.
2830
 
2831
   Relocations are maintained on a per section basis, while symbols are
2832
maintained on a per BFD basis.
2833
 
2834
   All that a back end has to do to fit the BFD interface is to create
2835
a `struct reloc_cache_entry' for each relocation in a particular
2836
section, and fill in the right bits of the structures.
2837
 
2838
* Menu:
2839
 
2840
* typedef arelent::
2841
* howto manager::
2842
 
2843

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

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

5656
File: bfd.info,  Node: Core Files,  Next: Targets,  Prev: Relocations,  Up: BFD front end
5657
 
5658
2.11 Core files
5659
===============
5660
 
5661
2.11.1 Core file functions
5662
--------------------------
5663
 
5664
*Description*
5665
These are functions pertaining to core files.
5666
 
5667
2.11.1.1 `bfd_core_file_failing_command'
5668
........................................
5669
 
5670
*Synopsis*
5671
     const char *bfd_core_file_failing_command (bfd *abfd);
5672
   *Description*
5673
Return a read-only string explaining which program was running when it
5674
failed and produced the core file ABFD.
5675
 
5676
2.11.1.2 `bfd_core_file_failing_signal'
5677
.......................................
5678
 
5679
*Synopsis*
5680
     int bfd_core_file_failing_signal (bfd *abfd);
5681
   *Description*
5682
Returns the signal number which caused the core dump which generated
5683
the file the BFD ABFD is attached to.
5684
 
5685
2.11.1.3 `core_file_matches_executable_p'
5686
.........................................
5687
 
5688
*Synopsis*
5689
     bfd_boolean core_file_matches_executable_p
5690
        (bfd *core_bfd, bfd *exec_bfd);
5691
   *Description*
5692
Return `TRUE' if the core file attached to CORE_BFD was generated by a
5693
run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
5694
 
5695
2.11.1.4 `generic_core_file_matches_executable_p'
5696
.................................................
5697
 
5698
*Synopsis*
5699
     bfd_boolean generic_core_file_matches_executable_p
5700
        (bfd *core_bfd, bfd *exec_bfd);
5701
   *Description*
5702
Return TRUE if the core file attached to CORE_BFD was generated by a
5703
run of the executable file attached to EXEC_BFD.  The match is based on
5704
executable basenames only.
5705
 
5706
   Note: When not able to determine the core file failing command or
5707
the executable name, we still return TRUE even though we're not sure
5708
that core file and executable match.  This is to avoid generating a
5709
false warning in situations where we really don't know whether they
5710
match or not.
5711
 
5712

5713
File: bfd.info,  Node: Targets,  Next: Architectures,  Prev: Core Files,  Up: BFD front end
5714
 
5715
2.12 Targets
5716
============
5717
 
5718
*Description*
5719
Each port of BFD to a different machine requires the creation of a
5720
target back end. All the back end provides to the root part of BFD is a
5721
structure containing pointers to functions which perform certain low
5722
level operations on files. BFD translates the applications's requests
5723
through a pointer into calls to the back end routines.
5724
 
5725
   When a file is opened with `bfd_openr', its format and target are
5726
unknown. BFD uses various mechanisms to determine how to interpret the
5727
file. The operations performed are:
5728
 
5729
   * Create a BFD by calling the internal routine `_bfd_new_bfd', then
5730
     call `bfd_find_target' with the target string supplied to
5731
     `bfd_openr' and the new BFD pointer.
5732
 
5733
   * If a null target string was provided to `bfd_find_target', look up
5734
     the environment variable `GNUTARGET' and use that as the target
5735
     string.
5736
 
5737
   * If the target string is still `NULL', or the target string is
5738
     `default', then use the first item in the target vector as the
5739
     target type, and set `target_defaulted' in the BFD to cause
5740
     `bfd_check_format' to loop through all the targets.  *Note
5741
     bfd_target::.  *Note Formats::.
5742
 
5743
   * Otherwise, inspect the elements in the target vector one by one,
5744
     until a match on target name is found. When found, use it.
5745
 
5746
   * Otherwise return the error `bfd_error_invalid_target' to
5747
     `bfd_openr'.
5748
 
5749
   * `bfd_openr' attempts to open the file using `bfd_open_file', and
5750
     returns the BFD.
5751
   Once the BFD has been opened and the target selected, the file
5752
format may be determined. This is done by calling `bfd_check_format' on
5753
the BFD with a suggested format.  If `target_defaulted' has been set,
5754
each possible target type is tried to see if it recognizes the
5755
specified format.  `bfd_check_format' returns `TRUE' when the caller
5756
guesses right.
5757
 
5758
* Menu:
5759
 
5760
* bfd_target::
5761
 
5762

5763
File: bfd.info,  Node: bfd_target,  Prev: Targets,  Up: Targets
5764
 
5765
2.12.1 bfd_target
5766
-----------------
5767
 
5768
*Description*
5769
This structure contains everything that BFD knows about a target. It
5770
includes things like its byte order, name, and which routines to call
5771
to do various operations.
5772
 
5773
   Every BFD points to a target structure with its `xvec' member.
5774
 
5775
   The macros below are used to dispatch to functions through the
5776
`bfd_target' vector. They are used in a number of macros further down
5777
in `bfd.h', and are also used when calling various routines by hand
5778
inside the BFD implementation.  The ARGLIST argument must be
5779
parenthesized; it contains all the arguments to the called function.
5780
 
5781
   They make the documentation (more) unpleasant to read, so if someone
5782
wants to fix this and not break the above, please do.
5783
     #define BFD_SEND(bfd, message, arglist) \
5784
       ((*((bfd)->xvec->message)) arglist)
5785
 
5786
     #ifdef DEBUG_BFD_SEND
5787
     #undef BFD_SEND
5788
     #define BFD_SEND(bfd, message, arglist) \
5789
       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
5790
         ((*((bfd)->xvec->message)) arglist) : \
5791
         (bfd_assert (__FILE__,__LINE__), NULL))
5792
     #endif
5793
   For operations which index on the BFD format:
5794
     #define BFD_SEND_FMT(bfd, message, arglist) \
5795
       (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
5796
 
5797
     #ifdef DEBUG_BFD_SEND
5798
     #undef BFD_SEND_FMT
5799
     #define BFD_SEND_FMT(bfd, message, arglist) \
5800
       (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
5801
        (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
5802
        (bfd_assert (__FILE__,__LINE__), NULL))
5803
     #endif
5804
   This is the structure which defines the type of BFD this is.  The
5805
`xvec' member of the struct `bfd' itself points here.  Each module that
5806
implements access to a different target under BFD, defines one of these.
5807
 
5808
   FIXME, these names should be rationalised with the names of the
5809
entry points which call them. Too bad we can't have one macro to define
5810
them both!
5811
     enum bfd_flavour
5812
     {
5813
       bfd_target_unknown_flavour,
5814
       bfd_target_aout_flavour,
5815
       bfd_target_coff_flavour,
5816
       bfd_target_ecoff_flavour,
5817
       bfd_target_xcoff_flavour,
5818
       bfd_target_elf_flavour,
5819
       bfd_target_ieee_flavour,
5820
       bfd_target_nlm_flavour,
5821
       bfd_target_oasys_flavour,
5822
       bfd_target_tekhex_flavour,
5823
       bfd_target_srec_flavour,
5824
       bfd_target_verilog_flavour,
5825
       bfd_target_ihex_flavour,
5826
       bfd_target_som_flavour,
5827
       bfd_target_os9k_flavour,
5828
       bfd_target_versados_flavour,
5829
       bfd_target_msdos_flavour,
5830
       bfd_target_ovax_flavour,
5831
       bfd_target_evax_flavour,
5832
       bfd_target_mmo_flavour,
5833
       bfd_target_mach_o_flavour,
5834
       bfd_target_pef_flavour,
5835
       bfd_target_pef_xlib_flavour,
5836
       bfd_target_sym_flavour
5837
     };
5838
 
5839
     enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
5840
 
5841
     /* Forward declaration.  */
5842
     typedef struct bfd_link_info _bfd_link_info;
5843
 
5844
     typedef struct bfd_target
5845
     {
5846
       /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc.  */
5847
       char *name;
5848
 
5849
      /* The "flavour" of a back end is a general indication about
5850
         the contents of a file.  */
5851
       enum bfd_flavour flavour;
5852
 
5853
       /* The order of bytes within the data area of a file.  */
5854
       enum bfd_endian byteorder;
5855
 
5856
      /* The order of bytes within the header parts of a file.  */
5857
       enum bfd_endian header_byteorder;
5858
 
5859
       /* A mask of all the flags which an executable may have set -
5860
          from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'.  */
5861
       flagword object_flags;
5862
 
5863
      /* A mask of all the flags which a section may have set - from
5864
         the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'.  */
5865
       flagword section_flags;
5866
 
5867
      /* The character normally found at the front of a symbol.
5868
         (if any), perhaps `_'.  */
5869
       char symbol_leading_char;
5870
 
5871
      /* The pad character for file names within an archive header.  */
5872
       char ar_pad_char;
5873
 
5874
       /* The maximum number of characters in an archive header.  */
5875
       unsigned short ar_max_namelen;
5876
 
5877
       /* Entries for byte swapping for data. These are different from the
5878
          other entry points, since they don't take a BFD as the first argument.
5879
          Certain other handlers could do the same.  */
5880
       bfd_uint64_t   (*bfd_getx64) (const void *);
5881
       bfd_int64_t    (*bfd_getx_signed_64) (const void *);
5882
       void           (*bfd_putx64) (bfd_uint64_t, void *);
5883
       bfd_vma        (*bfd_getx32) (const void *);
5884
       bfd_signed_vma (*bfd_getx_signed_32) (const void *);
5885
       void           (*bfd_putx32) (bfd_vma, void *);
5886
       bfd_vma        (*bfd_getx16) (const void *);
5887
       bfd_signed_vma (*bfd_getx_signed_16) (const void *);
5888
       void           (*bfd_putx16) (bfd_vma, void *);
5889
 
5890
       /* Byte swapping for the headers.  */
5891
       bfd_uint64_t   (*bfd_h_getx64) (const void *);
5892
       bfd_int64_t    (*bfd_h_getx_signed_64) (const void *);
5893
       void           (*bfd_h_putx64) (bfd_uint64_t, void *);
5894
       bfd_vma        (*bfd_h_getx32) (const void *);
5895
       bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
5896
       void           (*bfd_h_putx32) (bfd_vma, void *);
5897
       bfd_vma        (*bfd_h_getx16) (const void *);
5898
       bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
5899
       void           (*bfd_h_putx16) (bfd_vma, void *);
5900
 
5901
       /* Format dependent routines: these are vectors of entry points
5902
          within the target vector structure, one for each format to check.  */
5903
 
5904
       /* Check the format of a file being read.  Return a `bfd_target *' or zero.  */
5905
       const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
5906
 
5907
       /* Set the format of a file being written.  */
5908
       bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
5909
 
5910
       /* Write cached information into a file being written, at `bfd_close'.  */
5911
       bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
5912
   The general target vector.  These vectors are initialized using the
5913
BFD_JUMP_TABLE macros.
5914
 
5915
       /* Generic entry points.  */
5916
     #define BFD_JUMP_TABLE_GENERIC(NAME) \
5917
       NAME##_close_and_cleanup, \
5918
       NAME##_bfd_free_cached_info, \
5919
       NAME##_new_section_hook, \
5920
       NAME##_get_section_contents, \
5921
       NAME##_get_section_contents_in_window
5922
 
5923
       /* Called when the BFD is being closed to do any necessary cleanup.  */
5924
       bfd_boolean (*_close_and_cleanup) (bfd *);
5925
       /* Ask the BFD to free all cached information.  */
5926
       bfd_boolean (*_bfd_free_cached_info) (bfd *);
5927
       /* Called when a new section is created.  */
5928
       bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
5929
       /* Read the contents of a section.  */
5930
       bfd_boolean (*_bfd_get_section_contents)
5931
         (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
5932
       bfd_boolean (*_bfd_get_section_contents_in_window)
5933
         (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
5934
 
5935
       /* Entry points to copy private data.  */
5936
     #define BFD_JUMP_TABLE_COPY(NAME) \
5937
       NAME##_bfd_copy_private_bfd_data, \
5938
       NAME##_bfd_merge_private_bfd_data, \
5939
       _bfd_generic_init_private_section_data, \
5940
       NAME##_bfd_copy_private_section_data, \
5941
       NAME##_bfd_copy_private_symbol_data, \
5942
       NAME##_bfd_copy_private_header_data, \
5943
       NAME##_bfd_set_private_flags, \
5944
       NAME##_bfd_print_private_bfd_data
5945
 
5946
       /* Called to copy BFD general private data from one object file
5947
          to another.  */
5948
       bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
5949
       /* Called to merge BFD general private data from one object file
5950
          to a common output file when linking.  */
5951
       bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
5952
       /* Called to initialize BFD private section data from one object file
5953
          to another.  */
5954
     #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
5955
       BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info))
5956
       bfd_boolean (*_bfd_init_private_section_data)
5957
         (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
5958
       /* Called to copy BFD private section data from one object file
5959
          to another.  */
5960
       bfd_boolean (*_bfd_copy_private_section_data)
5961
         (bfd *, sec_ptr, bfd *, sec_ptr);
5962
       /* Called to copy BFD private symbol data from one symbol
5963
          to another.  */
5964
       bfd_boolean (*_bfd_copy_private_symbol_data)
5965
         (bfd *, asymbol *, bfd *, asymbol *);
5966
       /* Called to copy BFD private header data from one object file
5967
          to another.  */
5968
       bfd_boolean (*_bfd_copy_private_header_data)
5969
         (bfd *, bfd *);
5970
       /* Called to set private backend flags.  */
5971
       bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
5972
 
5973
       /* Called to print private BFD data.  */
5974
       bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
5975
 
5976
       /* Core file entry points.  */
5977
     #define BFD_JUMP_TABLE_CORE(NAME) \
5978
       NAME##_core_file_failing_command, \
5979
       NAME##_core_file_failing_signal, \
5980
       NAME##_core_file_matches_executable_p
5981
 
5982
       char *      (*_core_file_failing_command) (bfd *);
5983
       int         (*_core_file_failing_signal) (bfd *);
5984
       bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
5985
 
5986
       /* Archive entry points.  */
5987
     #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
5988
       NAME##_slurp_armap, \
5989
       NAME##_slurp_extended_name_table, \
5990
       NAME##_construct_extended_name_table, \
5991
       NAME##_truncate_arname, \
5992
       NAME##_write_armap, \
5993
       NAME##_read_ar_hdr, \
5994
       NAME##_write_ar_hdr, \
5995
       NAME##_openr_next_archived_file, \
5996
       NAME##_get_elt_at_index, \
5997
       NAME##_generic_stat_arch_elt, \
5998
       NAME##_update_armap_timestamp
5999
 
6000
       bfd_boolean (*_bfd_slurp_armap) (bfd *);
6001
       bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
6002
       bfd_boolean (*_bfd_construct_extended_name_table)
6003
         (bfd *, char **, bfd_size_type *, const char **);
6004
       void        (*_bfd_truncate_arname) (bfd *, const char *, char *);
6005
       bfd_boolean (*write_armap)
6006
         (bfd *, unsigned int, struct orl *, unsigned int, int);
6007
       void *      (*_bfd_read_ar_hdr_fn) (bfd *);
6008
       bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *);
6009
       bfd *       (*openr_next_archived_file) (bfd *, bfd *);
6010
     #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
6011
       bfd *       (*_bfd_get_elt_at_index) (bfd *, symindex);
6012
       int         (*_bfd_stat_arch_elt) (bfd *, struct stat *);
6013
       bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
6014
 
6015
       /* Entry points used for symbols.  */
6016
     #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
6017
       NAME##_get_symtab_upper_bound, \
6018
       NAME##_canonicalize_symtab, \
6019
       NAME##_make_empty_symbol, \
6020
       NAME##_print_symbol, \
6021
       NAME##_get_symbol_info, \
6022
       NAME##_bfd_is_local_label_name, \
6023
       NAME##_bfd_is_target_special_symbol, \
6024
       NAME##_get_lineno, \
6025
       NAME##_find_nearest_line, \
6026
       _bfd_generic_find_line, \
6027
       NAME##_find_inliner_info, \
6028
       NAME##_bfd_make_debug_symbol, \
6029
       NAME##_read_minisymbols, \
6030
       NAME##_minisymbol_to_symbol
6031
 
6032
       long        (*_bfd_get_symtab_upper_bound) (bfd *);
6033
       long        (*_bfd_canonicalize_symtab)
6034
         (bfd *, struct bfd_symbol **);
6035
       struct bfd_symbol *
6036
                   (*_bfd_make_empty_symbol) (bfd *);
6037
       void        (*_bfd_print_symbol)
6038
         (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
6039
     #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
6040
       void        (*_bfd_get_symbol_info)
6041
         (bfd *, struct bfd_symbol *, symbol_info *);
6042
     #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
6043
       bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
6044
       bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
6045
       alent *     (*_get_lineno) (bfd *, struct bfd_symbol *);
6046
       bfd_boolean (*_bfd_find_nearest_line)
6047
         (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
6048
          const char **, const char **, unsigned int *);
6049
       bfd_boolean (*_bfd_find_line)
6050
         (bfd *, struct bfd_symbol **, struct bfd_symbol *,
6051
          const char **, unsigned int *);
6052
       bfd_boolean (*_bfd_find_inliner_info)
6053
         (bfd *, const char **, const char **, unsigned int *);
6054
      /* Back-door to allow format-aware applications to create debug symbols
6055
         while using BFD for everything else.  Currently used by the assembler
6056
         when creating COFF files.  */
6057
       asymbol *   (*_bfd_make_debug_symbol)
6058
         (bfd *, void *, unsigned long size);
6059
     #define bfd_read_minisymbols(b, d, m, s) \
6060
       BFD_SEND (b, _read_minisymbols, (b, d, m, s))
6061
       long        (*_read_minisymbols)
6062
         (bfd *, bfd_boolean, void **, unsigned int *);
6063
     #define bfd_minisymbol_to_symbol(b, d, m, f) \
6064
       BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
6065
       asymbol *   (*_minisymbol_to_symbol)
6066
         (bfd *, bfd_boolean, const void *, asymbol *);
6067
 
6068
       /* Routines for relocs.  */
6069
     #define BFD_JUMP_TABLE_RELOCS(NAME) \
6070
       NAME##_get_reloc_upper_bound, \
6071
       NAME##_canonicalize_reloc, \
6072
       NAME##_bfd_reloc_type_lookup, \
6073
       NAME##_bfd_reloc_name_lookup
6074
 
6075
       long        (*_get_reloc_upper_bound) (bfd *, sec_ptr);
6076
       long        (*_bfd_canonicalize_reloc)
6077
         (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
6078
       /* See documentation on reloc types.  */
6079
       reloc_howto_type *
6080
                   (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
6081
       reloc_howto_type *
6082
                   (*reloc_name_lookup) (bfd *, const char *);
6083
 
6084
 
6085
       /* Routines used when writing an object file.  */
6086
     #define BFD_JUMP_TABLE_WRITE(NAME) \
6087
       NAME##_set_arch_mach, \
6088
       NAME##_set_section_contents
6089
 
6090
       bfd_boolean (*_bfd_set_arch_mach)
6091
         (bfd *, enum bfd_architecture, unsigned long);
6092
       bfd_boolean (*_bfd_set_section_contents)
6093
         (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
6094
 
6095
       /* Routines used by the linker.  */
6096
     #define BFD_JUMP_TABLE_LINK(NAME) \
6097
       NAME##_sizeof_headers, \
6098
       NAME##_bfd_get_relocated_section_contents, \
6099
       NAME##_bfd_relax_section, \
6100
       NAME##_bfd_link_hash_table_create, \
6101
       NAME##_bfd_link_hash_table_free, \
6102
       NAME##_bfd_link_add_symbols, \
6103
       NAME##_bfd_link_just_syms, \
6104
       NAME##_bfd_copy_link_hash_symbol_type, \
6105
       NAME##_bfd_final_link, \
6106
       NAME##_bfd_link_split_section, \
6107
       NAME##_bfd_gc_sections, \
6108
       NAME##_bfd_merge_sections, \
6109
       NAME##_bfd_is_group_section, \
6110
       NAME##_bfd_discard_group, \
6111
       NAME##_section_already_linked, \
6112
       NAME##_bfd_define_common_symbol
6113
 
6114
       int         (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
6115
       bfd_byte *  (*_bfd_get_relocated_section_contents)
6116
         (bfd *, struct bfd_link_info *, struct bfd_link_order *,
6117
          bfd_byte *, bfd_boolean, struct bfd_symbol **);
6118
 
6119
       bfd_boolean (*_bfd_relax_section)
6120
         (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
6121
 
6122
       /* Create a hash table for the linker.  Different backends store
6123
          different information in this table.  */
6124
       struct bfd_link_hash_table *
6125
                   (*_bfd_link_hash_table_create) (bfd *);
6126
 
6127
       /* Release the memory associated with the linker hash table.  */
6128
       void        (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
6129
 
6130
       /* Add symbols from this object file into the hash table.  */
6131
       bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
6132
 
6133
       /* Indicate that we are only retrieving symbol values from this section.  */
6134
       void        (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
6135
 
6136
       /* Copy the symbol type of a linker hash table entry.  */
6137
     #define bfd_copy_link_hash_symbol_type(b, t, f) \
6138
       BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f))
6139
       void (*_bfd_copy_link_hash_symbol_type)
6140
         (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
6141
 
6142
       /* Do a link based on the link_order structures attached to each
6143
          section of the BFD.  */
6144
       bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
6145
 
6146
       /* Should this section be split up into smaller pieces during linking.  */
6147
       bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
6148
 
6149
       /* Remove sections that are not referenced from the output.  */
6150
       bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
6151
 
6152
       /* Attempt to merge SEC_MERGE sections.  */
6153
       bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
6154
 
6155
       /* Is this section a member of a group?  */
6156
       bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
6157
 
6158
       /* Discard members of a group.  */
6159
       bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
6160
 
6161
       /* Check if SEC has been already linked during a reloceatable or
6162
          final link.  */
6163
       void (*_section_already_linked) (bfd *, struct bfd_section *,
6164
                                        struct bfd_link_info *);
6165
 
6166
       /* Define a common symbol.  */
6167
       bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *,
6168
                                                 struct bfd_link_hash_entry *);
6169
 
6170
       /* Routines to handle dynamic symbols and relocs.  */
6171
     #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
6172
       NAME##_get_dynamic_symtab_upper_bound, \
6173
       NAME##_canonicalize_dynamic_symtab, \
6174
       NAME##_get_synthetic_symtab, \
6175
       NAME##_get_dynamic_reloc_upper_bound, \
6176
       NAME##_canonicalize_dynamic_reloc
6177
 
6178
       /* Get the amount of memory required to hold the dynamic symbols.  */
6179
       long        (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
6180
       /* Read in the dynamic symbols.  */
6181
       long        (*_bfd_canonicalize_dynamic_symtab)
6182
         (bfd *, struct bfd_symbol **);
6183
       /* Create synthetized symbols.  */
6184
       long        (*_bfd_get_synthetic_symtab)
6185
         (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
6186
          struct bfd_symbol **);
6187
       /* Get the amount of memory required to hold the dynamic relocs.  */
6188
       long        (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
6189
       /* Read in the dynamic relocs.  */
6190
       long        (*_bfd_canonicalize_dynamic_reloc)
6191
         (bfd *, arelent **, struct bfd_symbol **);
6192
   A pointer to an alternative bfd_target in case the current one is not
6193
satisfactory.  This can happen when the target cpu supports both big
6194
and little endian code, and target chosen by the linker has the wrong
6195
endianness.  The function open_output() in ld/ldlang.c uses this field
6196
to find an alternative output format that is suitable.
6197
       /* Opposite endian version of this target.  */
6198
       const struct bfd_target * alternative_target;
6199
 
6200
       /* Data for use by back-end routines, which isn't
6201
          generic enough to belong in this structure.  */
6202
       const void *backend_data;
6203
 
6204
     } bfd_target;
6205
 
6206
2.12.1.1 `bfd_set_default_target'
6207
.................................
6208
 
6209
*Synopsis*
6210
     bfd_boolean bfd_set_default_target (const char *name);
6211
   *Description*
6212
Set the default target vector to use when recognizing a BFD.  This
6213
takes the name of the target, which may be a BFD target name or a
6214
configuration triplet.
6215
 
6216
2.12.1.2 `bfd_find_target'
6217
..........................
6218
 
6219
*Synopsis*
6220
     const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
6221
   *Description*
6222
Return a pointer to the transfer vector for the object target named
6223
TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
6224
environment variable `GNUTARGET'; if that is null or not defined, then
6225
choose the first entry in the target list.  Passing in the string
6226
"default" or setting the environment variable to "default" will cause
6227
the first entry in the target list to be returned, and
6228
"target_defaulted" will be set in the BFD if ABFD isn't `NULL'.  This
6229
causes `bfd_check_format' to loop over all the targets to find the one
6230
that matches the file being read.
6231
 
6232
2.12.1.3 `bfd_get_target_info'
6233
..............................
6234
 
6235
*Synopsis*
6236
     const bfd_target *bfd_get_target_info (const char *target_name,
6237
         bfd *abfd,
6238
         bfd_boolean *is_bigendian,
6239
         int *underscoring,
6240
         const char **def_target_arch);
6241
   *Description*
6242
Return a pointer to the transfer vector for the object target named
6243
TARGET_NAME.  If TARGET_NAME is `NULL', choose the one in the
6244
environment variable `GNUTARGET'; if that is null or not defined, then
6245
choose the first entry in the target list.  Passing in the string
6246
"default" or setting the environment variable to "default" will cause
6247
the first entry in the target list to be returned, and
6248
"target_defaulted" will be set in the BFD if ABFD isn't `NULL'.  This
6249
causes `bfd_check_format' to loop over all the targets to find the one
6250
that matches the file being read.  If IS_BIGENDIAN is not `NULL', then
6251
set this value to target's endian mode. True for big-endian, FALSE for
6252
little-endian or for invalid target.  If UNDERSCORING is not `NULL',
6253
then set this value to target's underscoring mode. Zero for
6254
none-underscoring, -1 for invalid target, else the value of target
6255
vector's symbol underscoring.  If DEF_TARGET_ARCH is not `NULL', then
6256
set it to the architecture string specified by the target_name.
6257
 
6258
2.12.1.4 `bfd_target_list'
6259
..........................
6260
 
6261
*Synopsis*
6262
     const char ** bfd_target_list (void);
6263
   *Description*
6264
Return a freshly malloced NULL-terminated vector of the names of all
6265
the valid BFD targets. Do not modify the names.
6266
 
6267
2.12.1.5 `bfd_seach_for_target'
6268
...............................
6269
 
6270
*Synopsis*
6271
     const bfd_target *bfd_search_for_target
6272
        (int (*search_func) (const bfd_target *, void *),
6273
         void *);
6274
   *Description*
6275
Return a pointer to the first transfer vector in the list of transfer
6276
vectors maintained by BFD that produces a non-zero result when passed
6277
to the function SEARCH_FUNC.  The parameter DATA is passed, unexamined,
6278
to the search function.
6279
 
6280

6281
File: bfd.info,  Node: Architectures,  Next: Opening and Closing,  Prev: Targets,  Up: BFD front end
6282
 
6283
2.13 Architectures
6284
==================
6285
 
6286
BFD keeps one atom in a BFD describing the architecture of the data
6287
attached to the BFD: a pointer to a `bfd_arch_info_type'.
6288
 
6289
   Pointers to structures can be requested independently of a BFD so
6290
that an architecture's information can be interrogated without access
6291
to an open BFD.
6292
 
6293
   The architecture information is provided by each architecture
6294
package.  The set of default architectures is selected by the macro
6295
`SELECT_ARCHITECTURES'.  This is normally set up in the
6296
`config/TARGET.mt' file of your choice.  If the name is not defined,
6297
then all the architectures supported are included.
6298
 
6299
   When BFD starts up, all the architectures are called with an
6300
initialize method.  It is up to the architecture back end to insert as
6301
many items into the list of architectures as it wants to; generally
6302
this would be one for each machine and one for the default case (an
6303
item with a machine field of 0).
6304
 
6305
   BFD's idea of an architecture is implemented in `archures.c'.
6306
 
6307
2.13.1 bfd_architecture
6308
-----------------------
6309
 
6310
*Description*
6311
This enum gives the object file's CPU architecture, in a global
6312
sense--i.e., what processor family does it belong to?  Another field
6313
indicates which processor within the family is in use.  The machine
6314
gives a number which distinguishes different versions of the
6315
architecture, containing, for example, 2 and 3 for Intel i960 KA and
6316
i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
6317
     enum bfd_architecture
6318
     {
6319
       bfd_arch_unknown,   /* File arch not known.  */
6320
       bfd_arch_obscure,   /* Arch known, not one of these.  */
6321
       bfd_arch_m68k,      /* Motorola 68xxx */
6322
     #define bfd_mach_m68000 1
6323
     #define bfd_mach_m68008 2
6324
     #define bfd_mach_m68010 3
6325
     #define bfd_mach_m68020 4
6326
     #define bfd_mach_m68030 5
6327
     #define bfd_mach_m68040 6
6328
     #define bfd_mach_m68060 7
6329
     #define bfd_mach_cpu32  8
6330
     #define bfd_mach_fido   9
6331
     #define bfd_mach_mcf_isa_a_nodiv 10
6332
     #define bfd_mach_mcf_isa_a 11
6333
     #define bfd_mach_mcf_isa_a_mac 12
6334
     #define bfd_mach_mcf_isa_a_emac 13
6335
     #define bfd_mach_mcf_isa_aplus 14
6336
     #define bfd_mach_mcf_isa_aplus_mac 15
6337
     #define bfd_mach_mcf_isa_aplus_emac 16
6338
     #define bfd_mach_mcf_isa_b_nousp 17
6339
     #define bfd_mach_mcf_isa_b_nousp_mac 18
6340
     #define bfd_mach_mcf_isa_b_nousp_emac 19
6341
     #define bfd_mach_mcf_isa_b 20
6342
     #define bfd_mach_mcf_isa_b_mac 21
6343
     #define bfd_mach_mcf_isa_b_emac 22
6344
     #define bfd_mach_mcf_isa_b_float 23
6345
     #define bfd_mach_mcf_isa_b_float_mac 24
6346
     #define bfd_mach_mcf_isa_b_float_emac 25
6347
     #define bfd_mach_mcf_isa_c 26
6348
     #define bfd_mach_mcf_isa_c_mac 27
6349
     #define bfd_mach_mcf_isa_c_emac 28
6350
     #define bfd_mach_mcf_isa_c_nodiv 29
6351
     #define bfd_mach_mcf_isa_c_nodiv_mac 30
6352
     #define bfd_mach_mcf_isa_c_nodiv_emac 31
6353
       bfd_arch_vax,       /* DEC Vax */
6354
       bfd_arch_i960,      /* Intel 960 */
6355
         /* The order of the following is important.
6356
            lower number indicates a machine type that
6357
            only accepts a subset of the instructions
6358
            available to machines with higher numbers.
6359
            The exception is the "ca", which is
6360
            incompatible with all other machines except
6361
            "core".  */
6362
 
6363
     #define bfd_mach_i960_core      1
6364
     #define bfd_mach_i960_ka_sa     2
6365
     #define bfd_mach_i960_kb_sb     3
6366
     #define bfd_mach_i960_mc        4
6367
     #define bfd_mach_i960_xa        5
6368
     #define bfd_mach_i960_ca        6
6369
     #define bfd_mach_i960_jx        7
6370
     #define bfd_mach_i960_hx        8
6371
 
6372
       bfd_arch_or32,      /* OpenRISC 32 */
6373
 
6374
       bfd_arch_sparc,     /* SPARC */
6375
     #define bfd_mach_sparc                 1
6376
     /* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
6377
     #define bfd_mach_sparc_sparclet        2
6378
     #define bfd_mach_sparc_sparclite       3
6379
     #define bfd_mach_sparc_v8plus          4
6380
     #define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns.  */
6381
     #define bfd_mach_sparc_sparclite_le    6
6382
     #define bfd_mach_sparc_v9              7
6383
     #define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns.  */
6384
     #define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns.  */
6385
     #define bfd_mach_sparc_v9b             10 /* with cheetah add'ns.  */
6386
     /* Nonzero if MACH has the v9 instruction set.  */
6387
     #define bfd_mach_sparc_v9_p(mach) \
6388
       ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
6389
        && (mach) != bfd_mach_sparc_sparclite_le)
6390
     /* Nonzero if MACH is a 64 bit sparc architecture.  */
6391
     #define bfd_mach_sparc_64bit_p(mach) \
6392
       ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
6393
       bfd_arch_spu,       /* PowerPC SPU */
6394
     #define bfd_mach_spu           256
6395
       bfd_arch_mips,      /* MIPS Rxxxx */
6396
     #define bfd_mach_mips3000              3000
6397
     #define bfd_mach_mips3900              3900
6398
     #define bfd_mach_mips4000              4000
6399
     #define bfd_mach_mips4010              4010
6400
     #define bfd_mach_mips4100              4100
6401
     #define bfd_mach_mips4111              4111
6402
     #define bfd_mach_mips4120              4120
6403
     #define bfd_mach_mips4300              4300
6404
     #define bfd_mach_mips4400              4400
6405
     #define bfd_mach_mips4600              4600
6406
     #define bfd_mach_mips4650              4650
6407
     #define bfd_mach_mips5000              5000
6408
     #define bfd_mach_mips5400              5400
6409
     #define bfd_mach_mips5500              5500
6410
     #define bfd_mach_mips6000              6000
6411
     #define bfd_mach_mips7000              7000
6412
     #define bfd_mach_mips8000              8000
6413
     #define bfd_mach_mips9000              9000
6414
     #define bfd_mach_mips10000             10000
6415
     #define bfd_mach_mips12000             12000
6416
     #define bfd_mach_mips14000             14000
6417
     #define bfd_mach_mips16000             16000
6418
     #define bfd_mach_mips16                16
6419
     #define bfd_mach_mips5                 5
6420
     #define bfd_mach_mips_loongson_2e      3001
6421
     #define bfd_mach_mips_loongson_2f      3002
6422
     #define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
6423
     #define bfd_mach_mips_octeon           6501
6424
     #define bfd_mach_mips_xlr              887682   /* decimal 'XLR'  */
6425
     #define bfd_mach_mipsisa32             32
6426
     #define bfd_mach_mipsisa32r2           33
6427
     #define bfd_mach_mipsisa64             64
6428
     #define bfd_mach_mipsisa64r2           65
6429
       bfd_arch_i386,      /* Intel 386 */
6430
     #define bfd_mach_i386_i386 1
6431
     #define bfd_mach_i386_i8086 2
6432
     #define bfd_mach_i386_i386_intel_syntax 3
6433
     #define bfd_mach_x86_64 64
6434
     #define bfd_mach_x86_64_intel_syntax 65
6435
       bfd_arch_l1om,   /* Intel L1OM */
6436
     #define bfd_mach_l1om 66
6437
     #define bfd_mach_l1om_intel_syntax 67
6438
       bfd_arch_we32k,     /* AT&T WE32xxx */
6439
       bfd_arch_tahoe,     /* CCI/Harris Tahoe */
6440
       bfd_arch_i860,      /* Intel 860 */
6441
       bfd_arch_i370,      /* IBM 360/370 Mainframes */
6442
       bfd_arch_romp,      /* IBM ROMP PC/RT */
6443
       bfd_arch_convex,    /* Convex */
6444
       bfd_arch_m88k,      /* Motorola 88xxx */
6445
       bfd_arch_m98k,      /* Motorola 98xxx */
6446
       bfd_arch_pyramid,   /* Pyramid Technology */
6447
       bfd_arch_h8300,     /* Renesas H8/300 (formerly Hitachi H8/300) */
6448
     #define bfd_mach_h8300    1
6449
     #define bfd_mach_h8300h   2
6450
     #define bfd_mach_h8300s   3
6451
     #define bfd_mach_h8300hn  4
6452
     #define bfd_mach_h8300sn  5
6453
     #define bfd_mach_h8300sx  6
6454
     #define bfd_mach_h8300sxn 7
6455
       bfd_arch_pdp11,     /* DEC PDP-11 */
6456
       bfd_arch_plugin,
6457
       bfd_arch_powerpc,   /* PowerPC */
6458
     #define bfd_mach_ppc           32
6459
     #define bfd_mach_ppc64         64
6460
     #define bfd_mach_ppc_403       403
6461
     #define bfd_mach_ppc_403gc     4030
6462
     #define bfd_mach_ppc_405       405
6463
     #define bfd_mach_ppc_505       505
6464
     #define bfd_mach_ppc_601       601
6465
     #define bfd_mach_ppc_602       602
6466
     #define bfd_mach_ppc_603       603
6467
     #define bfd_mach_ppc_ec603e    6031
6468
     #define bfd_mach_ppc_604       604
6469
     #define bfd_mach_ppc_620       620
6470
     #define bfd_mach_ppc_630       630
6471
     #define bfd_mach_ppc_750       750
6472
     #define bfd_mach_ppc_860       860
6473
     #define bfd_mach_ppc_a35       35
6474
     #define bfd_mach_ppc_rs64ii    642
6475
     #define bfd_mach_ppc_rs64iii   643
6476
     #define bfd_mach_ppc_7400      7400
6477
     #define bfd_mach_ppc_e500      500
6478
     #define bfd_mach_ppc_e500mc    5001
6479
     #define bfd_mach_ppc_e500mc64  5005
6480
     #define bfd_mach_ppc_titan     83
6481
       bfd_arch_rs6000,    /* IBM RS/6000 */
6482
     #define bfd_mach_rs6k          6000
6483
     #define bfd_mach_rs6k_rs1      6001
6484
     #define bfd_mach_rs6k_rsc      6003
6485
     #define bfd_mach_rs6k_rs2      6002
6486
       bfd_arch_hppa,      /* HP PA RISC */
6487
     #define bfd_mach_hppa10        10
6488
     #define bfd_mach_hppa11        11
6489
     #define bfd_mach_hppa20        20
6490
     #define bfd_mach_hppa20w       25
6491
       bfd_arch_d10v,      /* Mitsubishi D10V */
6492
     #define bfd_mach_d10v          1
6493
     #define bfd_mach_d10v_ts2      2
6494
     #define bfd_mach_d10v_ts3      3
6495
       bfd_arch_d30v,      /* Mitsubishi D30V */
6496
       bfd_arch_dlx,       /* DLX */
6497
       bfd_arch_m68hc11,   /* Motorola 68HC11 */
6498
       bfd_arch_m68hc12,   /* Motorola 68HC12 */
6499
     #define bfd_mach_m6812_default 0
6500
     #define bfd_mach_m6812         1
6501
     #define bfd_mach_m6812s        2
6502
       bfd_arch_z8k,       /* Zilog Z8000 */
6503
     #define bfd_mach_z8001         1
6504
     #define bfd_mach_z8002         2
6505
       bfd_arch_h8500,     /* Renesas H8/500 (formerly Hitachi H8/500) */
6506
       bfd_arch_sh,        /* Renesas / SuperH SH (formerly Hitachi SH) */
6507
     #define bfd_mach_sh            1
6508
     #define bfd_mach_sh2        0x20
6509
     #define bfd_mach_sh_dsp     0x2d
6510
     #define bfd_mach_sh2a       0x2a
6511
     #define bfd_mach_sh2a_nofpu 0x2b
6512
     #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
6513
     #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
6514
     #define bfd_mach_sh2a_or_sh4  0x2a3
6515
     #define bfd_mach_sh2a_or_sh3e 0x2a4
6516
     #define bfd_mach_sh2e       0x2e
6517
     #define bfd_mach_sh3        0x30
6518
     #define bfd_mach_sh3_nommu  0x31
6519
     #define bfd_mach_sh3_dsp    0x3d
6520
     #define bfd_mach_sh3e       0x3e
6521
     #define bfd_mach_sh4        0x40
6522
     #define bfd_mach_sh4_nofpu  0x41
6523
     #define bfd_mach_sh4_nommu_nofpu  0x42
6524
     #define bfd_mach_sh4a       0x4a
6525
     #define bfd_mach_sh4a_nofpu 0x4b
6526
     #define bfd_mach_sh4al_dsp  0x4d
6527
     #define bfd_mach_sh5        0x50
6528
       bfd_arch_alpha,     /* Dec Alpha */
6529
     #define bfd_mach_alpha_ev4  0x10
6530
     #define bfd_mach_alpha_ev5  0x20
6531
     #define bfd_mach_alpha_ev6  0x30
6532
       bfd_arch_arm,       /* Advanced Risc Machines ARM.  */
6533
     #define bfd_mach_arm_unknown   0
6534
     #define bfd_mach_arm_2         1
6535
     #define bfd_mach_arm_2a        2
6536
     #define bfd_mach_arm_3         3
6537
     #define bfd_mach_arm_3M        4
6538
     #define bfd_mach_arm_4         5
6539
     #define bfd_mach_arm_4T        6
6540
     #define bfd_mach_arm_5         7
6541
     #define bfd_mach_arm_5T        8
6542
     #define bfd_mach_arm_5TE       9
6543
     #define bfd_mach_arm_XScale    10
6544
     #define bfd_mach_arm_ep9312    11
6545
     #define bfd_mach_arm_iWMMXt    12
6546
     #define bfd_mach_arm_iWMMXt2   13
6547
       bfd_arch_ns32k,     /* National Semiconductors ns32000 */
6548
       bfd_arch_w65,       /* WDC 65816 */
6549
       bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
6550
       bfd_arch_tic4x,     /* Texas Instruments TMS320C3X/4X */
6551
     #define bfd_mach_tic3x         30
6552
     #define bfd_mach_tic4x         40
6553
       bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
6554
       bfd_arch_tic6x,     /* Texas Instruments TMS320C6X */
6555
       bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
6556
       bfd_arch_v850,      /* NEC V850 */
6557
     #define bfd_mach_v850          1
6558
     #define bfd_mach_v850e         'E'
6559
     #define bfd_mach_v850e1        '1'
6560
       bfd_arch_arc,       /* ARC Cores */
6561
     #define bfd_mach_arc_5         5
6562
     #define bfd_mach_arc_6         6
6563
     #define bfd_mach_arc_7         7
6564
     #define bfd_mach_arc_8         8
6565
      bfd_arch_m32c,     /* Renesas M16C/M32C.  */
6566
     #define bfd_mach_m16c        0x75
6567
     #define bfd_mach_m32c        0x78
6568
       bfd_arch_m32r,      /* Renesas M32R (formerly Mitsubishi M32R/D) */
6569
     #define bfd_mach_m32r          1 /* For backwards compatibility.  */
6570
     #define bfd_mach_m32rx         'x'
6571
     #define bfd_mach_m32r2         '2'
6572
       bfd_arch_mn10200,   /* Matsushita MN10200 */
6573
       bfd_arch_mn10300,   /* Matsushita MN10300 */
6574
     #define bfd_mach_mn10300               300
6575
     #define bfd_mach_am33          330
6576
     #define bfd_mach_am33_2        332
6577
       bfd_arch_fr30,
6578
     #define bfd_mach_fr30          0x46523330
6579
       bfd_arch_frv,
6580
     #define bfd_mach_frv           1
6581
     #define bfd_mach_frvsimple     2
6582
     #define bfd_mach_fr300         300
6583
     #define bfd_mach_fr400         400
6584
     #define bfd_mach_fr450         450
6585
     #define bfd_mach_frvtomcat     499     /* fr500 prototype */
6586
     #define bfd_mach_fr500         500
6587
     #define bfd_mach_fr550         550
6588
       bfd_arch_moxie,       /* The moxie processor */
6589
     #define bfd_mach_moxie         1
6590
       bfd_arch_mcore,
6591
       bfd_arch_mep,
6592
     #define bfd_mach_mep           1
6593
     #define bfd_mach_mep_h1        0x6831
6594
     #define bfd_mach_mep_c5        0x6335
6595
       bfd_arch_ia64,      /* HP/Intel ia64 */
6596
     #define bfd_mach_ia64_elf64    64
6597
     #define bfd_mach_ia64_elf32    32
6598
       bfd_arch_ip2k,      /* Ubicom IP2K microcontrollers. */
6599
     #define bfd_mach_ip2022        1
6600
     #define bfd_mach_ip2022ext     2
6601
      bfd_arch_iq2000,     /* Vitesse IQ2000.  */
6602
     #define bfd_mach_iq2000        1
6603
     #define bfd_mach_iq10          2
6604
       bfd_arch_mt,
6605
     #define bfd_mach_ms1           1
6606
     #define bfd_mach_mrisc2        2
6607
     #define bfd_mach_ms2           3
6608
       bfd_arch_pj,
6609
       bfd_arch_avr,       /* Atmel AVR microcontrollers.  */
6610
     #define bfd_mach_avr1          1
6611
     #define bfd_mach_avr2          2
6612
     #define bfd_mach_avr25         25
6613
     #define bfd_mach_avr3          3
6614
     #define bfd_mach_avr31         31
6615
     #define bfd_mach_avr35         35
6616
     #define bfd_mach_avr4          4
6617
     #define bfd_mach_avr5          5
6618
     #define bfd_mach_avr51         51
6619
     #define bfd_mach_avr6          6
6620
       bfd_arch_bfin,        /* ADI Blackfin */
6621
     #define bfd_mach_bfin          1
6622
       bfd_arch_cr16,       /* National Semiconductor CompactRISC (ie CR16). */
6623
     #define bfd_mach_cr16          1
6624
       bfd_arch_cr16c,       /* National Semiconductor CompactRISC. */
6625
     #define bfd_mach_cr16c         1
6626
       bfd_arch_crx,       /*  National Semiconductor CRX.  */
6627
     #define bfd_mach_crx           1
6628
       bfd_arch_cris,      /* Axis CRIS */
6629
     #define bfd_mach_cris_v0_v10   255
6630
     #define bfd_mach_cris_v32      32
6631
     #define bfd_mach_cris_v10_v32  1032
6632
       bfd_arch_rx,        /* Renesas RX.  */
6633
     #define bfd_mach_rx            0x75
6634
       bfd_arch_s390,      /* IBM s390 */
6635
     #define bfd_mach_s390_31       31
6636
     #define bfd_mach_s390_64       64
6637
       bfd_arch_score,     /* Sunplus score */
6638
     #define bfd_mach_score3         3
6639
     #define bfd_mach_score7         7
6640
       bfd_arch_openrisc,  /* OpenRISC */
6641
       bfd_arch_mmix,      /* Donald Knuth's educational processor.  */
6642
       bfd_arch_xstormy16,
6643
     #define bfd_mach_xstormy16     1
6644
       bfd_arch_msp430,    /* Texas Instruments MSP430 architecture.  */
6645
     #define bfd_mach_msp11          11
6646
     #define bfd_mach_msp110         110
6647
     #define bfd_mach_msp12          12
6648
     #define bfd_mach_msp13          13
6649
     #define bfd_mach_msp14          14
6650
     #define bfd_mach_msp15          15
6651
     #define bfd_mach_msp16          16
6652
     #define bfd_mach_msp21          21
6653
     #define bfd_mach_msp31          31
6654
     #define bfd_mach_msp32          32
6655
     #define bfd_mach_msp33          33
6656
     #define bfd_mach_msp41          41
6657
     #define bfd_mach_msp42          42
6658
     #define bfd_mach_msp43          43
6659
     #define bfd_mach_msp44          44
6660
       bfd_arch_xc16x,     /* Infineon's XC16X Series.               */
6661
     #define bfd_mach_xc16x         1
6662
     #define bfd_mach_xc16xl        2
6663
     #define bfd_mach_xc16xs         3
6664
       bfd_arch_xtensa,    /* Tensilica's Xtensa cores.  */
6665
     #define bfd_mach_xtensa        1
6666
       bfd_arch_z80,
6667
     #define bfd_mach_z80strict      1 /* No undocumented opcodes.  */
6668
     #define bfd_mach_z80            3 /* With ixl, ixh, iyl, and iyh.  */
6669
     #define bfd_mach_z80full        7 /* All undocumented instructions.  */
6670
     #define bfd_mach_r800           11 /* R800: successor with multiplication.  */
6671
       bfd_arch_lm32,      /* Lattice Mico32 */
6672
     #define bfd_mach_lm32      1
6673
       bfd_arch_microblaze,/* Xilinx MicroBlaze. */
6674
       bfd_arch_last
6675
       };
6676
 
6677
2.13.2 bfd_arch_info
6678
--------------------
6679
 
6680
*Description*
6681
This structure contains information on architectures for use within BFD.
6682
 
6683
     typedef struct bfd_arch_info
6684
     {
6685
       int bits_per_word;
6686
       int bits_per_address;
6687
       int bits_per_byte;
6688
       enum bfd_architecture arch;
6689
       unsigned long mach;
6690
       const char *arch_name;
6691
       const char *printable_name;
6692
       unsigned int section_align_power;
6693
       /* TRUE if this is the default machine for the architecture.
6694
          The default arch should be the first entry for an arch so that
6695
          all the entries for that arch can be accessed via `next'.  */
6696
       bfd_boolean the_default;
6697
       const struct bfd_arch_info * (*compatible)
6698
         (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
6699
 
6700
       bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
6701
 
6702
       const struct bfd_arch_info *next;
6703
     }
6704
     bfd_arch_info_type;
6705
 
6706
2.13.2.1 `bfd_printable_name'
6707
.............................
6708
 
6709
*Synopsis*
6710
     const char *bfd_printable_name (bfd *abfd);
6711
   *Description*
6712
Return a printable string representing the architecture and machine
6713
from the pointer to the architecture info structure.
6714
 
6715
2.13.2.2 `bfd_scan_arch'
6716
........................
6717
 
6718
*Synopsis*
6719
     const bfd_arch_info_type *bfd_scan_arch (const char *string);
6720
   *Description*
6721
Figure out if BFD supports any cpu which could be described with the
6722
name STRING.  Return a pointer to an `arch_info' structure if a machine
6723
is found, otherwise NULL.
6724
 
6725
2.13.2.3 `bfd_arch_list'
6726
........................
6727
 
6728
*Synopsis*
6729
     const char **bfd_arch_list (void);
6730
   *Description*
6731
Return a freshly malloced NULL-terminated vector of the names of all
6732
the valid BFD architectures.  Do not modify the names.
6733
 
6734
2.13.2.4 `bfd_arch_get_compatible'
6735
..................................
6736
 
6737
*Synopsis*
6738
     const bfd_arch_info_type *bfd_arch_get_compatible
6739
        (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
6740
   *Description*
6741
Determine whether two BFDs' architectures and machine types are
6742
compatible.  Calculates the lowest common denominator between the two
6743
architectures and machine types implied by the BFDs and returns a
6744
pointer to an `arch_info' structure describing the compatible machine.
6745
 
6746
2.13.2.5 `bfd_default_arch_struct'
6747
..................................
6748
 
6749
*Description*
6750
The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
6751
has been initialized to a fairly generic state.  A BFD starts life by
6752
pointing to this structure, until the correct back end has determined
6753
the real architecture of the file.
6754
     extern const bfd_arch_info_type bfd_default_arch_struct;
6755
 
6756
2.13.2.6 `bfd_set_arch_info'
6757
............................
6758
 
6759
*Synopsis*
6760
     void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
6761
   *Description*
6762
Set the architecture info of ABFD to ARG.
6763
 
6764
2.13.2.7 `bfd_default_set_arch_mach'
6765
....................................
6766
 
6767
*Synopsis*
6768
     bfd_boolean bfd_default_set_arch_mach
6769
        (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
6770
   *Description*
6771
Set the architecture and machine type in BFD ABFD to ARCH and MACH.
6772
Find the correct pointer to a structure and insert it into the
6773
`arch_info' pointer.
6774
 
6775
2.13.2.8 `bfd_get_arch'
6776
.......................
6777
 
6778
*Synopsis*
6779
     enum bfd_architecture bfd_get_arch (bfd *abfd);
6780
   *Description*
6781
Return the enumerated type which describes the BFD ABFD's architecture.
6782
 
6783
2.13.2.9 `bfd_get_mach'
6784
.......................
6785
 
6786
*Synopsis*
6787
     unsigned long bfd_get_mach (bfd *abfd);
6788
   *Description*
6789
Return the long type which describes the BFD ABFD's machine.
6790
 
6791
2.13.2.10 `bfd_arch_bits_per_byte'
6792
..................................
6793
 
6794
*Synopsis*
6795
     unsigned int bfd_arch_bits_per_byte (bfd *abfd);
6796
   *Description*
6797
Return the number of bits in one of the BFD ABFD's architecture's bytes.
6798
 
6799
2.13.2.11 `bfd_arch_bits_per_address'
6800
.....................................
6801
 
6802
*Synopsis*
6803
     unsigned int bfd_arch_bits_per_address (bfd *abfd);
6804
   *Description*
6805
Return the number of bits in one of the BFD ABFD's architecture's
6806
addresses.
6807
 
6808
2.13.2.12 `bfd_default_compatible'
6809
..................................
6810
 
6811
*Synopsis*
6812
     const bfd_arch_info_type *bfd_default_compatible
6813
        (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
6814
   *Description*
6815
The default function for testing for compatibility.
6816
 
6817
2.13.2.13 `bfd_default_scan'
6818
............................
6819
 
6820
*Synopsis*
6821
     bfd_boolean bfd_default_scan
6822
        (const struct bfd_arch_info *info, const char *string);
6823
   *Description*
6824
The default function for working out whether this is an architecture
6825
hit and a machine hit.
6826
 
6827
2.13.2.14 `bfd_get_arch_info'
6828
.............................
6829
 
6830
*Synopsis*
6831
     const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
6832
   *Description*
6833
Return the architecture info struct in ABFD.
6834
 
6835
2.13.2.15 `bfd_lookup_arch'
6836
...........................
6837
 
6838
*Synopsis*
6839
     const bfd_arch_info_type *bfd_lookup_arch
6840
        (enum bfd_architecture arch, unsigned long machine);
6841
   *Description*
6842
Look for the architecture info structure which matches the arguments
6843
ARCH and MACHINE. A machine of 0 matches the machine/architecture
6844
structure which marks itself as the default.
6845
 
6846
2.13.2.16 `bfd_printable_arch_mach'
6847
...................................
6848
 
6849
*Synopsis*
6850
     const char *bfd_printable_arch_mach
6851
        (enum bfd_architecture arch, unsigned long machine);
6852
   *Description*
6853
Return a printable string representing the architecture and machine
6854
type.
6855
 
6856
   This routine is depreciated.
6857
 
6858
2.13.2.17 `bfd_octets_per_byte'
6859
...............................
6860
 
6861
*Synopsis*
6862
     unsigned int bfd_octets_per_byte (bfd *abfd);
6863
   *Description*
6864
Return the number of octets (8-bit quantities) per target byte (minimum
6865
addressable unit).  In most cases, this will be one, but some DSP
6866
targets have 16, 32, or even 48 bits per byte.
6867
 
6868
2.13.2.18 `bfd_arch_mach_octets_per_byte'
6869
.........................................
6870
 
6871
*Synopsis*
6872
     unsigned int bfd_arch_mach_octets_per_byte
6873
        (enum bfd_architecture arch, unsigned long machine);
6874
   *Description*
6875
See bfd_octets_per_byte.
6876
 
6877
   This routine is provided for those cases where a bfd * is not
6878
available
6879
 
6880

6881
File: bfd.info,  Node: Opening and Closing,  Next: Internal,  Prev: Architectures,  Up: BFD front end
6882
 
6883
2.14 Opening and closing BFDs
6884
=============================
6885
 
6886
2.14.1 Functions for opening and closing
6887
----------------------------------------
6888
 
6889
2.14.1.1 `bfd_fopen'
6890
....................
6891
 
6892
*Synopsis*
6893
     bfd *bfd_fopen (const char *filename, const char *target,
6894
         const char *mode, int fd);
6895
   *Description*
6896
Open the file FILENAME with the target TARGET.  Return a pointer to the
6897
created BFD.  If FD is not -1, then `fdopen' is used to open the file;
6898
otherwise, `fopen' is used.  MODE is passed directly to `fopen' or
6899
`fdopen'.
6900
 
6901
   Calls `bfd_find_target', so TARGET is interpreted as by that
6902
function.
6903
 
6904
   The new BFD is marked as cacheable iff FD is -1.
6905
 
6906
   If `NULL' is returned then an error has occured.   Possible errors
6907
are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
6908
error.
6909
 
6910
2.14.1.2 `bfd_openr'
6911
....................
6912
 
6913
*Synopsis*
6914
     bfd *bfd_openr (const char *filename, const char *target);
6915
   *Description*
6916
Open the file FILENAME (using `fopen') with the target TARGET.  Return
6917
a pointer to the created BFD.
6918
 
6919
   Calls `bfd_find_target', so TARGET is interpreted as by that
6920
function.
6921
 
6922
   If `NULL' is returned then an error has occured.   Possible errors
6923
are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
6924
error.
6925
 
6926
2.14.1.3 `bfd_fdopenr'
6927
......................
6928
 
6929
*Synopsis*
6930
     bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
6931
   *Description*
6932
`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'.  It
6933
opens a BFD on a file already described by the FD supplied.
6934
 
6935
   When the file is later `bfd_close'd, the file descriptor will be
6936
closed.  If the caller desires that this file descriptor be cached by
6937
BFD (opened as needed, closed as needed to free descriptors for other
6938
opens), with the supplied FD used as an initial file descriptor (but
6939
subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
6940
returned BFD.  The default is to assume no caching; the file descriptor
6941
will remain open until `bfd_close', and will not be affected by BFD
6942
operations on other files.
6943
 
6944
   Possible errors are `bfd_error_no_memory',
6945
`bfd_error_invalid_target' and `bfd_error_system_call'.
6946
 
6947
2.14.1.4 `bfd_openstreamr'
6948
..........................
6949
 
6950
*Synopsis*
6951
     bfd *bfd_openstreamr (const char *, const char *, void *);
6952
   *Description*
6953
Open a BFD for read access on an existing stdio stream.  When the BFD
6954
is passed to `bfd_close', the stream will be closed.
6955
 
6956
2.14.1.5 `bfd_openr_iovec'
6957
..........................
6958
 
6959
*Synopsis*
6960
     bfd *bfd_openr_iovec (const char *filename, const char *target,
6961
         void *(*open_func) (struct bfd *nbfd,
6962
         void *open_closure),
6963
         void *open_closure,
6964
         file_ptr (*pread_func) (struct bfd *nbfd,
6965
         void *stream,
6966
         void *buf,
6967
         file_ptr nbytes,
6968
         file_ptr offset),
6969
         int (*close_func) (struct bfd *nbfd,
6970
         void *stream),
6971
         int (*stat_func) (struct bfd *abfd,
6972
         void *stream,
6973
         struct stat *sb));
6974
   *Description*
6975
Create and return a BFD backed by a read-only STREAM.  The STREAM is
6976
created using OPEN_FUNC, accessed using PREAD_FUNC and destroyed using
6977
CLOSE_FUNC.
6978
 
6979
   Calls `bfd_find_target', so TARGET is interpreted as by that
6980
function.
6981
 
6982
   Calls OPEN_FUNC (which can call `bfd_zalloc' and `bfd_get_filename')
6983
to obtain the read-only stream backing the BFD.  OPEN_FUNC either
6984
succeeds returning the non-`NULL' STREAM, or fails returning `NULL'
6985
(setting `bfd_error').
6986
 
6987
   Calls PREAD_FUNC to request NBYTES of data from STREAM starting at
6988
OFFSET (e.g., via a call to `bfd_read').  PREAD_FUNC either succeeds
6989
returning the number of bytes read (which can be less than NBYTES when
6990
end-of-file), or fails returning -1 (setting `bfd_error').
6991
 
6992
   Calls CLOSE_FUNC when the BFD is later closed using `bfd_close'.
6993
CLOSE_FUNC either succeeds returning 0, or fails returning -1 (setting
6994
`bfd_error').
6995
 
6996
   Calls STAT_FUNC to fill in a stat structure for bfd_stat,
6997
bfd_get_size, and bfd_get_mtime calls.  STAT_FUNC returns 0 on success,
6998
or returns -1 on failure (setting `bfd_error').
6999
 
7000
   If `bfd_openr_iovec' returns `NULL' then an error has occurred.
7001
Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target'
7002
and `bfd_error_system_call'.
7003
 
7004
2.14.1.6 `bfd_openw'
7005
....................
7006
 
7007
*Synopsis*
7008
     bfd *bfd_openw (const char *filename, const char *target);
7009
   *Description*
7010
Create a BFD, associated with file FILENAME, using the file format
7011
TARGET, and return a pointer to it.
7012
 
7013
   Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
7014
`bfd_error_invalid_target'.
7015
 
7016
2.14.1.7 `bfd_close'
7017
....................
7018
 
7019
*Synopsis*
7020
     bfd_boolean bfd_close (bfd *abfd);
7021
   *Description*
7022
Close a BFD. If the BFD was open for writing, then pending operations
7023
are completed and the file written out and closed.  If the created file
7024
is executable, then `chmod' is called to mark it as such.
7025
 
7026
   All memory attached to the BFD is released.
7027
 
7028
   The file descriptor associated with the BFD is closed (even if it
7029
was passed in to BFD by `bfd_fdopenr').
7030
 
7031
   *Returns*
7032
`TRUE' is returned if all is ok, otherwise `FALSE'.
7033
 
7034
2.14.1.8 `bfd_close_all_done'
7035
.............................
7036
 
7037
*Synopsis*
7038
     bfd_boolean bfd_close_all_done (bfd *);
7039
   *Description*
7040
Close a BFD.  Differs from `bfd_close' since it does not complete any
7041
pending operations.  This routine would be used if the application had
7042
just used BFD for swapping and didn't want to use any of the writing
7043
code.
7044
 
7045
   If the created file is executable, then `chmod' is called to mark it
7046
as such.
7047
 
7048
   All memory attached to the BFD is released.
7049
 
7050
   *Returns*
7051
`TRUE' is returned if all is ok, otherwise `FALSE'.
7052
 
7053
2.14.1.9 `bfd_create'
7054
.....................
7055
 
7056
*Synopsis*
7057
     bfd *bfd_create (const char *filename, bfd *templ);
7058
   *Description*
7059
Create a new BFD in the manner of `bfd_openw', but without opening a
7060
file. The new BFD takes the target from the target used by TEMPLATE.
7061
The format is always set to `bfd_object'.
7062
 
7063
2.14.1.10 `bfd_make_writable'
7064
.............................
7065
 
7066
*Synopsis*
7067
     bfd_boolean bfd_make_writable (bfd *abfd);
7068
   *Description*
7069
Takes a BFD as created by `bfd_create' and converts it into one like as
7070
returned by `bfd_openw'.  It does this by converting the BFD to
7071
BFD_IN_MEMORY.  It's assumed that you will call `bfd_make_readable' on
7072
this bfd later.
7073
 
7074
   *Returns*
7075
`TRUE' is returned if all is ok, otherwise `FALSE'.
7076
 
7077
2.14.1.11 `bfd_make_readable'
7078
.............................
7079
 
7080
*Synopsis*
7081
     bfd_boolean bfd_make_readable (bfd *abfd);
7082
   *Description*
7083
Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
7084
converts it into one like as returned by `bfd_openr'.  It does this by
7085
writing the contents out to the memory buffer, then reversing the
7086
direction.
7087
 
7088
   *Returns*
7089
`TRUE' is returned if all is ok, otherwise `FALSE'.
7090
 
7091
2.14.1.12 `bfd_alloc'
7092
.....................
7093
 
7094
*Synopsis*
7095
     void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
7096
   *Description*
7097
Allocate a block of WANTED bytes of memory attached to `abfd' and
7098
return a pointer to it.
7099
 
7100
2.14.1.13 `bfd_alloc2'
7101
......................
7102
 
7103
*Synopsis*
7104
     void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
7105
   *Description*
7106
Allocate a block of NMEMB elements of SIZE bytes each of memory
7107
attached to `abfd' and return a pointer to it.
7108
 
7109
2.14.1.14 `bfd_zalloc'
7110
......................
7111
 
7112
*Synopsis*
7113
     void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
7114
   *Description*
7115
Allocate a block of WANTED bytes of zeroed memory attached to `abfd'
7116
and return a pointer to it.
7117
 
7118
2.14.1.15 `bfd_zalloc2'
7119
.......................
7120
 
7121
*Synopsis*
7122
     void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
7123
   *Description*
7124
Allocate a block of NMEMB elements of SIZE bytes each of zeroed memory
7125
attached to `abfd' and return a pointer to it.
7126
 
7127
2.14.1.16 `bfd_calc_gnu_debuglink_crc32'
7128
........................................
7129
 
7130
*Synopsis*
7131
     unsigned long bfd_calc_gnu_debuglink_crc32
7132
        (unsigned long crc, const unsigned char *buf, bfd_size_type len);
7133
   *Description*
7134
Computes a CRC value as used in the .gnu_debuglink section.  Advances
7135
the previously computed CRC value by computing and adding in the crc32
7136
for LEN bytes of BUF.
7137
 
7138
   *Returns*
7139
Return the updated CRC32 value.
7140
 
7141
2.14.1.17 `get_debug_link_info'
7142
...............................
7143
 
7144
*Synopsis*
7145
     char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
7146
   *Description*
7147
fetch the filename and CRC32 value for any separate debuginfo
7148
associated with ABFD. Return NULL if no such info found, otherwise
7149
return filename and update CRC32_OUT.
7150
 
7151
2.14.1.18 `separate_debug_file_exists'
7152
......................................
7153
 
7154
*Synopsis*
7155
     bfd_boolean separate_debug_file_exists
7156
        (char *name, unsigned long crc32);
7157
   *Description*
7158
Checks to see if NAME is a file and if its contents match CRC32.
7159
 
7160
2.14.1.19 `find_separate_debug_file'
7161
....................................
7162
 
7163
*Synopsis*
7164
     char *find_separate_debug_file (bfd *abfd);
7165
   *Description*
7166
Searches ABFD for a reference to separate debugging information, scans
7167
various locations in the filesystem, including the file tree rooted at
7168
DEBUG_FILE_DIRECTORY, and returns a filename of such debugging
7169
information if the file is found and has matching CRC32.  Returns NULL
7170
if no reference to debugging file exists, or file cannot be found.
7171
 
7172
2.14.1.20 `bfd_follow_gnu_debuglink'
7173
....................................
7174
 
7175
*Synopsis*
7176
     char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
7177
   *Description*
7178
Takes a BFD and searches it for a .gnu_debuglink section.  If this
7179
section is found, it examines the section for the name and checksum of
7180
a '.debug' file containing auxiliary debugging information.  It then
7181
searches the filesystem for this .debug file in some standard
7182
locations, including the directory tree rooted at DIR, and if found
7183
returns the full filename.
7184
 
7185
   If DIR is NULL, it will search a default path configured into libbfd
7186
at build time.  [XXX this feature is not currently implemented].
7187
 
7188
   *Returns*
7189
`NULL' on any errors or failure to locate the .debug file, otherwise a
7190
pointer to a heap-allocated string containing the filename.  The caller
7191
is responsible for freeing this string.
7192
 
7193
2.14.1.21 `bfd_create_gnu_debuglink_section'
7194
............................................
7195
 
7196
*Synopsis*
7197
     struct bfd_section *bfd_create_gnu_debuglink_section
7198
        (bfd *abfd, const char *filename);
7199
   *Description*
7200
Takes a BFD and adds a .gnu_debuglink section to it.  The section is
7201
sized to be big enough to contain a link to the specified FILENAME.
7202
 
7203
   *Returns*
7204
A pointer to the new section is returned if all is ok.  Otherwise
7205
`NULL' is returned and bfd_error is set.
7206
 
7207
2.14.1.22 `bfd_fill_in_gnu_debuglink_section'
7208
.............................................
7209
 
7210
*Synopsis*
7211
     bfd_boolean bfd_fill_in_gnu_debuglink_section
7212
        (bfd *abfd, struct bfd_section *sect, const char *filename);
7213
   *Description*
7214
Takes a BFD and containing a .gnu_debuglink section SECT and fills in
7215
the contents of the section to contain a link to the specified
7216
FILENAME.  The filename should be relative to the current directory.
7217
 
7218
   *Returns*
7219
`TRUE' is returned if all is ok.  Otherwise `FALSE' is returned and
7220
bfd_error is set.
7221
 
7222

7223
File: bfd.info,  Node: Internal,  Next: File Caching,  Prev: Opening and Closing,  Up: BFD front end
7224
 
7225
2.15 Implementation details
7226
===========================
7227
 
7228
2.15.1 Internal functions
7229
-------------------------
7230
 
7231
*Description*
7232
These routines are used within BFD.  They are not intended for export,
7233
but are documented here for completeness.
7234
 
7235
2.15.1.1 `bfd_write_bigendian_4byte_int'
7236
........................................
7237
 
7238
*Synopsis*
7239
     bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
7240
   *Description*
7241
Write a 4 byte integer I to the output BFD ABFD, in big endian order
7242
regardless of what else is going on.  This is useful in archives.
7243
 
7244
2.15.1.2 `bfd_put_size'
7245
.......................
7246
 
7247
2.15.1.3 `bfd_get_size'
7248
.......................
7249
 
7250
*Description*
7251
These macros as used for reading and writing raw data in sections; each
7252
access (except for bytes) is vectored through the target format of the
7253
BFD and mangled accordingly. The mangling performs any necessary endian
7254
translations and removes alignment restrictions.  Note that types
7255
accepted and returned by these macros are identical so they can be
7256
swapped around in macros--for example, `libaout.h' defines `GET_WORD'
7257
to either `bfd_get_32' or `bfd_get_64'.
7258
 
7259
   In the put routines, VAL must be a `bfd_vma'.  If we are on a system
7260
without prototypes, the caller is responsible for making sure that is
7261
true, with a cast if necessary.  We don't cast them in the macro
7262
definitions because that would prevent `lint' or `gcc -Wall' from
7263
detecting sins such as passing a pointer.  To detect calling these with
7264
less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
7265
`bfd_vma''s.
7266
 
7267
     /* Byte swapping macros for user section data.  */
7268
 
7269
     #define bfd_put_8(abfd, val, ptr) \
7270
       ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
7271
     #define bfd_put_signed_8 \
7272
       bfd_put_8
7273
     #define bfd_get_8(abfd, ptr) \
7274
       (*(unsigned char *) (ptr) & 0xff)
7275
     #define bfd_get_signed_8(abfd, ptr) \
7276
       (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
7277
 
7278
     #define bfd_put_16(abfd, val, ptr) \
7279
       BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
7280
     #define bfd_put_signed_16 \
7281
       bfd_put_16
7282
     #define bfd_get_16(abfd, ptr) \
7283
       BFD_SEND (abfd, bfd_getx16, (ptr))
7284
     #define bfd_get_signed_16(abfd, ptr) \
7285
       BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
7286
 
7287
     #define bfd_put_32(abfd, val, ptr) \
7288
       BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
7289
     #define bfd_put_signed_32 \
7290
       bfd_put_32
7291
     #define bfd_get_32(abfd, ptr) \
7292
       BFD_SEND (abfd, bfd_getx32, (ptr))
7293
     #define bfd_get_signed_32(abfd, ptr) \
7294
       BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
7295
 
7296
     #define bfd_put_64(abfd, val, ptr) \
7297
       BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
7298
     #define bfd_put_signed_64 \
7299
       bfd_put_64
7300
     #define bfd_get_64(abfd, ptr) \
7301
       BFD_SEND (abfd, bfd_getx64, (ptr))
7302
     #define bfd_get_signed_64(abfd, ptr) \
7303
       BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
7304
 
7305
     #define bfd_get(bits, abfd, ptr)                       \
7306
       ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
7307
        : (bits) == 16 ? bfd_get_16 (abfd, ptr)             \
7308
        : (bits) == 32 ? bfd_get_32 (abfd, ptr)             \
7309
        : (bits) == 64 ? bfd_get_64 (abfd, ptr)             \
7310
        : (abort (), (bfd_vma) - 1))
7311
 
7312
     #define bfd_put(bits, abfd, val, ptr)                  \
7313
       ((bits) == 8 ? bfd_put_8  (abfd, val, ptr)           \
7314
        : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)                \
7315
        : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)                \
7316
        : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)                \
7317
        : (abort (), (void) 0))
7318
 
7319
2.15.1.4 `bfd_h_put_size'
7320
.........................
7321
 
7322
*Description*
7323
These macros have the same function as their `bfd_get_x' brethren,
7324
except that they are used for removing information for the header
7325
records of object files. Believe it or not, some object files keep
7326
their header records in big endian order and their data in little
7327
endian order.
7328
 
7329
     /* Byte swapping macros for file header data.  */
7330
 
7331
     #define bfd_h_put_8(abfd, val, ptr) \
7332
       bfd_put_8 (abfd, val, ptr)
7333
     #define bfd_h_put_signed_8(abfd, val, ptr) \
7334
       bfd_put_8 (abfd, val, ptr)
7335
     #define bfd_h_get_8(abfd, ptr) \
7336
       bfd_get_8 (abfd, ptr)
7337
     #define bfd_h_get_signed_8(abfd, ptr) \
7338
       bfd_get_signed_8 (abfd, ptr)
7339
 
7340
     #define bfd_h_put_16(abfd, val, ptr) \
7341
       BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
7342
     #define bfd_h_put_signed_16 \
7343
       bfd_h_put_16
7344
     #define bfd_h_get_16(abfd, ptr) \
7345
       BFD_SEND (abfd, bfd_h_getx16, (ptr))
7346
     #define bfd_h_get_signed_16(abfd, ptr) \
7347
       BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
7348
 
7349
     #define bfd_h_put_32(abfd, val, ptr) \
7350
       BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
7351
     #define bfd_h_put_signed_32 \
7352
       bfd_h_put_32
7353
     #define bfd_h_get_32(abfd, ptr) \
7354
       BFD_SEND (abfd, bfd_h_getx32, (ptr))
7355
     #define bfd_h_get_signed_32(abfd, ptr) \
7356
       BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
7357
 
7358
     #define bfd_h_put_64(abfd, val, ptr) \
7359
       BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
7360
     #define bfd_h_put_signed_64 \
7361
       bfd_h_put_64
7362
     #define bfd_h_get_64(abfd, ptr) \
7363
       BFD_SEND (abfd, bfd_h_getx64, (ptr))
7364
     #define bfd_h_get_signed_64(abfd, ptr) \
7365
       BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
7366
 
7367
     /* Aliases for the above, which should eventually go away.  */
7368
 
7369
     #define H_PUT_64  bfd_h_put_64
7370
     #define H_PUT_32  bfd_h_put_32
7371
     #define H_PUT_16  bfd_h_put_16
7372
     #define H_PUT_8   bfd_h_put_8
7373
     #define H_PUT_S64 bfd_h_put_signed_64
7374
     #define H_PUT_S32 bfd_h_put_signed_32
7375
     #define H_PUT_S16 bfd_h_put_signed_16
7376
     #define H_PUT_S8  bfd_h_put_signed_8
7377
     #define H_GET_64  bfd_h_get_64
7378
     #define H_GET_32  bfd_h_get_32
7379
     #define H_GET_16  bfd_h_get_16
7380
     #define H_GET_8   bfd_h_get_8
7381
     #define H_GET_S64 bfd_h_get_signed_64
7382
     #define H_GET_S32 bfd_h_get_signed_32
7383
     #define H_GET_S16 bfd_h_get_signed_16
7384
     #define H_GET_S8  bfd_h_get_signed_8
7385
 
7386
2.15.1.5 `bfd_log2'
7387
...................
7388
 
7389
*Synopsis*
7390
     unsigned int bfd_log2 (bfd_vma x);
7391
   *Description*
7392
Return the log base 2 of the value supplied, rounded up.  E.g., an X of
7393
1025 returns 11.  A X of 0 returns 0.
7394
 
7395

7396
File: bfd.info,  Node: File Caching,  Next: Linker Functions,  Prev: Internal,  Up: BFD front end
7397
 
7398
2.16 File caching
7399
=================
7400
 
7401
The file caching mechanism is embedded within BFD and allows the
7402
application to open as many BFDs as it wants without regard to the
7403
underlying operating system's file descriptor limit (often as low as 20
7404
open files).  The module in `cache.c' maintains a least recently used
7405
list of `BFD_CACHE_MAX_OPEN' files, and exports the name
7406
`bfd_cache_lookup', which runs around and makes sure that the required
7407
BFD is open. If not, then it chooses a file to close, closes it and
7408
opens the one wanted, returning its file handle.
7409
 
7410
2.16.1 Caching functions
7411
------------------------
7412
 
7413
2.16.1.1 `bfd_cache_init'
7414
.........................
7415
 
7416
*Synopsis*
7417
     bfd_boolean bfd_cache_init (bfd *abfd);
7418
   *Description*
7419
Add a newly opened BFD to the cache.
7420
 
7421
2.16.1.2 `bfd_cache_close'
7422
..........................
7423
 
7424
*Synopsis*
7425
     bfd_boolean bfd_cache_close (bfd *abfd);
7426
   *Description*
7427
Remove the BFD ABFD from the cache. If the attached file is open, then
7428
close it too.
7429
 
7430
   *Returns*
7431
`FALSE' is returned if closing the file fails, `TRUE' is returned if
7432
all is well.
7433
 
7434
2.16.1.3 `bfd_cache_close_all'
7435
..............................
7436
 
7437
*Synopsis*
7438
     bfd_boolean bfd_cache_close_all (void);
7439
   *Description*
7440
Remove all BFDs from the cache. If the attached file is open, then
7441
close it too.
7442
 
7443
   *Returns*
7444
`FALSE' is returned if closing one of the file fails, `TRUE' is
7445
returned if all is well.
7446
 
7447
2.16.1.4 `bfd_open_file'
7448
........................
7449
 
7450
*Synopsis*
7451
     FILE* bfd_open_file (bfd *abfd);
7452
   *Description*
7453
Call the OS to open a file for ABFD.  Return the `FILE *' (possibly
7454
`NULL') that results from this operation.  Set up the BFD so that
7455
future accesses know the file is open. If the `FILE *' returned is
7456
`NULL', then it won't have been put in the cache, so it won't have to
7457
be removed from it.
7458
 
7459

7460
File: bfd.info,  Node: Linker Functions,  Next: Hash Tables,  Prev: File Caching,  Up: BFD front end
7461
 
7462
2.17 Linker Functions
7463
=====================
7464
 
7465
The linker uses three special entry points in the BFD target vector.
7466
It is not necessary to write special routines for these entry points
7467
when creating a new BFD back end, since generic versions are provided.
7468
However, writing them can speed up linking and make it use
7469
significantly less runtime memory.
7470
 
7471
   The first routine creates a hash table used by the other routines.
7472
The second routine adds the symbols from an object file to the hash
7473
table.  The third routine takes all the object files and links them
7474
together to create the output file.  These routines are designed so
7475
that the linker proper does not need to know anything about the symbols
7476
in the object files that it is linking.  The linker merely arranges the
7477
sections as directed by the linker script and lets BFD handle the
7478
details of symbols and relocs.
7479
 
7480
   The second routine and third routines are passed a pointer to a
7481
`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
7482
information relevant to the link, including the linker hash table
7483
(which was created by the first routine) and a set of callback
7484
functions to the linker proper.
7485
 
7486
   The generic linker routines are in `linker.c', and use the header
7487
file `genlink.h'.  As of this writing, the only back ends which have
7488
implemented versions of these routines are a.out (in `aoutx.h') and
7489
ECOFF (in `ecoff.c').  The a.out routines are used as examples
7490
throughout this section.
7491
 
7492
* Menu:
7493
 
7494
* Creating a Linker Hash Table::
7495
* Adding Symbols to the Hash Table::
7496
* Performing the Final Link::
7497
 
7498

7499
File: bfd.info,  Node: Creating a Linker Hash Table,  Next: Adding Symbols to the Hash Table,  Prev: Linker Functions,  Up: Linker Functions
7500
 
7501
2.17.1 Creating a linker hash table
7502
-----------------------------------
7503
 
7504
The linker routines must create a hash table, which must be derived
7505
from `struct bfd_link_hash_table' described in `bfdlink.c'.  *Note Hash
7506
Tables::, for information on how to create a derived hash table.  This
7507
entry point is called using the target vector of the linker output file.
7508
 
7509
   The `_bfd_link_hash_table_create' entry point must allocate and
7510
initialize an instance of the desired hash table.  If the back end does
7511
not require any additional information to be stored with the entries in
7512
the hash table, the entry point may simply create a `struct
7513
bfd_link_hash_table'.  Most likely, however, some additional
7514
information will be needed.
7515
 
7516
   For example, with each entry in the hash table the a.out linker
7517
keeps the index the symbol has in the final output file (this index
7518
number is used so that when doing a relocatable link the symbol index
7519
used in the output file can be quickly filled in when copying over a
7520
reloc).  The a.out linker code defines the required structures and
7521
functions for a hash table derived from `struct bfd_link_hash_table'.
7522
The a.out linker hash table is created by the function
7523
`NAME(aout,link_hash_table_create)'; it simply allocates space for the
7524
hash table, initializes it, and returns a pointer to it.
7525
 
7526
   When writing the linker routines for a new back end, you will
7527
generally not know exactly which fields will be required until you have
7528
finished.  You should simply create a new hash table which defines no
7529
additional fields, and then simply add fields as they become necessary.
7530
 
7531

7532
File: bfd.info,  Node: Adding Symbols to the Hash Table,  Next: Performing the Final Link,  Prev: Creating a Linker Hash Table,  Up: Linker Functions
7533
 
7534
2.17.2 Adding symbols to the hash table
7535
---------------------------------------
7536
 
7537
The linker proper will call the `_bfd_link_add_symbols' entry point for
7538
each object file or archive which is to be linked (typically these are
7539
the files named on the command line, but some may also come from the
7540
linker script).  The entry point is responsible for examining the file.
7541 342 jeremybenn
For an object file, BFD must add any relevant symbol information to the
7542
hash table.  For an archive, BFD must determine which elements of the
7543
archive should be used and adding them to the link.
7544 330 jeremybenn
 
7545
   The a.out version of this entry point is
7546
`NAME(aout,link_add_symbols)'.
7547
 
7548
* Menu:
7549
 
7550
* Differing file formats::
7551
* Adding symbols from an object file::
7552
* Adding symbols from an archive::
7553
 
7554

7555
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
7556
 
7557
2.17.2.1 Differing file formats
7558
...............................
7559
 
7560
Normally all the files involved in a link will be of the same format,
7561
but it is also possible to link together different format object files,
7562
and the back end must support that.  The `_bfd_link_add_symbols' entry
7563
point is called via the target vector of the file to be added.  This
7564
has an important consequence: the function may not assume that the hash
7565
table is the type created by the corresponding
7566
`_bfd_link_hash_table_create' vector.  All the `_bfd_link_add_symbols'
7567
function can assume about the hash table is that it is derived from
7568
`struct bfd_link_hash_table'.
7569
 
7570
   Sometimes the `_bfd_link_add_symbols' function must store some
7571
information in the hash table entry to be used by the `_bfd_final_link'
7572
function.  In such a case the output bfd xvec must be checked to make
7573
sure that the hash table was created by an object file of the same
7574
format.
7575
 
7576
   The `_bfd_final_link' routine must be prepared to handle a hash
7577
entry without any extra information added by the
7578
`_bfd_link_add_symbols' function.  A hash entry without extra
7579
information will also occur when the linker script directs the linker
7580
to create a symbol.  Note that, regardless of how a hash table entry is
7581
added, all the fields will be initialized to some sort of null value by
7582
the hash table entry initialization function.
7583
 
7584
   See `ecoff_link_add_externals' for an example of how to check the
7585
output bfd before saving information (in this case, the ECOFF external
7586
symbol debugging information) in a hash table entry.
7587
 
7588

7589
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
7590
 
7591
2.17.2.2 Adding symbols from an object file
7592
...........................................
7593
 
7594
When the `_bfd_link_add_symbols' routine is passed an object file, it
7595
must add all externally visible symbols in that object file to the hash
7596
table.  The actual work of adding the symbol to the hash table is
7597
normally handled by the function `_bfd_generic_link_add_one_symbol'.
7598
The `_bfd_link_add_symbols' routine is responsible for reading all the
7599
symbols from the object file and passing the correct information to
7600
`_bfd_generic_link_add_one_symbol'.
7601
 
7602
   The `_bfd_link_add_symbols' routine should not use
7603
`bfd_canonicalize_symtab' to read the symbols.  The point of providing
7604
this routine is to avoid the overhead of converting the symbols into
7605
generic `asymbol' structures.
7606
 
7607
   `_bfd_generic_link_add_one_symbol' handles the details of combining
7608
common symbols, warning about multiple definitions, and so forth.  It
7609
takes arguments which describe the symbol to add, notably symbol flags,
7610
a section, and an offset.  The symbol flags include such things as
7611
`BSF_WEAK' or `BSF_INDIRECT'.  The section is a section in the object
7612
file, or something like `bfd_und_section_ptr' for an undefined symbol
7613
or `bfd_com_section_ptr' for a common symbol.
7614
 
7615
   If the `_bfd_final_link' routine is also going to need to read the
7616
symbol information, the `_bfd_link_add_symbols' routine should save it
7617
somewhere attached to the object file BFD.  However, the information
7618
should only be saved if the `keep_memory' field of the `info' argument
7619
is TRUE, so that the `-no-keep-memory' linker switch is effective.
7620
 
7621
   The a.out function which adds symbols from an object file is
7622
`aout_link_add_object_symbols', and most of the interesting work is in
7623
`aout_link_add_symbols'.  The latter saves pointers to the hash tables
7624
entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
7625
number, so that the `_bfd_final_link' routine does not have to call the
7626
hash table lookup routine to locate the entry.
7627
 
7628

7629
File: bfd.info,  Node: Adding symbols from an archive,  Prev: Adding symbols from an object file,  Up: Adding Symbols to the Hash Table
7630
 
7631
2.17.2.3 Adding symbols from an archive
7632
.......................................
7633
 
7634
When the `_bfd_link_add_symbols' routine is passed an archive, it must
7635
look through the symbols defined by the archive and decide which
7636
elements of the archive should be included in the link.  For each such
7637
element it must call the `add_archive_element' linker callback, and it
7638
must add the symbols from the object file to the linker hash table.
7639
 
7640
   In most cases the work of looking through the symbols in the archive
7641
should be done by the `_bfd_generic_link_add_archive_symbols' function.
7642
This function builds a hash table from the archive symbol table and
7643
looks through the list of undefined symbols to see which elements
7644
should be included.  `_bfd_generic_link_add_archive_symbols' is passed
7645
a function to call to make the final decision about adding an archive
7646
element to the link and to do the actual work of adding the symbols to
7647
the linker hash table.
7648
 
7649
   The function passed to `_bfd_generic_link_add_archive_symbols' must
7650
read the symbols of the archive element and decide whether the archive
7651
element should be included in the link.  If the element is to be
7652
included, the `add_archive_element' linker callback routine must be
7653
called with the element as an argument, and the elements symbols must
7654
be added to the linker hash table just as though the element had itself
7655
been passed to the `_bfd_link_add_symbols' function.
7656
 
7657
   When the a.out `_bfd_link_add_symbols' function receives an archive,
7658
it calls `_bfd_generic_link_add_archive_symbols' passing
7659
`aout_link_check_archive_element' as the function argument.
7660
`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
7661
If the latter decides to add the element (an element is only added if
7662
it provides a real, non-common, definition for a previously undefined
7663
or common symbol) it calls the `add_archive_element' callback and then
7664
`aout_link_check_archive_element' calls `aout_link_add_symbols' to
7665
actually add the symbols to the linker hash table.
7666
 
7667
   The ECOFF back end is unusual in that it does not normally call
7668
`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
7669
contain a hash table of symbols.  The ECOFF back end searches the
7670
archive itself to avoid the overhead of creating a new hash table.
7671
 
7672

7673
File: bfd.info,  Node: Performing the Final Link,  Prev: Adding Symbols to the Hash Table,  Up: Linker Functions
7674
 
7675
2.17.3 Performing the final link
7676
--------------------------------
7677
 
7678
When all the input files have been processed, the linker calls the
7679
`_bfd_final_link' entry point of the output BFD.  This routine is
7680
responsible for producing the final output file, which has several
7681
aspects.  It must relocate the contents of the input sections and copy
7682
the data into the output sections.  It must build an output symbol
7683
table including any local symbols from the input files and the global
7684
symbols from the hash table.  When producing relocatable output, it must
7685
modify the input relocs and write them into the output file.  There may
7686
also be object format dependent work to be done.
7687
 
7688
   The linker will also call the `write_object_contents' entry point
7689
when the BFD is closed.  The two entry points must work together in
7690
order to produce the correct output file.
7691
 
7692
   The details of how this works are inevitably dependent upon the
7693
specific object file format.  The a.out `_bfd_final_link' routine is
7694
`NAME(aout,final_link)'.
7695
 
7696
* Menu:
7697
 
7698
* Information provided by the linker::
7699
* Relocating the section contents::
7700
* Writing the symbol table::
7701
 
7702

7703
File: bfd.info,  Node: Information provided by the linker,  Next: Relocating the section contents,  Prev: Performing the Final Link,  Up: Performing the Final Link
7704
 
7705
2.17.3.1 Information provided by the linker
7706
...........................................
7707
 
7708
Before the linker calls the `_bfd_final_link' entry point, it sets up
7709
some data structures for the function to use.
7710
 
7711
   The `input_bfds' field of the `bfd_link_info' structure will point
7712
to a list of all the input files included in the link.  These files are
7713
linked through the `link_next' field of the `bfd' structure.
7714
 
7715
   Each section in the output file will have a list of `link_order'
7716
structures attached to the `map_head.link_order' field (the
7717
`link_order' structure is defined in `bfdlink.h').  These structures
7718
describe how to create the contents of the output section in terms of
7719
the contents of various input sections, fill constants, and,
7720
eventually, other types of information.  They also describe relocs that
7721
must be created by the BFD backend, but do not correspond to any input
7722
file; this is used to support -Ur, which builds constructors while
7723
generating a relocatable object file.
7724
 
7725

7726
File: bfd.info,  Node: Relocating the section contents,  Next: Writing the symbol table,  Prev: Information provided by the linker,  Up: Performing the Final Link
7727
 
7728
2.17.3.2 Relocating the section contents
7729
........................................
7730
 
7731
The `_bfd_final_link' function should look through the `link_order'
7732
structures attached to each section of the output file.  Each
7733
`link_order' structure should either be handled specially, or it should
7734
be passed to the function `_bfd_default_link_order' which will do the
7735
right thing (`_bfd_default_link_order' is defined in `linker.c').
7736
 
7737
   For efficiency, a `link_order' of type `bfd_indirect_link_order'
7738
whose associated section belongs to a BFD of the same format as the
7739
output BFD must be handled specially.  This type of `link_order'
7740
describes part of an output section in terms of a section belonging to
7741
one of the input files.  The `_bfd_final_link' function should read the
7742
contents of the section and any associated relocs, apply the relocs to
7743
the section contents, and write out the modified section contents.  If
7744
performing a relocatable link, the relocs themselves must also be
7745
modified and written out.
7746
 
7747
   The functions `_bfd_relocate_contents' and
7748
`_bfd_final_link_relocate' provide some general support for performing
7749
the actual relocations, notably overflow checking.  Their arguments
7750
include information about the symbol the relocation is against and a
7751
`reloc_howto_type' argument which describes the relocation to perform.
7752
These functions are defined in `reloc.c'.
7753
 
7754
   The a.out function which handles reading, relocating, and writing
7755
section contents is `aout_link_input_section'.  The actual relocation
7756
is done in `aout_link_input_section_std' and
7757
`aout_link_input_section_ext'.
7758
 
7759

7760
File: bfd.info,  Node: Writing the symbol table,  Prev: Relocating the section contents,  Up: Performing the Final Link
7761
 
7762
2.17.3.3 Writing the symbol table
7763
.................................
7764
 
7765
The `_bfd_final_link' function must gather all the symbols in the input
7766
files and write them out.  It must also write out all the symbols in
7767
the global hash table.  This must be controlled by the `strip' and
7768
`discard' fields of the `bfd_link_info' structure.
7769
 
7770
   The local symbols of the input files will not have been entered into
7771
the linker hash table.  The `_bfd_final_link' routine must consider
7772
each input file and include the symbols in the output file.  It may be
7773
convenient to do this when looking through the `link_order' structures,
7774
or it may be done by stepping through the `input_bfds' list.
7775
 
7776
   The `_bfd_final_link' routine must also traverse the global hash
7777
table to gather all the externally visible symbols.  It is possible
7778
that most of the externally visible symbols may be written out when
7779
considering the symbols of each input file, but it is still necessary
7780
to traverse the hash table since the linker script may have defined
7781
some symbols that are not in any of the input files.
7782
 
7783
   The `strip' field of the `bfd_link_info' structure controls which
7784
symbols are written out.  The possible values are listed in
7785
`bfdlink.h'.  If the value is `strip_some', then the `keep_hash' field
7786
of the `bfd_link_info' structure is a hash table of symbols to keep;
7787
each symbol should be looked up in this hash table, and only symbols
7788
which are present should be included in the output file.
7789
 
7790
   If the `strip' field of the `bfd_link_info' structure permits local
7791
symbols to be written out, the `discard' field is used to further
7792
controls which local symbols are included in the output file.  If the
7793
value is `discard_l', then all local symbols which begin with a certain
7794
prefix are discarded; this is controlled by the
7795
`bfd_is_local_label_name' entry point.
7796
 
7797
   The a.out backend handles symbols by calling
7798
`aout_link_write_symbols' on each input BFD and then traversing the
7799
global hash table with the function `aout_link_write_other_symbol'.  It
7800
builds a string table while writing out the symbols, which is written
7801
to the output file at the end of `NAME(aout,final_link)'.
7802
 
7803
2.17.3.4 `bfd_link_split_section'
7804
.................................
7805
 
7806
*Synopsis*
7807
     bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
7808
   *Description*
7809
Return nonzero if SEC should be split during a reloceatable or final
7810
link.
7811
     #define bfd_link_split_section(abfd, sec) \
7812
            BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
7813
 
7814
2.17.3.5 `bfd_section_already_linked'
7815
.....................................
7816
 
7817
*Synopsis*
7818
     void bfd_section_already_linked (bfd *abfd, asection *sec,
7819
         struct bfd_link_info *info);
7820
   *Description*
7821
Check if SEC has been already linked during a reloceatable or final
7822
link.
7823
     #define bfd_section_already_linked(abfd, sec, info) \
7824
            BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
7825
 
7826
2.17.3.6 `bfd_generic_define_common_symbol'
7827
...........................................
7828
 
7829
*Synopsis*
7830
     bfd_boolean bfd_generic_define_common_symbol
7831
        (bfd *output_bfd, struct bfd_link_info *info,
7832
         struct bfd_link_hash_entry *h);
7833
   *Description*
7834
Convert common symbol H into a defined symbol.  Return TRUE on success
7835
and FALSE on failure.
7836
     #define bfd_define_common_symbol(output_bfd, info, h) \
7837
            BFD_SEND (output_bfd, _bfd_define_common_symbol, (output_bfd, info, h))
7838
 
7839
2.17.3.7 `bfd_find_version_for_sym '
7840
....................................
7841
 
7842
*Synopsis*
7843
     struct bfd_elf_version_tree * bfd_find_version_for_sym
7844
        (struct bfd_elf_version_tree *verdefs,
7845
         const char *sym_name, bfd_boolean *hide);
7846
   *Description*
7847
Search an elf version script tree for symbol versioning info and export
7848
/ don't-export status for a given symbol.  Return non-NULL on success
7849
and NULL on failure; also sets the output `hide' boolean parameter.
7850
 
7851

7852
File: bfd.info,  Node: Hash Tables,  Prev: Linker Functions,  Up: BFD front end
7853
 
7854
2.18 Hash Tables
7855
================
7856
 
7857
BFD provides a simple set of hash table functions.  Routines are
7858
provided to initialize a hash table, to free a hash table, to look up a
7859
string in a hash table and optionally create an entry for it, and to
7860
traverse a hash table.  There is currently no routine to delete an
7861
string from a hash table.
7862
 
7863
   The basic hash table does not permit any data to be stored with a
7864
string.  However, a hash table is designed to present a base class from
7865
which other types of hash tables may be derived.  These derived types
7866
may store additional information with the string.  Hash tables were
7867
implemented in this way, rather than simply providing a data pointer in
7868
a hash table entry, because they were designed for use by the linker
7869
back ends.  The linker may create thousands of hash table entries, and
7870
the overhead of allocating private data and storing and following
7871
pointers becomes noticeable.
7872
 
7873
   The basic hash table code is in `hash.c'.
7874
 
7875
* Menu:
7876
 
7877
* Creating and Freeing a Hash Table::
7878
* Looking Up or Entering a String::
7879
* Traversing a Hash Table::
7880
* Deriving a New Hash Table Type::
7881
 
7882

7883
File: bfd.info,  Node: Creating and Freeing a Hash Table,  Next: Looking Up or Entering a String,  Prev: Hash Tables,  Up: Hash Tables
7884
 
7885
2.18.1 Creating and freeing a hash table
7886
----------------------------------------
7887
 
7888
To create a hash table, create an instance of a `struct bfd_hash_table'
7889
(defined in `bfd.h') and call `bfd_hash_table_init' (if you know
7890
approximately how many entries you will need, the function
7891
`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
7892
`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
7893
 
7894
   The function `bfd_hash_table_init' take as an argument a function to
7895
use to create new entries.  For a basic hash table, use the function
7896
`bfd_hash_newfunc'.  *Note Deriving a New Hash Table Type::, for why
7897
you would want to use a different value for this argument.
7898
 
7899
   `bfd_hash_table_init' will create an objalloc which will be used to
7900
allocate new entries.  You may allocate memory on this objalloc using
7901
`bfd_hash_allocate'.
7902
 
7903
   Use `bfd_hash_table_free' to free up all the memory that has been
7904
allocated for a hash table.  This will not free up the `struct
7905
bfd_hash_table' itself, which you must provide.
7906
 
7907
   Use `bfd_hash_set_default_size' to set the default size of hash
7908
table to use.
7909
 
7910

7911
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
7912
 
7913
2.18.2 Looking up or entering a string
7914
--------------------------------------
7915
 
7916
The function `bfd_hash_lookup' is used both to look up a string in the
7917
hash table and to create a new entry.
7918
 
7919
   If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
7920
string.  If the string is found, it will returns a pointer to a `struct
7921
bfd_hash_entry'.  If the string is not found in the table
7922
`bfd_hash_lookup' will return `NULL'.  You should not modify any of the
7923
fields in the returns `struct bfd_hash_entry'.
7924
 
7925
   If the CREATE argument is `TRUE', the string will be entered into
7926
the hash table if it is not already there.  Either way a pointer to a
7927
`struct bfd_hash_entry' will be returned, either to the existing
7928
structure or to a newly created one.  In this case, a `NULL' return
7929
means that an error occurred.
7930
 
7931
   If the CREATE argument is `TRUE', and a new entry is created, the
7932
COPY argument is used to decide whether to copy the string onto the
7933
hash table objalloc or not.  If COPY is passed as `FALSE', you must be
7934
careful not to deallocate or modify the string as long as the hash table
7935
exists.
7936
 
7937

7938
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
7939
 
7940
2.18.3 Traversing a hash table
7941
------------------------------
7942
 
7943
The function `bfd_hash_traverse' may be used to traverse a hash table,
7944
calling a function on each element.  The traversal is done in a random
7945
order.
7946
 
7947
   `bfd_hash_traverse' takes as arguments a function and a generic
7948
`void *' pointer.  The function is called with a hash table entry (a
7949
`struct bfd_hash_entry *') and the generic pointer passed to
7950
`bfd_hash_traverse'.  The function must return a `boolean' value, which
7951
indicates whether to continue traversing the hash table.  If the
7952
function returns `FALSE', `bfd_hash_traverse' will stop the traversal
7953
and return immediately.
7954
 
7955

7956
File: bfd.info,  Node: Deriving a New Hash Table Type,  Prev: Traversing a Hash Table,  Up: Hash Tables
7957
 
7958
2.18.4 Deriving a new hash table type
7959
-------------------------------------
7960
 
7961
Many uses of hash tables want to store additional information which
7962
each entry in the hash table.  Some also find it convenient to store
7963
additional information with the hash table itself.  This may be done
7964
using a derived hash table.
7965
 
7966
   Since C is not an object oriented language, creating a derived hash
7967
table requires sticking together some boilerplate routines with a few
7968
differences specific to the type of hash table you want to create.
7969
 
7970
   An example of a derived hash table is the linker hash table.  The
7971
structures for this are defined in `bfdlink.h'.  The functions are in
7972
`linker.c'.
7973
 
7974
   You may also derive a hash table from an already derived hash table.
7975
For example, the a.out linker backend code uses a hash table derived
7976
from the linker hash table.
7977
 
7978
* Menu:
7979
 
7980
* Define the Derived Structures::
7981
* Write the Derived Creation Routine::
7982
* Write Other Derived Routines::
7983
 
7984

7985
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
7986
 
7987
2.18.4.1 Define the derived structures
7988
......................................
7989
 
7990
You must define a structure for an entry in the hash table, and a
7991
structure for the hash table itself.
7992
 
7993
   The first field in the structure for an entry in the hash table must
7994
be of the type used for an entry in the hash table you are deriving
7995
from.  If you are deriving from a basic hash table this is `struct
7996
bfd_hash_entry', which is defined in `bfd.h'.  The first field in the
7997
structure for the hash table itself must be of the type of the hash
7998
table you are deriving from itself.  If you are deriving from a basic
7999
hash table, this is `struct bfd_hash_table'.
8000
 
8001
   For example, the linker hash table defines `struct
8002
bfd_link_hash_entry' (in `bfdlink.h').  The first field, `root', is of
8003
type `struct bfd_hash_entry'.  Similarly, the first field in `struct
8004
bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
8005
 
8006

8007
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
8008
 
8009
2.18.4.2 Write the derived creation routine
8010
...........................................
8011
 
8012
You must write a routine which will create and initialize an entry in
8013
the hash table.  This routine is passed as the function argument to
8014
`bfd_hash_table_init'.
8015
 
8016
   In order to permit other hash tables to be derived from the hash
8017
table you are creating, this routine must be written in a standard way.
8018
 
8019
   The first argument to the creation routine is a pointer to a hash
8020
table entry.  This may be `NULL', in which case the routine should
8021
allocate the right amount of space.  Otherwise the space has already
8022
been allocated by a hash table type derived from this one.
8023
 
8024
   After allocating space, the creation routine must call the creation
8025
routine of the hash table type it is derived from, passing in a pointer
8026
to the space it just allocated.  This will initialize any fields used
8027
by the base hash table.
8028
 
8029
   Finally the creation routine must initialize any local fields for
8030
the new hash table type.
8031
 
8032
   Here is a boilerplate example of a creation routine.  FUNCTION_NAME
8033
is the name of the routine.  ENTRY_TYPE is the type of an entry in the
8034
hash table you are creating.  BASE_NEWFUNC is the name of the creation
8035
routine of the hash table type your hash table is derived from.
8036
 
8037
     struct bfd_hash_entry *
8038
     FUNCTION_NAME (struct bfd_hash_entry *entry,
8039
                          struct bfd_hash_table *table,
8040
                          const char *string)
8041
     {
8042
       struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
8043
 
8044
      /* Allocate the structure if it has not already been allocated by a
8045
         derived class.  */
8046
       if (ret == NULL)
8047
         {
8048
           ret = bfd_hash_allocate (table, sizeof (* ret));
8049
           if (ret == NULL)
8050
             return NULL;
8051
         }
8052
 
8053
      /* Call the allocation method of the base class.  */
8054
       ret = ((ENTRY_TYPE *)
8055
             BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
8056
 
8057
      /* Initialize the local fields here.  */
8058
 
8059
       return (struct bfd_hash_entry *) ret;
8060
     }
8061
   *Description*
8062
The creation routine for the linker hash table, which is in `linker.c',
8063
looks just like this example.  FUNCTION_NAME is
8064
`_bfd_link_hash_newfunc'.  ENTRY_TYPE is `struct bfd_link_hash_entry'.
8065
BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
8066
hash table.
8067
 
8068
   `_bfd_link_hash_newfunc' also initializes the local fields in a
8069
linker hash table entry: `type', `written' and `next'.
8070
 
8071

8072
File: bfd.info,  Node: Write Other Derived Routines,  Prev: Write the Derived Creation Routine,  Up: Deriving a New Hash Table Type
8073
 
8074
2.18.4.3 Write other derived routines
8075
.....................................
8076
 
8077
You will want to write other routines for your new hash table, as well.
8078
 
8079
   You will want an initialization routine which calls the
8080
initialization routine of the hash table you are deriving from and
8081
initializes any other local fields.  For the linker hash table, this is
8082
`_bfd_link_hash_table_init' in `linker.c'.
8083
 
8084
   You will want a lookup routine which calls the lookup routine of the
8085
hash table you are deriving from and casts the result.  The linker hash
8086
table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
8087
additional argument which it uses to decide how to return the looked up
8088
value).
8089
 
8090
   You may want a traversal routine.  This should just call the
8091
traversal routine of the hash table you are deriving from with
8092
appropriate casts.  The linker hash table uses `bfd_link_hash_traverse'
8093
in `linker.c'.
8094
 
8095
   These routines may simply be defined as macros.  For example, the
8096
a.out backend linker hash table, which is derived from the linker hash
8097
table, uses macros for the lookup and traversal routines.  These are
8098
`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
8099
 
8100

8101
File: bfd.info,  Node: BFD back ends,  Next: GNU Free Documentation License,  Prev: BFD front end,  Up: Top
8102
 
8103
3 BFD back ends
8104
***************
8105
 
8106
* Menu:
8107
 
8108
* What to Put Where::
8109
* aout ::       a.out backends
8110
* coff ::       coff backends
8111
* elf  ::       elf backends
8112
* mmo  ::       mmo backend
8113
 
8114

8115
File: bfd.info,  Node: What to Put Where,  Next: aout,  Prev: BFD back ends,  Up: BFD back ends
8116
 
8117
3.1 What to Put Where
8118
=====================
8119
 
8120
All of BFD lives in one directory.
8121
 
8122

8123
File: bfd.info,  Node: aout,  Next: coff,  Prev: What to Put Where,  Up: BFD back ends
8124
 
8125
3.2 a.out backends
8126
==================
8127
 
8128
*Description*
8129
BFD supports a number of different flavours of a.out format, though the
8130
major differences are only the sizes of the structures on disk, and the
8131
shape of the relocation information.
8132
 
8133
   The support is split into a basic support file `aoutx.h' and other
8134
files which derive functions from the base. One derivation file is
8135
`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
8136
support for sun3, sun4, 386 and 29k a.out files, to create a target
8137
jump vector for a specific target.
8138
 
8139
   This information is further split out into more specific files for
8140
each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
8141
the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
8142
format.
8143
 
8144
   The base file `aoutx.h' defines general mechanisms for reading and
8145
writing records to and from disk and various other methods which BFD
8146
requires. It is included by `aout32.c' and `aout64.c' to form the names
8147
`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
8148
 
8149
   As an example, this is what goes on to make the back end for a sun4,
8150
from `aout32.c':
8151
 
8152
            #define ARCH_SIZE 32
8153
            #include "aoutx.h"
8154
 
8155
   Which exports names:
8156
 
8157
            ...
8158
            aout_32_canonicalize_reloc
8159
            aout_32_find_nearest_line
8160
            aout_32_get_lineno
8161
            aout_32_get_reloc_upper_bound
8162
            ...
8163
 
8164
   from `sunos.c':
8165
 
8166
            #define TARGET_NAME "a.out-sunos-big"
8167
            #define VECNAME    sunos_big_vec
8168
            #include "aoutf1.h"
8169
 
8170
   requires all the names from `aout32.c', and produces the jump vector
8171
 
8172
            sunos_big_vec
8173
 
8174
   The file `host-aout.c' is a special case.  It is for a large set of
8175
hosts that use "more or less standard" a.out files, and for which
8176
cross-debugging is not interesting.  It uses the standard 32-bit a.out
8177
support routines, but determines the file offsets and addresses of the
8178
text, data, and BSS sections, the machine architecture and machine
8179
type, and the entry point address, in a host-dependent manner.  Once
8180
these values have been determined, generic code is used to handle the
8181
object file.
8182
 
8183
   When porting it to run on a new system, you must supply:
8184
 
8185
             HOST_PAGE_SIZE
8186
             HOST_SEGMENT_SIZE
8187
             HOST_MACHINE_ARCH       (optional)
8188
             HOST_MACHINE_MACHINE    (optional)
8189
             HOST_TEXT_START_ADDR
8190
             HOST_STACK_END_ADDR
8191
 
8192
   in the file `../include/sys/h-XXX.h' (for your host).  These values,
8193
plus the structures and macros defined in `a.out.h' on your host
8194
system, will produce a BFD target that will access ordinary a.out files
8195
on your host. To configure a new machine to use `host-aout.c', specify:
8196
 
8197
            TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
8198
            TDEPFILES= host-aout.o trad-core.o
8199
 
8200
   in the `config/XXX.mt' file, and modify `configure.in' to use the
8201
`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
8202
is selected.
8203
 
8204
3.2.1 Relocations
8205
-----------------
8206
 
8207
*Description*
8208
The file `aoutx.h' provides for both the _standard_ and _extended_
8209
forms of a.out relocation records.
8210
 
8211
   The standard records contain only an address, a symbol index, and a
8212
type field. The extended records (used on 29ks and sparcs) also have a
8213
full integer for an addend.
8214
 
8215
3.2.2 Internal entry points
8216
---------------------------
8217
 
8218
*Description*
8219
`aoutx.h' exports several routines for accessing the contents of an
8220
a.out file, which are gathered and exported in turn by various format
8221
specific files (eg sunos.c).
8222
 
8223
3.2.2.1 `aout_SIZE_swap_exec_header_in'
8224
.......................................
8225
 
8226
*Synopsis*
8227
     void aout_SIZE_swap_exec_header_in,
8228
        (bfd *abfd,
8229
         struct external_exec *bytes,
8230
         struct internal_exec *execp);
8231
   *Description*
8232
Swap the information in an executable header RAW_BYTES taken from a raw
8233
byte stream memory image into the internal exec header structure EXECP.
8234
 
8235
3.2.2.2 `aout_SIZE_swap_exec_header_out'
8236
........................................
8237
 
8238
*Synopsis*
8239
     void aout_SIZE_swap_exec_header_out
8240
        (bfd *abfd,
8241
         struct internal_exec *execp,
8242
         struct external_exec *raw_bytes);
8243
   *Description*
8244
Swap the information in an internal exec header structure EXECP into
8245
the buffer RAW_BYTES ready for writing to disk.
8246
 
8247
3.2.2.3 `aout_SIZE_some_aout_object_p'
8248
......................................
8249
 
8250
*Synopsis*
8251
     const bfd_target *aout_SIZE_some_aout_object_p
8252
        (bfd *abfd,
8253
         struct internal_exec *execp,
8254
         const bfd_target *(*callback_to_real_object_p) (bfd *));
8255
   *Description*
8256
Some a.out variant thinks that the file open in ABFD checking is an
8257
a.out file.  Do some more checking, and set up for access if it really
8258
is.  Call back to the calling environment's "finish up" function just
8259
before returning, to handle any last-minute setup.
8260
 
8261
3.2.2.4 `aout_SIZE_mkobject'
8262
............................
8263
 
8264
*Synopsis*
8265
     bfd_boolean aout_SIZE_mkobject, (bfd *abfd);
8266
   *Description*
8267
Initialize BFD ABFD for use with a.out files.
8268
 
8269
3.2.2.5 `aout_SIZE_machine_type'
8270
................................
8271
 
8272
*Synopsis*
8273
     enum machine_type  aout_SIZE_machine_type
8274
        (enum bfd_architecture arch,
8275
         unsigned long machine,
8276
         bfd_boolean *unknown);
8277
   *Description*
8278
Keep track of machine architecture and machine type for a.out's. Return
8279
the `machine_type' for a particular architecture and machine, or
8280
`M_UNKNOWN' if that exact architecture and machine can't be represented
8281
in a.out format.
8282
 
8283
   If the architecture is understood, machine type 0 (default) is
8284
always understood.
8285
 
8286
3.2.2.6 `aout_SIZE_set_arch_mach'
8287
.................................
8288
 
8289
*Synopsis*
8290
     bfd_boolean aout_SIZE_set_arch_mach,
8291
        (bfd *,
8292
         enum bfd_architecture arch,
8293
         unsigned long machine);
8294
   *Description*
8295
Set the architecture and the machine of the BFD ABFD to the values ARCH
8296
and MACHINE.  Verify that ABFD's format can support the architecture
8297
required.
8298
 
8299
3.2.2.7 `aout_SIZE_new_section_hook'
8300
....................................
8301
 
8302
*Synopsis*
8303
     bfd_boolean aout_SIZE_new_section_hook,
8304
        (bfd *abfd,
8305
         asection *newsect);
8306
   *Description*
8307
Called by the BFD in response to a `bfd_make_section' request.
8308
 
8309

8310
File: bfd.info,  Node: coff,  Next: elf,  Prev: aout,  Up: BFD back ends
8311
 
8312
3.3 coff backends
8313
=================
8314
 
8315
BFD supports a number of different flavours of coff format.  The major
8316
differences between formats are the sizes and alignments of fields in
8317
structures on disk, and the occasional extra field.
8318
 
8319
   Coff in all its varieties is implemented with a few common files and
8320
a number of implementation specific files. For example, The 88k bcs
8321
coff format is implemented in the file `coff-m88k.c'. This file
8322
`#include's `coff/m88k.h' which defines the external structure of the
8323
coff format for the 88k, and `coff/internal.h' which defines the
8324
internal structure. `coff-m88k.c' also defines the relocations used by
8325
the 88k format *Note Relocations::.
8326
 
8327
   The Intel i960 processor version of coff is implemented in
8328
`coff-i960.c'. This file has the same structure as `coff-m88k.c',
8329
except that it includes `coff/i960.h' rather than `coff-m88k.h'.
8330
 
8331
3.3.1 Porting to a new version of coff
8332
--------------------------------------
8333
 
8334
The recommended method is to select from the existing implementations
8335
the version of coff which is most like the one you want to use.  For
8336
example, we'll say that i386 coff is the one you select, and that your
8337
coff flavour is called foo.  Copy `i386coff.c' to `foocoff.c', copy
8338
`../include/coff/i386.h' to `../include/coff/foo.h', and add the lines
8339
to `targets.c' and `Makefile.in' so that your new back end is used.
8340
Alter the shapes of the structures in `../include/coff/foo.h' so that
8341
they match what you need. You will probably also have to add `#ifdef's
8342
to the code in `coff/internal.h' and `coffcode.h' if your version of
8343
coff is too wild.
8344
 
8345
   You can verify that your new BFD backend works quite simply by
8346
building `objdump' from the `binutils' directory, and making sure that
8347
its version of what's going on and your host system's idea (assuming it
8348
has the pretty standard coff dump utility, usually called `att-dump' or
8349
just `dump') are the same.  Then clean up your code, and send what
8350
you've done to Cygnus. Then your stuff will be in the next release, and
8351
you won't have to keep integrating it.
8352
 
8353
3.3.2 How the coff backend works
8354
--------------------------------
8355
 
8356
3.3.2.1 File layout
8357
...................
8358
 
8359
The Coff backend is split into generic routines that are applicable to
8360
any Coff target and routines that are specific to a particular target.
8361
The target-specific routines are further split into ones which are
8362
basically the same for all Coff targets except that they use the
8363
external symbol format or use different values for certain constants.
8364
 
8365
   The generic routines are in `coffgen.c'.  These routines work for
8366
any Coff target.  They use some hooks into the target specific code;
8367
the hooks are in a `bfd_coff_backend_data' structure, one of which
8368
exists for each target.
8369
 
8370
   The essentially similar target-specific routines are in
8371
`coffcode.h'.  This header file includes executable C code.  The
8372
various Coff targets first include the appropriate Coff header file,
8373
make any special defines that are needed, and then include `coffcode.h'.
8374
 
8375
   Some of the Coff targets then also have additional routines in the
8376
target source file itself.
8377
 
8378
   For example, `coff-i960.c' includes `coff/internal.h' and
8379
`coff/i960.h'.  It then defines a few constants, such as `I960', and
8380
includes `coffcode.h'.  Since the i960 has complex relocation types,
8381
`coff-i960.c' also includes some code to manipulate the i960 relocs.
8382
This code is not in `coffcode.h' because it would not be used by any
8383
other target.
8384
 
8385
3.3.2.2 Coff long section names
8386
...............................
8387
 
8388
In the standard Coff object format, section names are limited to the
8389
eight bytes available in the `s_name' field of the `SCNHDR' section
8390
header structure.  The format requires the field to be NUL-padded, but
8391
not necessarily NUL-terminated, so the longest section names permitted
8392
are a full eight characters.
8393
 
8394
   The Microsoft PE variants of the Coff object file format add an
8395
extension to support the use of long section names.  This extension is
8396
defined in section 4 of the Microsoft PE/COFF specification (rev 8.1).
8397
If a section name is too long to fit into the section header's `s_name'
8398
field, it is instead placed into the string table, and the `s_name'
8399
field is filled with a slash ("/") followed by the ASCII decimal
8400
representation of the offset of the full name relative to the string
8401
table base.
8402
 
8403
   Note that this implies that the extension can only be used in object
8404
files, as executables do not contain a string table.  The standard
8405
specifies that long section names from objects emitted into executable
8406
images are to be truncated.
8407
 
8408
   However, as a GNU extension, BFD can generate executable images that
8409
contain a string table and long section names.  This would appear to be
8410
technically valid, as the standard only says that Coff debugging
8411
information is deprecated, not forbidden, and in practice it works,
8412
although some tools that parse PE files expecting the MS standard
8413
format may become confused; `PEview' is one known example.
8414
 
8415
   The functionality is supported in BFD by code implemented under the
8416
control of the macro `COFF_LONG_SECTION_NAMES'.  If not defined, the
8417
format does not support long section names in any way.  If defined, it
8418
is used to initialise a flag, `_bfd_coff_long_section_names', and a
8419
hook function pointer, `_bfd_coff_set_long_section_names', in the Coff
8420
backend data structure.  The flag controls the generation of long
8421
section names in output BFDs at runtime; if it is false, as it will be
8422
by default when generating an executable image, long section names are
8423
truncated; if true, the long section names extension is employed.  The
8424
hook points to a function that allows the value of the flag to be
8425
altered at runtime, on formats that support long section names at all;
8426
on other formats it points to a stub that returns an error indication.
8427
With input BFDs, the flag is set according to whether any long section
8428
names are detected while reading the section headers.  For a completely
8429
new BFD, the flag is set to the default for the target format.  This
8430
information can be used by a client of the BFD library when deciding
8431
what output format to generate, and means that a BFD that is opened for
8432
read and subsequently converted to a writeable BFD and modified
8433
in-place will retain whatever format it had on input.
8434
 
8435
   If `COFF_LONG_SECTION_NAMES' is simply defined (blank), or is
8436
defined to the value "1", then long section names are enabled by
8437
default; if it is defined to the value zero, they are disabled by
8438
default (but still accepted in input BFDs).  The header `coffcode.h'
8439
defines a macro, `COFF_DEFAULT_LONG_SECTION_NAMES', which is used in
8440
the backends to initialise the backend data structure fields
8441
appropriately; see the comments for further detail.
8442
 
8443
3.3.2.3 Bit twiddling
8444
.....................
8445
 
8446
Each flavour of coff supported in BFD has its own header file
8447
describing the external layout of the structures. There is also an
8448
internal description of the coff layout, in `coff/internal.h'. A major
8449
function of the coff backend is swapping the bytes and twiddling the
8450
bits to translate the external form of the structures into the normal
8451
internal form. This is all performed in the `bfd_swap'_thing_direction
8452
routines. Some elements are different sizes between different versions
8453
of coff; it is the duty of the coff version specific include file to
8454
override the definitions of various packing routines in `coffcode.h'.
8455
E.g., the size of line number entry in coff is sometimes 16 bits, and
8456
sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
8457
will select the correct one. No doubt, some day someone will find a
8458
version of coff which has a varying field size not catered to at the
8459
moment. To port BFD, that person will have to add more `#defines'.
8460
Three of the bit twiddling routines are exported to `gdb';
8461
`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
8462
reads the symbol table on its own, but uses BFD to fix things up.  More
8463
of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
8464
`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
8465
`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
8466
`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
8467
table and reloc drudgery itself, thereby saving the internal BFD
8468
overhead, but uses BFD to swap things on the way out, making cross
8469
ports much safer.  Doing so also allows BFD (and thus the linker) to
8470
use the same header files as `gas', which makes one avenue to disaster
8471
disappear.
8472
 
8473
3.3.2.4 Symbol reading
8474
......................
8475
 
8476
The simple canonical form for symbols used by BFD is not rich enough to
8477
keep all the information available in a coff symbol table. The back end
8478
gets around this problem by keeping the original symbol table around,
8479
"behind the scenes".
8480
 
8481
   When a symbol table is requested (through a call to
8482
`bfd_canonicalize_symtab'), a request gets through to
8483
`coff_get_normalized_symtab'. This reads the symbol table from the coff
8484
file and swaps all the structures inside into the internal form. It
8485
also fixes up all the pointers in the table (represented in the file by
8486
offsets from the first symbol in the table) into physical pointers to
8487
elements in the new internal table. This involves some work since the
8488
meanings of fields change depending upon context: a field that is a
8489
pointer to another structure in the symbol table at one moment may be
8490
the size in bytes of a structure at the next.  Another pass is made
8491
over the table. All symbols which mark file names (`C_FILE' symbols)
8492
are modified so that the internal string points to the value in the
8493
auxent (the real filename) rather than the normal text associated with
8494
the symbol (`".file"').
8495
 
8496
   At this time the symbol names are moved around. Coff stores all
8497
symbols less than nine characters long physically within the symbol
8498
table; longer strings are kept at the end of the file in the string
8499
table. This pass moves all strings into memory and replaces them with
8500
pointers to the strings.
8501
 
8502
   The symbol table is massaged once again, this time to create the
8503
canonical table used by the BFD application. Each symbol is inspected
8504
in turn, and a decision made (using the `sclass' field) about the
8505
various flags to set in the `asymbol'.  *Note Symbols::. The generated
8506
canonical table shares strings with the hidden internal symbol table.
8507
 
8508
   Any linenumbers are read from the coff file too, and attached to the
8509
symbols which own the functions the linenumbers belong to.
8510
 
8511
3.3.2.5 Symbol writing
8512
......................
8513
 
8514
Writing a symbol to a coff file which didn't come from a coff file will
8515
lose any debugging information. The `asymbol' structure remembers the
8516
BFD from which the symbol was taken, and on output the back end makes
8517
sure that the same destination target as source target is present.
8518
 
8519
   When the symbols have come from a coff file then all the debugging
8520
information is preserved.
8521
 
8522
   Symbol tables are provided for writing to the back end in a vector
8523
of pointers to pointers. This allows applications like the linker to
8524
accumulate and output large symbol tables without having to do too much
8525
byte copying.
8526
 
8527
   This function runs through the provided symbol table and patches
8528
each symbol marked as a file place holder (`C_FILE') to point to the
8529
next file place holder in the list. It also marks each `offset' field
8530
in the list with the offset from the first symbol of the current symbol.
8531
 
8532
   Another function of this procedure is to turn the canonical value
8533
form of BFD into the form used by coff. Internally, BFD expects symbol
8534
values to be offsets from a section base; so a symbol physically at
8535
0x120, but in a section starting at 0x100, would have the value 0x20.
8536
Coff expects symbols to contain their final value, so symbols have
8537
their values changed at this point to reflect their sum with their
8538
owning section.  This transformation uses the `output_section' field of
8539
the `asymbol''s `asection' *Note Sections::.
8540
 
8541
   * `coff_mangle_symbols'
8542
   This routine runs though the provided symbol table and uses the
8543
offsets generated by the previous pass and the pointers generated when
8544
the symbol table was read in to create the structured hierarchy
8545
required by coff. It changes each pointer to a symbol into the index
8546
into the symbol table of the asymbol.
8547
 
8548
   * `coff_write_symbols'
8549
   This routine runs through the symbol table and patches up the
8550
symbols from their internal form into the coff way, calls the bit
8551
twiddlers, and writes out the table to the file.
8552
 
8553
3.3.2.6 `coff_symbol_type'
8554
..........................
8555
 
8556
*Description*
8557
The hidden information for an `asymbol' is described in a
8558
`combined_entry_type':
8559
 
8560
 
8561
     typedef struct coff_ptr_struct
8562
     {
8563
       /* Remembers the offset from the first symbol in the file for
8564
          this symbol. Generated by coff_renumber_symbols. */
8565
       unsigned int offset;
8566
 
8567
       /* Should the value of this symbol be renumbered.  Used for
8568
          XCOFF C_BSTAT symbols.  Set by coff_slurp_symbol_table.  */
8569
       unsigned int fix_value : 1;
8570
 
8571
       /* Should the tag field of this symbol be renumbered.
8572
          Created by coff_pointerize_aux. */
8573
       unsigned int fix_tag : 1;
8574
 
8575
       /* Should the endidx field of this symbol be renumbered.
8576
          Created by coff_pointerize_aux. */
8577
       unsigned int fix_end : 1;
8578
 
8579
       /* Should the x_csect.x_scnlen field be renumbered.
8580
          Created by coff_pointerize_aux. */
8581
       unsigned int fix_scnlen : 1;
8582
 
8583
       /* Fix up an XCOFF C_BINCL/C_EINCL symbol.  The value is the
8584
          index into the line number entries.  Set by coff_slurp_symbol_table.  */
8585
       unsigned int fix_line : 1;
8586
 
8587
       /* The container for the symbol structure as read and translated
8588
          from the file. */
8589
       union
8590
       {
8591
         union internal_auxent auxent;
8592
         struct internal_syment syment;
8593
       } u;
8594
     } combined_entry_type;
8595
 
8596
 
8597
     /* Each canonical asymbol really looks like this: */
8598
 
8599
     typedef struct coff_symbol_struct
8600
     {
8601
       /* The actual symbol which the rest of BFD works with */
8602
       asymbol symbol;
8603
 
8604
       /* A pointer to the hidden information for this symbol */
8605
       combined_entry_type *native;
8606
 
8607
       /* A pointer to the linenumber information for this symbol */
8608
       struct lineno_cache_entry *lineno;
8609
 
8610
       /* Have the line numbers been relocated yet ? */
8611
       bfd_boolean done_lineno;
8612
     } coff_symbol_type;
8613
 
8614
3.3.2.7 `bfd_coff_backend_data'
8615
...............................
8616
 
8617
     /* COFF symbol classifications.  */
8618
 
8619
     enum coff_symbol_classification
8620
     {
8621
       /* Global symbol.  */
8622
       COFF_SYMBOL_GLOBAL,
8623
       /* Common symbol.  */
8624
       COFF_SYMBOL_COMMON,
8625
       /* Undefined symbol.  */
8626
       COFF_SYMBOL_UNDEFINED,
8627
       /* Local symbol.  */
8628
       COFF_SYMBOL_LOCAL,
8629
       /* PE section symbol.  */
8630
       COFF_SYMBOL_PE_SECTION
8631
     };
8632
Special entry points for gdb to swap in coff symbol table parts:
8633
     typedef struct
8634
     {
8635
       void (*_bfd_coff_swap_aux_in)
8636
         (bfd *, void *, int, int, int, int, void *);
8637
 
8638
       void (*_bfd_coff_swap_sym_in)
8639
         (bfd *, void *, void *);
8640
 
8641
       void (*_bfd_coff_swap_lineno_in)
8642
         (bfd *, void *, void *);
8643
 
8644
       unsigned int (*_bfd_coff_swap_aux_out)
8645
         (bfd *, void *, int, int, int, int, void *);
8646
 
8647
       unsigned int (*_bfd_coff_swap_sym_out)
8648
         (bfd *, void *, void *);
8649
 
8650
       unsigned int (*_bfd_coff_swap_lineno_out)
8651
         (bfd *, void *, void *);
8652
 
8653
       unsigned int (*_bfd_coff_swap_reloc_out)
8654
         (bfd *, void *, void *);
8655
 
8656
       unsigned int (*_bfd_coff_swap_filehdr_out)
8657
         (bfd *, void *, void *);
8658
 
8659
       unsigned int (*_bfd_coff_swap_aouthdr_out)
8660
         (bfd *, void *, void *);
8661
 
8662
       unsigned int (*_bfd_coff_swap_scnhdr_out)
8663
         (bfd *, void *, void *);
8664
 
8665
       unsigned int _bfd_filhsz;
8666
       unsigned int _bfd_aoutsz;
8667
       unsigned int _bfd_scnhsz;
8668
       unsigned int _bfd_symesz;
8669
       unsigned int _bfd_auxesz;
8670
       unsigned int _bfd_relsz;
8671
       unsigned int _bfd_linesz;
8672
       unsigned int _bfd_filnmlen;
8673
       bfd_boolean _bfd_coff_long_filenames;
8674
 
8675
       bfd_boolean _bfd_coff_long_section_names;
8676
       bfd_boolean (*_bfd_coff_set_long_section_names)
8677
         (bfd *, int);
8678
 
8679
       unsigned int _bfd_coff_default_section_alignment_power;
8680
       bfd_boolean _bfd_coff_force_symnames_in_strings;
8681
       unsigned int _bfd_coff_debug_string_prefix_length;
8682
 
8683
       void (*_bfd_coff_swap_filehdr_in)
8684
         (bfd *, void *, void *);
8685
 
8686
       void (*_bfd_coff_swap_aouthdr_in)
8687
         (bfd *, void *, void *);
8688
 
8689
       void (*_bfd_coff_swap_scnhdr_in)
8690
         (bfd *, void *, void *);
8691
 
8692
       void (*_bfd_coff_swap_reloc_in)
8693
         (bfd *abfd, void *, void *);
8694
 
8695
       bfd_boolean (*_bfd_coff_bad_format_hook)
8696
         (bfd *, void *);
8697
 
8698
       bfd_boolean (*_bfd_coff_set_arch_mach_hook)
8699
         (bfd *, void *);
8700
 
8701
       void * (*_bfd_coff_mkobject_hook)
8702
         (bfd *, void *, void *);
8703
 
8704
       bfd_boolean (*_bfd_styp_to_sec_flags_hook)
8705
         (bfd *, void *, const char *, asection *, flagword *);
8706
 
8707
       void (*_bfd_set_alignment_hook)
8708
         (bfd *, asection *, void *);
8709
 
8710
       bfd_boolean (*_bfd_coff_slurp_symbol_table)
8711
         (bfd *);
8712
 
8713
       bfd_boolean (*_bfd_coff_symname_in_debug)
8714
         (bfd *, struct internal_syment *);
8715
 
8716
       bfd_boolean (*_bfd_coff_pointerize_aux_hook)
8717
         (bfd *, combined_entry_type *, combined_entry_type *,
8718
                 unsigned int, combined_entry_type *);
8719
 
8720
       bfd_boolean (*_bfd_coff_print_aux)
8721
         (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
8722
                 combined_entry_type *, unsigned int);
8723
 
8724
       void (*_bfd_coff_reloc16_extra_cases)
8725
         (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
8726
                bfd_byte *, unsigned int *, unsigned int *);
8727
 
8728
       int (*_bfd_coff_reloc16_estimate)
8729
         (bfd *, asection *, arelent *, unsigned int,
8730
                 struct bfd_link_info *);
8731
 
8732
       enum coff_symbol_classification (*_bfd_coff_classify_symbol)
8733
         (bfd *, struct internal_syment *);
8734
 
8735
       bfd_boolean (*_bfd_coff_compute_section_file_positions)
8736
         (bfd *);
8737
 
8738
       bfd_boolean (*_bfd_coff_start_final_link)
8739
         (bfd *, struct bfd_link_info *);
8740
 
8741
       bfd_boolean (*_bfd_coff_relocate_section)
8742
         (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
8743
                 struct internal_reloc *, struct internal_syment *, asection **);
8744
 
8745
       reloc_howto_type *(*_bfd_coff_rtype_to_howto)
8746
         (bfd *, asection *, struct internal_reloc *,
8747
                 struct coff_link_hash_entry *, struct internal_syment *,
8748
                 bfd_vma *);
8749
 
8750
       bfd_boolean (*_bfd_coff_adjust_symndx)
8751
         (bfd *, struct bfd_link_info *, bfd *, asection *,
8752
                 struct internal_reloc *, bfd_boolean *);
8753
 
8754
       bfd_boolean (*_bfd_coff_link_add_one_symbol)
8755
         (struct bfd_link_info *, bfd *, const char *, flagword,
8756
                 asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
8757
                 struct bfd_link_hash_entry **);
8758
 
8759
       bfd_boolean (*_bfd_coff_link_output_has_begun)
8760
         (bfd *, struct coff_final_link_info *);
8761
 
8762
       bfd_boolean (*_bfd_coff_final_link_postscript)
8763
         (bfd *, struct coff_final_link_info *);
8764
 
8765
       bfd_boolean (*_bfd_coff_print_pdata)
8766
         (bfd *, void *);
8767
 
8768
     } bfd_coff_backend_data;
8769
 
8770
     #define coff_backend_info(abfd) \
8771
       ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
8772
 
8773
     #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
8774
       ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
8775
 
8776
     #define bfd_coff_swap_sym_in(a,e,i) \
8777
       ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
8778
 
8779
     #define bfd_coff_swap_lineno_in(a,e,i) \
8780
       ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
8781
 
8782
     #define bfd_coff_swap_reloc_out(abfd, i, o) \
8783
       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
8784
 
8785
     #define bfd_coff_swap_lineno_out(abfd, i, o) \
8786
       ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
8787
 
8788
     #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
8789
       ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
8790
 
8791
     #define bfd_coff_swap_sym_out(abfd, i,o) \
8792
       ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
8793
 
8794
     #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
8795
       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
8796
 
8797
     #define bfd_coff_swap_filehdr_out(abfd, i,o) \
8798
       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
8799
 
8800
     #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
8801
       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
8802
 
8803
     #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
8804
     #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
8805
     #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
8806
     #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
8807
     #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
8808
     #define bfd_coff_relsz(abfd)  (coff_backend_info (abfd)->_bfd_relsz)
8809
     #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
8810
     #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
8811
     #define bfd_coff_long_filenames(abfd) \
8812
       (coff_backend_info (abfd)->_bfd_coff_long_filenames)
8813
     #define bfd_coff_long_section_names(abfd) \
8814
       (coff_backend_info (abfd)->_bfd_coff_long_section_names)
8815
     #define bfd_coff_set_long_section_names(abfd, enable) \
8816
       ((coff_backend_info (abfd)->_bfd_coff_set_long_section_names) (abfd, enable))
8817
     #define bfd_coff_default_section_alignment_power(abfd) \
8818
       (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
8819
     #define bfd_coff_swap_filehdr_in(abfd, i,o) \
8820
       ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
8821
 
8822
     #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
8823
       ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
8824
 
8825
     #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
8826
       ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
8827
 
8828
     #define bfd_coff_swap_reloc_in(abfd, i, o) \
8829
       ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
8830
 
8831
     #define bfd_coff_bad_format_hook(abfd, filehdr) \
8832
       ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
8833
 
8834
     #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
8835
       ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
8836
     #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
8837
       ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
8838
        (abfd, filehdr, aouthdr))
8839
 
8840
     #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
8841
       ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
8842
        (abfd, scnhdr, name, section, flags_ptr))
8843
 
8844
     #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
8845
       ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
8846
 
8847
     #define bfd_coff_slurp_symbol_table(abfd)\
8848
       ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
8849
 
8850
     #define bfd_coff_symname_in_debug(abfd, sym)\
8851
       ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
8852
 
8853
     #define bfd_coff_force_symnames_in_strings(abfd)\
8854
       (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
8855
 
8856
     #define bfd_coff_debug_string_prefix_length(abfd)\
8857
       (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
8858
 
8859
     #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
8860
       ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
8861
        (abfd, file, base, symbol, aux, indaux))
8862
 
8863
     #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
8864
                                          reloc, data, src_ptr, dst_ptr)\
8865
       ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
8866
        (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
8867
 
8868
     #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
8869
       ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
8870
        (abfd, section, reloc, shrink, link_info))
8871
 
8872
     #define bfd_coff_classify_symbol(abfd, sym)\
8873
       ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
8874
        (abfd, sym))
8875
 
8876
     #define bfd_coff_compute_section_file_positions(abfd)\
8877
       ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
8878
        (abfd))
8879
 
8880
     #define bfd_coff_start_final_link(obfd, info)\
8881
       ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
8882
        (obfd, info))
8883
     #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
8884
       ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
8885
        (obfd, info, ibfd, o, con, rel, isyms, secs))
8886
     #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
8887
       ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
8888
        (abfd, sec, rel, h, sym, addendp))
8889
     #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
8890
       ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
8891
        (obfd, info, ibfd, sec, rel, adjustedp))
8892
     #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
8893
                                          value, string, cp, coll, hashp)\
8894
       ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
8895
        (info, abfd, name, flags, section, value, string, cp, coll, hashp))
8896
 
8897
     #define bfd_coff_link_output_has_begun(a,p) \
8898
       ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
8899
     #define bfd_coff_final_link_postscript(a,p) \
8900
       ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
8901
 
8902
     #define bfd_coff_have_print_pdata(a) \
8903
       (coff_backend_info (a)->_bfd_coff_print_pdata)
8904
     #define bfd_coff_print_pdata(a,p) \
8905
       ((coff_backend_info (a)->_bfd_coff_print_pdata) (a, p))
8906
 
8907
     /* Macro: Returns true if the bfd is a PE executable as opposed to a
8908
        PE object file.  */
8909
     #define bfd_pei_p(abfd) \
8910
       (CONST_STRNEQ ((abfd)->xvec->name, "pei-"))
8911
 
8912
3.3.2.8 Writing relocations
8913
...........................
8914
 
8915
To write relocations, the back end steps though the canonical
8916
relocation table and create an `internal_reloc'. The symbol index to
8917
use is removed from the `offset' field in the symbol table supplied.
8918
The address comes directly from the sum of the section base address and
8919
the relocation offset; the type is dug directly from the howto field.
8920
Then the `internal_reloc' is swapped into the shape of an
8921
`external_reloc' and written out to disk.
8922
 
8923
3.3.2.9 Reading linenumbers
8924
...........................
8925
 
8926
Creating the linenumber table is done by reading in the entire coff
8927
linenumber table, and creating another table for internal use.
8928
 
8929
   A coff linenumber table is structured so that each function is
8930
marked as having a line number of 0. Each line within the function is
8931
an offset from the first line in the function. The base of the line
8932
number information for the table is stored in the symbol associated
8933
with the function.
8934
 
8935
   Note: The PE format uses line number 0 for a flag indicating a new
8936
source file.
8937
 
8938
   The information is copied from the external to the internal table,
8939
and each symbol which marks a function is marked by pointing its...
8940
 
8941
   How does this work ?
8942
 
8943
3.3.2.10 Reading relocations
8944
............................
8945
 
8946
Coff relocations are easily transformed into the internal BFD form
8947
(`arelent').
8948
 
8949
   Reading a coff relocation table is done in the following stages:
8950
 
8951
   * Read the entire coff relocation table into memory.
8952
 
8953
   * Process each relocation in turn; first swap it from the external
8954
     to the internal form.
8955
 
8956
   * Turn the symbol referenced in the relocation's symbol index into a
8957
     pointer into the canonical symbol table.  This table is the same
8958
     as the one returned by a call to `bfd_canonicalize_symtab'. The
8959
     back end will call that routine and save the result if a
8960
     canonicalization hasn't been done.
8961
 
8962
   * The reloc index is turned into a pointer to a howto structure, in
8963
     a back end specific way. For instance, the 386 and 960 use the
8964
     `r_type' to directly produce an index into a howto table vector;
8965
     the 88k subtracts a number from the `r_type' field and creates an
8966
     addend field.
8967
 
8968

8969
File: bfd.info,  Node: elf,  Next: mmo,  Prev: coff,  Up: BFD back ends
8970
 
8971
3.4 ELF backends
8972
================
8973
 
8974
BFD support for ELF formats is being worked on.  Currently, the best
8975
supported back ends are for sparc and i386 (running svr4 or Solaris 2).
8976
 
8977
   Documentation of the internals of the support code still needs to be
8978
written.  The code is changing quickly enough that we haven't bothered
8979
yet.
8980
 
8981

8982
File: bfd.info,  Node: mmo,  Prev: elf,  Up: BFD back ends
8983
 
8984
3.5 mmo backend
8985
===============
8986
 
8987
The mmo object format is used exclusively together with Professor
8988
Donald E. Knuth's educational 64-bit processor MMIX.  The simulator
8989
`mmix' which is available at
8990
`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'
8991
understands this format.  That package also includes a combined
8992
assembler and linker called `mmixal'.  The mmo format has no advantages
8993
feature-wise compared to e.g. ELF.  It is a simple non-relocatable
8994
object format with no support for archives or debugging information,
8995
except for symbol value information and line numbers (which is not yet
8996
implemented in BFD).  See
8997
`http://www-cs-faculty.stanford.edu/~knuth/mmix.html' for more
8998
information about MMIX.  The ELF format is used for intermediate object
8999
files in the BFD implementation.
9000
 
9001
* Menu:
9002
 
9003
* File layout::
9004
* Symbol-table::
9005
* mmo section mapping::
9006
 
9007

9008
File: bfd.info,  Node: File layout,  Next: Symbol-table,  Prev: mmo,  Up: mmo
9009
 
9010
3.5.1 File layout
9011
-----------------
9012
 
9013
The mmo file contents is not partitioned into named sections as with
9014
e.g. ELF.  Memory areas is formed by specifying the location of the
9015
data that follows.  Only the memory area `0x0000...00' to `0x01ff...ff'
9016
is executable, so it is used for code (and constants) and the area
9017
`0x2000...00' to `0x20ff...ff' is used for writable data.  *Note mmo
9018
section mapping::.
9019
 
9020
   There is provision for specifying "special data" of 65536 different
9021
types.  We use type 80 (decimal), arbitrarily chosen the same as the
9022
ELF `e_machine' number for MMIX, filling it with section information
9023
normally found in ELF objects. *Note mmo section mapping::.
9024
 
9025
   Contents is entered as 32-bit words, xor:ed over previous contents,
9026
always zero-initialized.  A word that starts with the byte `0x98' forms
9027
a command called a `lopcode', where the next byte distinguished between
9028
the thirteen lopcodes.  The two remaining bytes, called the `Y' and `Z'
9029
fields, or the `YZ' field (a 16-bit big-endian number), are used for
9030
various purposes different for each lopcode.  As documented in
9031
`http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz', the
9032
lopcodes are:
9033
 
9034
`lop_quote'
9035
     0x98000001.  The next word is contents, regardless of whether it
9036
     starts with 0x98 or not.
9037
 
9038
`lop_loc'
9039
     0x9801YYZZ, where `Z' is 1 or 2.  This is a location directive,
9040
     setting the location for the next data to the next 32-bit word
9041
     (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56.  Normally
9042
     `Y' is 0 for the text segment and 2 for the data segment.
9043
 
9044
`lop_skip'
9045
     0x9802YYZZ.  Increase the current location by `YZ' bytes.
9046
 
9047
`lop_fixo'
9048
     0x9803YYZZ, where `Z' is 1 or 2.  Store the current location as 64
9049
     bits into the location pointed to by the next 32-bit (Z = 1) or
9050
     64-bit (Z = 2) word, plus Y * 2^56.
9051
 
9052
`lop_fixr'
9053
     0x9804YYZZ.  `YZ' is stored into the current location plus 2 - 4 *
9054
     YZ.
9055
 
9056
`lop_fixrx'
9057
     0x980500ZZ.  `Z' is 16 or 24.  A value `L' derived from the
9058
     following 32-bit word are used in a manner similar to `YZ' in
9059
     lop_fixr: it is xor:ed into the current location minus 4 * L.  The
9060
     first byte of the word is 0 or 1.  If it is 1, then L = (LOWEST 24
9061
     BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
9062
 
9063
`lop_file'
9064
     0x9806YYZZ.  `Y' is the file number, `Z' is count of 32-bit words.
9065
     Set the file number to `Y' and the line counter to 0.  The next Z
9066
     * 4 bytes contain the file name, padded with zeros if the count is
9067
     not a multiple of four.  The same `Y' may occur multiple times,
9068
     but `Z' must be 0 for all but the first occurrence.
9069
 
9070
`lop_line'
9071
     0x9807YYZZ.  `YZ' is the line number.  Together with lop_file, it
9072
     forms the source location for the next 32-bit word.  Note that for
9073
     each non-lopcode 32-bit word, line numbers are assumed incremented
9074
     by one.
9075
 
9076
`lop_spec'
9077
     0x9808YYZZ.  `YZ' is the type number.  Data until the next lopcode
9078
     other than lop_quote forms special data of type `YZ'.  *Note mmo
9079
     section mapping::.
9080
 
9081
     Other types than 80, (or type 80 with a content that does not
9082
     parse) is stored in sections named `.MMIX.spec_data.N' where N is
9083
     the `YZ'-type.  The flags for such a sections say not to allocate
9084
     or load the data.  The vma is 0.  Contents of multiple occurrences
9085
     of special data N is concatenated to the data of the previous
9086
     lop_spec Ns.  The location in data or code at which the lop_spec
9087
     occurred is lost.
9088
 
9089
`lop_pre'
9090
     0x980901ZZ.  The first lopcode in a file.  The `Z' field forms the
9091
     length of header information in 32-bit words, where the first word
9092
     tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
9093
 
9094
`lop_post'
9095
     0x980a00ZZ.  Z > 32.  This lopcode follows after all
9096
     content-generating lopcodes in a program.  The `Z' field denotes
9097
     the value of `rG' at the beginning of the program.  The following
9098
     256 - Z big-endian 64-bit words are loaded into global registers
9099
     `$G' ... `$255'.
9100
 
9101
`lop_stab'
9102
     0x980b0000.  The next-to-last lopcode in a program.  Must follow
9103
     immediately after the lop_post lopcode and its data.  After this
9104
     lopcode follows all symbols in a compressed format (*note
9105
     Symbol-table::).
9106
 
9107
`lop_end'
9108
     0x980cYYZZ.  The last lopcode in a program.  It must follow the
9109
     lop_stab lopcode and its data.  The `YZ' field contains the number
9110
     of 32-bit words of symbol table information after the preceding
9111
     lop_stab lopcode.
9112
 
9113
   Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
9114
`lop_fixo' are not generated by BFD, but are handled.  They are
9115
generated by `mmixal'.
9116
 
9117
   This trivial one-label, one-instruction file:
9118
 
9119
      :Main TRAP 1,2,3
9120
 
9121
   can be represented this way in mmo:
9122
 
9123
      0x98090101 - lop_pre, one 32-bit word with timestamp.
9124
      
9125
      0x98010002 - lop_loc, text segment, using a 64-bit address.
9126
                   Note that mmixal does not emit this for the file above.
9127
      0x00000000 - Address, high 32 bits.
9128
      0x00000000 - Address, low 32 bits.
9129
      0x98060002 - lop_file, 2 32-bit words for file-name.
9130
      0x74657374 - "test"
9131
      0x2e730000 - ".s\0\0"
9132
      0x98070001 - lop_line, line 1.
9133
      0x00010203 - TRAP 1,2,3
9134
      0x980a00ff - lop_post, setting $255 to 0.
9135
      0x00000000
9136
      0x00000000
9137
      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
9138
      0x203a4040   *Note Symbol-table::.
9139
      0x10404020
9140
      0x4d206120
9141
      0x69016e00
9142
      0x81000000
9143
      0x980c0005 - lop_end; symbol table contained five 32-bit words.
9144
 
9145

9146
File: bfd.info,  Node: Symbol-table,  Next: mmo section mapping,  Prev: File layout,  Up: mmo
9147
 
9148
3.5.2 Symbol table format
9149
-------------------------
9150
 
9151
From mmixal.w (or really, the generated mmixal.tex) in
9152
`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'):
9153
"Symbols are stored and retrieved by means of a `ternary search trie',
9154
following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on
9155
Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C'
9156
(Reading, Mass.  Addison-Wesley, 1998), `15.4'.)  Each trie node stores
9157
a character, and there are branches to subtries for the cases where a
9158
given character is less than, equal to, or greater than the character
9159
in the trie.  There also is a pointer to a symbol table entry if a
9160
symbol ends at the current node."
9161
 
9162
   So it's a tree encoded as a stream of bytes.  The stream of bytes
9163
acts on a single virtual global symbol, adding and removing characters
9164
and signalling complete symbol points.  Here, we read the stream and
9165
create symbols at the completion points.
9166
 
9167
   First, there's a control byte `m'.  If any of the listed bits in `m'
9168
is nonzero, we execute what stands at the right, in the listed order:
9169
 
9170
      (MMO3_LEFT)
9171
      0x40 - Traverse left trie.
9172
             (Read a new command byte and recurse.)
9173
 
9174
      (MMO3_SYMBITS)
9175
      0x2f - Read the next byte as a character and store it in the
9176
             current character position; increment character position.
9177
             Test the bits of `m':
9178
 
9179
             (MMO3_WCHAR)
9180
             0x80 - The character is 16-bit (so read another byte,
9181
                    merge into current character.
9182
 
9183
             (MMO3_TYPEBITS)
9184
             0xf  - We have a complete symbol; parse the type, value
9185
                    and serial number and do what should be done
9186
                    with a symbol.  The type and length information
9187
                    is in j = (m & 0xf).
9188
 
9189
                    (MMO3_REGQUAL_BITS)
9190
                    j == 0xf: A register variable.  The following
9191
                              byte tells which register.
9192
                    j <= 8:   An absolute symbol.  Read j bytes as the
9193
                              big-endian number the symbol equals.
9194
                              A j = 2 with two zero bytes denotes an
9195
                              unknown symbol.
9196
                    j > 8:    As with j <= 8, but add (0x20 << 56)
9197
                              to the value in the following j - 8
9198
                              bytes.
9199
 
9200
                    Then comes the serial number, as a variant of
9201
                    uleb128, but better named ubeb128:
9202
                    Read bytes and shift the previous value left 7
9203
                    (multiply by 128).  Add in the new byte, repeat
9204
                    until a byte has bit 7 set.  The serial number
9205
                    is the computed value minus 128.
9206
 
9207
             (MMO3_MIDDLE)
9208
             0x20 - Traverse middle trie.  (Read a new command byte
9209
                    and recurse.)  Decrement character position.
9210
 
9211
      (MMO3_RIGHT)
9212
      0x10 - Traverse right trie.  (Read a new command byte and
9213
             recurse.)
9214
 
9215
   Let's look again at the `lop_stab' for the trivial file (*note File
9216
layout::).
9217
 
9218
      0x980b0000 - lop_stab for ":Main" = 0, serial 1.
9219
      0x203a4040
9220
      0x10404020
9221
      0x4d206120
9222
      0x69016e00
9223
      0x81000000
9224
 
9225
   This forms the trivial trie (note that the path between ":" and "M"
9226
is redundant):
9227
 
9228
      203a     ":"
9229
      40       /
9230
      40      /
9231
      10      \
9232
      40      /
9233
      40     /
9234
      204d  "M"
9235
      2061  "a"
9236
      2069  "i"
9237
      016e  "n" is the last character in a full symbol, and
9238
            with a value represented in one byte.
9239
      00    The value is 0.
9240
      81    The serial number is 1.
9241
 
9242

9243
File: bfd.info,  Node: mmo section mapping,  Prev: Symbol-table,  Up: mmo
9244
 
9245
3.5.3 mmo section mapping
9246
-------------------------
9247
 
9248
The implementation in BFD uses special data type 80 (decimal) to
9249
encapsulate and describe named sections, containing e.g. debug
9250
information.  If needed, any datum in the encapsulation will be quoted
9251
using lop_quote.  First comes a 32-bit word holding the number of
9252
32-bit words containing the zero-terminated zero-padded segment name.
9253
After the name there's a 32-bit word holding flags describing the
9254
section type.  Then comes a 64-bit big-endian word with the section
9255
length (in bytes), then another with the section start address.
9256
Depending on the type of section, the contents might follow,
9257
zero-padded to 32-bit boundary.  For a loadable section (such as data
9258
or code), the contents might follow at some later point, not
9259
necessarily immediately, as a lop_loc with the same start address as in
9260
the section description, followed by the contents.  This in effect
9261
forms a descriptor that must be emitted before the actual contents.
9262
Sections described this way must not overlap.
9263
 
9264
   For areas that don't have such descriptors, synthetic sections are
9265
formed by BFD.  Consecutive contents in the two memory areas
9266
`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
9267
entered in sections named `.text' and `.data' respectively.  If an area
9268
is not otherwise described, but would together with a neighboring lower
9269
area be less than `0x40000000' bytes long, it is joined with the lower
9270
area and the gap is zero-filled.  For other cases, a new section is
9271
formed, named `.MMIX.sec.N'.  Here, N is a number, a running count
9272
through the mmo file, starting at 0.
9273
 
9274
   A loadable section specified as:
9275
 
9276
      .section secname,"ax"
9277
      TETRA 1,2,3,4,-1,-2009
9278
      BYTE 80
9279
 
9280
   and linked to address `0x4', is represented by the sequence:
9281
 
9282
      0x98080050 - lop_spec 80
9283
      0x00000002 - two 32-bit words for the section name
9284
      0x7365636e - "secn"
9285
      0x616d6500 - "ame\0"
9286
      0x00000033 - flags CODE, READONLY, LOAD, ALLOC
9287
      0x00000000 - high 32 bits of section length
9288
      0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
9289
      0x00000000 - high 32 bits of section address
9290
      0x00000004 - section address is 4
9291
      0x98010002 - 64 bits with address of following data
9292
      0x00000000 - high 32 bits of address
9293
      0x00000004 - low 32 bits: data starts at address 4
9294
      0x00000001 - 1
9295
      0x00000002 - 2
9296
      0x00000003 - 3
9297
      0x00000004 - 4
9298
      0xffffffff - -1
9299
      0xfffff827 - -2009
9300
      0x50000000 - 80 as a byte, padded with zeros.
9301
 
9302
   Note that the lop_spec wrapping does not include the section
9303
contents.  Compare this to a non-loaded section specified as:
9304
 
9305
      .section thirdsec
9306
      TETRA 200001,100002
9307
      BYTE 38,40
9308
 
9309
   This, when linked to address `0x200000000000001c', is represented by:
9310
 
9311
      0x98080050 - lop_spec 80
9312
      0x00000002 - two 32-bit words for the section name
9313
      0x7365636e - "thir"
9314
      0x616d6500 - "dsec"
9315
      0x00000010 - flag READONLY
9316
      0x00000000 - high 32 bits of section length
9317
      0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
9318
      0x20000000 - high 32 bits of address
9319
      0x0000001c - low 32 bits of address 0x200000000000001c
9320
      0x00030d41 - 200001
9321
      0x000186a2 - 100002
9322
      0x26280000 - 38, 40 as bytes, padded with zeros
9323
 
9324
   For the latter example, the section contents must not be loaded in
9325
memory, and is therefore specified as part of the special data.  The
9326
address is usually unimportant but might provide information for e.g.
9327
the DWARF 2 debugging format.
9328
 
9329

9330
File: bfd.info,  Node: GNU Free Documentation License,  Next: BFD Index,  Prev: BFD back ends,  Up: Top
9331
 
9332
                     Version 1.3, 3 November 2008
9333
 
9334
     Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
9335
     `http://fsf.org/'
9336
 
9337
     Everyone is permitted to copy and distribute verbatim copies
9338
     of this license document, but changing it is not allowed.
9339
 
9340
  0. PREAMBLE
9341
 
9342
     The purpose of this License is to make a manual, textbook, or other
9343
     functional and useful document "free" in the sense of freedom: to
9344
     assure everyone the effective freedom to copy and redistribute it,
9345
     with or without modifying it, either commercially or
9346
     noncommercially.  Secondarily, this License preserves for the
9347
     author and publisher a way to get credit for their work, while not
9348
     being considered responsible for modifications made by others.
9349
 
9350
     This License is a kind of "copyleft", which means that derivative
9351
     works of the document must themselves be free in the same sense.
9352
     It complements the GNU General Public License, which is a copyleft
9353
     license designed for free software.
9354
 
9355
     We have designed this License in order to use it for manuals for
9356
     free software, because free software needs free documentation: a
9357
     free program should come with manuals providing the same freedoms
9358
     that the software does.  But this License is not limited to
9359
     software manuals; it can be used for any textual work, regardless
9360
     of subject matter or whether it is published as a printed book.
9361
     We recommend this License principally for works whose purpose is
9362
     instruction or reference.
9363
 
9364
  1. APPLICABILITY AND DEFINITIONS
9365
 
9366
     This License applies to any manual or other work, in any medium,
9367
     that contains a notice placed by the copyright holder saying it
9368
     can be distributed under the terms of this License.  Such a notice
9369
     grants a world-wide, royalty-free license, unlimited in duration,
9370
     to use that work under the conditions stated herein.  The
9371
     "Document", below, refers to any such manual or work.  Any member
9372
     of the public is a licensee, and is addressed as "you".  You
9373
     accept the license if you copy, modify or distribute the work in a
9374
     way requiring permission under copyright law.
9375
 
9376
     A "Modified Version" of the Document means any work containing the
9377
     Document or a portion of it, either copied verbatim, or with
9378
     modifications and/or translated into another language.
9379
 
9380
     A "Secondary Section" is a named appendix or a front-matter section
9381
     of the Document that deals exclusively with the relationship of the
9382
     publishers or authors of the Document to the Document's overall
9383
     subject (or to related matters) and contains nothing that could
9384
     fall directly within that overall subject.  (Thus, if the Document
9385
     is in part a textbook of mathematics, a Secondary Section may not
9386
     explain any mathematics.)  The relationship could be a matter of
9387
     historical connection with the subject or with related matters, or
9388
     of legal, commercial, philosophical, ethical or political position
9389
     regarding them.
9390
 
9391
     The "Invariant Sections" are certain Secondary Sections whose
9392
     titles are designated, as being those of Invariant Sections, in
9393
     the notice that says that the Document is released under this
9394
     License.  If a section does not fit the above definition of
9395
     Secondary then it is not allowed to be designated as Invariant.
9396
     The Document may contain zero Invariant Sections.  If the Document
9397
     does not identify any Invariant Sections then there are none.
9398
 
9399
     The "Cover Texts" are certain short passages of text that are
9400
     listed, as Front-Cover Texts or Back-Cover Texts, in the notice
9401
     that says that the Document is released under this License.  A
9402
     Front-Cover Text may be at most 5 words, and a Back-Cover Text may
9403
     be at most 25 words.
9404
 
9405
     A "Transparent" copy of the Document means a machine-readable copy,
9406
     represented in a format whose specification is available to the
9407
     general public, that is suitable for revising the document
9408
     straightforwardly with generic text editors or (for images
9409
     composed of pixels) generic paint programs or (for drawings) some
9410
     widely available drawing editor, and that is suitable for input to
9411
     text formatters or for automatic translation to a variety of
9412
     formats suitable for input to text formatters.  A copy made in an
9413
     otherwise Transparent file format whose markup, or absence of
9414
     markup, has been arranged to thwart or discourage subsequent
9415
     modification by readers is not Transparent.  An image format is
9416
     not Transparent if used for any substantial amount of text.  A
9417
     copy that is not "Transparent" is called "Opaque".
9418
 
9419
     Examples of suitable formats for Transparent copies include plain
9420
     ASCII without markup, Texinfo input format, LaTeX input format,
9421
     SGML or XML using a publicly available DTD, and
9422
     standard-conforming simple HTML, PostScript or PDF designed for
9423
     human modification.  Examples of transparent image formats include
9424
     PNG, XCF and JPG.  Opaque formats include proprietary formats that
9425
     can be read and edited only by proprietary word processors, SGML or
9426
     XML for which the DTD and/or processing tools are not generally
9427
     available, and the machine-generated HTML, PostScript or PDF
9428
     produced by some word processors for output purposes only.
9429
 
9430
     The "Title Page" means, for a printed book, the title page itself,
9431
     plus such following pages as are needed to hold, legibly, the
9432
     material this License requires to appear in the title page.  For
9433
     works in formats which do not have any title page as such, "Title
9434
     Page" means the text near the most prominent appearance of the
9435
     work's title, preceding the beginning of the body of the text.
9436
 
9437
     The "publisher" means any person or entity that distributes copies
9438
     of the Document to the public.
9439
 
9440
     A section "Entitled XYZ" means a named subunit of the Document
9441
     whose title either is precisely XYZ or contains XYZ in parentheses
9442
     following text that translates XYZ in another language.  (Here XYZ
9443
     stands for a specific section name mentioned below, such as
9444
     "Acknowledgements", "Dedications", "Endorsements", or "History".)
9445
     To "Preserve the Title" of such a section when you modify the
9446
     Document means that it remains a section "Entitled XYZ" according
9447
     to this definition.
9448
 
9449
     The Document may include Warranty Disclaimers next to the notice
9450
     which states that this License applies to the Document.  These
9451
     Warranty Disclaimers are considered to be included by reference in
9452
     this License, but only as regards disclaiming warranties: any other
9453
     implication that these Warranty Disclaimers may have is void and
9454
     has no effect on the meaning of this License.
9455
 
9456
  2. VERBATIM COPYING
9457
 
9458
     You may copy and distribute the Document in any medium, either
9459
     commercially or noncommercially, provided that this License, the
9460
     copyright notices, and the license notice saying this License
9461
     applies to the Document are reproduced in all copies, and that you
9462
     add no other conditions whatsoever to those of this License.  You
9463
     may not use technical measures to obstruct or control the reading
9464
     or further copying of the copies you make or distribute.  However,
9465
     you may accept compensation in exchange for copies.  If you
9466
     distribute a large enough number of copies you must also follow
9467
     the conditions in section 3.
9468
 
9469
     You may also lend copies, under the same conditions stated above,
9470
     and you may publicly display copies.
9471
 
9472
  3. COPYING IN QUANTITY
9473
 
9474
     If you publish printed copies (or copies in media that commonly
9475
     have printed covers) of the Document, numbering more than 100, and
9476
     the Document's license notice requires Cover Texts, you must
9477
     enclose the copies in covers that carry, clearly and legibly, all
9478
     these Cover Texts: Front-Cover Texts on the front cover, and
9479
     Back-Cover Texts on the back cover.  Both covers must also clearly
9480
     and legibly identify you as the publisher of these copies.  The
9481
     front cover must present the full title with all words of the
9482
     title equally prominent and visible.  You may add other material
9483
     on the covers in addition.  Copying with changes limited to the
9484
     covers, as long as they preserve the title of the Document and
9485
     satisfy these conditions, can be treated as verbatim copying in
9486
     other respects.
9487
 
9488
     If the required texts for either cover are too voluminous to fit
9489
     legibly, you should put the first ones listed (as many as fit
9490
     reasonably) on the actual cover, and continue the rest onto
9491
     adjacent pages.
9492
 
9493
     If you publish or distribute Opaque copies of the Document
9494
     numbering more than 100, you must either include a
9495
     machine-readable Transparent copy along with each Opaque copy, or
9496
     state in or with each Opaque copy a computer-network location from
9497
     which the general network-using public has access to download
9498
     using public-standard network protocols a complete Transparent
9499
     copy of the Document, free of added material.  If you use the
9500
     latter option, you must take reasonably prudent steps, when you
9501
     begin distribution of Opaque copies in quantity, to ensure that
9502
     this Transparent copy will remain thus accessible at the stated
9503
     location until at least one year after the last time you
9504
     distribute an Opaque copy (directly or through your agents or
9505
     retailers) of that edition to the public.
9506
 
9507
     It is requested, but not required, that you contact the authors of
9508
     the Document well before redistributing any large number of
9509
     copies, to give them a chance to provide you with an updated
9510
     version of the Document.
9511
 
9512
  4. MODIFICATIONS
9513
 
9514
     You may copy and distribute a Modified Version of the Document
9515
     under the conditions of sections 2 and 3 above, provided that you
9516
     release the Modified Version under precisely this License, with
9517
     the Modified Version filling the role of the Document, thus
9518
     licensing distribution and modification of the Modified Version to
9519
     whoever possesses a copy of it.  In addition, you must do these
9520
     things in the Modified Version:
9521
 
9522
       A. Use in the Title Page (and on the covers, if any) a title
9523
          distinct from that of the Document, and from those of
9524
          previous versions (which should, if there were any, be listed
9525
          in the History section of the Document).  You may use the
9526
          same title as a previous version if the original publisher of
9527
          that version gives permission.
9528
 
9529
       B. List on the Title Page, as authors, one or more persons or
9530
          entities responsible for authorship of the modifications in
9531
          the Modified Version, together with at least five of the
9532
          principal authors of the Document (all of its principal
9533
          authors, if it has fewer than five), unless they release you
9534
          from this requirement.
9535
 
9536
       C. State on the Title page the name of the publisher of the
9537
          Modified Version, as the publisher.
9538
 
9539
       D. Preserve all the copyright notices of the Document.
9540
 
9541
       E. Add an appropriate copyright notice for your modifications
9542
          adjacent to the other copyright notices.
9543
 
9544
       F. Include, immediately after the copyright notices, a license
9545
          notice giving the public permission to use the Modified
9546
          Version under the terms of this License, in the form shown in
9547
          the Addendum below.
9548
 
9549
       G. Preserve in that license notice the full lists of Invariant
9550
          Sections and required Cover Texts given in the Document's
9551
          license notice.
9552
 
9553
       H. Include an unaltered copy of this License.
9554
 
9555
       I. Preserve the section Entitled "History", Preserve its Title,
9556
          and add to it an item stating at least the title, year, new
9557
          authors, and publisher of the Modified Version as given on
9558
          the Title Page.  If there is no section Entitled "History" in
9559
          the Document, create one stating the title, year, authors,
9560
          and publisher of the Document as given on its Title Page,
9561
          then add an item describing the Modified Version as stated in
9562
          the previous sentence.
9563
 
9564
       J. Preserve the network location, if any, given in the Document
9565
          for public access to a Transparent copy of the Document, and
9566
          likewise the network locations given in the Document for
9567
          previous versions it was based on.  These may be placed in
9568
          the "History" section.  You may omit a network location for a
9569
          work that was published at least four years before the
9570
          Document itself, or if the original publisher of the version
9571
          it refers to gives permission.
9572
 
9573
       K. For any section Entitled "Acknowledgements" or "Dedications",
9574
          Preserve the Title of the section, and preserve in the
9575
          section all the substance and tone of each of the contributor
9576
          acknowledgements and/or dedications given therein.
9577
 
9578
       L. Preserve all the Invariant Sections of the Document,
9579
          unaltered in their text and in their titles.  Section numbers
9580
          or the equivalent are not considered part of the section
9581
          titles.
9582
 
9583
       M. Delete any section Entitled "Endorsements".  Such a section
9584
          may not be included in the Modified Version.
9585
 
9586
       N. Do not retitle any existing section to be Entitled
9587
          "Endorsements" or to conflict in title with any Invariant
9588
          Section.
9589
 
9590
       O. Preserve any Warranty Disclaimers.
9591
 
9592
     If the Modified Version includes new front-matter sections or
9593
     appendices that qualify as Secondary Sections and contain no
9594
     material copied from the Document, you may at your option
9595
     designate some or all of these sections as invariant.  To do this,
9596
     add their titles to the list of Invariant Sections in the Modified
9597
     Version's license notice.  These titles must be distinct from any
9598
     other section titles.
9599
 
9600
     You may add a section Entitled "Endorsements", provided it contains
9601
     nothing but endorsements of your Modified Version by various
9602
     parties--for example, statements of peer review or that the text
9603
     has been approved by an organization as the authoritative
9604
     definition of a standard.
9605
 
9606
     You may add a passage of up to five words as a Front-Cover Text,
9607
     and a passage of up to 25 words as a Back-Cover Text, to the end
9608
     of the list of Cover Texts in the Modified Version.  Only one
9609
     passage of Front-Cover Text and one of Back-Cover Text may be
9610
     added by (or through arrangements made by) any one entity.  If the
9611
     Document already includes a cover text for the same cover,
9612
     previously added by you or by arrangement made by the same entity
9613
     you are acting on behalf of, you may not add another; but you may
9614
     replace the old one, on explicit permission from the previous
9615
     publisher that added the old one.
9616
 
9617
     The author(s) and publisher(s) of the Document do not by this
9618
     License give permission to use their names for publicity for or to
9619
     assert or imply endorsement of any Modified Version.
9620
 
9621
  5. COMBINING DOCUMENTS
9622
 
9623
     You may combine the Document with other documents released under
9624
     this License, under the terms defined in section 4 above for
9625
     modified versions, provided that you include in the combination
9626
     all of the Invariant Sections of all of the original documents,
9627
     unmodified, and list them all as Invariant Sections of your
9628
     combined work in its license notice, and that you preserve all
9629
     their Warranty Disclaimers.
9630
 
9631
     The combined work need only contain one copy of this License, and
9632
     multiple identical Invariant Sections may be replaced with a single
9633
     copy.  If there are multiple Invariant Sections with the same name
9634
     but different contents, make the title of each such section unique
9635
     by adding at the end of it, in parentheses, the name of the
9636
     original author or publisher of that section if known, or else a
9637
     unique number.  Make the same adjustment to the section titles in
9638
     the list of Invariant Sections in the license notice of the
9639
     combined work.
9640
 
9641
     In the combination, you must combine any sections Entitled
9642
     "History" in the various original documents, forming one section
9643
     Entitled "History"; likewise combine any sections Entitled
9644
     "Acknowledgements", and any sections Entitled "Dedications".  You
9645
     must delete all sections Entitled "Endorsements."
9646
 
9647
  6. COLLECTIONS OF DOCUMENTS
9648
 
9649
     You may make a collection consisting of the Document and other
9650
     documents released under this License, and replace the individual
9651
     copies of this License in the various documents with a single copy
9652
     that is included in the collection, provided that you follow the
9653
     rules of this License for verbatim copying of each of the
9654
     documents in all other respects.
9655
 
9656
     You may extract a single document from such a collection, and
9657
     distribute it individually under this License, provided you insert
9658
     a copy of this License into the extracted document, and follow
9659
     this License in all other respects regarding verbatim copying of
9660
     that document.
9661
 
9662
  7. AGGREGATION WITH INDEPENDENT WORKS
9663
 
9664
     A compilation of the Document or its derivatives with other
9665
     separate and independent documents or works, in or on a volume of
9666
     a storage or distribution medium, is called an "aggregate" if the
9667
     copyright resulting from the compilation is not used to limit the
9668
     legal rights of the compilation's users beyond what the individual
9669
     works permit.  When the Document is included in an aggregate, this
9670
     License does not apply to the other works in the aggregate which
9671
     are not themselves derivative works of the Document.
9672
 
9673
     If the Cover Text requirement of section 3 is applicable to these
9674
     copies of the Document, then if the Document is less than one half
9675
     of the entire aggregate, the Document's Cover Texts may be placed
9676
     on covers that bracket the Document within the aggregate, or the
9677
     electronic equivalent of covers if the Document is in electronic
9678
     form.  Otherwise they must appear on printed covers that bracket
9679
     the whole aggregate.
9680
 
9681
  8. TRANSLATION
9682
 
9683
     Translation is considered a kind of modification, so you may
9684
     distribute translations of the Document under the terms of section
9685
     4.  Replacing Invariant Sections with translations requires special
9686
     permission from their copyright holders, but you may include
9687
     translations of some or all Invariant Sections in addition to the
9688
     original versions of these Invariant Sections.  You may include a
9689
     translation of this License, and all the license notices in the
9690
     Document, and any Warranty Disclaimers, provided that you also
9691
     include the original English version of this License and the
9692
     original versions of those notices and disclaimers.  In case of a
9693
     disagreement between the translation and the original version of
9694
     this License or a notice or disclaimer, the original version will
9695
     prevail.
9696
 
9697
     If a section in the Document is Entitled "Acknowledgements",
9698
     "Dedications", or "History", the requirement (section 4) to
9699
     Preserve its Title (section 1) will typically require changing the
9700
     actual title.
9701
 
9702
  9. TERMINATION
9703
 
9704
     You may not copy, modify, sublicense, or distribute the Document
9705
     except as expressly provided under this License.  Any attempt
9706
     otherwise to copy, modify, sublicense, or distribute it is void,
9707
     and will automatically terminate your rights under this License.
9708
 
9709
     However, if you cease all violation of this License, then your
9710
     license from a particular copyright holder is reinstated (a)
9711
     provisionally, unless and until the copyright holder explicitly
9712
     and finally terminates your license, and (b) permanently, if the
9713
     copyright holder fails to notify you of the violation by some
9714
     reasonable means prior to 60 days after the cessation.
9715
 
9716
     Moreover, your license from a particular copyright holder is
9717
     reinstated permanently if the copyright holder notifies you of the
9718
     violation by some reasonable means, this is the first time you have
9719
     received notice of violation of this License (for any work) from
9720
     that copyright holder, and you cure the violation prior to 30 days
9721
     after your receipt of the notice.
9722
 
9723
     Termination of your rights under this section does not terminate
9724
     the licenses of parties who have received copies or rights from
9725
     you under this License.  If your rights have been terminated and
9726
     not permanently reinstated, receipt of a copy of some or all of
9727
     the same material does not give you any rights to use it.
9728
 
9729
 10. FUTURE REVISIONS OF THIS LICENSE
9730
 
9731
     The Free Software Foundation may publish new, revised versions of
9732
     the GNU Free Documentation License from time to time.  Such new
9733
     versions will be similar in spirit to the present version, but may
9734
     differ in detail to address new problems or concerns.  See
9735
     `http://www.gnu.org/copyleft/'.
9736
 
9737
     Each version of the License is given a distinguishing version
9738
     number.  If the Document specifies that a particular numbered
9739
     version of this License "or any later version" applies to it, you
9740
     have the option of following the terms and conditions either of
9741
     that specified version or of any later version that has been
9742
     published (not as a draft) by the Free Software Foundation.  If
9743
     the Document does not specify a version number of this License,
9744
     you may choose any version ever published (not as a draft) by the
9745
     Free Software Foundation.  If the Document specifies that a proxy
9746
     can decide which future versions of this License can be used, that
9747
     proxy's public statement of acceptance of a version permanently
9748
     authorizes you to choose that version for the Document.
9749
 
9750
 11. RELICENSING
9751
 
9752
     "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
9753
     World Wide Web server that publishes copyrightable works and also
9754
     provides prominent facilities for anybody to edit those works.  A
9755
     public wiki that anybody can edit is an example of such a server.
9756
     A "Massive Multiauthor Collaboration" (or "MMC") contained in the
9757
     site means any set of copyrightable works thus published on the MMC
9758
     site.
9759
 
9760
     "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
9761
     license published by Creative Commons Corporation, a not-for-profit
9762
     corporation with a principal place of business in San Francisco,
9763
     California, as well as future copyleft versions of that license
9764
     published by that same organization.
9765
 
9766
     "Incorporate" means to publish or republish a Document, in whole or
9767
     in part, as part of another Document.
9768
 
9769
     An MMC is "eligible for relicensing" if it is licensed under this
9770
     License, and if all works that were first published under this
9771
     License somewhere other than this MMC, and subsequently
9772
     incorporated in whole or in part into the MMC, (1) had no cover
9773
     texts or invariant sections, and (2) were thus incorporated prior
9774
     to November 1, 2008.
9775
 
9776
     The operator of an MMC Site may republish an MMC contained in the
9777
     site under CC-BY-SA on the same site at any time before August 1,
9778
     2009, provided the MMC is eligible for relicensing.
9779
 
9780
 
9781
ADDENDUM: How to use this License for your documents
9782
====================================================
9783
 
9784
To use this License in a document you have written, include a copy of
9785
the License in the document and put the following copyright and license
9786
notices just after the title page:
9787
 
9788
       Copyright (C)  YEAR  YOUR NAME.
9789
       Permission is granted to copy, distribute and/or modify this document
9790
       under the terms of the GNU Free Documentation License, Version 1.3
9791
       or any later version published by the Free Software Foundation;
9792
       with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
9793
       Texts.  A copy of the license is included in the section entitled ``GNU
9794
       Free Documentation License''.
9795
 
9796
   If you have Invariant Sections, Front-Cover Texts and Back-Cover
9797
Texts, replace the "with...Texts." line with this:
9798
 
9799
         with the Invariant Sections being LIST THEIR TITLES, with
9800
         the Front-Cover Texts being LIST, and with the Back-Cover Texts
9801
         being LIST.
9802
 
9803
   If you have Invariant Sections without Cover Texts, or some other
9804
combination of the three, merge those two alternatives to suit the
9805
situation.
9806
 
9807
   If your document contains nontrivial examples of program code, we
9808
recommend releasing these examples in parallel under your choice of
9809
free software license, such as the GNU General Public License, to
9810
permit their use in free software.
9811
 
9812

9813
File: bfd.info,  Node: BFD Index,  Prev: GNU Free Documentation License,  Up: Top
9814
 
9815
BFD Index
9816
*********
9817
 
9818
 
9819
* Menu:
9820
9821
* _bfd_final_link_relocate:              Relocating the section contents.
9822
                                                             (line   22)
9823
* _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
9824
                                                             (line   12)
9825
* _bfd_generic_link_add_one_symbol:      Adding symbols from an object file.
9826
                                                             (line   19)
9827
* _bfd_generic_make_empty_symbol:        symbol handling functions.
9828
                                                             (line   92)
9829
* _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
9830
                                                             (line    6)
9831
* _bfd_link_final_link in target vector: Performing the Final Link.
9832
                                                             (line    6)
9833
* _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
9834
                                                             (line    6)
9835
* _bfd_relocate_contents:                Relocating the section contents.
9836
                                                             (line   22)
9837
* aout_SIZE_machine_type:                aout.               (line  147)
9838
* aout_SIZE_mkobject:                    aout.               (line  139)
9839
* aout_SIZE_new_section_hook:            aout.               (line  177)
9840
* aout_SIZE_set_arch_mach:               aout.               (line  164)
9841
* aout_SIZE_some_aout_object_p:          aout.               (line  125)
9842
* aout_SIZE_swap_exec_header_in:         aout.               (line  101)
9843
* aout_SIZE_swap_exec_header_out:        aout.               (line  113)
9844
* arelent_chain:                         typedef arelent.    (line  336)
9845
* BFD:                                   Overview.           (line    6)
9846
* BFD canonical format:                  Canonical format.   (line   11)
9847
* bfd_alloc:                             Opening and Closing.
9848
                                                             (line  211)
9849
* bfd_alloc2:                            Opening and Closing.
9850
                                                             (line  220)
9851
* bfd_alt_mach_code:                     BFD front end.      (line  693)
9852
* bfd_arch_bits_per_address:             Architectures.      (line  519)
9853
* bfd_arch_bits_per_byte:                Architectures.      (line  511)
9854
* bfd_arch_get_compatible:               Architectures.      (line  454)
9855
* bfd_arch_list:                         Architectures.      (line  445)
9856
* bfd_arch_mach_octets_per_byte:         Architectures.      (line  588)
9857 512 jeremybenn
* BFD_ARELOC_BFIN_ADD:                   howto manager.      (line 1016)
9858
* BFD_ARELOC_BFIN_ADDR:                  howto manager.      (line 1067)
9859
* BFD_ARELOC_BFIN_AND:                   howto manager.      (line 1037)
9860
* BFD_ARELOC_BFIN_COMP:                  howto manager.      (line 1058)
9861
* BFD_ARELOC_BFIN_CONST:                 howto manager.      (line 1013)
9862
* BFD_ARELOC_BFIN_DIV:                   howto manager.      (line 1025)
9863
* BFD_ARELOC_BFIN_HWPAGE:                howto manager.      (line 1064)
9864
* BFD_ARELOC_BFIN_LAND:                  howto manager.      (line 1046)
9865
* BFD_ARELOC_BFIN_LEN:                   howto manager.      (line 1052)
9866
* BFD_ARELOC_BFIN_LOR:                   howto manager.      (line 1049)
9867
* BFD_ARELOC_BFIN_LSHIFT:                howto manager.      (line 1031)
9868
* BFD_ARELOC_BFIN_MOD:                   howto manager.      (line 1028)
9869
* BFD_ARELOC_BFIN_MULT:                  howto manager.      (line 1022)
9870
* BFD_ARELOC_BFIN_NEG:                   howto manager.      (line 1055)
9871
* BFD_ARELOC_BFIN_OR:                    howto manager.      (line 1040)
9872
* BFD_ARELOC_BFIN_PAGE:                  howto manager.      (line 1061)
9873
* BFD_ARELOC_BFIN_PUSH:                  howto manager.      (line 1010)
9874
* BFD_ARELOC_BFIN_RSHIFT:                howto manager.      (line 1034)
9875
* BFD_ARELOC_BFIN_SUB:                   howto manager.      (line 1019)
9876
* BFD_ARELOC_BFIN_XOR:                   howto manager.      (line 1043)
9877 330 jeremybenn
* bfd_cache_close:                       File Caching.       (line   26)
9878
* bfd_cache_close_all:                   File Caching.       (line   39)
9879
* bfd_cache_init:                        File Caching.       (line   18)
9880
* bfd_calc_gnu_debuglink_crc32:          Opening and Closing.
9881
                                                             (line  247)
9882
* bfd_canonicalize_reloc:                BFD front end.      (line  412)
9883
* bfd_canonicalize_symtab:               symbol handling functions.
9884
                                                             (line   50)
9885
* bfd_check_format:                      Formats.            (line   21)
9886
* bfd_check_format_matches:              Formats.            (line   52)
9887
* bfd_check_overflow:                    typedef arelent.    (line  348)
9888
* bfd_close:                             Opening and Closing.
9889
                                                             (line  136)
9890
* bfd_close_all_done:                    Opening and Closing.
9891
                                                             (line  154)
9892
* bfd_coff_backend_data:                 coff.               (line  304)
9893
* bfd_copy_private_bfd_data:             BFD front end.      (line  551)
9894
* bfd_copy_private_header_data:          BFD front end.      (line  533)
9895
* bfd_copy_private_section_data:         section prototypes. (line  255)
9896
* bfd_copy_private_symbol_data:          symbol handling functions.
9897
                                                             (line  140)
9898
* bfd_core_file_failing_command:         Core Files.         (line   12)
9899
* bfd_core_file_failing_signal:          Core Files.         (line   21)
9900
* bfd_create:                            Opening and Closing.
9901
                                                             (line  173)
9902
* bfd_create_gnu_debuglink_section:      Opening and Closing.
9903
                                                             (line  313)
9904
* bfd_decode_symclass:                   symbol handling functions.
9905
                                                             (line  111)
9906
* bfd_default_arch_struct:               Architectures.      (line  466)
9907
* bfd_default_compatible:                Architectures.      (line  528)
9908 512 jeremybenn
* bfd_default_reloc_type_lookup:         howto manager.      (line 2339)
9909 330 jeremybenn
* bfd_default_scan:                      Architectures.      (line  537)
9910
* bfd_default_set_arch_mach:             Architectures.      (line  484)
9911
* bfd_demangle:                          BFD front end.      (line  791)
9912
* bfd_emul_get_commonpagesize:           BFD front end.      (line  771)
9913
* bfd_emul_get_maxpagesize:              BFD front end.      (line  751)
9914
* bfd_emul_set_commonpagesize:           BFD front end.      (line  782)
9915
* bfd_emul_set_maxpagesize:              BFD front end.      (line  762)
9916
* bfd_errmsg:                            BFD front end.      (line  337)
9917
* bfd_fdopenr:                           Opening and Closing.
9918
                                                             (line   46)
9919
* bfd_fill_in_gnu_debuglink_section:     Opening and Closing.
9920
                                                             (line  327)
9921
* bfd_find_target:                       bfd_target.         (line  454)
9922
* bfd_find_version_for_sym:              Writing the symbol table.
9923
                                                             (line   80)
9924
* bfd_follow_gnu_debuglink:              Opening and Closing.
9925
                                                             (line  292)
9926
* bfd_fopen:                             Opening and Closing.
9927
                                                             (line    9)
9928
* bfd_format_string:                     Formats.            (line   79)
9929
* bfd_generic_define_common_symbol:      Writing the symbol table.
9930
                                                             (line   67)
9931
* bfd_generic_discard_group:             section prototypes. (line  281)
9932 512 jeremybenn
* bfd_generic_gc_sections:               howto manager.      (line 2370)
9933
* bfd_generic_get_relocated_section_contents: howto manager. (line 2390)
9934 330 jeremybenn
* bfd_generic_is_group_section:          section prototypes. (line  273)
9935 512 jeremybenn
* bfd_generic_merge_sections:            howto manager.      (line 2380)
9936
* bfd_generic_relax_section:             howto manager.      (line 2357)
9937 330 jeremybenn
* bfd_get_arch:                          Architectures.      (line  495)
9938
* bfd_get_arch_info:                     Architectures.      (line  547)
9939
* bfd_get_arch_size:                     BFD front end.      (line  456)
9940
* bfd_get_error:                         BFD front end.      (line  318)
9941
* bfd_get_error_handler:                 BFD front end.      (line  388)
9942
* bfd_get_gp_size:                       BFD front end.      (line  497)
9943
* bfd_get_mach:                          Architectures.      (line  503)
9944
* bfd_get_mtime:                         BFD front end.      (line  836)
9945
* bfd_get_next_mapent:                   Archives.           (line   52)
9946 512 jeremybenn
* bfd_get_reloc_code_name:               howto manager.      (line 2348)
9947 330 jeremybenn
* bfd_get_reloc_size:                    typedef arelent.    (line  327)
9948
* bfd_get_reloc_upper_bound:             BFD front end.      (line  402)
9949
* bfd_get_section_by_name:               section prototypes. (line   17)
9950
* bfd_get_section_by_name_if:            section prototypes. (line   31)
9951
* bfd_get_section_contents:              section prototypes. (line  228)
9952
* bfd_get_sign_extend_vma:               BFD front end.      (line  469)
9953
* bfd_get_size <1>:                      Internal.           (line   25)
9954
* bfd_get_size:                          BFD front end.      (line  845)
9955
* bfd_get_symtab_upper_bound:            symbol handling functions.
9956
                                                             (line    6)
9957
* bfd_get_target_info:                   bfd_target.         (line  470)
9958
* bfd_get_unique_section_name:           section prototypes. (line   50)
9959
* bfd_h_put_size:                        Internal.           (line   97)
9960
* bfd_hash_allocate:                     Creating and Freeing a Hash Table.
9961
                                                             (line   17)
9962
* bfd_hash_lookup:                       Looking Up or Entering a String.
9963
                                                             (line    6)
9964
* bfd_hash_newfunc:                      Creating and Freeing a Hash Table.
9965
                                                             (line   12)
9966
* bfd_hash_set_default_size:             Creating and Freeing a Hash Table.
9967
                                                             (line   25)
9968
* bfd_hash_table_free:                   Creating and Freeing a Hash Table.
9969
                                                             (line   21)
9970
* bfd_hash_table_init:                   Creating and Freeing a Hash Table.
9971
                                                             (line    6)
9972
* bfd_hash_table_init_n:                 Creating and Freeing a Hash Table.
9973
                                                             (line    6)
9974
* bfd_hash_traverse:                     Traversing a Hash Table.
9975
                                                             (line    6)
9976
* bfd_init:                              Initialization.     (line   11)
9977
* bfd_install_relocation:                typedef arelent.    (line  389)
9978
* bfd_is_local_label:                    symbol handling functions.
9979
                                                             (line   17)
9980
* bfd_is_local_label_name:               symbol handling functions.
9981
                                                             (line   26)
9982
* bfd_is_target_special_symbol:          symbol handling functions.
9983
                                                             (line   38)
9984
* bfd_is_undefined_symclass:             symbol handling functions.
9985
                                                             (line  120)
9986
* bfd_link_split_section:                Writing the symbol table.
9987
                                                             (line   44)
9988
* bfd_log2:                              Internal.           (line  164)
9989
* bfd_lookup_arch:                       Architectures.      (line  555)
9990
* bfd_make_debug_symbol:                 symbol handling functions.
9991
                                                             (line  102)
9992
* bfd_make_empty_symbol:                 symbol handling functions.
9993
                                                             (line   78)
9994
* bfd_make_readable:                     Opening and Closing.
9995
                                                             (line  197)
9996
* bfd_make_section:                      section prototypes. (line  129)
9997
* bfd_make_section_anyway:               section prototypes. (line  100)
9998
* bfd_make_section_anyway_with_flags:    section prototypes. (line   82)
9999
* bfd_make_section_old_way:              section prototypes. (line   62)
10000
* bfd_make_section_with_flags:           section prototypes. (line  116)
10001
* bfd_make_writable:                     Opening and Closing.
10002
                                                             (line  183)
10003
* bfd_malloc_and_get_section:            section prototypes. (line  245)
10004
* bfd_map_over_sections:                 section prototypes. (line  155)
10005
* bfd_merge_private_bfd_data:            BFD front end.      (line  567)
10006
* bfd_mmap:                              BFD front end.      (line  874)
10007
* bfd_octets_per_byte:                   Architectures.      (line  578)
10008
* bfd_open_file:                         File Caching.       (line   52)
10009
* bfd_openr:                             Opening and Closing.
10010
                                                             (line   30)
10011
* bfd_openr_iovec:                       Opening and Closing.
10012
                                                             (line   76)
10013
* bfd_openr_next_archived_file:          Archives.           (line   78)
10014
* bfd_openstreamr:                       Opening and Closing.
10015
                                                             (line   67)
10016
* bfd_openw:                             Opening and Closing.
10017
                                                             (line  124)
10018
* bfd_perform_relocation:                typedef arelent.    (line  364)
10019
* bfd_perror:                            BFD front end.      (line  346)
10020
* bfd_preserve_finish:                   BFD front end.      (line  741)
10021
* bfd_preserve_restore:                  BFD front end.      (line  731)
10022
* bfd_preserve_save:                     BFD front end.      (line  715)
10023
* bfd_print_symbol_vandf:                symbol handling functions.
10024
                                                             (line   70)
10025
* bfd_printable_arch_mach:               Architectures.      (line  566)
10026
* bfd_printable_name:                    Architectures.      (line  426)
10027
* bfd_put_size:                          Internal.           (line   22)
10028
* BFD_RELOC_12_PCREL:                    howto manager.      (line   39)
10029
* BFD_RELOC_14:                          howto manager.      (line   31)
10030
* BFD_RELOC_16:                          howto manager.      (line   30)
10031
* BFD_RELOC_16_BASEREL:                  howto manager.      (line   95)
10032
* BFD_RELOC_16_GOT_PCREL:                howto manager.      (line   52)
10033
* BFD_RELOC_16_GOTOFF:                   howto manager.      (line   55)
10034
* BFD_RELOC_16_PCREL:                    howto manager.      (line   38)
10035
* BFD_RELOC_16_PCREL_S2:                 howto manager.      (line  107)
10036
* BFD_RELOC_16_PLT_PCREL:                howto manager.      (line   63)
10037
* BFD_RELOC_16_PLTOFF:                   howto manager.      (line   67)
10038 512 jeremybenn
* BFD_RELOC_16C_ABS20:                   howto manager.      (line 1903)
10039
* BFD_RELOC_16C_ABS20_C:                 howto manager.      (line 1904)
10040
* BFD_RELOC_16C_ABS24:                   howto manager.      (line 1905)
10041
* BFD_RELOC_16C_ABS24_C:                 howto manager.      (line 1906)
10042
* BFD_RELOC_16C_DISP04:                  howto manager.      (line 1883)
10043
* BFD_RELOC_16C_DISP04_C:                howto manager.      (line 1884)
10044
* BFD_RELOC_16C_DISP08:                  howto manager.      (line 1885)
10045
* BFD_RELOC_16C_DISP08_C:                howto manager.      (line 1886)
10046
* BFD_RELOC_16C_DISP16:                  howto manager.      (line 1887)
10047
* BFD_RELOC_16C_DISP16_C:                howto manager.      (line 1888)
10048
* BFD_RELOC_16C_DISP24:                  howto manager.      (line 1889)
10049
* BFD_RELOC_16C_DISP24_C:                howto manager.      (line 1890)
10050
* BFD_RELOC_16C_DISP24a:                 howto manager.      (line 1891)
10051
* BFD_RELOC_16C_DISP24a_C:               howto manager.      (line 1892)
10052
* BFD_RELOC_16C_IMM04:                   howto manager.      (line 1907)
10053
* BFD_RELOC_16C_IMM04_C:                 howto manager.      (line 1908)
10054
* BFD_RELOC_16C_IMM16:                   howto manager.      (line 1909)
10055
* BFD_RELOC_16C_IMM16_C:                 howto manager.      (line 1910)
10056
* BFD_RELOC_16C_IMM20:                   howto manager.      (line 1911)
10057
* BFD_RELOC_16C_IMM20_C:                 howto manager.      (line 1912)
10058
* BFD_RELOC_16C_IMM24:                   howto manager.      (line 1913)
10059
* BFD_RELOC_16C_IMM24_C:                 howto manager.      (line 1914)
10060
* BFD_RELOC_16C_IMM32:                   howto manager.      (line 1915)
10061
* BFD_RELOC_16C_IMM32_C:                 howto manager.      (line 1916)
10062
* BFD_RELOC_16C_NUM08:                   howto manager.      (line 1877)
10063
* BFD_RELOC_16C_NUM08_C:                 howto manager.      (line 1878)
10064
* BFD_RELOC_16C_NUM16:                   howto manager.      (line 1879)
10065
* BFD_RELOC_16C_NUM16_C:                 howto manager.      (line 1880)
10066
* BFD_RELOC_16C_NUM32:                   howto manager.      (line 1881)
10067
* BFD_RELOC_16C_NUM32_C:                 howto manager.      (line 1882)
10068
* BFD_RELOC_16C_REG04:                   howto manager.      (line 1893)
10069
* BFD_RELOC_16C_REG04_C:                 howto manager.      (line 1894)
10070
* BFD_RELOC_16C_REG04a:                  howto manager.      (line 1895)
10071
* BFD_RELOC_16C_REG04a_C:                howto manager.      (line 1896)
10072
* BFD_RELOC_16C_REG14:                   howto manager.      (line 1897)
10073
* BFD_RELOC_16C_REG14_C:                 howto manager.      (line 1898)
10074
* BFD_RELOC_16C_REG16:                   howto manager.      (line 1899)
10075
* BFD_RELOC_16C_REG16_C:                 howto manager.      (line 1900)
10076
* BFD_RELOC_16C_REG20:                   howto manager.      (line 1901)
10077
* BFD_RELOC_16C_REG20_C:                 howto manager.      (line 1902)
10078 330 jeremybenn
* BFD_RELOC_23_PCREL_S2:                 howto manager.      (line  108)
10079
* BFD_RELOC_24:                          howto manager.      (line   29)
10080
* BFD_RELOC_24_PCREL:                    howto manager.      (line   37)
10081
* BFD_RELOC_24_PLT_PCREL:                howto manager.      (line   62)
10082
* BFD_RELOC_26:                          howto manager.      (line   28)
10083 512 jeremybenn
* BFD_RELOC_28_PCREL_S2:                 howto manager.      (line  109)
10084 330 jeremybenn
* BFD_RELOC_32:                          howto manager.      (line   27)
10085
* BFD_RELOC_32_BASEREL:                  howto manager.      (line   94)
10086
* BFD_RELOC_32_GOT_PCREL:                howto manager.      (line   51)
10087
* BFD_RELOC_32_GOTOFF:                   howto manager.      (line   54)
10088
* BFD_RELOC_32_PCREL:                    howto manager.      (line   36)
10089
* BFD_RELOC_32_PCREL_S2:                 howto manager.      (line  106)
10090
* BFD_RELOC_32_PLT_PCREL:                howto manager.      (line   61)
10091
* BFD_RELOC_32_PLTOFF:                   howto manager.      (line   66)
10092
* BFD_RELOC_32_SECREL:                   howto manager.      (line   48)
10093 512 jeremybenn
* BFD_RELOC_386_COPY:                    howto manager.      (line  508)
10094
* BFD_RELOC_386_GLOB_DAT:                howto manager.      (line  509)
10095
* BFD_RELOC_386_GOT32:                   howto manager.      (line  506)
10096
* BFD_RELOC_386_GOTOFF:                  howto manager.      (line  512)
10097
* BFD_RELOC_386_GOTPC:                   howto manager.      (line  513)
10098
* BFD_RELOC_386_IRELATIVE:               howto manager.      (line  529)
10099
* BFD_RELOC_386_JUMP_SLOT:               howto manager.      (line  510)
10100
* BFD_RELOC_386_PLT32:                   howto manager.      (line  507)
10101
* BFD_RELOC_386_RELATIVE:                howto manager.      (line  511)
10102
* BFD_RELOC_386_TLS_DESC:                howto manager.      (line  528)
10103
* BFD_RELOC_386_TLS_DESC_CALL:           howto manager.      (line  527)
10104
* BFD_RELOC_386_TLS_DTPMOD32:            howto manager.      (line  523)
10105
* BFD_RELOC_386_TLS_DTPOFF32:            howto manager.      (line  524)
10106
* BFD_RELOC_386_TLS_GD:                  howto manager.      (line  518)
10107
* BFD_RELOC_386_TLS_GOTDESC:             howto manager.      (line  526)
10108
* BFD_RELOC_386_TLS_GOTIE:               howto manager.      (line  516)
10109
* BFD_RELOC_386_TLS_IE:                  howto manager.      (line  515)
10110
* BFD_RELOC_386_TLS_IE_32:               howto manager.      (line  521)
10111
* BFD_RELOC_386_TLS_LDM:                 howto manager.      (line  519)
10112
* BFD_RELOC_386_TLS_LDO_32:              howto manager.      (line  520)
10113
* BFD_RELOC_386_TLS_LE:                  howto manager.      (line  517)
10114
* BFD_RELOC_386_TLS_LE_32:               howto manager.      (line  522)
10115
* BFD_RELOC_386_TLS_TPOFF:               howto manager.      (line  514)
10116
* BFD_RELOC_386_TLS_TPOFF32:             howto manager.      (line  525)
10117
* BFD_RELOC_390_12:                      howto manager.      (line 1563)
10118
* BFD_RELOC_390_20:                      howto manager.      (line 1663)
10119
* BFD_RELOC_390_COPY:                    howto manager.      (line 1572)
10120
* BFD_RELOC_390_GLOB_DAT:                howto manager.      (line 1575)
10121
* BFD_RELOC_390_GOT12:                   howto manager.      (line 1566)
10122
* BFD_RELOC_390_GOT16:                   howto manager.      (line 1587)
10123
* BFD_RELOC_390_GOT20:                   howto manager.      (line 1664)
10124
* BFD_RELOC_390_GOT64:                   howto manager.      (line 1605)
10125
* BFD_RELOC_390_GOTENT:                  howto manager.      (line 1611)
10126
* BFD_RELOC_390_GOTOFF64:                howto manager.      (line 1614)
10127
* BFD_RELOC_390_GOTPC:                   howto manager.      (line 1584)
10128
* BFD_RELOC_390_GOTPCDBL:                howto manager.      (line 1602)
10129
* BFD_RELOC_390_GOTPLT12:                howto manager.      (line 1617)
10130
* BFD_RELOC_390_GOTPLT16:                howto manager.      (line 1620)
10131
* BFD_RELOC_390_GOTPLT20:                howto manager.      (line 1665)
10132
* BFD_RELOC_390_GOTPLT32:                howto manager.      (line 1623)
10133
* BFD_RELOC_390_GOTPLT64:                howto manager.      (line 1626)
10134
* BFD_RELOC_390_GOTPLTENT:               howto manager.      (line 1629)
10135
* BFD_RELOC_390_JMP_SLOT:                howto manager.      (line 1578)
10136
* BFD_RELOC_390_PC16DBL:                 howto manager.      (line 1590)
10137
* BFD_RELOC_390_PC32DBL:                 howto manager.      (line 1596)
10138
* BFD_RELOC_390_PLT16DBL:                howto manager.      (line 1593)
10139
* BFD_RELOC_390_PLT32:                   howto manager.      (line 1569)
10140
* BFD_RELOC_390_PLT32DBL:                howto manager.      (line 1599)
10141
* BFD_RELOC_390_PLT64:                   howto manager.      (line 1608)
10142
* BFD_RELOC_390_PLTOFF16:                howto manager.      (line 1632)
10143
* BFD_RELOC_390_PLTOFF32:                howto manager.      (line 1635)
10144
* BFD_RELOC_390_PLTOFF64:                howto manager.      (line 1638)
10145
* BFD_RELOC_390_RELATIVE:                howto manager.      (line 1581)
10146
* BFD_RELOC_390_TLS_DTPMOD:              howto manager.      (line 1658)
10147
* BFD_RELOC_390_TLS_DTPOFF:              howto manager.      (line 1659)
10148
* BFD_RELOC_390_TLS_GD32:                howto manager.      (line 1644)
10149
* BFD_RELOC_390_TLS_GD64:                howto manager.      (line 1645)
10150
* BFD_RELOC_390_TLS_GDCALL:              howto manager.      (line 1642)
10151
* BFD_RELOC_390_TLS_GOTIE12:             howto manager.      (line 1646)
10152
* BFD_RELOC_390_TLS_GOTIE20:             howto manager.      (line 1666)
10153
* BFD_RELOC_390_TLS_GOTIE32:             howto manager.      (line 1647)
10154
* BFD_RELOC_390_TLS_GOTIE64:             howto manager.      (line 1648)
10155
* BFD_RELOC_390_TLS_IE32:                howto manager.      (line 1651)
10156
* BFD_RELOC_390_TLS_IE64:                howto manager.      (line 1652)
10157
* BFD_RELOC_390_TLS_IEENT:               howto manager.      (line 1653)
10158
* BFD_RELOC_390_TLS_LDCALL:              howto manager.      (line 1643)
10159
* BFD_RELOC_390_TLS_LDM32:               howto manager.      (line 1649)
10160
* BFD_RELOC_390_TLS_LDM64:               howto manager.      (line 1650)
10161
* BFD_RELOC_390_TLS_LDO32:               howto manager.      (line 1656)
10162
* BFD_RELOC_390_TLS_LDO64:               howto manager.      (line 1657)
10163
* BFD_RELOC_390_TLS_LE32:                howto manager.      (line 1654)
10164
* BFD_RELOC_390_TLS_LE64:                howto manager.      (line 1655)
10165
* BFD_RELOC_390_TLS_LOAD:                howto manager.      (line 1641)
10166
* BFD_RELOC_390_TLS_TPOFF:               howto manager.      (line 1660)
10167 330 jeremybenn
* BFD_RELOC_64:                          howto manager.      (line   26)
10168
* BFD_RELOC_64_PCREL:                    howto manager.      (line   35)
10169
* BFD_RELOC_64_PLT_PCREL:                howto manager.      (line   60)
10170
* BFD_RELOC_64_PLTOFF:                   howto manager.      (line   65)
10171
* BFD_RELOC_68K_GLOB_DAT:                howto manager.      (line   74)
10172
* BFD_RELOC_68K_JMP_SLOT:                howto manager.      (line   75)
10173
* BFD_RELOC_68K_RELATIVE:                howto manager.      (line   76)
10174
* BFD_RELOC_68K_TLS_GD16:                howto manager.      (line   78)
10175
* BFD_RELOC_68K_TLS_GD32:                howto manager.      (line   77)
10176
* BFD_RELOC_68K_TLS_GD8:                 howto manager.      (line   79)
10177
* BFD_RELOC_68K_TLS_IE16:                howto manager.      (line   87)
10178
* BFD_RELOC_68K_TLS_IE32:                howto manager.      (line   86)
10179
* BFD_RELOC_68K_TLS_IE8:                 howto manager.      (line   88)
10180
* BFD_RELOC_68K_TLS_LDM16:               howto manager.      (line   81)
10181
* BFD_RELOC_68K_TLS_LDM32:               howto manager.      (line   80)
10182
* BFD_RELOC_68K_TLS_LDM8:                howto manager.      (line   82)
10183
* BFD_RELOC_68K_TLS_LDO16:               howto manager.      (line   84)
10184
* BFD_RELOC_68K_TLS_LDO32:               howto manager.      (line   83)
10185
* BFD_RELOC_68K_TLS_LDO8:                howto manager.      (line   85)
10186
* BFD_RELOC_68K_TLS_LE16:                howto manager.      (line   90)
10187
* BFD_RELOC_68K_TLS_LE32:                howto manager.      (line   89)
10188
* BFD_RELOC_68K_TLS_LE8:                 howto manager.      (line   91)
10189
* BFD_RELOC_8:                           howto manager.      (line   32)
10190 512 jeremybenn
* BFD_RELOC_860_COPY:                    howto manager.      (line 2031)
10191
* BFD_RELOC_860_GLOB_DAT:                howto manager.      (line 2032)
10192
* BFD_RELOC_860_HAGOT:                   howto manager.      (line 2057)
10193
* BFD_RELOC_860_HAGOTOFF:                howto manager.      (line 2058)
10194
* BFD_RELOC_860_HAPC:                    howto manager.      (line 2059)
10195
* BFD_RELOC_860_HIGH:                    howto manager.      (line 2060)
10196
* BFD_RELOC_860_HIGHADJ:                 howto manager.      (line 2056)
10197
* BFD_RELOC_860_HIGOT:                   howto manager.      (line 2061)
10198
* BFD_RELOC_860_HIGOTOFF:                howto manager.      (line 2062)
10199
* BFD_RELOC_860_JUMP_SLOT:               howto manager.      (line 2033)
10200
* BFD_RELOC_860_LOGOT0:                  howto manager.      (line 2045)
10201
* BFD_RELOC_860_LOGOT1:                  howto manager.      (line 2047)
10202
* BFD_RELOC_860_LOGOTOFF0:               howto manager.      (line 2049)
10203
* BFD_RELOC_860_LOGOTOFF1:               howto manager.      (line 2051)
10204
* BFD_RELOC_860_LOGOTOFF2:               howto manager.      (line 2053)
10205
* BFD_RELOC_860_LOGOTOFF3:               howto manager.      (line 2054)
10206
* BFD_RELOC_860_LOPC:                    howto manager.      (line 2055)
10207
* BFD_RELOC_860_LOW0:                    howto manager.      (line 2038)
10208
* BFD_RELOC_860_LOW1:                    howto manager.      (line 2040)
10209
* BFD_RELOC_860_LOW2:                    howto manager.      (line 2042)
10210
* BFD_RELOC_860_LOW3:                    howto manager.      (line 2044)
10211
* BFD_RELOC_860_PC16:                    howto manager.      (line 2037)
10212
* BFD_RELOC_860_PC26:                    howto manager.      (line 2035)
10213
* BFD_RELOC_860_PLT26:                   howto manager.      (line 2036)
10214
* BFD_RELOC_860_RELATIVE:                howto manager.      (line 2034)
10215
* BFD_RELOC_860_SPGOT0:                  howto manager.      (line 2046)
10216
* BFD_RELOC_860_SPGOT1:                  howto manager.      (line 2048)
10217
* BFD_RELOC_860_SPGOTOFF0:               howto manager.      (line 2050)
10218
* BFD_RELOC_860_SPGOTOFF1:               howto manager.      (line 2052)
10219
* BFD_RELOC_860_SPLIT0:                  howto manager.      (line 2039)
10220
* BFD_RELOC_860_SPLIT1:                  howto manager.      (line 2041)
10221
* BFD_RELOC_860_SPLIT2:                  howto manager.      (line 2043)
10222 330 jeremybenn
* BFD_RELOC_8_BASEREL:                   howto manager.      (line   99)
10223
* BFD_RELOC_8_FFnn:                      howto manager.      (line  103)
10224
* BFD_RELOC_8_GOT_PCREL:                 howto manager.      (line   53)
10225
* BFD_RELOC_8_GOTOFF:                    howto manager.      (line   59)
10226
* BFD_RELOC_8_PCREL:                     howto manager.      (line   40)
10227
* BFD_RELOC_8_PLT_PCREL:                 howto manager.      (line   64)
10228
* BFD_RELOC_8_PLTOFF:                    howto manager.      (line   71)
10229 512 jeremybenn
* BFD_RELOC_ALPHA_BOH:                   howto manager.      (line  316)
10230
* BFD_RELOC_ALPHA_BRSGP:                 howto manager.      (line  299)
10231
* BFD_RELOC_ALPHA_BSR:                   howto manager.      (line  308)
10232
* BFD_RELOC_ALPHA_CODEADDR:              howto manager.      (line  290)
10233
* BFD_RELOC_ALPHA_DTPMOD64:              howto manager.      (line  322)
10234
* BFD_RELOC_ALPHA_DTPREL16:              howto manager.      (line  327)
10235
* BFD_RELOC_ALPHA_DTPREL64:              howto manager.      (line  324)
10236
* BFD_RELOC_ALPHA_DTPREL_HI16:           howto manager.      (line  325)
10237
* BFD_RELOC_ALPHA_DTPREL_LO16:           howto manager.      (line  326)
10238
* BFD_RELOC_ALPHA_ELF_LITERAL:           howto manager.      (line  255)
10239
* BFD_RELOC_ALPHA_GOTDTPREL16:           howto manager.      (line  323)
10240
* BFD_RELOC_ALPHA_GOTTPREL16:            howto manager.      (line  328)
10241
* BFD_RELOC_ALPHA_GPDISP:                howto manager.      (line  249)
10242
* BFD_RELOC_ALPHA_GPDISP_HI16:           howto manager.      (line  235)
10243
* BFD_RELOC_ALPHA_GPDISP_LO16:           howto manager.      (line  243)
10244
* BFD_RELOC_ALPHA_GPREL_HI16:            howto manager.      (line  294)
10245
* BFD_RELOC_ALPHA_GPREL_LO16:            howto manager.      (line  295)
10246
* BFD_RELOC_ALPHA_HINT:                  howto manager.      (line  281)
10247
* BFD_RELOC_ALPHA_LDA:                   howto manager.      (line  312)
10248
* BFD_RELOC_ALPHA_LINKAGE:               howto manager.      (line  286)
10249
* BFD_RELOC_ALPHA_LITERAL:               howto manager.      (line  254)
10250
* BFD_RELOC_ALPHA_LITUSE:                howto manager.      (line  256)
10251
* BFD_RELOC_ALPHA_NOP:                   howto manager.      (line  304)
10252
* BFD_RELOC_ALPHA_TLSGD:                 howto manager.      (line  320)
10253
* BFD_RELOC_ALPHA_TLSLDM:                howto manager.      (line  321)
10254
* BFD_RELOC_ALPHA_TPREL16:               howto manager.      (line  332)
10255
* BFD_RELOC_ALPHA_TPREL64:               howto manager.      (line  329)
10256
* BFD_RELOC_ALPHA_TPREL_HI16:            howto manager.      (line  330)
10257
* BFD_RELOC_ALPHA_TPREL_LO16:            howto manager.      (line  331)
10258
* BFD_RELOC_ARC_B22_PCREL:               howto manager.      (line  945)
10259
* BFD_RELOC_ARC_B26:                     howto manager.      (line  950)
10260
* BFD_RELOC_ARM_ADR_IMM:                 howto manager.      (line  831)
10261
* BFD_RELOC_ARM_ADRL_IMMEDIATE:          howto manager.      (line  818)
10262
* BFD_RELOC_ARM_ALU_PC_G0:               howto manager.      (line  785)
10263
* BFD_RELOC_ARM_ALU_PC_G0_NC:            howto manager.      (line  784)
10264
* BFD_RELOC_ARM_ALU_PC_G1:               howto manager.      (line  787)
10265
* BFD_RELOC_ARM_ALU_PC_G1_NC:            howto manager.      (line  786)
10266
* BFD_RELOC_ARM_ALU_PC_G2:               howto manager.      (line  788)
10267
* BFD_RELOC_ARM_ALU_SB_G0:               howto manager.      (line  799)
10268
* BFD_RELOC_ARM_ALU_SB_G0_NC:            howto manager.      (line  798)
10269
* BFD_RELOC_ARM_ALU_SB_G1:               howto manager.      (line  801)
10270
* BFD_RELOC_ARM_ALU_SB_G1_NC:            howto manager.      (line  800)
10271
* BFD_RELOC_ARM_ALU_SB_G2:               howto manager.      (line  802)
10272
* BFD_RELOC_ARM_CP_OFF_IMM:              howto manager.      (line  827)
10273
* BFD_RELOC_ARM_CP_OFF_IMM_S2:           howto manager.      (line  828)
10274
* BFD_RELOC_ARM_GLOB_DAT:                howto manager.      (line  765)
10275
* BFD_RELOC_ARM_GOT32:                   howto manager.      (line  766)
10276
* BFD_RELOC_ARM_GOT_PREL:                howto manager.      (line  771)
10277
* BFD_RELOC_ARM_GOTOFF:                  howto manager.      (line  769)
10278
* BFD_RELOC_ARM_GOTPC:                   howto manager.      (line  770)
10279
* BFD_RELOC_ARM_HWLITERAL:               howto manager.      (line  838)
10280
* BFD_RELOC_ARM_IMMEDIATE:               howto manager.      (line  817)
10281
* BFD_RELOC_ARM_IN_POOL:                 howto manager.      (line  834)
10282
* BFD_RELOC_ARM_JUMP_SLOT:               howto manager.      (line  764)
10283
* BFD_RELOC_ARM_LDC_PC_G0:               howto manager.      (line  795)
10284
* BFD_RELOC_ARM_LDC_PC_G1:               howto manager.      (line  796)
10285
* BFD_RELOC_ARM_LDC_PC_G2:               howto manager.      (line  797)
10286
* BFD_RELOC_ARM_LDC_SB_G0:               howto manager.      (line  809)
10287
* BFD_RELOC_ARM_LDC_SB_G1:               howto manager.      (line  810)
10288
* BFD_RELOC_ARM_LDC_SB_G2:               howto manager.      (line  811)
10289
* BFD_RELOC_ARM_LDR_IMM:                 howto manager.      (line  832)
10290
* BFD_RELOC_ARM_LDR_PC_G0:               howto manager.      (line  789)
10291
* BFD_RELOC_ARM_LDR_PC_G1:               howto manager.      (line  790)
10292
* BFD_RELOC_ARM_LDR_PC_G2:               howto manager.      (line  791)
10293
* BFD_RELOC_ARM_LDR_SB_G0:               howto manager.      (line  803)
10294
* BFD_RELOC_ARM_LDR_SB_G1:               howto manager.      (line  804)
10295
* BFD_RELOC_ARM_LDR_SB_G2:               howto manager.      (line  805)
10296
* BFD_RELOC_ARM_LDRS_PC_G0:              howto manager.      (line  792)
10297
* BFD_RELOC_ARM_LDRS_PC_G1:              howto manager.      (line  793)
10298
* BFD_RELOC_ARM_LDRS_PC_G2:              howto manager.      (line  794)
10299
* BFD_RELOC_ARM_LDRS_SB_G0:              howto manager.      (line  806)
10300
* BFD_RELOC_ARM_LDRS_SB_G1:              howto manager.      (line  807)
10301
* BFD_RELOC_ARM_LDRS_SB_G2:              howto manager.      (line  808)
10302
* BFD_RELOC_ARM_LITERAL:                 howto manager.      (line  833)
10303
* BFD_RELOC_ARM_MOVT:                    howto manager.      (line  755)
10304
* BFD_RELOC_ARM_MOVT_PCREL:              howto manager.      (line  757)
10305
* BFD_RELOC_ARM_MOVW:                    howto manager.      (line  754)
10306
* BFD_RELOC_ARM_MOVW_PCREL:              howto manager.      (line  756)
10307
* BFD_RELOC_ARM_MULTI:                   howto manager.      (line  826)
10308
* BFD_RELOC_ARM_OFFSET_IMM:              howto manager.      (line  728)
10309
* BFD_RELOC_ARM_OFFSET_IMM8:             howto manager.      (line  835)
10310
* BFD_RELOC_ARM_PCREL_BLX:               howto manager.      (line  699)
10311
* BFD_RELOC_ARM_PCREL_BRANCH:            howto manager.      (line  695)
10312
* BFD_RELOC_ARM_PCREL_CALL:              howto manager.      (line  709)
10313
* BFD_RELOC_ARM_PCREL_JUMP:              howto manager.      (line  713)
10314
* BFD_RELOC_ARM_PLT32:                   howto manager.      (line  767)
10315
* BFD_RELOC_ARM_PREL31:                  howto manager.      (line  751)
10316
* BFD_RELOC_ARM_RELATIVE:                howto manager.      (line  768)
10317
* BFD_RELOC_ARM_ROSEGREL32:              howto manager.      (line  740)
10318
* BFD_RELOC_ARM_SBREL32:                 howto manager.      (line  743)
10319
* BFD_RELOC_ARM_SHIFT_IMM:               howto manager.      (line  823)
10320
* BFD_RELOC_ARM_SMC:                     howto manager.      (line  824)
10321
* BFD_RELOC_ARM_SWI:                     howto manager.      (line  825)
10322
* BFD_RELOC_ARM_T32_ADD_IMM:             howto manager.      (line  820)
10323
* BFD_RELOC_ARM_T32_ADD_PC12:            howto manager.      (line  822)
10324
* BFD_RELOC_ARM_T32_CP_OFF_IMM:          howto manager.      (line  829)
10325
* BFD_RELOC_ARM_T32_CP_OFF_IMM_S2:       howto manager.      (line  830)
10326
* BFD_RELOC_ARM_T32_IMM12:               howto manager.      (line  821)
10327
* BFD_RELOC_ARM_T32_IMMEDIATE:           howto manager.      (line  819)
10328
* BFD_RELOC_ARM_T32_OFFSET_IMM:          howto manager.      (line  837)
10329
* BFD_RELOC_ARM_T32_OFFSET_U8:           howto manager.      (line  836)
10330
* BFD_RELOC_ARM_TARGET1:                 howto manager.      (line  736)
10331
* BFD_RELOC_ARM_TARGET2:                 howto manager.      (line  746)
10332
* BFD_RELOC_ARM_THUMB_ADD:               howto manager.      (line  839)
10333
* BFD_RELOC_ARM_THUMB_IMM:               howto manager.      (line  840)
10334
* BFD_RELOC_ARM_THUMB_MOVT:              howto manager.      (line  759)
10335
* BFD_RELOC_ARM_THUMB_MOVT_PCREL:        howto manager.      (line  761)
10336
* BFD_RELOC_ARM_THUMB_MOVW:              howto manager.      (line  758)
10337
* BFD_RELOC_ARM_THUMB_MOVW_PCREL:        howto manager.      (line  760)
10338
* BFD_RELOC_ARM_THUMB_OFFSET:            howto manager.      (line  732)
10339
* BFD_RELOC_ARM_THUMB_SHIFT:             howto manager.      (line  841)
10340
* BFD_RELOC_ARM_TLS_DTPMOD32:            howto manager.      (line  778)
10341
* BFD_RELOC_ARM_TLS_DTPOFF32:            howto manager.      (line  777)
10342
* BFD_RELOC_ARM_TLS_GD32:                howto manager.      (line  774)
10343
* BFD_RELOC_ARM_TLS_IE32:                howto manager.      (line  780)
10344
* BFD_RELOC_ARM_TLS_LDM32:               howto manager.      (line  776)
10345
* BFD_RELOC_ARM_TLS_LDO32:               howto manager.      (line  775)
10346
* BFD_RELOC_ARM_TLS_LE32:                howto manager.      (line  781)
10347
* BFD_RELOC_ARM_TLS_TPOFF32:             howto manager.      (line  779)
10348
* BFD_RELOC_ARM_V4BX:                    howto manager.      (line  814)
10349
* BFD_RELOC_AVR_13_PCREL:                howto manager.      (line 1438)
10350
* BFD_RELOC_AVR_16_PM:                   howto manager.      (line 1442)
10351
* BFD_RELOC_AVR_6:                       howto manager.      (line 1529)
10352
* BFD_RELOC_AVR_6_ADIW:                  howto manager.      (line 1533)
10353
* BFD_RELOC_AVR_7_PCREL:                 howto manager.      (line 1434)
10354
* BFD_RELOC_AVR_CALL:                    howto manager.      (line 1521)
10355
* BFD_RELOC_AVR_HH8_LDI:                 howto manager.      (line 1454)
10356
* BFD_RELOC_AVR_HH8_LDI_NEG:             howto manager.      (line 1473)
10357
* BFD_RELOC_AVR_HH8_LDI_PM:              howto manager.      (line 1502)
10358
* BFD_RELOC_AVR_HH8_LDI_PM_NEG:          howto manager.      (line 1516)
10359
* BFD_RELOC_AVR_HI8_LDI:                 howto manager.      (line 1450)
10360
* BFD_RELOC_AVR_HI8_LDI_GS:              howto manager.      (line 1496)
10361
* BFD_RELOC_AVR_HI8_LDI_NEG:             howto manager.      (line 1468)
10362
* BFD_RELOC_AVR_HI8_LDI_PM:              howto manager.      (line 1492)
10363
* BFD_RELOC_AVR_HI8_LDI_PM_NEG:          howto manager.      (line 1511)
10364
* BFD_RELOC_AVR_LDI:                     howto manager.      (line 1525)
10365
* BFD_RELOC_AVR_LO8_LDI:                 howto manager.      (line 1446)
10366
* BFD_RELOC_AVR_LO8_LDI_GS:              howto manager.      (line 1486)
10367
* BFD_RELOC_AVR_LO8_LDI_NEG:             howto manager.      (line 1463)
10368
* BFD_RELOC_AVR_LO8_LDI_PM:              howto manager.      (line 1482)
10369
* BFD_RELOC_AVR_LO8_LDI_PM_NEG:          howto manager.      (line 1507)
10370
* BFD_RELOC_AVR_MS8_LDI:                 howto manager.      (line 1459)
10371
* BFD_RELOC_AVR_MS8_LDI_NEG:             howto manager.      (line 1478)
10372
* BFD_RELOC_BFIN_10_PCREL:               howto manager.      (line  970)
10373
* BFD_RELOC_BFIN_11_PCREL:               howto manager.      (line  973)
10374
* BFD_RELOC_BFIN_12_PCREL_JUMP:          howto manager.      (line  976)
10375
* BFD_RELOC_BFIN_12_PCREL_JUMP_S:        howto manager.      (line  979)
10376
* BFD_RELOC_BFIN_16_HIGH:                howto manager.      (line  958)
10377
* BFD_RELOC_BFIN_16_IMM:                 howto manager.      (line  955)
10378
* BFD_RELOC_BFIN_16_LOW:                 howto manager.      (line  967)
10379
* BFD_RELOC_BFIN_24_PCREL_CALL_X:        howto manager.      (line  982)
10380
* BFD_RELOC_BFIN_24_PCREL_JUMP_L:        howto manager.      (line  985)
10381
* BFD_RELOC_BFIN_4_PCREL:                howto manager.      (line  961)
10382
* BFD_RELOC_BFIN_5_PCREL:                howto manager.      (line  964)
10383
* BFD_RELOC_BFIN_FUNCDESC:               howto manager.      (line  991)
10384
* BFD_RELOC_BFIN_FUNCDESC_GOT17M4:       howto manager.      (line  992)
10385
* BFD_RELOC_BFIN_FUNCDESC_GOTHI:         howto manager.      (line  993)
10386
* BFD_RELOC_BFIN_FUNCDESC_GOTLO:         howto manager.      (line  994)
10387
* BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4:    howto manager.      (line  996)
10388
* BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI:      howto manager.      (line  997)
10389
* BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO:      howto manager.      (line  998)
10390
* BFD_RELOC_BFIN_FUNCDESC_VALUE:         howto manager.      (line  995)
10391
* BFD_RELOC_BFIN_GOT:                    howto manager.      (line 1004)
10392
* BFD_RELOC_BFIN_GOT17M4:                howto manager.      (line  988)
10393
* BFD_RELOC_BFIN_GOTHI:                  howto manager.      (line  989)
10394
* BFD_RELOC_BFIN_GOTLO:                  howto manager.      (line  990)
10395
* BFD_RELOC_BFIN_GOTOFF17M4:             howto manager.      (line  999)
10396
* BFD_RELOC_BFIN_GOTOFFHI:               howto manager.      (line 1000)
10397
* BFD_RELOC_BFIN_GOTOFFLO:               howto manager.      (line 1001)
10398
* BFD_RELOC_BFIN_PLTPC:                  howto manager.      (line 1007)
10399
* BFD_RELOC_C6000_ABS_H16:               howto manager.      (line 1301)
10400
* BFD_RELOC_C6000_ABS_L16:               howto manager.      (line 1300)
10401
* BFD_RELOC_C6000_ABS_S16:               howto manager.      (line 1299)
10402
* BFD_RELOC_C6000_ALIGN:                 howto manager.      (line 1318)
10403
* BFD_RELOC_C6000_COPY:                  howto manager.      (line 1317)
10404
* BFD_RELOC_C6000_DSBT_INDEX:            howto manager.      (line 1315)
10405
* BFD_RELOC_C6000_FPHEAD:                howto manager.      (line 1319)
10406
* BFD_RELOC_C6000_NOCMP:                 howto manager.      (line 1320)
10407
* BFD_RELOC_C6000_PCR_S10:               howto manager.      (line 1297)
10408
* BFD_RELOC_C6000_PCR_S12:               howto manager.      (line 1296)
10409
* BFD_RELOC_C6000_PCR_S21:               howto manager.      (line 1295)
10410
* BFD_RELOC_C6000_PCR_S7:                howto manager.      (line 1298)
10411
* BFD_RELOC_C6000_PREL31:                howto manager.      (line 1316)
10412
* BFD_RELOC_C6000_SBR_GOT_H16_W:         howto manager.      (line 1314)
10413
* BFD_RELOC_C6000_SBR_GOT_L16_W:         howto manager.      (line 1313)
10414
* BFD_RELOC_C6000_SBR_GOT_U15_W:         howto manager.      (line 1312)
10415
* BFD_RELOC_C6000_SBR_H16_B:             howto manager.      (line 1309)
10416
* BFD_RELOC_C6000_SBR_H16_H:             howto manager.      (line 1310)
10417
* BFD_RELOC_C6000_SBR_H16_W:             howto manager.      (line 1311)
10418
* BFD_RELOC_C6000_SBR_L16_B:             howto manager.      (line 1306)
10419
* BFD_RELOC_C6000_SBR_L16_H:             howto manager.      (line 1307)
10420
* BFD_RELOC_C6000_SBR_L16_W:             howto manager.      (line 1308)
10421
* BFD_RELOC_C6000_SBR_S16:               howto manager.      (line 1305)
10422
* BFD_RELOC_C6000_SBR_U15_B:             howto manager.      (line 1302)
10423
* BFD_RELOC_C6000_SBR_U15_H:             howto manager.      (line 1303)
10424
* BFD_RELOC_C6000_SBR_U15_W:             howto manager.      (line 1304)
10425 330 jeremybenn
* bfd_reloc_code_type:                   howto manager.      (line   10)
10426 512 jeremybenn
* BFD_RELOC_CR16_ABS20:                  howto manager.      (line 1931)
10427
* BFD_RELOC_CR16_ABS24:                  howto manager.      (line 1932)
10428
* BFD_RELOC_CR16_DISP16:                 howto manager.      (line 1942)
10429
* BFD_RELOC_CR16_DISP20:                 howto manager.      (line 1943)
10430
* BFD_RELOC_CR16_DISP24:                 howto manager.      (line 1944)
10431
* BFD_RELOC_CR16_DISP24a:                howto manager.      (line 1945)
10432
* BFD_RELOC_CR16_DISP4:                  howto manager.      (line 1940)
10433
* BFD_RELOC_CR16_DISP8:                  howto manager.      (line 1941)
10434
* BFD_RELOC_CR16_GLOB_DAT:               howto manager.      (line 1951)
10435
* BFD_RELOC_CR16_GOT_REGREL20:           howto manager.      (line 1949)
10436
* BFD_RELOC_CR16_GOTC_REGREL20:          howto manager.      (line 1950)
10437
* BFD_RELOC_CR16_IMM16:                  howto manager.      (line 1935)
10438
* BFD_RELOC_CR16_IMM20:                  howto manager.      (line 1936)
10439
* BFD_RELOC_CR16_IMM24:                  howto manager.      (line 1937)
10440
* BFD_RELOC_CR16_IMM32:                  howto manager.      (line 1938)
10441
* BFD_RELOC_CR16_IMM32a:                 howto manager.      (line 1939)
10442
* BFD_RELOC_CR16_IMM4:                   howto manager.      (line 1933)
10443
* BFD_RELOC_CR16_IMM8:                   howto manager.      (line 1934)
10444
* BFD_RELOC_CR16_NUM16:                  howto manager.      (line 1920)
10445
* BFD_RELOC_CR16_NUM32:                  howto manager.      (line 1921)
10446
* BFD_RELOC_CR16_NUM32a:                 howto manager.      (line 1922)
10447
* BFD_RELOC_CR16_NUM8:                   howto manager.      (line 1919)
10448
* BFD_RELOC_CR16_REGREL0:                howto manager.      (line 1923)
10449
* BFD_RELOC_CR16_REGREL14:               howto manager.      (line 1926)
10450
* BFD_RELOC_CR16_REGREL14a:              howto manager.      (line 1927)
10451
* BFD_RELOC_CR16_REGREL16:               howto manager.      (line 1928)
10452
* BFD_RELOC_CR16_REGREL20:               howto manager.      (line 1929)
10453
* BFD_RELOC_CR16_REGREL20a:              howto manager.      (line 1930)
10454
* BFD_RELOC_CR16_REGREL4:                howto manager.      (line 1924)
10455
* BFD_RELOC_CR16_REGREL4a:               howto manager.      (line 1925)
10456
* BFD_RELOC_CR16_SWITCH16:               howto manager.      (line 1947)
10457
* BFD_RELOC_CR16_SWITCH32:               howto manager.      (line 1948)
10458
* BFD_RELOC_CR16_SWITCH8:                howto manager.      (line 1946)
10459
* BFD_RELOC_CRIS_16_DTPREL:              howto manager.      (line 2022)
10460
* BFD_RELOC_CRIS_16_GOT:                 howto manager.      (line 1998)
10461
* BFD_RELOC_CRIS_16_GOT_GD:              howto manager.      (line 2018)
10462
* BFD_RELOC_CRIS_16_GOT_TPREL:           howto manager.      (line 2024)
10463
* BFD_RELOC_CRIS_16_GOTPLT:              howto manager.      (line 2004)
10464
* BFD_RELOC_CRIS_16_TPREL:               howto manager.      (line 2026)
10465
* BFD_RELOC_CRIS_32_DTPREL:              howto manager.      (line 2021)
10466
* BFD_RELOC_CRIS_32_GD:                  howto manager.      (line 2019)
10467
* BFD_RELOC_CRIS_32_GOT:                 howto manager.      (line 1995)
10468
* BFD_RELOC_CRIS_32_GOT_GD:              howto manager.      (line 2017)
10469
* BFD_RELOC_CRIS_32_GOT_TPREL:           howto manager.      (line 2023)
10470
* BFD_RELOC_CRIS_32_GOTPLT:              howto manager.      (line 2001)
10471
* BFD_RELOC_CRIS_32_GOTREL:              howto manager.      (line 2007)
10472
* BFD_RELOC_CRIS_32_IE:                  howto manager.      (line 2028)
10473
* BFD_RELOC_CRIS_32_PLT_GOTREL:          howto manager.      (line 2010)
10474
* BFD_RELOC_CRIS_32_PLT_PCREL:           howto manager.      (line 2013)
10475
* BFD_RELOC_CRIS_32_TPREL:               howto manager.      (line 2025)
10476
* BFD_RELOC_CRIS_BDISP8:                 howto manager.      (line 1976)
10477
* BFD_RELOC_CRIS_COPY:                   howto manager.      (line 1989)
10478
* BFD_RELOC_CRIS_DTP:                    howto manager.      (line 2020)
10479
* BFD_RELOC_CRIS_DTPMOD:                 howto manager.      (line 2027)
10480
* BFD_RELOC_CRIS_GLOB_DAT:               howto manager.      (line 1990)
10481
* BFD_RELOC_CRIS_JUMP_SLOT:              howto manager.      (line 1991)
10482
* BFD_RELOC_CRIS_LAPCQ_OFFSET:           howto manager.      (line 1984)
10483
* BFD_RELOC_CRIS_RELATIVE:               howto manager.      (line 1992)
10484
* BFD_RELOC_CRIS_SIGNED_16:              howto manager.      (line 1982)
10485
* BFD_RELOC_CRIS_SIGNED_6:               howto manager.      (line 1978)
10486
* BFD_RELOC_CRIS_SIGNED_8:               howto manager.      (line 1980)
10487
* BFD_RELOC_CRIS_UNSIGNED_16:            howto manager.      (line 1983)
10488
* BFD_RELOC_CRIS_UNSIGNED_4:             howto manager.      (line 1985)
10489
* BFD_RELOC_CRIS_UNSIGNED_5:             howto manager.      (line 1977)
10490
* BFD_RELOC_CRIS_UNSIGNED_6:             howto manager.      (line 1979)
10491
* BFD_RELOC_CRIS_UNSIGNED_8:             howto manager.      (line 1981)
10492
* BFD_RELOC_CRX_ABS16:                   howto manager.      (line 1964)
10493
* BFD_RELOC_CRX_ABS32:                   howto manager.      (line 1965)
10494
* BFD_RELOC_CRX_IMM16:                   howto manager.      (line 1969)
10495
* BFD_RELOC_CRX_IMM32:                   howto manager.      (line 1970)
10496
* BFD_RELOC_CRX_NUM16:                   howto manager.      (line 1967)
10497
* BFD_RELOC_CRX_NUM32:                   howto manager.      (line 1968)
10498
* BFD_RELOC_CRX_NUM8:                    howto manager.      (line 1966)
10499
* BFD_RELOC_CRX_REGREL12:                howto manager.      (line 1960)
10500
* BFD_RELOC_CRX_REGREL22:                howto manager.      (line 1961)
10501
* BFD_RELOC_CRX_REGREL28:                howto manager.      (line 1962)
10502
* BFD_RELOC_CRX_REGREL32:                howto manager.      (line 1963)
10503
* BFD_RELOC_CRX_REL16:                   howto manager.      (line 1957)
10504
* BFD_RELOC_CRX_REL24:                   howto manager.      (line 1958)
10505
* BFD_RELOC_CRX_REL32:                   howto manager.      (line 1959)
10506
* BFD_RELOC_CRX_REL4:                    howto manager.      (line 1954)
10507
* BFD_RELOC_CRX_REL8:                    howto manager.      (line 1955)
10508
* BFD_RELOC_CRX_REL8_CMP:                howto manager.      (line 1956)
10509
* BFD_RELOC_CRX_SWITCH16:                howto manager.      (line 1972)
10510
* BFD_RELOC_CRX_SWITCH32:                howto manager.      (line 1973)
10511
* BFD_RELOC_CRX_SWITCH8:                 howto manager.      (line 1971)
10512
* BFD_RELOC_CTOR:                        howto manager.      (line  689)
10513
* BFD_RELOC_D10V_10_PCREL_L:             howto manager.      (line 1074)
10514
* BFD_RELOC_D10V_10_PCREL_R:             howto manager.      (line 1070)
10515
* BFD_RELOC_D10V_18:                     howto manager.      (line 1079)
10516
* BFD_RELOC_D10V_18_PCREL:               howto manager.      (line 1082)
10517
* BFD_RELOC_D30V_15:                     howto manager.      (line 1097)
10518
* BFD_RELOC_D30V_15_PCREL:               howto manager.      (line 1101)
10519
* BFD_RELOC_D30V_15_PCREL_R:             howto manager.      (line 1105)
10520
* BFD_RELOC_D30V_21:                     howto manager.      (line 1110)
10521
* BFD_RELOC_D30V_21_PCREL:               howto manager.      (line 1114)
10522
* BFD_RELOC_D30V_21_PCREL_R:             howto manager.      (line 1118)
10523
* BFD_RELOC_D30V_32:                     howto manager.      (line 1123)
10524
* BFD_RELOC_D30V_32_PCREL:               howto manager.      (line 1126)
10525
* BFD_RELOC_D30V_6:                      howto manager.      (line 1085)
10526
* BFD_RELOC_D30V_9_PCREL:                howto manager.      (line 1088)
10527
* BFD_RELOC_D30V_9_PCREL_R:              howto manager.      (line 1092)
10528
* BFD_RELOC_DLX_HI16_S:                  howto manager.      (line 1129)
10529
* BFD_RELOC_DLX_JMP26:                   howto manager.      (line 1135)
10530
* BFD_RELOC_DLX_LO16:                    howto manager.      (line 1132)
10531
* BFD_RELOC_FR30_10_IN_8:                howto manager.      (line 1342)
10532
* BFD_RELOC_FR30_12_PCREL:               howto manager.      (line 1350)
10533
* BFD_RELOC_FR30_20:                     howto manager.      (line 1326)
10534
* BFD_RELOC_FR30_48:                     howto manager.      (line 1323)
10535
* BFD_RELOC_FR30_6_IN_4:                 howto manager.      (line 1330)
10536
* BFD_RELOC_FR30_8_IN_8:                 howto manager.      (line 1334)
10537
* BFD_RELOC_FR30_9_IN_8:                 howto manager.      (line 1338)
10538
* BFD_RELOC_FR30_9_PCREL:                howto manager.      (line 1346)
10539
* BFD_RELOC_FRV_FUNCDESC:                howto manager.      (line  441)
10540
* BFD_RELOC_FRV_FUNCDESC_GOT12:          howto manager.      (line  442)
10541
* BFD_RELOC_FRV_FUNCDESC_GOTHI:          howto manager.      (line  443)
10542
* BFD_RELOC_FRV_FUNCDESC_GOTLO:          howto manager.      (line  444)
10543
* BFD_RELOC_FRV_FUNCDESC_GOTOFF12:       howto manager.      (line  446)
10544
* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI:       howto manager.      (line  447)
10545
* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO:       howto manager.      (line  448)
10546
* BFD_RELOC_FRV_FUNCDESC_VALUE:          howto manager.      (line  445)
10547
* BFD_RELOC_FRV_GETTLSOFF:               howto manager.      (line  452)
10548
* BFD_RELOC_FRV_GETTLSOFF_RELAX:         howto manager.      (line  465)
10549
* BFD_RELOC_FRV_GOT12:                   howto manager.      (line  438)
10550
* BFD_RELOC_FRV_GOTHI:                   howto manager.      (line  439)
10551
* BFD_RELOC_FRV_GOTLO:                   howto manager.      (line  440)
10552
* BFD_RELOC_FRV_GOTOFF12:                howto manager.      (line  449)
10553
* BFD_RELOC_FRV_GOTOFFHI:                howto manager.      (line  450)
10554
* BFD_RELOC_FRV_GOTOFFLO:                howto manager.      (line  451)
10555
* BFD_RELOC_FRV_GOTTLSDESC12:            howto manager.      (line  454)
10556
* BFD_RELOC_FRV_GOTTLSDESCHI:            howto manager.      (line  455)
10557
* BFD_RELOC_FRV_GOTTLSDESCLO:            howto manager.      (line  456)
10558
* BFD_RELOC_FRV_GOTTLSOFF12:             howto manager.      (line  460)
10559
* BFD_RELOC_FRV_GOTTLSOFFHI:             howto manager.      (line  461)
10560
* BFD_RELOC_FRV_GOTTLSOFFLO:             howto manager.      (line  462)
10561
* BFD_RELOC_FRV_GPREL12:                 howto manager.      (line  433)
10562
* BFD_RELOC_FRV_GPREL32:                 howto manager.      (line  435)
10563
* BFD_RELOC_FRV_GPRELHI:                 howto manager.      (line  436)
10564
* BFD_RELOC_FRV_GPRELLO:                 howto manager.      (line  437)
10565
* BFD_RELOC_FRV_GPRELU12:                howto manager.      (line  434)
10566
* BFD_RELOC_FRV_HI16:                    howto manager.      (line  432)
10567
* BFD_RELOC_FRV_LABEL16:                 howto manager.      (line  429)
10568
* BFD_RELOC_FRV_LABEL24:                 howto manager.      (line  430)
10569
* BFD_RELOC_FRV_LO16:                    howto manager.      (line  431)
10570
* BFD_RELOC_FRV_TLSDESC_RELAX:           howto manager.      (line  464)
10571
* BFD_RELOC_FRV_TLSDESC_VALUE:           howto manager.      (line  453)
10572
* BFD_RELOC_FRV_TLSMOFF:                 howto manager.      (line  467)
10573
* BFD_RELOC_FRV_TLSMOFF12:               howto manager.      (line  457)
10574
* BFD_RELOC_FRV_TLSMOFFHI:               howto manager.      (line  458)
10575
* BFD_RELOC_FRV_TLSMOFFLO:               howto manager.      (line  459)
10576
* BFD_RELOC_FRV_TLSOFF:                  howto manager.      (line  463)
10577
* BFD_RELOC_FRV_TLSOFF_RELAX:            howto manager.      (line  466)
10578
* BFD_RELOC_GPREL16:                     howto manager.      (line  122)
10579
* BFD_RELOC_GPREL32:                     howto manager.      (line  123)
10580
* BFD_RELOC_H8_DIR16A8:                  howto manager.      (line 2069)
10581
* BFD_RELOC_H8_DIR16R8:                  howto manager.      (line 2070)
10582
* BFD_RELOC_H8_DIR24A8:                  howto manager.      (line 2071)
10583
* BFD_RELOC_H8_DIR24R8:                  howto manager.      (line 2072)
10584
* BFD_RELOC_H8_DIR32A16:                 howto manager.      (line 2073)
10585
* BFD_RELOC_HI16:                        howto manager.      (line  345)
10586 330 jeremybenn
* BFD_RELOC_HI16_BASEREL:                howto manager.      (line   97)
10587
* BFD_RELOC_HI16_GOTOFF:                 howto manager.      (line   57)
10588 512 jeremybenn
* BFD_RELOC_HI16_PCREL:                  howto manager.      (line  357)
10589 330 jeremybenn
* BFD_RELOC_HI16_PLTOFF:                 howto manager.      (line   69)
10590 512 jeremybenn
* BFD_RELOC_HI16_S:                      howto manager.      (line  348)
10591 330 jeremybenn
* BFD_RELOC_HI16_S_BASEREL:              howto manager.      (line   98)
10592
* BFD_RELOC_HI16_S_GOTOFF:               howto manager.      (line   58)
10593 512 jeremybenn
* BFD_RELOC_HI16_S_PCREL:                howto manager.      (line  360)
10594 330 jeremybenn
* BFD_RELOC_HI16_S_PLTOFF:               howto manager.      (line   70)
10595 512 jeremybenn
* BFD_RELOC_HI22:                        howto manager.      (line  117)
10596
* BFD_RELOC_I370_D12:                    howto manager.      (line  686)
10597
* BFD_RELOC_I960_CALLJ:                  howto manager.      (line  129)
10598
* BFD_RELOC_IA64_COPY:                   howto manager.      (line 1813)
10599
* BFD_RELOC_IA64_DIR32LSB:               howto manager.      (line 1758)
10600
* BFD_RELOC_IA64_DIR32MSB:               howto manager.      (line 1757)
10601
* BFD_RELOC_IA64_DIR64LSB:               howto manager.      (line 1760)
10602
* BFD_RELOC_IA64_DIR64MSB:               howto manager.      (line 1759)
10603
* BFD_RELOC_IA64_DTPMOD64LSB:            howto manager.      (line 1823)
10604
* BFD_RELOC_IA64_DTPMOD64MSB:            howto manager.      (line 1822)
10605
* BFD_RELOC_IA64_DTPREL14:               howto manager.      (line 1825)
10606
* BFD_RELOC_IA64_DTPREL22:               howto manager.      (line 1826)
10607
* BFD_RELOC_IA64_DTPREL32LSB:            howto manager.      (line 1829)
10608
* BFD_RELOC_IA64_DTPREL32MSB:            howto manager.      (line 1828)
10609
* BFD_RELOC_IA64_DTPREL64I:              howto manager.      (line 1827)
10610
* BFD_RELOC_IA64_DTPREL64LSB:            howto manager.      (line 1831)
10611
* BFD_RELOC_IA64_DTPREL64MSB:            howto manager.      (line 1830)
10612
* BFD_RELOC_IA64_FPTR32LSB:              howto manager.      (line 1775)
10613
* BFD_RELOC_IA64_FPTR32MSB:              howto manager.      (line 1774)
10614
* BFD_RELOC_IA64_FPTR64I:                howto manager.      (line 1773)
10615
* BFD_RELOC_IA64_FPTR64LSB:              howto manager.      (line 1777)
10616
* BFD_RELOC_IA64_FPTR64MSB:              howto manager.      (line 1776)
10617
* BFD_RELOC_IA64_GPREL22:                howto manager.      (line 1761)
10618
* BFD_RELOC_IA64_GPREL32LSB:             howto manager.      (line 1764)
10619
* BFD_RELOC_IA64_GPREL32MSB:             howto manager.      (line 1763)
10620
* BFD_RELOC_IA64_GPREL64I:               howto manager.      (line 1762)
10621
* BFD_RELOC_IA64_GPREL64LSB:             howto manager.      (line 1766)
10622
* BFD_RELOC_IA64_GPREL64MSB:             howto manager.      (line 1765)
10623
* BFD_RELOC_IA64_IMM14:                  howto manager.      (line 1754)
10624
* BFD_RELOC_IA64_IMM22:                  howto manager.      (line 1755)
10625
* BFD_RELOC_IA64_IMM64:                  howto manager.      (line 1756)
10626
* BFD_RELOC_IA64_IPLTLSB:                howto manager.      (line 1812)
10627
* BFD_RELOC_IA64_IPLTMSB:                howto manager.      (line 1811)
10628
* BFD_RELOC_IA64_LDXMOV:                 howto manager.      (line 1815)
10629
* BFD_RELOC_IA64_LTOFF22:                howto manager.      (line 1767)
10630
* BFD_RELOC_IA64_LTOFF22X:               howto manager.      (line 1814)
10631
* BFD_RELOC_IA64_LTOFF64I:               howto manager.      (line 1768)
10632
* BFD_RELOC_IA64_LTOFF_DTPMOD22:         howto manager.      (line 1824)
10633
* BFD_RELOC_IA64_LTOFF_DTPREL22:         howto manager.      (line 1832)
10634
* BFD_RELOC_IA64_LTOFF_FPTR22:           howto manager.      (line 1789)
10635
* BFD_RELOC_IA64_LTOFF_FPTR32LSB:        howto manager.      (line 1792)
10636
* BFD_RELOC_IA64_LTOFF_FPTR32MSB:        howto manager.      (line 1791)
10637
* BFD_RELOC_IA64_LTOFF_FPTR64I:          howto manager.      (line 1790)
10638
* BFD_RELOC_IA64_LTOFF_FPTR64LSB:        howto manager.      (line 1794)
10639
* BFD_RELOC_IA64_LTOFF_FPTR64MSB:        howto manager.      (line 1793)
10640
* BFD_RELOC_IA64_LTOFF_TPREL22:          howto manager.      (line 1821)
10641
* BFD_RELOC_IA64_LTV32LSB:               howto manager.      (line 1808)
10642
* BFD_RELOC_IA64_LTV32MSB:               howto manager.      (line 1807)
10643
* BFD_RELOC_IA64_LTV64LSB:               howto manager.      (line 1810)
10644
* BFD_RELOC_IA64_LTV64MSB:               howto manager.      (line 1809)
10645
* BFD_RELOC_IA64_PCREL21B:               howto manager.      (line 1778)
10646
* BFD_RELOC_IA64_PCREL21BI:              howto manager.      (line 1779)
10647
* BFD_RELOC_IA64_PCREL21F:               howto manager.      (line 1781)
10648
* BFD_RELOC_IA64_PCREL21M:               howto manager.      (line 1780)
10649
* BFD_RELOC_IA64_PCREL22:                howto manager.      (line 1782)
10650
* BFD_RELOC_IA64_PCREL32LSB:             howto manager.      (line 1786)
10651
* BFD_RELOC_IA64_PCREL32MSB:             howto manager.      (line 1785)
10652
* BFD_RELOC_IA64_PCREL60B:               howto manager.      (line 1783)
10653
* BFD_RELOC_IA64_PCREL64I:               howto manager.      (line 1784)
10654
* BFD_RELOC_IA64_PCREL64LSB:             howto manager.      (line 1788)
10655
* BFD_RELOC_IA64_PCREL64MSB:             howto manager.      (line 1787)
10656
* BFD_RELOC_IA64_PLTOFF22:               howto manager.      (line 1769)
10657
* BFD_RELOC_IA64_PLTOFF64I:              howto manager.      (line 1770)
10658
* BFD_RELOC_IA64_PLTOFF64LSB:            howto manager.      (line 1772)
10659
* BFD_RELOC_IA64_PLTOFF64MSB:            howto manager.      (line 1771)
10660
* BFD_RELOC_IA64_REL32LSB:               howto manager.      (line 1804)
10661
* BFD_RELOC_IA64_REL32MSB:               howto manager.      (line 1803)
10662
* BFD_RELOC_IA64_REL64LSB:               howto manager.      (line 1806)
10663
* BFD_RELOC_IA64_REL64MSB:               howto manager.      (line 1805)
10664
* BFD_RELOC_IA64_SECREL32LSB:            howto manager.      (line 1800)
10665
* BFD_RELOC_IA64_SECREL32MSB:            howto manager.      (line 1799)
10666
* BFD_RELOC_IA64_SECREL64LSB:            howto manager.      (line 1802)
10667
* BFD_RELOC_IA64_SECREL64MSB:            howto manager.      (line 1801)
10668
* BFD_RELOC_IA64_SEGREL32LSB:            howto manager.      (line 1796)
10669
* BFD_RELOC_IA64_SEGREL32MSB:            howto manager.      (line 1795)
10670
* BFD_RELOC_IA64_SEGREL64LSB:            howto manager.      (line 1798)
10671
* BFD_RELOC_IA64_SEGREL64MSB:            howto manager.      (line 1797)
10672
* BFD_RELOC_IA64_TPREL14:                howto manager.      (line 1816)
10673
* BFD_RELOC_IA64_TPREL22:                howto manager.      (line 1817)
10674
* BFD_RELOC_IA64_TPREL64I:               howto manager.      (line 1818)
10675
* BFD_RELOC_IA64_TPREL64LSB:             howto manager.      (line 1820)
10676
* BFD_RELOC_IA64_TPREL64MSB:             howto manager.      (line 1819)
10677
* BFD_RELOC_IP2K_ADDR16CJP:              howto manager.      (line 1706)
10678
* BFD_RELOC_IP2K_BANK:                   howto manager.      (line 1703)
10679
* BFD_RELOC_IP2K_EX8DATA:                howto manager.      (line 1714)
10680
* BFD_RELOC_IP2K_FR9:                    howto manager.      (line 1700)
10681
* BFD_RELOC_IP2K_FR_OFFSET:              howto manager.      (line 1727)
10682
* BFD_RELOC_IP2K_HI8DATA:                howto manager.      (line 1713)
10683
* BFD_RELOC_IP2K_HI8INSN:                howto manager.      (line 1718)
10684
* BFD_RELOC_IP2K_LO8DATA:                howto manager.      (line 1712)
10685
* BFD_RELOC_IP2K_LO8INSN:                howto manager.      (line 1717)
10686
* BFD_RELOC_IP2K_PAGE3:                  howto manager.      (line 1709)
10687
* BFD_RELOC_IP2K_PC_SKIP:                howto manager.      (line 1721)
10688
* BFD_RELOC_IP2K_TEXT:                   howto manager.      (line 1724)
10689
* BFD_RELOC_IQ2000_OFFSET_16:            howto manager.      (line 2123)
10690
* BFD_RELOC_IQ2000_OFFSET_21:            howto manager.      (line 2124)
10691
* BFD_RELOC_IQ2000_UHI16:                howto manager.      (line 2125)
10692
* BFD_RELOC_LM32_16_GOT:                 howto manager.      (line 2230)
10693
* BFD_RELOC_LM32_BRANCH:                 howto manager.      (line 2229)
10694
* BFD_RELOC_LM32_CALL:                   howto manager.      (line 2228)
10695
* BFD_RELOC_LM32_COPY:                   howto manager.      (line 2233)
10696
* BFD_RELOC_LM32_GLOB_DAT:               howto manager.      (line 2234)
10697
* BFD_RELOC_LM32_GOTOFF_HI16:            howto manager.      (line 2231)
10698
* BFD_RELOC_LM32_GOTOFF_LO16:            howto manager.      (line 2232)
10699
* BFD_RELOC_LM32_JMP_SLOT:               howto manager.      (line 2235)
10700
* BFD_RELOC_LM32_RELATIVE:               howto manager.      (line 2236)
10701
* BFD_RELOC_LO10:                        howto manager.      (line  118)
10702
* BFD_RELOC_LO16:                        howto manager.      (line  354)
10703 330 jeremybenn
* BFD_RELOC_LO16_BASEREL:                howto manager.      (line   96)
10704
* BFD_RELOC_LO16_GOTOFF:                 howto manager.      (line   56)
10705 512 jeremybenn
* BFD_RELOC_LO16_PCREL:                  howto manager.      (line  363)
10706 330 jeremybenn
* BFD_RELOC_LO16_PLTOFF:                 howto manager.      (line   68)
10707 512 jeremybenn
* BFD_RELOC_M32C_HI8:                    howto manager.      (line 1138)
10708
* BFD_RELOC_M32C_RL_1ADDR:               howto manager.      (line 1140)
10709
* BFD_RELOC_M32C_RL_2ADDR:               howto manager.      (line 1141)
10710
* BFD_RELOC_M32C_RL_JUMP:                howto manager.      (line 1139)
10711
* BFD_RELOC_M32R_10_PCREL:               howto manager.      (line 1148)
10712
* BFD_RELOC_M32R_18_PCREL:               howto manager.      (line 1152)
10713
* BFD_RELOC_M32R_24:                     howto manager.      (line 1144)
10714
* BFD_RELOC_M32R_26_PCREL:               howto manager.      (line 1155)
10715
* BFD_RELOC_M32R_26_PLTREL:              howto manager.      (line 1174)
10716
* BFD_RELOC_M32R_COPY:                   howto manager.      (line 1175)
10717
* BFD_RELOC_M32R_GLOB_DAT:               howto manager.      (line 1176)
10718
* BFD_RELOC_M32R_GOT16_HI_SLO:           howto manager.      (line 1185)
10719
* BFD_RELOC_M32R_GOT16_HI_ULO:           howto manager.      (line 1184)
10720
* BFD_RELOC_M32R_GOT16_LO:               howto manager.      (line 1186)
10721
* BFD_RELOC_M32R_GOT24:                  howto manager.      (line 1173)
10722
* BFD_RELOC_M32R_GOTOFF:                 howto manager.      (line 1179)
10723
* BFD_RELOC_M32R_GOTOFF_HI_SLO:          howto manager.      (line 1181)
10724
* BFD_RELOC_M32R_GOTOFF_HI_ULO:          howto manager.      (line 1180)
10725
* BFD_RELOC_M32R_GOTOFF_LO:              howto manager.      (line 1182)
10726
* BFD_RELOC_M32R_GOTPC24:                howto manager.      (line 1183)
10727
* BFD_RELOC_M32R_GOTPC_HI_SLO:           howto manager.      (line 1188)
10728
* BFD_RELOC_M32R_GOTPC_HI_ULO:           howto manager.      (line 1187)
10729
* BFD_RELOC_M32R_GOTPC_LO:               howto manager.      (line 1189)
10730
* BFD_RELOC_M32R_HI16_SLO:               howto manager.      (line 1162)
10731
* BFD_RELOC_M32R_HI16_ULO:               howto manager.      (line 1158)
10732
* BFD_RELOC_M32R_JMP_SLOT:               howto manager.      (line 1177)
10733
* BFD_RELOC_M32R_LO16:                   howto manager.      (line 1166)
10734
* BFD_RELOC_M32R_RELATIVE:               howto manager.      (line 1178)
10735
* BFD_RELOC_M32R_SDA16:                  howto manager.      (line 1169)
10736
* BFD_RELOC_M68HC11_24:                  howto manager.      (line 1868)
10737
* BFD_RELOC_M68HC11_3B:                  howto manager.      (line 1843)
10738
* BFD_RELOC_M68HC11_HI8:                 howto manager.      (line 1835)
10739
* BFD_RELOC_M68HC11_LO16:                howto manager.      (line 1857)
10740
* BFD_RELOC_M68HC11_LO8:                 howto manager.      (line 1839)
10741
* BFD_RELOC_M68HC11_PAGE:                howto manager.      (line 1863)
10742
* BFD_RELOC_M68HC11_RL_GROUP:            howto manager.      (line 1852)
10743
* BFD_RELOC_M68HC11_RL_JUMP:             howto manager.      (line 1846)
10744
* BFD_RELOC_M68HC12_5B:                  howto manager.      (line 1874)
10745
* BFD_RELOC_MACH_O_PAIR:                 howto manager.      (line 2243)
10746
* BFD_RELOC_MACH_O_SECTDIFF:             howto manager.      (line 2239)
10747
* BFD_RELOC_MACH_O_X86_64_BRANCH32:      howto manager.      (line 2246)
10748
* BFD_RELOC_MACH_O_X86_64_BRANCH8:       howto manager.      (line 2247)
10749
* BFD_RELOC_MACH_O_X86_64_GOT:           howto manager.      (line 2251)
10750
* BFD_RELOC_MACH_O_X86_64_GOT_LOAD:      howto manager.      (line 2254)
10751
* BFD_RELOC_MACH_O_X86_64_PCREL32_1:     howto manager.      (line 2264)
10752
* BFD_RELOC_MACH_O_X86_64_PCREL32_2:     howto manager.      (line 2267)
10753
* BFD_RELOC_MACH_O_X86_64_PCREL32_4:     howto manager.      (line 2270)
10754
* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32:  howto manager.      (line 2258)
10755
* BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64:  howto manager.      (line 2261)
10756
* BFD_RELOC_MCORE_PCREL_32:              howto manager.      (line 1357)
10757
* BFD_RELOC_MCORE_PCREL_IMM11BY2:        howto manager.      (line 1355)
10758
* BFD_RELOC_MCORE_PCREL_IMM4BY2:         howto manager.      (line 1356)
10759
* BFD_RELOC_MCORE_PCREL_IMM8BY4:         howto manager.      (line 1354)
10760
* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2:    howto manager.      (line 1358)
10761
* BFD_RELOC_MCORE_RVA:                   howto manager.      (line 1359)
10762
* BFD_RELOC_MEP_16:                      howto manager.      (line 1363)
10763
* BFD_RELOC_MEP_32:                      howto manager.      (line 1364)
10764
* BFD_RELOC_MEP_8:                       howto manager.      (line 1362)
10765
* BFD_RELOC_MEP_ADDR24A4:                howto manager.      (line 1379)
10766
* BFD_RELOC_MEP_GNU_VTENTRY:             howto manager.      (line 1381)
10767
* BFD_RELOC_MEP_GNU_VTINHERIT:           howto manager.      (line 1380)
10768
* BFD_RELOC_MEP_GPREL:                   howto manager.      (line 1373)
10769
* BFD_RELOC_MEP_HI16S:                   howto manager.      (line 1372)
10770
* BFD_RELOC_MEP_HI16U:                   howto manager.      (line 1371)
10771
* BFD_RELOC_MEP_LOW16:                   howto manager.      (line 1370)
10772
* BFD_RELOC_MEP_PCABS24A2:               howto manager.      (line 1369)
10773
* BFD_RELOC_MEP_PCREL12A2:               howto manager.      (line 1366)
10774
* BFD_RELOC_MEP_PCREL17A2:               howto manager.      (line 1367)
10775
* BFD_RELOC_MEP_PCREL24A2:               howto manager.      (line 1368)
10776
* BFD_RELOC_MEP_PCREL8A2:                howto manager.      (line 1365)
10777
* BFD_RELOC_MEP_TPREL:                   howto manager.      (line 1374)
10778
* BFD_RELOC_MEP_TPREL7:                  howto manager.      (line 1375)
10779
* BFD_RELOC_MEP_TPREL7A2:                howto manager.      (line 1376)
10780
* BFD_RELOC_MEP_TPREL7A4:                howto manager.      (line 1377)
10781
* BFD_RELOC_MEP_UIMM24:                  howto manager.      (line 1378)
10782
* BFD_RELOC_MICROBLAZE_32_GOTOFF:        howto manager.      (line 2317)
10783
* BFD_RELOC_MICROBLAZE_32_LO:            howto manager.      (line 2273)
10784
* BFD_RELOC_MICROBLAZE_32_LO_PCREL:      howto manager.      (line 2277)
10785
* BFD_RELOC_MICROBLAZE_32_ROSDA:         howto manager.      (line 2281)
10786
* BFD_RELOC_MICROBLAZE_32_RWSDA:         howto manager.      (line 2285)
10787
* BFD_RELOC_MICROBLAZE_32_SYM_OP_SYM:    howto manager.      (line 2289)
10788
* BFD_RELOC_MICROBLAZE_64_GOT:           howto manager.      (line 2303)
10789
* BFD_RELOC_MICROBLAZE_64_GOTOFF:        howto manager.      (line 2312)
10790
* BFD_RELOC_MICROBLAZE_64_GOTPC:         howto manager.      (line 2298)
10791
* BFD_RELOC_MICROBLAZE_64_NONE:          howto manager.      (line 2293)
10792
* BFD_RELOC_MICROBLAZE_64_PLT:           howto manager.      (line 2307)
10793
* BFD_RELOC_MICROBLAZE_COPY:             howto manager.      (line 2321)
10794
* BFD_RELOC_MIPS16_CALL16:               howto manager.      (line  367)
10795
* BFD_RELOC_MIPS16_GOT16:                howto manager.      (line  366)
10796
* BFD_RELOC_MIPS16_GPREL:                howto manager.      (line  342)
10797
* BFD_RELOC_MIPS16_HI16:                 howto manager.      (line  371)
10798
* BFD_RELOC_MIPS16_HI16_S:               howto manager.      (line  374)
10799
* BFD_RELOC_MIPS16_JMP:                  howto manager.      (line  339)
10800
* BFD_RELOC_MIPS16_LO16:                 howto manager.      (line  380)
10801
* BFD_RELOC_MIPS_CALL16:                 howto manager.      (line  387)
10802
* BFD_RELOC_MIPS_CALL_HI16:              howto manager.      (line  390)
10803
* BFD_RELOC_MIPS_CALL_LO16:              howto manager.      (line  391)
10804
* BFD_RELOC_MIPS_COPY:                   howto manager.      (line  422)
10805
* BFD_RELOC_MIPS_DELETE:                 howto manager.      (line  400)
10806
* BFD_RELOC_MIPS_GOT16:                  howto manager.      (line  386)
10807
* BFD_RELOC_MIPS_GOT_DISP:               howto manager.      (line  395)
10808
* BFD_RELOC_MIPS_GOT_HI16:               howto manager.      (line  388)
10809
* BFD_RELOC_MIPS_GOT_LO16:               howto manager.      (line  389)
10810
* BFD_RELOC_MIPS_GOT_OFST:               howto manager.      (line  394)
10811
* BFD_RELOC_MIPS_GOT_PAGE:               howto manager.      (line  393)
10812
* BFD_RELOC_MIPS_HIGHER:                 howto manager.      (line  402)
10813
* BFD_RELOC_MIPS_HIGHEST:                howto manager.      (line  401)
10814
* BFD_RELOC_MIPS_INSERT_A:               howto manager.      (line  398)
10815
* BFD_RELOC_MIPS_INSERT_B:               howto manager.      (line  399)
10816
* BFD_RELOC_MIPS_JALR:                   howto manager.      (line  406)
10817
* BFD_RELOC_MIPS_JMP:                    howto manager.      (line  335)
10818
* BFD_RELOC_MIPS_JUMP_SLOT:              howto manager.      (line  423)
10819
* BFD_RELOC_MIPS_LITERAL:                howto manager.      (line  383)
10820
* BFD_RELOC_MIPS_REL16:                  howto manager.      (line  404)
10821
* BFD_RELOC_MIPS_RELGOT:                 howto manager.      (line  405)
10822
* BFD_RELOC_MIPS_SCN_DISP:               howto manager.      (line  403)
10823
* BFD_RELOC_MIPS_SHIFT5:                 howto manager.      (line  396)
10824
* BFD_RELOC_MIPS_SHIFT6:                 howto manager.      (line  397)
10825
* BFD_RELOC_MIPS_SUB:                    howto manager.      (line  392)
10826
* BFD_RELOC_MIPS_TLS_DTPMOD32:           howto manager.      (line  407)
10827
* BFD_RELOC_MIPS_TLS_DTPMOD64:           howto manager.      (line  409)
10828
* BFD_RELOC_MIPS_TLS_DTPREL32:           howto manager.      (line  408)
10829
* BFD_RELOC_MIPS_TLS_DTPREL64:           howto manager.      (line  410)
10830
* BFD_RELOC_MIPS_TLS_DTPREL_HI16:        howto manager.      (line  413)
10831
* BFD_RELOC_MIPS_TLS_DTPREL_LO16:        howto manager.      (line  414)
10832
* BFD_RELOC_MIPS_TLS_GD:                 howto manager.      (line  411)
10833
* BFD_RELOC_MIPS_TLS_GOTTPREL:           howto manager.      (line  415)
10834
* BFD_RELOC_MIPS_TLS_LDM:                howto manager.      (line  412)
10835
* BFD_RELOC_MIPS_TLS_TPREL32:            howto manager.      (line  416)
10836
* BFD_RELOC_MIPS_TLS_TPREL64:            howto manager.      (line  417)
10837
* BFD_RELOC_MIPS_TLS_TPREL_HI16:         howto manager.      (line  418)
10838
* BFD_RELOC_MIPS_TLS_TPREL_LO16:         howto manager.      (line  419)
10839
* BFD_RELOC_MMIX_ADDR19:                 howto manager.      (line 1410)
10840
* BFD_RELOC_MMIX_ADDR27:                 howto manager.      (line 1414)
10841
* BFD_RELOC_MMIX_BASE_PLUS_OFFSET:       howto manager.      (line 1426)
10842
* BFD_RELOC_MMIX_CBRANCH:                howto manager.      (line 1390)
10843
* BFD_RELOC_MMIX_CBRANCH_1:              howto manager.      (line 1392)
10844
* BFD_RELOC_MMIX_CBRANCH_2:              howto manager.      (line 1393)
10845
* BFD_RELOC_MMIX_CBRANCH_3:              howto manager.      (line 1394)
10846
* BFD_RELOC_MMIX_CBRANCH_J:              howto manager.      (line 1391)
10847
* BFD_RELOC_MMIX_GETA:                   howto manager.      (line 1384)
10848
* BFD_RELOC_MMIX_GETA_1:                 howto manager.      (line 1385)
10849
* BFD_RELOC_MMIX_GETA_2:                 howto manager.      (line 1386)
10850
* BFD_RELOC_MMIX_GETA_3:                 howto manager.      (line 1387)
10851
* BFD_RELOC_MMIX_JMP:                    howto manager.      (line 1404)
10852
* BFD_RELOC_MMIX_JMP_1:                  howto manager.      (line 1405)
10853
* BFD_RELOC_MMIX_JMP_2:                  howto manager.      (line 1406)
10854
* BFD_RELOC_MMIX_JMP_3:                  howto manager.      (line 1407)
10855
* BFD_RELOC_MMIX_LOCAL:                  howto manager.      (line 1430)
10856
* BFD_RELOC_MMIX_PUSHJ:                  howto manager.      (line 1397)
10857
* BFD_RELOC_MMIX_PUSHJ_1:                howto manager.      (line 1398)
10858
* BFD_RELOC_MMIX_PUSHJ_2:                howto manager.      (line 1399)
10859
* BFD_RELOC_MMIX_PUSHJ_3:                howto manager.      (line 1400)
10860
* BFD_RELOC_MMIX_PUSHJ_STUBBABLE:        howto manager.      (line 1401)
10861
* BFD_RELOC_MMIX_REG:                    howto manager.      (line 1422)
10862
* BFD_RELOC_MMIX_REG_OR_BYTE:            howto manager.      (line 1418)
10863
* BFD_RELOC_MN10300_16_PCREL:            howto manager.      (line 1264)
10864
* BFD_RELOC_MN10300_32_PCREL:            howto manager.      (line 1260)
10865
* BFD_RELOC_MN10300_ALIGN:               howto manager.      (line  502)
10866
* BFD_RELOC_MN10300_COPY:                howto manager.      (line  485)
10867
* BFD_RELOC_MN10300_GLOB_DAT:            howto manager.      (line  488)
10868
* BFD_RELOC_MN10300_GOT16:               howto manager.      (line  481)
10869
* BFD_RELOC_MN10300_GOT24:               howto manager.      (line  477)
10870
* BFD_RELOC_MN10300_GOT32:               howto manager.      (line  473)
10871
* BFD_RELOC_MN10300_GOTOFF24:            howto manager.      (line  470)
10872
* BFD_RELOC_MN10300_JMP_SLOT:            howto manager.      (line  491)
10873
* BFD_RELOC_MN10300_RELATIVE:            howto manager.      (line  494)
10874
* BFD_RELOC_MN10300_SYM_DIFF:            howto manager.      (line  497)
10875
* BFD_RELOC_MOXIE_10_PCREL:              howto manager.      (line  426)
10876
* BFD_RELOC_MSP430_10_PCREL:             howto manager.      (line 2114)
10877
* BFD_RELOC_MSP430_16:                   howto manager.      (line 2116)
10878
* BFD_RELOC_MSP430_16_BYTE:              howto manager.      (line 2118)
10879
* BFD_RELOC_MSP430_16_PCREL:             howto manager.      (line 2115)
10880
* BFD_RELOC_MSP430_16_PCREL_BYTE:        howto manager.      (line 2117)
10881
* BFD_RELOC_MSP430_2X_PCREL:             howto manager.      (line 2119)
10882
* BFD_RELOC_MSP430_RL_PCREL:             howto manager.      (line 2120)
10883
* BFD_RELOC_MT_GNU_VTENTRY:              howto manager.      (line 2108)
10884
* BFD_RELOC_MT_GNU_VTINHERIT:            howto manager.      (line 2105)
10885
* BFD_RELOC_MT_HI16:                     howto manager.      (line 2099)
10886
* BFD_RELOC_MT_LO16:                     howto manager.      (line 2102)
10887
* BFD_RELOC_MT_PC16:                     howto manager.      (line 2096)
10888
* BFD_RELOC_MT_PCINSN8:                  howto manager.      (line 2111)
10889
* BFD_RELOC_NONE:                        howto manager.      (line  132)
10890
* BFD_RELOC_NS32K_DISP_16:               howto manager.      (line  568)
10891
* BFD_RELOC_NS32K_DISP_16_PCREL:         howto manager.      (line  571)
10892
* BFD_RELOC_NS32K_DISP_32:               howto manager.      (line  569)
10893
* BFD_RELOC_NS32K_DISP_32_PCREL:         howto manager.      (line  572)
10894
* BFD_RELOC_NS32K_DISP_8:                howto manager.      (line  567)
10895
* BFD_RELOC_NS32K_DISP_8_PCREL:          howto manager.      (line  570)
10896
* BFD_RELOC_NS32K_IMM_16:                howto manager.      (line  562)
10897
* BFD_RELOC_NS32K_IMM_16_PCREL:          howto manager.      (line  565)
10898
* BFD_RELOC_NS32K_IMM_32:                howto manager.      (line  563)
10899
* BFD_RELOC_NS32K_IMM_32_PCREL:          howto manager.      (line  566)
10900
* BFD_RELOC_NS32K_IMM_8:                 howto manager.      (line  561)
10901
* BFD_RELOC_NS32K_IMM_8_PCREL:           howto manager.      (line  564)
10902
* BFD_RELOC_OPENRISC_ABS_26:             howto manager.      (line 2065)
10903
* BFD_RELOC_OPENRISC_REL_26:             howto manager.      (line 2066)
10904
* BFD_RELOC_PDP11_DISP_6_PCREL:          howto manager.      (line  576)
10905
* BFD_RELOC_PDP11_DISP_8_PCREL:          howto manager.      (line  575)
10906
* BFD_RELOC_PJ_CODE_DIR16:               howto manager.      (line  581)
10907
* BFD_RELOC_PJ_CODE_DIR32:               howto manager.      (line  582)
10908
* BFD_RELOC_PJ_CODE_HI16:                howto manager.      (line  579)
10909
* BFD_RELOC_PJ_CODE_LO16:                howto manager.      (line  580)
10910
* BFD_RELOC_PJ_CODE_REL16:               howto manager.      (line  583)
10911
* BFD_RELOC_PJ_CODE_REL32:               howto manager.      (line  584)
10912
* BFD_RELOC_PPC64_ADDR16_DS:             howto manager.      (line  629)
10913
* BFD_RELOC_PPC64_ADDR16_LO_DS:          howto manager.      (line  630)
10914
* BFD_RELOC_PPC64_DTPREL16_DS:           howto manager.      (line  678)
10915
* BFD_RELOC_PPC64_DTPREL16_HIGHER:       howto manager.      (line  680)
10916
* BFD_RELOC_PPC64_DTPREL16_HIGHERA:      howto manager.      (line  681)
10917
* BFD_RELOC_PPC64_DTPREL16_HIGHEST:      howto manager.      (line  682)
10918
* BFD_RELOC_PPC64_DTPREL16_HIGHESTA:     howto manager.      (line  683)
10919
* BFD_RELOC_PPC64_DTPREL16_LO_DS:        howto manager.      (line  679)
10920
* BFD_RELOC_PPC64_GOT16_DS:              howto manager.      (line  631)
10921
* BFD_RELOC_PPC64_GOT16_LO_DS:           howto manager.      (line  632)
10922
* BFD_RELOC_PPC64_HIGHER:                howto manager.      (line  617)
10923
* BFD_RELOC_PPC64_HIGHER_S:              howto manager.      (line  618)
10924
* BFD_RELOC_PPC64_HIGHEST:               howto manager.      (line  619)
10925
* BFD_RELOC_PPC64_HIGHEST_S:             howto manager.      (line  620)
10926
* BFD_RELOC_PPC64_PLT16_LO_DS:           howto manager.      (line  633)
10927
* BFD_RELOC_PPC64_PLTGOT16:              howto manager.      (line  625)
10928
* BFD_RELOC_PPC64_PLTGOT16_DS:           howto manager.      (line  638)
10929
* BFD_RELOC_PPC64_PLTGOT16_HA:           howto manager.      (line  628)
10930
* BFD_RELOC_PPC64_PLTGOT16_HI:           howto manager.      (line  627)
10931
* BFD_RELOC_PPC64_PLTGOT16_LO:           howto manager.      (line  626)
10932
* BFD_RELOC_PPC64_PLTGOT16_LO_DS:        howto manager.      (line  639)
10933
* BFD_RELOC_PPC64_SECTOFF_DS:            howto manager.      (line  634)
10934
* BFD_RELOC_PPC64_SECTOFF_LO_DS:         howto manager.      (line  635)
10935
* BFD_RELOC_PPC64_TOC:                   howto manager.      (line  624)
10936
* BFD_RELOC_PPC64_TOC16_DS:              howto manager.      (line  636)
10937
* BFD_RELOC_PPC64_TOC16_HA:              howto manager.      (line  623)
10938
* BFD_RELOC_PPC64_TOC16_HI:              howto manager.      (line  622)
10939
* BFD_RELOC_PPC64_TOC16_LO:              howto manager.      (line  621)
10940
* BFD_RELOC_PPC64_TOC16_LO_DS:           howto manager.      (line  637)
10941
* BFD_RELOC_PPC64_TPREL16_DS:            howto manager.      (line  672)
10942
* BFD_RELOC_PPC64_TPREL16_HIGHER:        howto manager.      (line  674)
10943
* BFD_RELOC_PPC64_TPREL16_HIGHERA:       howto manager.      (line  675)
10944
* BFD_RELOC_PPC64_TPREL16_HIGHEST:       howto manager.      (line  676)
10945
* BFD_RELOC_PPC64_TPREL16_HIGHESTA:      howto manager.      (line  677)
10946
* BFD_RELOC_PPC64_TPREL16_LO_DS:         howto manager.      (line  673)
10947
* BFD_RELOC_PPC_B16:                     howto manager.      (line  590)
10948
* BFD_RELOC_PPC_B16_BRNTAKEN:            howto manager.      (line  592)
10949
* BFD_RELOC_PPC_B16_BRTAKEN:             howto manager.      (line  591)
10950
* BFD_RELOC_PPC_B26:                     howto manager.      (line  587)
10951
* BFD_RELOC_PPC_BA16:                    howto manager.      (line  593)
10952
* BFD_RELOC_PPC_BA16_BRNTAKEN:           howto manager.      (line  595)
10953
* BFD_RELOC_PPC_BA16_BRTAKEN:            howto manager.      (line  594)
10954
* BFD_RELOC_PPC_BA26:                    howto manager.      (line  588)
10955
* BFD_RELOC_PPC_COPY:                    howto manager.      (line  596)
10956
* BFD_RELOC_PPC_DTPMOD:                  howto manager.      (line  645)
10957
* BFD_RELOC_PPC_DTPREL:                  howto manager.      (line  655)
10958
* BFD_RELOC_PPC_DTPREL16:                howto manager.      (line  651)
10959
* BFD_RELOC_PPC_DTPREL16_HA:             howto manager.      (line  654)
10960
* BFD_RELOC_PPC_DTPREL16_HI:             howto manager.      (line  653)
10961
* BFD_RELOC_PPC_DTPREL16_LO:             howto manager.      (line  652)
10962
* BFD_RELOC_PPC_EMB_BIT_FLD:             howto manager.      (line  615)
10963
* BFD_RELOC_PPC_EMB_MRKREF:              howto manager.      (line  610)
10964
* BFD_RELOC_PPC_EMB_NADDR16:             howto manager.      (line  602)
10965
* BFD_RELOC_PPC_EMB_NADDR16_HA:          howto manager.      (line  605)
10966
* BFD_RELOC_PPC_EMB_NADDR16_HI:          howto manager.      (line  604)
10967
* BFD_RELOC_PPC_EMB_NADDR16_LO:          howto manager.      (line  603)
10968
* BFD_RELOC_PPC_EMB_NADDR32:             howto manager.      (line  601)
10969
* BFD_RELOC_PPC_EMB_RELSDA:              howto manager.      (line  616)
10970
* BFD_RELOC_PPC_EMB_RELSEC16:            howto manager.      (line  611)
10971
* BFD_RELOC_PPC_EMB_RELST_HA:            howto manager.      (line  614)
10972
* BFD_RELOC_PPC_EMB_RELST_HI:            howto manager.      (line  613)
10973
* BFD_RELOC_PPC_EMB_RELST_LO:            howto manager.      (line  612)
10974
* BFD_RELOC_PPC_EMB_SDA21:               howto manager.      (line  609)
10975
* BFD_RELOC_PPC_EMB_SDA2I16:             howto manager.      (line  607)
10976
* BFD_RELOC_PPC_EMB_SDA2REL:             howto manager.      (line  608)
10977
* BFD_RELOC_PPC_EMB_SDAI16:              howto manager.      (line  606)
10978
* BFD_RELOC_PPC_GLOB_DAT:                howto manager.      (line  597)
10979
* BFD_RELOC_PPC_GOT_DTPREL16:            howto manager.      (line  668)
10980
* BFD_RELOC_PPC_GOT_DTPREL16_HA:         howto manager.      (line  671)
10981
* BFD_RELOC_PPC_GOT_DTPREL16_HI:         howto manager.      (line  670)
10982
* BFD_RELOC_PPC_GOT_DTPREL16_LO:         howto manager.      (line  669)
10983
* BFD_RELOC_PPC_GOT_TLSGD16:             howto manager.      (line  656)
10984
* BFD_RELOC_PPC_GOT_TLSGD16_HA:          howto manager.      (line  659)
10985
* BFD_RELOC_PPC_GOT_TLSGD16_HI:          howto manager.      (line  658)
10986
* BFD_RELOC_PPC_GOT_TLSGD16_LO:          howto manager.      (line  657)
10987
* BFD_RELOC_PPC_GOT_TLSLD16:             howto manager.      (line  660)
10988
* BFD_RELOC_PPC_GOT_TLSLD16_HA:          howto manager.      (line  663)
10989
* BFD_RELOC_PPC_GOT_TLSLD16_HI:          howto manager.      (line  662)
10990
* BFD_RELOC_PPC_GOT_TLSLD16_LO:          howto manager.      (line  661)
10991
* BFD_RELOC_PPC_GOT_TPREL16:             howto manager.      (line  664)
10992
* BFD_RELOC_PPC_GOT_TPREL16_HA:          howto manager.      (line  667)
10993
* BFD_RELOC_PPC_GOT_TPREL16_HI:          howto manager.      (line  666)
10994
* BFD_RELOC_PPC_GOT_TPREL16_LO:          howto manager.      (line  665)
10995
* BFD_RELOC_PPC_JMP_SLOT:                howto manager.      (line  598)
10996
* BFD_RELOC_PPC_LOCAL24PC:               howto manager.      (line  600)
10997
* BFD_RELOC_PPC_RELATIVE:                howto manager.      (line  599)
10998
* BFD_RELOC_PPC_TLS:                     howto manager.      (line  642)
10999
* BFD_RELOC_PPC_TLSGD:                   howto manager.      (line  643)
11000
* BFD_RELOC_PPC_TLSLD:                   howto manager.      (line  644)
11001
* BFD_RELOC_PPC_TOC16:                   howto manager.      (line  589)
11002
* BFD_RELOC_PPC_TPREL:                   howto manager.      (line  650)
11003
* BFD_RELOC_PPC_TPREL16:                 howto manager.      (line  646)
11004
* BFD_RELOC_PPC_TPREL16_HA:              howto manager.      (line  649)
11005
* BFD_RELOC_PPC_TPREL16_HI:              howto manager.      (line  648)
11006
* BFD_RELOC_PPC_TPREL16_LO:              howto manager.      (line  647)
11007
* BFD_RELOC_RELC:                        howto manager.      (line 2082)
11008 330 jeremybenn
* BFD_RELOC_RVA:                         howto manager.      (line  100)
11009 512 jeremybenn
* BFD_RELOC_RX_16_OP:                    howto manager.      (line 1541)
11010
* BFD_RELOC_RX_16U:                      howto manager.      (line 1545)
11011
* BFD_RELOC_RX_24_OP:                    howto manager.      (line 1542)
11012
* BFD_RELOC_RX_24U:                      howto manager.      (line 1546)
11013
* BFD_RELOC_RX_32_OP:                    howto manager.      (line 1543)
11014
* BFD_RELOC_RX_8U:                       howto manager.      (line 1544)
11015
* BFD_RELOC_RX_ABS16:                    howto manager.      (line 1555)
11016
* BFD_RELOC_RX_ABS16U:                   howto manager.      (line 1557)
11017
* BFD_RELOC_RX_ABS16UL:                  howto manager.      (line 1559)
11018
* BFD_RELOC_RX_ABS16UW:                  howto manager.      (line 1558)
11019
* BFD_RELOC_RX_ABS32:                    howto manager.      (line 1556)
11020
* BFD_RELOC_RX_ABS8:                     howto manager.      (line 1554)
11021
* BFD_RELOC_RX_DIFF:                     howto manager.      (line 1548)
11022
* BFD_RELOC_RX_DIR3U_PCREL:              howto manager.      (line 1547)
11023
* BFD_RELOC_RX_GPRELB:                   howto manager.      (line 1549)
11024
* BFD_RELOC_RX_GPRELL:                   howto manager.      (line 1551)
11025
* BFD_RELOC_RX_GPRELW:                   howto manager.      (line 1550)
11026
* BFD_RELOC_RX_NEG16:                    howto manager.      (line 1538)
11027
* BFD_RELOC_RX_NEG24:                    howto manager.      (line 1539)
11028
* BFD_RELOC_RX_NEG32:                    howto manager.      (line 1540)
11029
* BFD_RELOC_RX_NEG8:                     howto manager.      (line 1537)
11030
* BFD_RELOC_RX_OP_SUBTRACT:              howto manager.      (line 1553)
11031
* BFD_RELOC_RX_RELAX:                    howto manager.      (line 1560)
11032
* BFD_RELOC_RX_SYM:                      howto manager.      (line 1552)
11033
* BFD_RELOC_SCORE16_BRANCH:              howto manager.      (line 1688)
11034
* BFD_RELOC_SCORE16_JMP:                 howto manager.      (line 1685)
11035
* BFD_RELOC_SCORE_BCMP:                  howto manager.      (line 1691)
11036
* BFD_RELOC_SCORE_BRANCH:                howto manager.      (line 1676)
11037
* BFD_RELOC_SCORE_CALL15:                howto manager.      (line 1696)
11038
* BFD_RELOC_SCORE_DUMMY2:                howto manager.      (line 1672)
11039
* BFD_RELOC_SCORE_DUMMY_HI16:            howto manager.      (line 1697)
11040
* BFD_RELOC_SCORE_GOT15:                 howto manager.      (line 1694)
11041
* BFD_RELOC_SCORE_GOT_LO16:              howto manager.      (line 1695)
11042
* BFD_RELOC_SCORE_GPREL15:               howto manager.      (line 1669)
11043
* BFD_RELOC_SCORE_IMM30:                 howto manager.      (line 1679)
11044
* BFD_RELOC_SCORE_IMM32:                 howto manager.      (line 1682)
11045
* BFD_RELOC_SCORE_JMP:                   howto manager.      (line 1673)
11046
* BFD_RELOC_SH_ALIGN:                    howto manager.      (line  867)
11047
* BFD_RELOC_SH_CODE:                     howto manager.      (line  868)
11048
* BFD_RELOC_SH_COPY:                     howto manager.      (line  873)
11049
* BFD_RELOC_SH_COPY64:                   howto manager.      (line  898)
11050
* BFD_RELOC_SH_COUNT:                    howto manager.      (line  866)
11051
* BFD_RELOC_SH_DATA:                     howto manager.      (line  869)
11052
* BFD_RELOC_SH_DISP12:                   howto manager.      (line  849)
11053
* BFD_RELOC_SH_DISP12BY2:                howto manager.      (line  850)
11054
* BFD_RELOC_SH_DISP12BY4:                howto manager.      (line  851)
11055
* BFD_RELOC_SH_DISP12BY8:                howto manager.      (line  852)
11056
* BFD_RELOC_SH_DISP20:                   howto manager.      (line  853)
11057
* BFD_RELOC_SH_DISP20BY8:                howto manager.      (line  854)
11058
* BFD_RELOC_SH_FUNCDESC:                 howto manager.      (line  941)
11059
* BFD_RELOC_SH_GLOB_DAT:                 howto manager.      (line  874)
11060
* BFD_RELOC_SH_GLOB_DAT64:               howto manager.      (line  899)
11061
* BFD_RELOC_SH_GOT10BY4:                 howto manager.      (line  902)
11062
* BFD_RELOC_SH_GOT10BY8:                 howto manager.      (line  903)
11063
* BFD_RELOC_SH_GOT20:                    howto manager.      (line  935)
11064
* BFD_RELOC_SH_GOT_HI16:                 howto manager.      (line  881)
11065
* BFD_RELOC_SH_GOT_LOW16:                howto manager.      (line  878)
11066
* BFD_RELOC_SH_GOT_MEDHI16:              howto manager.      (line  880)
11067
* BFD_RELOC_SH_GOT_MEDLOW16:             howto manager.      (line  879)
11068
* BFD_RELOC_SH_GOTFUNCDESC:              howto manager.      (line  937)
11069
* BFD_RELOC_SH_GOTFUNCDESC20:            howto manager.      (line  938)
11070
* BFD_RELOC_SH_GOTOFF20:                 howto manager.      (line  936)
11071
* BFD_RELOC_SH_GOTOFF_HI16:              howto manager.      (line  893)
11072
* BFD_RELOC_SH_GOTOFF_LOW16:             howto manager.      (line  890)
11073
* BFD_RELOC_SH_GOTOFF_MEDHI16:           howto manager.      (line  892)
11074
* BFD_RELOC_SH_GOTOFF_MEDLOW16:          howto manager.      (line  891)
11075
* BFD_RELOC_SH_GOTOFFFUNCDESC:           howto manager.      (line  939)
11076
* BFD_RELOC_SH_GOTOFFFUNCDESC20:         howto manager.      (line  940)
11077
* BFD_RELOC_SH_GOTPC:                    howto manager.      (line  877)
11078
* BFD_RELOC_SH_GOTPC_HI16:               howto manager.      (line  897)
11079
* BFD_RELOC_SH_GOTPC_LOW16:              howto manager.      (line  894)
11080
* BFD_RELOC_SH_GOTPC_MEDHI16:            howto manager.      (line  896)
11081
* BFD_RELOC_SH_GOTPC_MEDLOW16:           howto manager.      (line  895)
11082
* BFD_RELOC_SH_GOTPLT10BY4:              howto manager.      (line  904)
11083
* BFD_RELOC_SH_GOTPLT10BY8:              howto manager.      (line  905)
11084
* BFD_RELOC_SH_GOTPLT32:                 howto manager.      (line  906)
11085
* BFD_RELOC_SH_GOTPLT_HI16:              howto manager.      (line  885)
11086
* BFD_RELOC_SH_GOTPLT_LOW16:             howto manager.      (line  882)
11087
* BFD_RELOC_SH_GOTPLT_MEDHI16:           howto manager.      (line  884)
11088
* BFD_RELOC_SH_GOTPLT_MEDLOW16:          howto manager.      (line  883)
11089
* BFD_RELOC_SH_IMM3:                     howto manager.      (line  847)
11090
* BFD_RELOC_SH_IMM3U:                    howto manager.      (line  848)
11091
* BFD_RELOC_SH_IMM4:                     howto manager.      (line  855)
11092
* BFD_RELOC_SH_IMM4BY2:                  howto manager.      (line  856)
11093
* BFD_RELOC_SH_IMM4BY4:                  howto manager.      (line  857)
11094
* BFD_RELOC_SH_IMM8:                     howto manager.      (line  858)
11095
* BFD_RELOC_SH_IMM8BY2:                  howto manager.      (line  859)
11096
* BFD_RELOC_SH_IMM8BY4:                  howto manager.      (line  860)
11097
* BFD_RELOC_SH_IMM_HI16:                 howto manager.      (line  924)
11098
* BFD_RELOC_SH_IMM_HI16_PCREL:           howto manager.      (line  925)
11099
* BFD_RELOC_SH_IMM_LOW16:                howto manager.      (line  918)
11100
* BFD_RELOC_SH_IMM_LOW16_PCREL:          howto manager.      (line  919)
11101
* BFD_RELOC_SH_IMM_MEDHI16:              howto manager.      (line  922)
11102
* BFD_RELOC_SH_IMM_MEDHI16_PCREL:        howto manager.      (line  923)
11103
* BFD_RELOC_SH_IMM_MEDLOW16:             howto manager.      (line  920)
11104
* BFD_RELOC_SH_IMM_MEDLOW16_PCREL:       howto manager.      (line  921)
11105
* BFD_RELOC_SH_IMMS10:                   howto manager.      (line  912)
11106
* BFD_RELOC_SH_IMMS10BY2:                howto manager.      (line  913)
11107
* BFD_RELOC_SH_IMMS10BY4:                howto manager.      (line  914)
11108
* BFD_RELOC_SH_IMMS10BY8:                howto manager.      (line  915)
11109
* BFD_RELOC_SH_IMMS16:                   howto manager.      (line  916)
11110
* BFD_RELOC_SH_IMMS6:                    howto manager.      (line  909)
11111
* BFD_RELOC_SH_IMMS6BY32:                howto manager.      (line  910)
11112
* BFD_RELOC_SH_IMMU16:                   howto manager.      (line  917)
11113
* BFD_RELOC_SH_IMMU5:                    howto manager.      (line  908)
11114
* BFD_RELOC_SH_IMMU6:                    howto manager.      (line  911)
11115
* BFD_RELOC_SH_JMP_SLOT:                 howto manager.      (line  875)
11116
* BFD_RELOC_SH_JMP_SLOT64:               howto manager.      (line  900)
11117
* BFD_RELOC_SH_LABEL:                    howto manager.      (line  870)
11118
* BFD_RELOC_SH_LOOP_END:                 howto manager.      (line  872)
11119
* BFD_RELOC_SH_LOOP_START:               howto manager.      (line  871)
11120
* BFD_RELOC_SH_PCDISP12BY2:              howto manager.      (line  846)
11121
* BFD_RELOC_SH_PCDISP8BY2:               howto manager.      (line  845)
11122
* BFD_RELOC_SH_PCRELIMM8BY2:             howto manager.      (line  861)
11123
* BFD_RELOC_SH_PCRELIMM8BY4:             howto manager.      (line  862)
11124
* BFD_RELOC_SH_PLT_HI16:                 howto manager.      (line  889)
11125
* BFD_RELOC_SH_PLT_LOW16:                howto manager.      (line  886)
11126
* BFD_RELOC_SH_PLT_MEDHI16:              howto manager.      (line  888)
11127
* BFD_RELOC_SH_PLT_MEDLOW16:             howto manager.      (line  887)
11128
* BFD_RELOC_SH_PT_16:                    howto manager.      (line  926)
11129
* BFD_RELOC_SH_RELATIVE:                 howto manager.      (line  876)
11130
* BFD_RELOC_SH_RELATIVE64:               howto manager.      (line  901)
11131
* BFD_RELOC_SH_SHMEDIA_CODE:             howto manager.      (line  907)
11132
* BFD_RELOC_SH_SWITCH16:                 howto manager.      (line  863)
11133
* BFD_RELOC_SH_SWITCH32:                 howto manager.      (line  864)
11134
* BFD_RELOC_SH_TLS_DTPMOD32:             howto manager.      (line  932)
11135
* BFD_RELOC_SH_TLS_DTPOFF32:             howto manager.      (line  933)
11136
* BFD_RELOC_SH_TLS_GD_32:                howto manager.      (line  927)
11137
* BFD_RELOC_SH_TLS_IE_32:                howto manager.      (line  930)
11138
* BFD_RELOC_SH_TLS_LD_32:                howto manager.      (line  928)
11139
* BFD_RELOC_SH_TLS_LDO_32:               howto manager.      (line  929)
11140
* BFD_RELOC_SH_TLS_LE_32:                howto manager.      (line  931)
11141
* BFD_RELOC_SH_TLS_TPOFF32:              howto manager.      (line  934)
11142
* BFD_RELOC_SH_USES:                     howto manager.      (line  865)
11143
* BFD_RELOC_SPARC13:                     howto manager.      (line  135)
11144
* BFD_RELOC_SPARC22:                     howto manager.      (line  134)
11145
* BFD_RELOC_SPARC_10:                    howto manager.      (line  164)
11146
* BFD_RELOC_SPARC_11:                    howto manager.      (line  165)
11147
* BFD_RELOC_SPARC_5:                     howto manager.      (line  177)
11148
* BFD_RELOC_SPARC_6:                     howto manager.      (line  176)
11149
* BFD_RELOC_SPARC_64:                    howto manager.      (line  163)
11150
* BFD_RELOC_SPARC_7:                     howto manager.      (line  175)
11151
* BFD_RELOC_SPARC_BASE13:                howto manager.      (line  159)
11152
* BFD_RELOC_SPARC_BASE22:                howto manager.      (line  160)
11153
* BFD_RELOC_SPARC_COPY:                  howto manager.      (line  142)
11154
* BFD_RELOC_SPARC_DISP64:                howto manager.      (line  178)
11155
* BFD_RELOC_SPARC_GLOB_DAT:              howto manager.      (line  143)
11156
* BFD_RELOC_SPARC_GOT10:                 howto manager.      (line  136)
11157
* BFD_RELOC_SPARC_GOT13:                 howto manager.      (line  137)
11158
* BFD_RELOC_SPARC_GOT22:                 howto manager.      (line  138)
11159
* BFD_RELOC_SPARC_GOTDATA_HIX22:         howto manager.      (line  149)
11160
* BFD_RELOC_SPARC_GOTDATA_LOX10:         howto manager.      (line  150)
11161
* BFD_RELOC_SPARC_GOTDATA_OP:            howto manager.      (line  153)
11162
* BFD_RELOC_SPARC_GOTDATA_OP_HIX22:      howto manager.      (line  151)
11163
* BFD_RELOC_SPARC_GOTDATA_OP_LOX10:      howto manager.      (line  152)
11164
* BFD_RELOC_SPARC_H44:                   howto manager.      (line  183)
11165
* BFD_RELOC_SPARC_HH22:                  howto manager.      (line  167)
11166
* BFD_RELOC_SPARC_HIX22:                 howto manager.      (line  181)
11167
* BFD_RELOC_SPARC_HM10:                  howto manager.      (line  168)
11168
* BFD_RELOC_SPARC_IRELATIVE:             howto manager.      (line  155)
11169
* BFD_RELOC_SPARC_JMP_IREL:              howto manager.      (line  154)
11170
* BFD_RELOC_SPARC_JMP_SLOT:              howto manager.      (line  144)
11171
* BFD_RELOC_SPARC_L44:                   howto manager.      (line  185)
11172
* BFD_RELOC_SPARC_LM22:                  howto manager.      (line  169)
11173
* BFD_RELOC_SPARC_LOX10:                 howto manager.      (line  182)
11174
* BFD_RELOC_SPARC_M44:                   howto manager.      (line  184)
11175
* BFD_RELOC_SPARC_OLO10:                 howto manager.      (line  166)
11176
* BFD_RELOC_SPARC_PC10:                  howto manager.      (line  139)
11177
* BFD_RELOC_SPARC_PC22:                  howto manager.      (line  140)
11178
* BFD_RELOC_SPARC_PC_HH22:               howto manager.      (line  170)
11179
* BFD_RELOC_SPARC_PC_HM10:               howto manager.      (line  171)
11180
* BFD_RELOC_SPARC_PC_LM22:               howto manager.      (line  172)
11181
* BFD_RELOC_SPARC_PLT32:                 howto manager.      (line  179)
11182
* BFD_RELOC_SPARC_PLT64:                 howto manager.      (line  180)
11183
* BFD_RELOC_SPARC_REGISTER:              howto manager.      (line  186)
11184
* BFD_RELOC_SPARC_RELATIVE:              howto manager.      (line  145)
11185
* BFD_RELOC_SPARC_REV32:                 howto manager.      (line  189)
11186
* BFD_RELOC_SPARC_TLS_DTPMOD32:          howto manager.      (line  210)
11187
* BFD_RELOC_SPARC_TLS_DTPMOD64:          howto manager.      (line  211)
11188
* BFD_RELOC_SPARC_TLS_DTPOFF32:          howto manager.      (line  212)
11189
* BFD_RELOC_SPARC_TLS_DTPOFF64:          howto manager.      (line  213)
11190
* BFD_RELOC_SPARC_TLS_GD_ADD:            howto manager.      (line  194)
11191
* BFD_RELOC_SPARC_TLS_GD_CALL:           howto manager.      (line  195)
11192
* BFD_RELOC_SPARC_TLS_GD_HI22:           howto manager.      (line  192)
11193
* BFD_RELOC_SPARC_TLS_GD_LO10:           howto manager.      (line  193)
11194
* BFD_RELOC_SPARC_TLS_IE_ADD:            howto manager.      (line  207)
11195
* BFD_RELOC_SPARC_TLS_IE_HI22:           howto manager.      (line  203)
11196
* BFD_RELOC_SPARC_TLS_IE_LD:             howto manager.      (line  205)
11197
* BFD_RELOC_SPARC_TLS_IE_LDX:            howto manager.      (line  206)
11198
* BFD_RELOC_SPARC_TLS_IE_LO10:           howto manager.      (line  204)
11199
* BFD_RELOC_SPARC_TLS_LDM_ADD:           howto manager.      (line  198)
11200
* BFD_RELOC_SPARC_TLS_LDM_CALL:          howto manager.      (line  199)
11201
* BFD_RELOC_SPARC_TLS_LDM_HI22:          howto manager.      (line  196)
11202
* BFD_RELOC_SPARC_TLS_LDM_LO10:          howto manager.      (line  197)
11203
* BFD_RELOC_SPARC_TLS_LDO_ADD:           howto manager.      (line  202)
11204
* BFD_RELOC_SPARC_TLS_LDO_HIX22:         howto manager.      (line  200)
11205
* BFD_RELOC_SPARC_TLS_LDO_LOX10:         howto manager.      (line  201)
11206
* BFD_RELOC_SPARC_TLS_LE_HIX22:          howto manager.      (line  208)
11207
* BFD_RELOC_SPARC_TLS_LE_LOX10:          howto manager.      (line  209)
11208
* BFD_RELOC_SPARC_TLS_TPOFF32:           howto manager.      (line  214)
11209
* BFD_RELOC_SPARC_TLS_TPOFF64:           howto manager.      (line  215)
11210
* BFD_RELOC_SPARC_UA16:                  howto manager.      (line  146)
11211
* BFD_RELOC_SPARC_UA32:                  howto manager.      (line  147)
11212
* BFD_RELOC_SPARC_UA64:                  howto manager.      (line  148)
11213
* BFD_RELOC_SPARC_WDISP16:               howto manager.      (line  173)
11214
* BFD_RELOC_SPARC_WDISP19:               howto manager.      (line  174)
11215
* BFD_RELOC_SPARC_WDISP22:               howto manager.      (line  133)
11216
* BFD_RELOC_SPARC_WPLT30:                howto manager.      (line  141)
11217
* BFD_RELOC_SPU_ADD_PIC:                 howto manager.      (line  232)
11218
* BFD_RELOC_SPU_HI16:                    howto manager.      (line  229)
11219
* BFD_RELOC_SPU_IMM10:                   howto manager.      (line  220)
11220
* BFD_RELOC_SPU_IMM10W:                  howto manager.      (line  221)
11221
* BFD_RELOC_SPU_IMM16:                   howto manager.      (line  222)
11222
* BFD_RELOC_SPU_IMM16W:                  howto manager.      (line  223)
11223
* BFD_RELOC_SPU_IMM18:                   howto manager.      (line  224)
11224
* BFD_RELOC_SPU_IMM7:                    howto manager.      (line  218)
11225
* BFD_RELOC_SPU_IMM8:                    howto manager.      (line  219)
11226
* BFD_RELOC_SPU_LO16:                    howto manager.      (line  228)
11227
* BFD_RELOC_SPU_PCREL16:                 howto manager.      (line  227)
11228
* BFD_RELOC_SPU_PCREL9a:                 howto manager.      (line  225)
11229
* BFD_RELOC_SPU_PCREL9b:                 howto manager.      (line  226)
11230
* BFD_RELOC_SPU_PPU32:                   howto manager.      (line  230)
11231
* BFD_RELOC_SPU_PPU64:                   howto manager.      (line  231)
11232
* BFD_RELOC_THUMB_PCREL_BLX:             howto manager.      (line  704)
11233
* BFD_RELOC_THUMB_PCREL_BRANCH12:        howto manager.      (line  718)
11234
* BFD_RELOC_THUMB_PCREL_BRANCH20:        howto manager.      (line  719)
11235
* BFD_RELOC_THUMB_PCREL_BRANCH23:        howto manager.      (line  720)
11236
* BFD_RELOC_THUMB_PCREL_BRANCH25:        howto manager.      (line  721)
11237
* BFD_RELOC_THUMB_PCREL_BRANCH7:         howto manager.      (line  716)
11238
* BFD_RELOC_THUMB_PCREL_BRANCH9:         howto manager.      (line  717)
11239
* BFD_RELOC_TIC30_LDP:                   howto manager.      (line 1268)
11240
* BFD_RELOC_TIC54X_16_OF_23:             howto manager.      (line 1286)
11241
* BFD_RELOC_TIC54X_23:                   howto manager.      (line 1283)
11242
* BFD_RELOC_TIC54X_MS7_OF_23:            howto manager.      (line 1291)
11243
* BFD_RELOC_TIC54X_PARTLS7:              howto manager.      (line 1273)
11244
* BFD_RELOC_TIC54X_PARTMS9:              howto manager.      (line 1278)
11245
* bfd_reloc_type_lookup:                 howto manager.      (line 2326)
11246
* BFD_RELOC_V850_22_PCREL:               howto manager.      (line 1195)
11247
* BFD_RELOC_V850_9_PCREL:                howto manager.      (line 1192)
11248
* BFD_RELOC_V850_ALIGN:                  howto manager.      (line 1253)
11249
* BFD_RELOC_V850_CALLT_16_16_OFFSET:     howto manager.      (line 1244)
11250
* BFD_RELOC_V850_CALLT_6_7_OFFSET:       howto manager.      (line 1241)
11251
* BFD_RELOC_V850_LO16_SPLIT_OFFSET:      howto manager.      (line 1256)
11252
* BFD_RELOC_V850_LONGCALL:               howto manager.      (line 1247)
11253
* BFD_RELOC_V850_LONGJUMP:               howto manager.      (line 1250)
11254
* BFD_RELOC_V850_SDA_15_16_OFFSET:       howto manager.      (line 1201)
11255
* BFD_RELOC_V850_SDA_16_16_OFFSET:       howto manager.      (line 1198)
11256
* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager.      (line 1233)
11257
* BFD_RELOC_V850_TDA_16_16_OFFSET:       howto manager.      (line 1223)
11258
* BFD_RELOC_V850_TDA_4_4_OFFSET:         howto manager.      (line 1230)
11259
* BFD_RELOC_V850_TDA_4_5_OFFSET:         howto manager.      (line 1226)
11260
* BFD_RELOC_V850_TDA_6_8_OFFSET:         howto manager.      (line 1212)
11261
* BFD_RELOC_V850_TDA_7_7_OFFSET:         howto manager.      (line 1220)
11262
* BFD_RELOC_V850_TDA_7_8_OFFSET:         howto manager.      (line 1216)
11263
* BFD_RELOC_V850_ZDA_15_16_OFFSET:       howto manager.      (line 1208)
11264
* BFD_RELOC_V850_ZDA_16_16_OFFSET:       howto manager.      (line 1205)
11265
* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager.      (line 1237)
11266
* BFD_RELOC_VAX_GLOB_DAT:                howto manager.      (line 2091)
11267
* BFD_RELOC_VAX_JMP_SLOT:                howto manager.      (line 2092)
11268
* BFD_RELOC_VAX_RELATIVE:                howto manager.      (line 2093)
11269
* BFD_RELOC_VPE4KMATH_DATA:              howto manager.      (line 1730)
11270
* BFD_RELOC_VPE4KMATH_INSN:              howto manager.      (line 1731)
11271
* BFD_RELOC_VTABLE_ENTRY:                howto manager.      (line 1735)
11272
* BFD_RELOC_VTABLE_INHERIT:              howto manager.      (line 1734)
11273
* BFD_RELOC_X86_64_32S:                  howto manager.      (line  539)
11274
* BFD_RELOC_X86_64_COPY:                 howto manager.      (line  534)
11275
* BFD_RELOC_X86_64_DTPMOD64:             howto manager.      (line  540)
11276
* BFD_RELOC_X86_64_DTPOFF32:             howto manager.      (line  545)
11277
* BFD_RELOC_X86_64_DTPOFF64:             howto manager.      (line  541)
11278
* BFD_RELOC_X86_64_GLOB_DAT:             howto manager.      (line  535)
11279
* BFD_RELOC_X86_64_GOT32:                howto manager.      (line  532)
11280
* BFD_RELOC_X86_64_GOT64:                howto manager.      (line  550)
11281
* BFD_RELOC_X86_64_GOTOFF64:             howto manager.      (line  548)
11282
* BFD_RELOC_X86_64_GOTPC32:              howto manager.      (line  549)
11283
* BFD_RELOC_X86_64_GOTPC32_TLSDESC:      howto manager.      (line  555)
11284
* BFD_RELOC_X86_64_GOTPC64:              howto manager.      (line  552)
11285
* BFD_RELOC_X86_64_GOTPCREL:             howto manager.      (line  538)
11286
* BFD_RELOC_X86_64_GOTPCREL64:           howto manager.      (line  551)
11287
* BFD_RELOC_X86_64_GOTPLT64:             howto manager.      (line  553)
11288
* BFD_RELOC_X86_64_GOTTPOFF:             howto manager.      (line  546)
11289
* BFD_RELOC_X86_64_IRELATIVE:            howto manager.      (line  558)
11290
* BFD_RELOC_X86_64_JUMP_SLOT:            howto manager.      (line  536)
11291
* BFD_RELOC_X86_64_PLT32:                howto manager.      (line  533)
11292
* BFD_RELOC_X86_64_PLTOFF64:             howto manager.      (line  554)
11293
* BFD_RELOC_X86_64_RELATIVE:             howto manager.      (line  537)
11294
* BFD_RELOC_X86_64_TLSDESC:              howto manager.      (line  557)
11295
* BFD_RELOC_X86_64_TLSDESC_CALL:         howto manager.      (line  556)
11296
* BFD_RELOC_X86_64_TLSGD:                howto manager.      (line  543)
11297
* BFD_RELOC_X86_64_TLSLD:                howto manager.      (line  544)
11298
* BFD_RELOC_X86_64_TPOFF32:              howto manager.      (line  547)
11299
* BFD_RELOC_X86_64_TPOFF64:              howto manager.      (line  542)
11300
* BFD_RELOC_XC16X_PAG:                   howto manager.      (line 2085)
11301
* BFD_RELOC_XC16X_POF:                   howto manager.      (line 2086)
11302
* BFD_RELOC_XC16X_SEG:                   howto manager.      (line 2087)
11303
* BFD_RELOC_XC16X_SOF:                   howto manager.      (line 2088)
11304
* BFD_RELOC_XSTORMY16_12:                howto manager.      (line 2077)
11305
* BFD_RELOC_XSTORMY16_24:                howto manager.      (line 2078)
11306
* BFD_RELOC_XSTORMY16_FPTR16:            howto manager.      (line 2079)
11307
* BFD_RELOC_XSTORMY16_REL_12:            howto manager.      (line 2076)
11308
* BFD_RELOC_XTENSA_ASM_EXPAND:           howto manager.      (line 2197)
11309
* BFD_RELOC_XTENSA_ASM_SIMPLIFY:         howto manager.      (line 2202)
11310
* BFD_RELOC_XTENSA_DIFF16:               howto manager.      (line 2144)
11311
* BFD_RELOC_XTENSA_DIFF32:               howto manager.      (line 2145)
11312
* BFD_RELOC_XTENSA_DIFF8:                howto manager.      (line 2143)
11313
* BFD_RELOC_XTENSA_GLOB_DAT:             howto manager.      (line 2133)
11314
* BFD_RELOC_XTENSA_JMP_SLOT:             howto manager.      (line 2134)
11315
* BFD_RELOC_XTENSA_OP0:                  howto manager.      (line 2191)
11316
* BFD_RELOC_XTENSA_OP1:                  howto manager.      (line 2192)
11317
* BFD_RELOC_XTENSA_OP2:                  howto manager.      (line 2193)
11318
* BFD_RELOC_XTENSA_PLT:                  howto manager.      (line 2138)
11319
* BFD_RELOC_XTENSA_RELATIVE:             howto manager.      (line 2135)
11320
* BFD_RELOC_XTENSA_RTLD:                 howto manager.      (line 2128)
11321
* BFD_RELOC_XTENSA_SLOT0_ALT:            howto manager.      (line 2173)
11322
* BFD_RELOC_XTENSA_SLOT0_OP:             howto manager.      (line 2153)
11323
* BFD_RELOC_XTENSA_SLOT10_ALT:           howto manager.      (line 2183)
11324
* BFD_RELOC_XTENSA_SLOT10_OP:            howto manager.      (line 2163)
11325
* BFD_RELOC_XTENSA_SLOT11_ALT:           howto manager.      (line 2184)
11326
* BFD_RELOC_XTENSA_SLOT11_OP:            howto manager.      (line 2164)
11327
* BFD_RELOC_XTENSA_SLOT12_ALT:           howto manager.      (line 2185)
11328
* BFD_RELOC_XTENSA_SLOT12_OP:            howto manager.      (line 2165)
11329
* BFD_RELOC_XTENSA_SLOT13_ALT:           howto manager.      (line 2186)
11330
* BFD_RELOC_XTENSA_SLOT13_OP:            howto manager.      (line 2166)
11331
* BFD_RELOC_XTENSA_SLOT14_ALT:           howto manager.      (line 2187)
11332
* BFD_RELOC_XTENSA_SLOT14_OP:            howto manager.      (line 2167)
11333
* BFD_RELOC_XTENSA_SLOT1_ALT:            howto manager.      (line 2174)
11334
* BFD_RELOC_XTENSA_SLOT1_OP:             howto manager.      (line 2154)
11335
* BFD_RELOC_XTENSA_SLOT2_ALT:            howto manager.      (line 2175)
11336
* BFD_RELOC_XTENSA_SLOT2_OP:             howto manager.      (line 2155)
11337
* BFD_RELOC_XTENSA_SLOT3_ALT:            howto manager.      (line 2176)
11338
* BFD_RELOC_XTENSA_SLOT3_OP:             howto manager.      (line 2156)
11339
* BFD_RELOC_XTENSA_SLOT4_ALT:            howto manager.      (line 2177)
11340
* BFD_RELOC_XTENSA_SLOT4_OP:             howto manager.      (line 2157)
11341
* BFD_RELOC_XTENSA_SLOT5_ALT:            howto manager.      (line 2178)
11342
* BFD_RELOC_XTENSA_SLOT5_OP:             howto manager.      (line 2158)
11343
* BFD_RELOC_XTENSA_SLOT6_ALT:            howto manager.      (line 2179)
11344
* BFD_RELOC_XTENSA_SLOT6_OP:             howto manager.      (line 2159)
11345
* BFD_RELOC_XTENSA_SLOT7_ALT:            howto manager.      (line 2180)
11346
* BFD_RELOC_XTENSA_SLOT7_OP:             howto manager.      (line 2160)
11347
* BFD_RELOC_XTENSA_SLOT8_ALT:            howto manager.      (line 2181)
11348
* BFD_RELOC_XTENSA_SLOT8_OP:             howto manager.      (line 2161)
11349
* BFD_RELOC_XTENSA_SLOT9_ALT:            howto manager.      (line 2182)
11350
* BFD_RELOC_XTENSA_SLOT9_OP:             howto manager.      (line 2162)
11351
* BFD_RELOC_XTENSA_TLS_ARG:              howto manager.      (line 2212)
11352
* BFD_RELOC_XTENSA_TLS_CALL:             howto manager.      (line 2213)
11353
* BFD_RELOC_XTENSA_TLS_DTPOFF:           howto manager.      (line 2209)
11354
* BFD_RELOC_XTENSA_TLS_FUNC:             howto manager.      (line 2211)
11355
* BFD_RELOC_XTENSA_TLS_TPOFF:            howto manager.      (line 2210)
11356
* BFD_RELOC_XTENSA_TLSDESC_ARG:          howto manager.      (line 2208)
11357
* BFD_RELOC_XTENSA_TLSDESC_FN:           howto manager.      (line 2207)
11358
* BFD_RELOC_Z80_DISP8:                   howto manager.      (line 2216)
11359
* BFD_RELOC_Z8K_CALLR:                   howto manager.      (line 2222)
11360
* BFD_RELOC_Z8K_DISP7:                   howto manager.      (line 2219)
11361
* BFD_RELOC_Z8K_IMM4L:                   howto manager.      (line 2225)
11362 330 jeremybenn
* bfd_scan_arch:                         Architectures.      (line  435)
11363
* bfd_scan_vma:                          BFD front end.      (line  517)
11364
* bfd_seach_for_target:                  bfd_target.         (line  505)
11365
* bfd_section_already_linked:            Writing the symbol table.
11366
                                                             (line   55)
11367
* bfd_section_list_clear:                section prototypes. (line    8)
11368
* bfd_sections_find_if:                  section prototypes. (line  176)
11369
* bfd_set_arch_info:                     Architectures.      (line  476)
11370
* bfd_set_archive_head:                  Archives.           (line   69)
11371
* bfd_set_default_target:                bfd_target.         (line  444)
11372
* bfd_set_error:                         BFD front end.      (line  327)
11373
* bfd_set_error_handler:                 BFD front end.      (line  369)
11374
* bfd_set_error_program_name:            BFD front end.      (line  378)
11375
* bfd_set_file_flags:                    BFD front end.      (line  437)
11376
* bfd_set_format:                        Formats.            (line   68)
11377
* bfd_set_gp_size:                       BFD front end.      (line  507)
11378
* bfd_set_private_flags:                 BFD front end.      (line  584)
11379
* bfd_set_reloc:                         BFD front end.      (line  427)
11380
* bfd_set_section_contents:              section prototypes. (line  207)
11381
* bfd_set_section_flags:                 section prototypes. (line  140)
11382
* bfd_set_section_size:                  section prototypes. (line  193)
11383
* bfd_set_start_address:                 BFD front end.      (line  486)
11384
* bfd_set_symtab:                        symbol handling functions.
11385
                                                             (line   60)
11386
* bfd_symbol_info:                       symbol handling functions.
11387
                                                             (line  130)
11388
* bfd_target_list:                       bfd_target.         (line  496)
11389
* bfd_write_bigendian_4byte_int:         Internal.           (line   13)
11390
* bfd_zalloc:                            Opening and Closing.
11391
                                                             (line  229)
11392
* bfd_zalloc2:                           Opening and Closing.
11393
                                                             (line  238)
11394
* coff_symbol_type:                      coff.               (line  244)
11395
* core_file_matches_executable_p:        Core Files.         (line   30)
11396
* find_separate_debug_file:              Opening and Closing.
11397
                                                             (line  280)
11398
* generic_core_file_matches_executable_p: Core Files.        (line   40)
11399
* get_debug_link_info:                   Opening and Closing.
11400
                                                             (line  261)
11401
* Hash tables:                           Hash Tables.        (line    6)
11402
* internal object-file format:           Canonical format.   (line   11)
11403
* Linker:                                Linker Functions.   (line    6)
11404
* Other functions:                       BFD front end.      (line  599)
11405
* separate_debug_file_exists:            Opening and Closing.
11406
                                                             (line  271)
11407
* struct bfd_iovec:                      BFD front end.      (line  802)
11408
* target vector (_bfd_final_link):       Performing the Final Link.
11409
                                                             (line    6)
11410
* target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
11411
                                                             (line    6)
11412
* target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
11413
 
11414
 
11415
* what is it?:                           Overview.           (line    6)
11416
11417
11418

11419
Tag Table:
11420 342 jeremybenn
Node: Top1052
11421
Node: Overview1391
11422
Node: History2442
11423
Node: How It Works3388
11424
Node: What BFD Version 2 Can Do4931
11425
Node: BFD information loss6246
11426
Node: Canonical format8778
11427
Node: BFD front end13150
11428
Node: Memory Usage44686
11429
Node: Initialization45914
11430
Node: Sections46373
11431
Node: Section Input46856
11432
Node: Section Output48221
11433
Node: typedef asection50707
11434
Node: section prototypes75716
11435
Node: Symbols85396
11436
Node: Reading Symbols86991
11437
Node: Writing Symbols88098
11438
Node: Mini Symbols89807
11439
Node: typedef asymbol90781
11440
Node: symbol handling functions96840
11441
Node: Archives102182
11442
Node: Formats105908
11443
Node: Relocations108856
11444
Node: typedef arelent109583
11445
Node: howto manager125219
11446 512 jeremybenn
Node: Core Files200319
11447
Node: Targets202136
11448
Node: bfd_target204106
11449
Node: Architectures226422
11450
Node: Opening and Closing249712
11451
Node: Internal261050
11452
Node: File Caching267383
11453
Node: Linker Functions269297
11454
Node: Creating a Linker Hash Table270970
11455
Node: Adding Symbols to the Hash Table272708
11456
Node: Differing file formats273608
11457
Node: Adding symbols from an object file275333
11458
Node: Adding symbols from an archive277484
11459
Node: Performing the Final Link279898
11460
Node: Information provided by the linker281140
11461
Node: Relocating the section contents282294
11462
Node: Writing the symbol table284045
11463
Node: Hash Tables288060
11464
Node: Creating and Freeing a Hash Table289258
11465
Node: Looking Up or Entering a String290508
11466
Node: Traversing a Hash Table291761
11467
Node: Deriving a New Hash Table Type292550
11468
Node: Define the Derived Structures293616
11469
Node: Write the Derived Creation Routine294697
11470
Node: Write Other Derived Routines297321
11471
Node: BFD back ends298636
11472
Node: What to Put Where298906
11473
Node: aout299086
11474
Node: coff305404
11475
Node: elf333837
11476
Node: mmo334238
11477
Node: File layout335166
11478
Node: Symbol-table340813
11479
Node: mmo section mapping344582
11480
Node: GNU Free Documentation License348234

powered by: WebSVN 2.1.0

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