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

Subversion Repositories openrisc_me

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

11417
Tag Table:
11418
Node: Top1051
11419
Node: Overview1390
11420
Node: History2441
11421
Node: How It Works3387
11422
Node: What BFD Version 2 Can Do4930
11423
Node: BFD information loss6245
11424
Node: Canonical format8777
11425
Node: BFD front end13149
11426
Node: Memory Usage44685
11427
Node: Initialization45913
11428
Node: Sections46372
11429
Node: Section Input46855
11430
Node: Section Output48220
11431
Node: typedef asection50706
11432
Node: section prototypes75715
11433
Node: Symbols85395
11434
Node: Reading Symbols86990
11435
Node: Writing Symbols88097
11436
Node: Mini Symbols89806
11437
Node: typedef asymbol90780
11438
Node: symbol handling functions96839
11439
Node: Archives102181
11440
Node: Formats105907
11441
Node: Relocations108855
11442
Node: typedef arelent109582
11443
Node: howto manager125218
11444
Node: Core Files200290
11445
Node: Targets202107
11446
Node: bfd_target204077
11447
Node: Architectures226393
11448
Node: Opening and Closing249683
11449
Node: Internal261021
11450
Node: File Caching267354
11451
Node: Linker Functions269268
11452
Node: Creating a Linker Hash Table270941
11453
Node: Adding Symbols to the Hash Table272679
11454
Node: Differing file formats273579
11455
Node: Adding symbols from an object file275304
11456
Node: Adding symbols from an archive277455
11457
Node: Performing the Final Link279869
11458
Node: Information provided by the linker281111
11459
Node: Relocating the section contents282265
11460
Node: Writing the symbol table284016
11461
Node: Hash Tables288031
11462
Node: Creating and Freeing a Hash Table289229
11463
Node: Looking Up or Entering a String290479
11464
Node: Traversing a Hash Table291732
11465
Node: Deriving a New Hash Table Type292521
11466
Node: Define the Derived Structures293587
11467
Node: Write the Derived Creation Routine294668
11468
Node: Write Other Derived Routines297292
11469
Node: BFD back ends298607
11470
Node: What to Put Where298877
11471
Node: aout299057
11472
Node: coff305375
11473
Node: elf333808
11474
Node: mmo334209
11475
Node: File layout335137
11476
Node: Symbol-table340784
11477
Node: mmo section mapping344553
11478
Node: GNU Free Documentation License348205

powered by: WebSVN 2.1.0

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