• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Révisiona334aaf9e47b9316385ceb48cfff1ad0e11bbe75 (tree)
l'heure2005-06-13 04:13:57
AuteurDaniel Jacobowitz <drow@fals...>
CommiterDaniel Jacobowitz

Message de Log

Update generated files for binutils 2.16.1.

Change Summary

Modification

--- a/bfd/doc/bfd.info
+++ b/bfd/doc/bfd.info
@@ -1,5 +1,5 @@
1-This is ../.././bfd/doc/bfd.info, produced by makeinfo version 4.7 from
2-../.././bfd/doc/bfd.texinfo.
1+This is ../../../src/bfd/doc/bfd.info, produced by makeinfo version 4.7
2+from ../../../src/bfd/doc/bfd.texinfo.
33
44 START-INFO-DIR-ENTRY
55 * Bfd: (bfd). The Binary File Descriptor library.
@@ -17,73 +17,9740 @@ END-INFO-DIR-ENTRY
1717 section entitled "GNU Free Documentation License".
1818
1919 
20-Indirect:
21-bfd.info-1: 724
22-bfd.info-2: 298309
20+File: bfd.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
21+
22+ This file documents the binary file descriptor library libbfd.
23+
24+* Menu:
25+
26+* Overview:: Overview of BFD
27+* BFD front end:: BFD front end
28+* BFD back ends:: BFD back ends
29+* GNU Free Documentation License:: GNU Free Documentation License
30+* Index:: Index
31+
32+
33+File: bfd.info, Node: Overview, Next: BFD front end, Prev: Top, Up: Top
34+
35+1 Introduction
36+**************
37+
38+BFD is a package which allows applications to use the same routines to
39+operate on object files whatever the object file format. A new object
40+file format can be supported simply by creating a new BFD back end and
41+adding it to the library.
42+
43+ BFD is split into two parts: the front end, and the back ends (one
44+for each object file format).
45+ * The front end of BFD provides the interface to the user. It manages
46+ memory and various canonical data structures. The front end also
47+ decides which back end to use and when to call back end routines.
48+
49+ * The back ends provide BFD its view of the real world. Each back
50+ end provides a set of calls which the BFD front end can use to
51+ maintain its canonical form. The back ends also may keep around
52+ information for their own use, for greater efficiency.
53+
54+* Menu:
55+
56+* History:: History
57+* How It Works:: How It Works
58+* What BFD Version 2 Can Do:: What BFD Version 2 Can Do
59+
60+
61+File: bfd.info, Node: History, Next: How It Works, Prev: Overview, Up: Overview
62+
63+1.1 History
64+===========
65+
66+One spur behind BFD was the desire, on the part of the GNU 960 team at
67+Intel Oregon, for interoperability of applications on their COFF and
68+b.out file formats. Cygnus was providing GNU support for the team, and
69+was contracted to provide the required functionality.
70+
71+ The name came from a conversation David Wallace was having with
72+Richard Stallman about the library: RMS said that it would be quite
73+hard--David said "BFD". Stallman was right, but the name stuck.
74+
75+ At the same time, Ready Systems wanted much the same thing, but for
76+different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k
77+coff.
78+
79+ BFD was first implemented by members of Cygnus Support; Steve
80+Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K.
81+Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace
82+(`gumby@cygnus.com').
83+
84+
85+File: bfd.info, Node: How It Works, Next: What BFD Version 2 Can Do, Prev: History, Up: Overview
86+
87+1.2 How To Use BFD
88+==================
89+
90+To use the library, include `bfd.h' and link with `libbfd.a'.
91+
92+ BFD provides a common interface to the parts of an object file for a
93+calling application.
94+
95+ When an application sucessfully opens a target file (object,
96+archive, or whatever), a pointer to an internal structure is returned.
97+This pointer points to a structure called `bfd', described in `bfd.h'.
98+Our convention is to call this pointer a BFD, and instances of it
99+within code `abfd'. All operations on the target object file are
100+applied as methods to the BFD. The mapping is defined within `bfd.h'
101+in a set of macros, all beginning with `bfd_' to reduce namespace
102+pollution.
103+
104+ For example, this sequence does what you would probably expect:
105+return the number of sections in an object file attached to a BFD
106+`abfd'.
107+
108+ #include "bfd.h"
109+
110+ unsigned int number_of_sections (abfd)
111+ bfd *abfd;
112+ {
113+ return bfd_count_sections (abfd);
114+ }
115+
116+ The abstraction used within BFD is that an object file has:
117+
118+ * a header,
119+
120+ * a number of sections containing raw data (*note Sections::),
121+
122+ * a set of relocations (*note Relocations::), and
123+
124+ * some symbol information (*note Symbols::).
125+ Also, BFDs opened for archives have the additional attribute of an
126+index and contain subordinate BFDs. This approach is fine for a.out and
127+coff, but loses efficiency when applied to formats such as S-records and
128+IEEE-695.
129+
130+
131+File: bfd.info, Node: What BFD Version 2 Can Do, Prev: How It Works, Up: Overview
132+
133+1.3 What BFD Version 2 Can Do
134+=============================
135+
136+When an object file is opened, BFD subroutines automatically determine
137+the format of the input object file. They then build a descriptor in
138+memory with pointers to routines that will be used to access elements of
139+the object file's data structures.
140+
141+ As different information from the object files is required, BFD
142+reads from different sections of the file and processes them. For
143+example, a very common operation for the linker is processing symbol
144+tables. Each BFD back end provides a routine for converting between
145+the object file's representation of symbols and an internal canonical
146+format. When the linker asks for the symbol table of an object file, it
147+calls through a memory pointer to the routine from the relevant BFD
148+back end which reads and converts the table into a canonical form. The
149+linker then operates upon the canonical form. When the link is finished
150+and the linker writes the output file's symbol table, another BFD back
151+end routine is called to take the newly created symbol table and
152+convert it into the chosen output format.
153+
154+* Menu:
155+
156+* BFD information loss:: Information Loss
157+* Canonical format:: The BFD canonical object-file format
158+
159+
160+File: bfd.info, Node: BFD information loss, Next: Canonical format, Up: What BFD Version 2 Can Do
161+
162+1.3.1 Information Loss
163+----------------------
164+
165+_Information can be lost during output._ The output formats supported
166+by BFD do not provide identical facilities, and information which can
167+be described in one form has nowhere to go in another format. One
168+example of this is alignment information in `b.out'. There is nowhere
169+in an `a.out' format file to store alignment information on the
170+contained data, so when a file is linked from `b.out' and an `a.out'
171+image is produced, alignment information will not propagate to the
172+output file. (The linker will still use the alignment information
173+internally, so the link is performed correctly).
174+
175+ Another example is COFF section names. COFF files may contain an
176+unlimited number of sections, each one with a textual section name. If
177+the target of the link is a format which does not have many sections
178+(e.g., `a.out') or has sections without names (e.g., the Oasys format),
179+the link cannot be done simply. You can circumvent this problem by
180+describing the desired input-to-output section mapping with the linker
181+command language.
182+
183+ _Information can be lost during canonicalization._ The BFD internal
184+canonical form of the external formats is not exhaustive; there are
185+structures in input formats for which there is no direct representation
186+internally. This means that the BFD back ends cannot maintain all
187+possible data richness through the transformation between external to
188+internal and back to external formats.
189+
190+ This limitation is only a problem when an application reads one
191+format and writes another. Each BFD back end is responsible for
192+maintaining as much data as possible, and the internal BFD canonical
193+form has structures which are opaque to the BFD core, and exported only
194+to the back ends. When a file is read in one format, the canonical form
195+is generated for BFD and the application. At the same time, the back
196+end saves away any information which may otherwise be lost. If the data
197+is then written back in the same format, the back end routine will be
198+able to use the canonical form provided by the BFD core as well as the
199+information it prepared earlier. Since there is a great deal of
200+commonality between back ends, there is no information lost when
201+linking or copying big endian COFF to little endian COFF, or `a.out' to
202+`b.out'. When a mixture of formats is linked, the information is only
203+lost from the files whose format differs from the destination.
204+
205+
206+File: bfd.info, Node: Canonical format, Prev: BFD information loss, Up: What BFD Version 2 Can Do
207+
208+1.3.2 The BFD canonical object-file format
209+------------------------------------------
210+
211+The greatest potential for loss of information occurs when there is the
212+least overlap between the information provided by the source format,
213+that stored by the canonical format, and that needed by the destination
214+format. A brief description of the canonical form may help you
215+understand which kinds of data you can count on preserving across
216+conversions.
217+
218+_files_
219+ Information stored on a per-file basis includes target machine
220+ architecture, particular implementation format type, a demand
221+ pageable bit, and a write protected bit. Information like Unix
222+ magic numbers is not stored here--only the magic numbers' meaning,
223+ so a `ZMAGIC' file would have both the demand pageable bit and the
224+ write protected text bit set. The byte order of the target is
225+ stored on a per-file basis, so that big- and little-endian object
226+ files may be used with one another.
227+
228+_sections_
229+ Each section in the input file contains the name of the section,
230+ the section's original address in the object file, size and
231+ alignment information, various flags, and pointers into other BFD
232+ data structures.
233+
234+_symbols_
235+ Each symbol contains a pointer to the information for the object
236+ file which originally defined it, its name, its value, and various
237+ flag bits. When a BFD back end reads in a symbol table, it
238+ relocates all symbols to make them relative to the base of the
239+ section where they were defined. Doing this ensures that each
240+ symbol points to its containing section. Each symbol also has a
241+ varying amount of hidden private data for the BFD back end. Since
242+ the symbol points to the original file, the private data format
243+ for that symbol is accessible. `ld' can operate on a collection
244+ of symbols of wildly different formats without problems.
245+
246+ Normal global and simple local symbols are maintained on output,
247+ so an output file (no matter its format) will retain symbols
248+ pointing to functions and to global, static, and common variables.
249+ Some symbol information is not worth retaining; in `a.out', type
250+ information is stored in the symbol table as long symbol names.
251+ This information would be useless to most COFF debuggers; the
252+ linker has command line switches to allow users to throw it away.
253+
254+ There is one word of type information within the symbol, so if the
255+ format supports symbol type information within symbols (for
256+ example, COFF, IEEE, Oasys) and the type is simple enough to fit
257+ within one word (nearly everything but aggregates), the
258+ information will be preserved.
259+
260+_relocation level_
261+ Each canonical BFD relocation record contains a pointer to the
262+ symbol to relocate to, the offset of the data to relocate, the
263+ section the data is in, and a pointer to a relocation type
264+ descriptor. Relocation is performed by passing messages through
265+ the relocation type descriptor and the symbol pointer. Therefore,
266+ relocations can be performed on output data using a relocation
267+ method that is only available in one of the input formats. For
268+ instance, Oasys provides a byte relocation format. A relocation
269+ record requesting this relocation type would point indirectly to a
270+ routine to perform this, so the relocation may be performed on a
271+ byte being written to a 68k COFF file, even though 68k COFF has no
272+ such relocation type.
273+
274+_line numbers_
275+ Object formats can contain, for debugging purposes, some form of
276+ mapping between symbols, source line numbers, and addresses in the
277+ output file. These addresses have to be relocated along with the
278+ symbol information. Each symbol with an associated list of line
279+ number records points to the first record of the list. The head
280+ of a line number list consists of a pointer to the symbol, which
281+ allows finding out the address of the function whose line number
282+ is being described. The rest of the list is made up of pairs:
283+ offsets into the section and line numbers. Any format which can
284+ simply derive this information can pass it successfully between
285+ formats (COFF, IEEE and Oasys).
286+
287+
288+File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up: Top
289+
290+2 BFD Front End
291+***************
292+
293+2.1 `typedef bfd'
294+=================
295+
296+A BFD has type `bfd'; objects of this type are the cornerstone of any
297+application using BFD. Using BFD consists of making references though
298+the BFD and to data in the BFD.
299+
300+ Here is the structure that defines the type `bfd'. It contains the
301+major data about the file and pointers to the rest of the data.
302+
303+
304+ struct bfd
305+ {
306+ /* A unique identifier of the BFD */
307+ unsigned int id;
308+
309+ /* The filename the application opened the BFD with. */
310+ const char *filename;
311+
312+ /* A pointer to the target jump table. */
313+ const struct bfd_target *xvec;
314+
315+ /* The IOSTREAM, and corresponding IO vector that provide access
316+ to the file backing the BFD. */
317+ void *iostream;
318+ const struct bfd_iovec *iovec;
319+
320+ /* Is the file descriptor being cached? That is, can it be closed as
321+ needed, and re-opened when accessed later? */
322+ bfd_boolean cacheable;
323+
324+ /* Marks whether there was a default target specified when the
325+ BFD was opened. This is used to select which matching algorithm
326+ to use to choose the back end. */
327+ bfd_boolean target_defaulted;
328+
329+ /* The caching routines use these to maintain a
330+ least-recently-used list of BFDs. */
331+ struct bfd *lru_prev, *lru_next;
332+
333+ /* When a file is closed by the caching routines, BFD retains
334+ state information on the file here... */
335+ ufile_ptr where;
336+
337+ /* ... and here: (``once'' means at least once). */
338+ bfd_boolean opened_once;
339+
340+ /* Set if we have a locally maintained mtime value, rather than
341+ getting it from the file each time. */
342+ bfd_boolean mtime_set;
343+
344+ /* File modified time, if mtime_set is TRUE. */
345+ long mtime;
346+
347+ /* Reserved for an unimplemented file locking extension. */
348+ int ifd;
349+
350+ /* The format which belongs to the BFD. (object, core, etc.) */
351+ bfd_format format;
352+
353+ /* The direction with which the BFD was opened. */
354+ enum bfd_direction
355+ {
356+ no_direction = 0,
357+ read_direction = 1,
358+ write_direction = 2,
359+ both_direction = 3
360+ }
361+ direction;
362+
363+ /* Format_specific flags. */
364+ flagword flags;
365+
366+ /* Currently my_archive is tested before adding origin to
367+ anything. I believe that this can become always an add of
368+ origin, with origin set to 0 for non archive files. */
369+ ufile_ptr origin;
370+
371+ /* Remember when output has begun, to stop strange things
372+ from happening. */
373+ bfd_boolean output_has_begun;
374+
375+ /* A hash table for section names. */
376+ struct bfd_hash_table section_htab;
377+
378+ /* Pointer to linked list of sections. */
379+ struct bfd_section *sections;
380+
381+ /* The place where we add to the section list. */
382+ struct bfd_section **section_tail;
383+
384+ /* The number of sections. */
385+ unsigned int section_count;
386+
387+ /* Stuff only useful for object files:
388+ The start address. */
389+ bfd_vma start_address;
390+
391+ /* Used for input and output. */
392+ unsigned int symcount;
393+
394+ /* Symbol table for output BFD (with symcount entries). */
395+ struct bfd_symbol **outsymbols;
396+
397+ /* Used for slurped dynamic symbol tables. */
398+ unsigned int dynsymcount;
399+
400+ /* Pointer to structure which contains architecture information. */
401+ const struct bfd_arch_info *arch_info;
402+
403+ /* Flag set if symbols from this BFD should not be exported. */
404+ bfd_boolean no_export;
405+
406+ /* Stuff only useful for archives. */
407+ void *arelt_data;
408+ struct bfd *my_archive; /* The containing archive BFD. */
409+ struct bfd *next; /* The next BFD in the archive. */
410+ struct bfd *archive_head; /* The first BFD in the archive. */
411+ bfd_boolean has_armap;
412+
413+ /* A chain of BFD structures involved in a link. */
414+ struct bfd *link_next;
415+
416+ /* A field used by _bfd_generic_link_add_archive_symbols. This will
417+ be used only for archive elements. */
418+ int archive_pass;
419+
420+ /* Used by the back end to hold private data. */
421+ union
422+ {
423+ struct aout_data_struct *aout_data;
424+ struct artdata *aout_ar_data;
425+ struct _oasys_data *oasys_obj_data;
426+ struct _oasys_ar_data *oasys_ar_data;
427+ struct coff_tdata *coff_obj_data;
428+ struct pe_tdata *pe_obj_data;
429+ struct xcoff_tdata *xcoff_obj_data;
430+ struct ecoff_tdata *ecoff_obj_data;
431+ struct ieee_data_struct *ieee_data;
432+ struct ieee_ar_data_struct *ieee_ar_data;
433+ struct srec_data_struct *srec_data;
434+ struct ihex_data_struct *ihex_data;
435+ struct tekhex_data_struct *tekhex_data;
436+ struct elf_obj_tdata *elf_obj_data;
437+ struct nlm_obj_tdata *nlm_obj_data;
438+ struct bout_data_struct *bout_data;
439+ struct mmo_data_struct *mmo_data;
440+ struct sun_core_struct *sun_core_data;
441+ struct sco5_core_struct *sco5_core_data;
442+ struct trad_core_struct *trad_core_data;
443+ struct som_data_struct *som_data;
444+ struct hpux_core_struct *hpux_core_data;
445+ struct hppabsd_core_struct *hppabsd_core_data;
446+ struct sgi_core_struct *sgi_core_data;
447+ struct lynx_core_struct *lynx_core_data;
448+ struct osf_core_struct *osf_core_data;
449+ struct cisco_core_struct *cisco_core_data;
450+ struct versados_data_struct *versados_data;
451+ struct netbsd_core_struct *netbsd_core_data;
452+ struct mach_o_data_struct *mach_o_data;
453+ struct mach_o_fat_data_struct *mach_o_fat_data;
454+ struct bfd_pef_data_struct *pef_data;
455+ struct bfd_pef_xlib_data_struct *pef_xlib_data;
456+ struct bfd_sym_data_struct *sym_data;
457+ void *any;
458+ }
459+ tdata;
460+
461+ /* Used by the application to hold private data. */
462+ void *usrdata;
463+
464+ /* Where all the allocated stuff under this BFD goes. This is a
465+ struct objalloc *, but we use void * to avoid requiring the inclusion
466+ of objalloc.h. */
467+ void *memory;
468+ };
469+
470+2.2 Error reporting
471+===================
472+
473+Most BFD functions return nonzero on success (check their individual
474+documentation for precise semantics). On an error, they call
475+`bfd_set_error' to set an error condition that callers can check by
476+calling `bfd_get_error'. If that returns `bfd_error_system_call', then
477+check `errno'.
478+
479+ The easiest way to report a BFD error to the user is to use
480+`bfd_perror'.
481+
482+2.2.1 Type `bfd_error_type'
483+---------------------------
484+
485+The values returned by `bfd_get_error' are defined by the enumerated
486+type `bfd_error_type'.
487+
488+
489+ typedef enum bfd_error
490+ {
491+ bfd_error_no_error = 0,
492+ bfd_error_system_call,
493+ bfd_error_invalid_target,
494+ bfd_error_wrong_format,
495+ bfd_error_wrong_object_format,
496+ bfd_error_invalid_operation,
497+ bfd_error_no_memory,
498+ bfd_error_no_symbols,
499+ bfd_error_no_armap,
500+ bfd_error_no_more_archived_files,
501+ bfd_error_malformed_archive,
502+ bfd_error_file_not_recognized,
503+ bfd_error_file_ambiguously_recognized,
504+ bfd_error_no_contents,
505+ bfd_error_nonrepresentable_section,
506+ bfd_error_no_debug_section,
507+ bfd_error_bad_value,
508+ bfd_error_file_truncated,
509+ bfd_error_file_too_big,
510+ bfd_error_invalid_error_code
511+ }
512+ bfd_error_type;
513+
514+2.2.1.1 `bfd_get_error'
515+.......................
516+
517+*Synopsis*
518+ bfd_error_type bfd_get_error (void);
519+ *Description*
520+Return the current BFD error condition.
521+
522+2.2.1.2 `bfd_set_error'
523+.......................
524+
525+*Synopsis*
526+ void bfd_set_error (bfd_error_type error_tag);
527+ *Description*
528+Set the BFD error condition to be ERROR_TAG.
529+
530+2.2.1.3 `bfd_errmsg'
531+....................
532+
533+*Synopsis*
534+ const char *bfd_errmsg (bfd_error_type error_tag);
535+ *Description*
536+Return a string describing the error ERROR_TAG, or the system error if
537+ERROR_TAG is `bfd_error_system_call'.
538+
539+2.2.1.4 `bfd_perror'
540+....................
541+
542+*Synopsis*
543+ void bfd_perror (const char *message);
544+ *Description*
545+Print to the standard error stream a string describing the last BFD
546+error that occurred, or the last system error if the last BFD error was
547+a system call failure. If MESSAGE is non-NULL and non-empty, the error
548+string printed is preceded by MESSAGE, a colon, and a space. It is
549+followed by a newline.
550+
551+2.2.2 BFD error handler
552+-----------------------
553+
554+Some BFD functions want to print messages describing the problem. They
555+call a BFD error handler function. This function may be overridden by
556+the program.
557+
558+ The BFD error handler acts like printf.
559+
560+
561+ typedef void (*bfd_error_handler_type) (const char *, ...);
562+
563+2.2.2.1 `bfd_set_error_handler'
564+...............................
565+
566+*Synopsis*
567+ bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
568+ *Description*
569+Set the BFD error handler function. Returns the previous function.
570+
571+2.2.2.2 `bfd_set_error_program_name'
572+....................................
573+
574+*Synopsis*
575+ void bfd_set_error_program_name (const char *);
576+ *Description*
577+Set the program name to use when printing a BFD error. This is printed
578+before the error message followed by a colon and space. The string
579+must not be changed after it is passed to this function.
580+
581+2.2.2.3 `bfd_get_error_handler'
582+...............................
583+
584+*Synopsis*
585+ bfd_error_handler_type bfd_get_error_handler (void);
586+ *Description*
587+Return the BFD error handler function.
588+
589+2.3 Symbols
590+===========
591+
592+2.3.0.1 `bfd_get_reloc_upper_bound'
593+...................................
594+
595+*Synopsis*
596+ long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
597+ *Description*
598+Return the number of bytes required to store the relocation information
599+associated with section SECT attached to bfd ABFD. If an error occurs,
600+return -1.
601+
602+2.3.0.2 `bfd_canonicalize_reloc'
603+................................
604+
605+*Synopsis*
606+ long bfd_canonicalize_reloc
607+ (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
608+ *Description*
609+Call the back end associated with the open BFD ABFD and translate the
610+external form of the relocation information attached to SEC into the
611+internal canonical form. Place the table into memory at LOC, which has
612+been preallocated, usually by a call to `bfd_get_reloc_upper_bound'.
613+Returns the number of relocs, or -1 on error.
614+
615+ The SYMS table is also needed for horrible internal magic reasons.
616+
617+2.3.0.3 `bfd_set_reloc'
618+.......................
619+
620+*Synopsis*
621+ void bfd_set_reloc
622+ (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
623+ *Description*
624+Set the relocation pointer and count within section SEC to the values
625+REL and COUNT. The argument ABFD is ignored.
626+
627+2.3.0.4 `bfd_set_file_flags'
628+............................
629+
630+*Synopsis*
631+ bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
632+ *Description*
633+Set the flag word in the BFD ABFD to the value FLAGS.
634+
635+ Possible errors are:
636+ * `bfd_error_wrong_format' - The target bfd was not of object format.
637+
638+ * `bfd_error_invalid_operation' - The target bfd was open for
639+ reading.
640+
641+ * `bfd_error_invalid_operation' - The flag word contained a bit
642+ which was not applicable to the type of file. E.g., an attempt
643+ was made to set the `D_PAGED' bit on a BFD format which does not
644+ support demand paging.
645+
646+2.3.0.5 `bfd_get_arch_size'
647+...........................
648+
649+*Synopsis*
650+ int bfd_get_arch_size (bfd *abfd);
651+ *Description*
652+Returns the architecture address size, in bits, as determined by the
653+object file's format. For ELF, this information is included in the
654+header.
655+
656+ *Returns*
657+Returns the arch size in bits if known, `-1' otherwise.
658+
659+2.3.0.6 `bfd_get_sign_extend_vma'
660+.................................
661+
662+*Synopsis*
663+ int bfd_get_sign_extend_vma (bfd *abfd);
664+ *Description*
665+Indicates if the target architecture "naturally" sign extends an
666+address. Some architectures implicitly sign extend address values when
667+they are converted to types larger than the size of an address. For
668+instance, bfd_get_start_address() will return an address sign extended
669+to fill a bfd_vma when this is the case.
670+
671+ *Returns*
672+Returns `1' if the target architecture is known to sign extend
673+addresses, `0' if the target architecture is known to not sign extend
674+addresses, and `-1' otherwise.
675+
676+2.3.0.7 `bfd_set_start_address'
677+...............................
678+
679+*Synopsis*
680+ bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
681+ *Description*
682+Make VMA the entry point of output BFD ABFD.
683+
684+ *Returns*
685+Returns `TRUE' on success, `FALSE' otherwise.
686+
687+2.3.0.8 `bfd_get_gp_size'
688+.........................
689+
690+*Synopsis*
691+ unsigned int bfd_get_gp_size (bfd *abfd);
692+ *Description*
693+Return the maximum size of objects to be optimized using the GP
694+register under MIPS ECOFF. This is typically set by the `-G' argument
695+to the compiler, assembler or linker.
696+
697+2.3.0.9 `bfd_set_gp_size'
698+.........................
699+
700+*Synopsis*
701+ void bfd_set_gp_size (bfd *abfd, unsigned int i);
702+ *Description*
703+Set the maximum size of objects to be optimized using the GP register
704+under ECOFF or MIPS ELF. This is typically set by the `-G' argument to
705+the compiler, assembler or linker.
706+
707+2.3.0.10 `bfd_scan_vma'
708+.......................
709+
710+*Synopsis*
711+ bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
712+ *Description*
713+Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
714+integer, and return that integer. (Though without as many bells and
715+whistles as `strtoul'.) The expression is assumed to be unsigned
716+(i.e., positive). If given a BASE, it is used as the base for
717+conversion. A base of 0 causes the function to interpret the string in
718+hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
719+zero is found, otherwise in decimal.
720+
721+ If the value would overflow, the maximum `bfd_vma' value is returned.
722+
723+2.3.0.11 `bfd_copy_private_header_data'
724+.......................................
725+
726+*Synopsis*
727+ bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
728+ *Description*
729+Copy private BFD header information from the BFD IBFD to the the BFD
730+OBFD. This copies information that may require sections to exist, but
731+does not require symbol tables. Return `true' on success, `false' on
732+error. Possible error returns are:
733+
734+ * `bfd_error_no_memory' - Not enough memory exists to create private
735+ data for OBFD.
736+
737+ #define bfd_copy_private_header_data(ibfd, obfd) \
738+ BFD_SEND (obfd, _bfd_copy_private_header_data, \
739+ (ibfd, obfd))
740+
741+2.3.0.12 `bfd_copy_private_bfd_data'
742+....................................
743+
744+*Synopsis*
745+ bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
746+ *Description*
747+Copy private BFD information from the BFD IBFD to the the BFD OBFD.
748+Return `TRUE' on success, `FALSE' on error. Possible error returns are:
749+
750+ * `bfd_error_no_memory' - Not enough memory exists to create private
751+ data for OBFD.
752+
753+ #define bfd_copy_private_bfd_data(ibfd, obfd) \
754+ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
755+ (ibfd, obfd))
756+
757+2.3.0.13 `bfd_merge_private_bfd_data'
758+.....................................
759+
760+*Synopsis*
761+ bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
762+ *Description*
763+Merge private BFD information from the BFD IBFD to the the output file
764+BFD OBFD when linking. Return `TRUE' on success, `FALSE' on error.
765+Possible error returns are:
766+
767+ * `bfd_error_no_memory' - Not enough memory exists to create private
768+ data for OBFD.
769+
770+ #define bfd_merge_private_bfd_data(ibfd, obfd) \
771+ BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
772+ (ibfd, obfd))
773+
774+2.3.0.14 `bfd_set_private_flags'
775+................................
776+
777+*Synopsis*
778+ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
779+ *Description*
780+Set private BFD flag information in the BFD ABFD. Return `TRUE' on
781+success, `FALSE' on error. Possible error returns are:
782+
783+ * `bfd_error_no_memory' - Not enough memory exists to create private
784+ data for OBFD.
785+
786+ #define bfd_set_private_flags(abfd, flags) \
787+ BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
788+
789+2.3.0.15 `Other functions'
790+..........................
791+
792+*Description*
793+The following functions exist but have not yet been documented.
794+ #define bfd_sizeof_headers(abfd, reloc) \
795+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
796+
797+ #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
798+ BFD_SEND (abfd, _bfd_find_nearest_line, \
799+ (abfd, sec, syms, off, file, func, line))
800+
801+ #define bfd_debug_info_start(abfd) \
802+ BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
803+
804+ #define bfd_debug_info_end(abfd) \
805+ BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
806+
807+ #define bfd_debug_info_accumulate(abfd, section) \
808+ BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
809+
810+ #define bfd_stat_arch_elt(abfd, stat) \
811+ BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
812+
813+ #define bfd_update_armap_timestamp(abfd) \
814+ BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
815+
816+ #define bfd_set_arch_mach(abfd, arch, mach)\
817+ BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
818+
819+ #define bfd_relax_section(abfd, section, link_info, again) \
820+ BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
821+
822+ #define bfd_gc_sections(abfd, link_info) \
823+ BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
824+
825+ #define bfd_merge_sections(abfd, link_info) \
826+ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
827+
828+ #define bfd_is_group_section(abfd, sec) \
829+ BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
830+
831+ #define bfd_discard_group(abfd, sec) \
832+ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
833+
834+ #define bfd_link_hash_table_create(abfd) \
835+ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
836+
837+ #define bfd_link_hash_table_free(abfd, hash) \
838+ BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
839+
840+ #define bfd_link_add_symbols(abfd, info) \
841+ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
842+
843+ #define bfd_link_just_syms(abfd, sec, info) \
844+ BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
845+
846+ #define bfd_final_link(abfd, info) \
847+ BFD_SEND (abfd, _bfd_final_link, (abfd, info))
848+
849+ #define bfd_free_cached_info(abfd) \
850+ BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
851+
852+ #define bfd_get_dynamic_symtab_upper_bound(abfd) \
853+ BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
854+
855+ #define bfd_print_private_bfd_data(abfd, file)\
856+ BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
857+
858+ #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
859+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
860+
861+ #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
862+ BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
863+ dyncount, dynsyms, ret))
864+
865+ #define bfd_get_dynamic_reloc_upper_bound(abfd) \
866+ BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
867+
868+ #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
869+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
870+
871+ extern bfd_byte *bfd_get_relocated_section_contents
872+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
873+ bfd_boolean, asymbol **);
874+
875+2.3.0.16 `bfd_alt_mach_code'
876+............................
877+
878+*Synopsis*
879+ bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
880+ *Description*
881+When more than one machine code number is available for the same
882+machine type, this function can be used to switch between the preferred
883+one (alternative == 0) and any others. Currently, only ELF supports
884+this feature, with up to two alternate machine codes.
885+
886+ struct bfd_preserve
887+ {
888+ void *marker;
889+ void *tdata;
890+ flagword flags;
891+ const struct bfd_arch_info *arch_info;
892+ struct bfd_section *sections;
893+ struct bfd_section **section_tail;
894+ unsigned int section_count;
895+ struct bfd_hash_table section_htab;
896+ };
897+
898+2.3.0.17 `bfd_preserve_save'
899+............................
900+
901+*Synopsis*
902+ bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
903+ *Description*
904+When testing an object for compatibility with a particular target
905+back-end, the back-end object_p function needs to set up certain fields
906+in the bfd on successfully recognizing the object. This typically
907+happens in a piecemeal fashion, with failures possible at many points.
908+On failure, the bfd is supposed to be restored to its initial state,
909+which is virtually impossible. However, restoring a subset of the bfd
910+state works in practice. This function stores the subset and
911+reinitializes the bfd.
912+
913+2.3.0.18 `bfd_preserve_restore'
914+...............................
915+
916+*Synopsis*
917+ void bfd_preserve_restore (bfd *, struct bfd_preserve *);
918+ *Description*
919+This function restores bfd state saved by bfd_preserve_save. If MARKER
920+is non-NULL in struct bfd_preserve then that block and all subsequently
921+bfd_alloc'd memory is freed.
922+
923+2.3.0.19 `bfd_preserve_finish'
924+..............................
925+
926+*Synopsis*
927+ void bfd_preserve_finish (bfd *, struct bfd_preserve *);
928+ *Description*
929+This function should be called when the bfd state saved by
930+bfd_preserve_save is no longer needed. ie. when the back-end object_p
931+function returns with success.
932+
933+2.3.0.20 `struct bfd_iovec'
934+...........................
935+
936+*Description*
937+The `struct bfd_iovec' contains the internal file I/O class. Each
938+`BFD' has an instance of this class and all file I/O is routed through
939+it (it is assumed that the instance implements all methods listed
940+below).
941+ struct bfd_iovec
942+ {
943+ /* To avoid problems with macros, a "b" rather than "f"
944+ prefix is prepended to each method name. */
945+ /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
946+ bytes starting at PTR. Return the number of bytes actually
947+ transfered (a read past end-of-file returns less than NBYTES),
948+ or -1 (setting `bfd_error') if an error occurs. */
949+ file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
950+ file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
951+ file_ptr nbytes);
952+ /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error'
953+ if an error occurs. */
954+ file_ptr (*btell) (struct bfd *abfd);
955+ /* For the following, on successful completion a value of 0 is returned.
956+ Otherwise, a value of -1 is returned (and `bfd_error' is set). */
957+ int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
958+ int (*bclose) (struct bfd *abfd);
959+ int (*bflush) (struct bfd *abfd);
960+ int (*bstat) (struct bfd *abfd, struct stat *sb);
961+ };
962+
963+2.3.0.21 `bfd_get_mtime'
964+........................
965+
966+*Synopsis*
967+ long bfd_get_mtime (bfd *abfd);
968+ *Description*
969+Return the file modification time (as read from the file system, or
970+from the archive header for archive members).
971+
972+2.3.0.22 `bfd_get_size'
973+.......................
974+
975+*Synopsis*
976+ long bfd_get_size (bfd *abfd);
977+ *Description*
978+Return the file size (as read from file system) for the file associated
979+with BFD ABFD.
980+
981+ The initial motivation for, and use of, this routine is not so we
982+can get the exact size of the object the BFD applies to, since that
983+might not be generally possible (archive members for example). It
984+would be ideal if someone could eventually modify it so that such
985+results were guaranteed.
986+
987+ Instead, we want to ask questions like "is this NNN byte sized
988+object I'm about to try read from file offset YYY reasonable?" As as
989+example of where we might do this, some object formats use string
990+tables for which the first `sizeof (long)' bytes of the table contain
991+the size of the table itself, including the size bytes. If an
992+application tries to read what it thinks is one of these string tables,
993+without some way to validate the size, and for some reason the size is
994+wrong (byte swapping error, wrong location for the string table, etc.),
995+the only clue is likely to be a read error when it tries to read the
996+table, or a "virtual memory exhausted" error when it tries to allocate
997+15 bazillon bytes of space for the 15 bazillon byte table it is about
998+to read. This function at least allows us to answer the question, "is
999+the size reasonable?".
1000+
1001+* Menu:
1002+
1003+* Memory Usage::
1004+* Initialization::
1005+* Sections::
1006+* Symbols::
1007+* Archives::
1008+* Formats::
1009+* Relocations::
1010+* Core Files::
1011+* Targets::
1012+* Architectures::
1013+* Opening and Closing::
1014+* Internal::
1015+* File Caching::
1016+* Linker Functions::
1017+* Hash Tables::
1018+
1019+
1020+File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: BFD front end, Up: BFD front end
1021+
1022+2.4 Memory Usage
1023+================
1024+
1025+BFD keeps all of its internal structures in obstacks. There is one
1026+obstack per open BFD file, into which the current state is stored. When
1027+a BFD is closed, the obstack is deleted, and so everything which has
1028+been allocated by BFD for the closing file is thrown away.
1029+
1030+ BFD does not free anything created by an application, but pointers
1031+into `bfd' structures become invalid on a `bfd_close'; for example,
1032+after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
1033+still around, since it has been allocated by the application, but the
1034+data that it pointed to are lost.
1035+
1036+ The general rule is to not close a BFD until all operations dependent
1037+upon data from the BFD have been completed, or all the data from within
1038+the file has been copied. To help with the management of memory, there
1039+is a function (`bfd_alloc_size') which returns the number of bytes in
1040+obstacks associated with the supplied BFD. This could be used to select
1041+the greediest open BFD, close it to reclaim the memory, perform some
1042+operation and reopen the BFD again, to get a fresh copy of the data
1043+structures.
1044+
1045+
1046+File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end
1047+
1048+2.5 Initialization
1049+==================
1050+
1051+These are the functions that handle initializing a BFD.
1052+
1053+2.5.0.1 `bfd_init'
1054+..................
1055+
1056+*Synopsis*
1057+ void bfd_init (void);
1058+ *Description*
1059+This routine must be called before any other BFD function to initialize
1060+magical internal data structures.
1061+
1062+
1063+File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end
1064+
1065+2.6 Sections
1066+============
1067+
1068+The raw data contained within a BFD is maintained through the section
1069+abstraction. A single BFD may have any number of sections. It keeps
1070+hold of them by pointing to the first; each one points to the next in
1071+the list.
1072+
1073+ Sections are supported in BFD in `section.c'.
1074+
1075+* Menu:
1076+
1077+* Section Input::
1078+* Section Output::
1079+* typedef asection::
1080+* section prototypes::
1081+
1082+
1083+File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections
1084+
1085+2.6.1 Section input
1086+-------------------
1087+
1088+When a BFD is opened for reading, the section structures are created
1089+and attached to the BFD.
1090+
1091+ Each section has a name which describes the section in the outside
1092+world--for example, `a.out' would contain at least three sections,
1093+called `.text', `.data' and `.bss'.
1094+
1095+ Names need not be unique; for example a COFF file may have several
1096+sections named `.data'.
1097+
1098+ Sometimes a BFD will contain more than the "natural" number of
1099+sections. A back end may attach other sections containing constructor
1100+data, or an application may add a section (using `bfd_make_section') to
1101+the sections attached to an already open BFD. For example, the linker
1102+creates an extra section `COMMON' for each input file's BFD to hold
1103+information about common storage.
1104+
1105+ The raw data is not necessarily read in when the section descriptor
1106+is created. Some targets may leave the data in place until a
1107+`bfd_get_section_contents' call is made. Other back ends may read in
1108+all the data at once. For example, an S-record file has to be read
1109+once to determine the size of the data. An IEEE-695 file doesn't
1110+contain raw data in sections, but data and relocation expressions
1111+intermixed, so the data area has to be parsed to get out the data and
1112+relocations.
1113+
1114+
1115+File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections
1116+
1117+2.6.2 Section output
1118+--------------------
1119+
1120+To write a new object style BFD, the various sections to be written
1121+have to be created. They are attached to the BFD in the same way as
1122+input sections; data is written to the sections using
1123+`bfd_set_section_contents'.
1124+
1125+ Any program that creates or combines sections (e.g., the assembler
1126+and linker) must use the `asection' fields `output_section' and
1127+`output_offset' to indicate the file sections to which each section
1128+must be written. (If the section is being created from scratch,
1129+`output_section' should probably point to the section itself and
1130+`output_offset' should probably be zero.)
1131+
1132+ The data to be written comes from input sections attached (via
1133+`output_section' pointers) to the output sections. The output section
1134+structure can be considered a filter for the input section: the output
1135+section determines the vma of the output data and the name, but the
1136+input section determines the offset into the output section of the data
1137+to be written.
1138+
1139+ E.g., to create a section "O", starting at 0x100, 0x123 long,
1140+containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and
1141+"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would
1142+look like:
1143+
1144+ section name "A"
1145+ output_offset 0x00
1146+ size 0x20
1147+ output_section -----------> section name "O"
1148+ | vma 0x100
1149+ section name "B" | size 0x123
1150+ output_offset 0x20 |
1151+ size 0x103 |
1152+ output_section --------|
1153+
1154+2.6.3 Link orders
1155+-----------------
1156+
1157+The data within a section is stored in a "link_order". These are much
1158+like the fixups in `gas'. The link_order abstraction allows a section
1159+to grow and shrink within itself.
1160+
1161+ A link_order knows how big it is, and which is the next link_order
1162+and where the raw data for it is; it also points to a list of
1163+relocations which apply to it.
1164+
1165+ The link_order is used by the linker to perform relaxing on final
1166+code. The compiler creates code which is as big as necessary to make
1167+it work without relaxing, and the user can select whether to relax.
1168+Sometimes relaxing takes a lot of time. The linker runs around the
1169+relocations to see if any are attached to data which can be shrunk, if
1170+so it does it on a link_order by link_order basis.
1171+
1172+
1173+File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections
1174+
1175+2.6.4 typedef asection
1176+----------------------
1177+
1178+Here is the section structure:
1179+
1180+
1181+ typedef struct bfd_section
1182+ {
1183+ /* The name of the section; the name isn't a copy, the pointer is
1184+ the same as that passed to bfd_make_section. */
1185+ const char *name;
1186+
1187+ /* A unique sequence number. */
1188+ int id;
1189+
1190+ /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
1191+ int index;
1192+
1193+ /* The next section in the list belonging to the BFD, or NULL. */
1194+ struct bfd_section *next;
1195+
1196+ /* The field flags contains attributes of the section. Some
1197+ flags are read in from the object file, and some are
1198+ synthesized from other information. */
1199+ flagword flags;
1200+
1201+ #define SEC_NO_FLAGS 0x000
1202+
1203+ /* Tells the OS to allocate space for this section when loading.
1204+ This is clear for a section containing debug information only. */
1205+ #define SEC_ALLOC 0x001
1206+
1207+ /* Tells the OS to load the section from the file when loading.
1208+ This is clear for a .bss section. */
1209+ #define SEC_LOAD 0x002
1210+
1211+ /* The section contains data still to be relocated, so there is
1212+ some relocation information too. */
1213+ #define SEC_RELOC 0x004
1214+
1215+ /* A signal to the OS that the section contains read only data. */
1216+ #define SEC_READONLY 0x008
1217+
1218+ /* The section contains code only. */
1219+ #define SEC_CODE 0x010
1220+
1221+ /* The section contains data only. */
1222+ #define SEC_DATA 0x020
1223+
1224+ /* The section will reside in ROM. */
1225+ #define SEC_ROM 0x040
1226+
1227+ /* The section contains constructor information. This section
1228+ type is used by the linker to create lists of constructors and
1229+ destructors used by `g++'. When a back end sees a symbol
1230+ which should be used in a constructor list, it creates a new
1231+ section for the type of name (e.g., `__CTOR_LIST__'), attaches
1232+ the symbol to it, and builds a relocation. To build the lists
1233+ of constructors, all the linker has to do is catenate all the
1234+ sections called `__CTOR_LIST__' and relocate the data
1235+ contained within - exactly the operations it would peform on
1236+ standard data. */
1237+ #define SEC_CONSTRUCTOR 0x080
1238+
1239+ /* The section has contents - a data section could be
1240+ `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
1241+ `SEC_HAS_CONTENTS' */
1242+ #define SEC_HAS_CONTENTS 0x100
1243+
1244+ /* An instruction to the linker to not output the section
1245+ even if it has information which would normally be written. */
1246+ #define SEC_NEVER_LOAD 0x200
1247+
1248+ /* The section contains thread local data. */
1249+ #define SEC_THREAD_LOCAL 0x400
1250+
1251+ /* The section has GOT references. This flag is only for the
1252+ linker, and is currently only used by the elf32-hppa back end.
1253+ It will be set if global offset table references were detected
1254+ in this section, which indicate to the linker that the section
1255+ contains PIC code, and must be handled specially when doing a
1256+ static link. */
1257+ #define SEC_HAS_GOT_REF 0x800
1258+
1259+ /* The section contains common symbols (symbols may be defined
1260+ multiple times, the value of a symbol is the amount of
1261+ space it requires, and the largest symbol value is the one
1262+ used). Most targets have exactly one of these (which we
1263+ translate to bfd_com_section_ptr), but ECOFF has two. */
1264+ #define SEC_IS_COMMON 0x1000
1265+
1266+ /* The section contains only debugging information. For
1267+ example, this is set for ELF .debug and .stab sections.
1268+ strip tests this flag to see if a section can be
1269+ discarded. */
1270+ #define SEC_DEBUGGING 0x2000
1271+
1272+ /* The contents of this section are held in memory pointed to
1273+ by the contents field. This is checked by bfd_get_section_contents,
1274+ and the data is retrieved from memory if appropriate. */
1275+ #define SEC_IN_MEMORY 0x4000
1276+
1277+ /* The contents of this section are to be excluded by the
1278+ linker for executable and shared objects unless those
1279+ objects are to be further relocated. */
1280+ #define SEC_EXCLUDE 0x8000
1281+
1282+ /* The contents of this section are to be sorted based on the sum of
1283+ the symbol and addend values specified by the associated relocation
1284+ entries. Entries without associated relocation entries will be
1285+ appended to the end of the section in an unspecified order. */
1286+ #define SEC_SORT_ENTRIES 0x10000
1287+
1288+ /* When linking, duplicate sections of the same name should be
1289+ discarded, rather than being combined into a single section as
1290+ is usually done. This is similar to how common symbols are
1291+ handled. See SEC_LINK_DUPLICATES below. */
1292+ #define SEC_LINK_ONCE 0x20000
1293+
1294+ /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
1295+ should handle duplicate sections. */
1296+ #define SEC_LINK_DUPLICATES 0x40000
1297+
1298+ /* This value for SEC_LINK_DUPLICATES means that duplicate
1299+ sections with the same name should simply be discarded. */
1300+ #define SEC_LINK_DUPLICATES_DISCARD 0x0
1301+
1302+ /* This value for SEC_LINK_DUPLICATES means that the linker
1303+ should warn if there are any duplicate sections, although
1304+ it should still only link one copy. */
1305+ #define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
1306+
1307+ /* This value for SEC_LINK_DUPLICATES means that the linker
1308+ should warn if any duplicate sections are a different size. */
1309+ #define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
1310+
1311+ /* This value for SEC_LINK_DUPLICATES means that the linker
1312+ should warn if any duplicate sections contain different
1313+ contents. */
1314+ #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
1315+ (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
1316+
1317+ /* This section was created by the linker as part of dynamic
1318+ relocation or other arcane processing. It is skipped when
1319+ going through the first-pass output, trusting that someone
1320+ else up the line will take care of it later. */
1321+ #define SEC_LINKER_CREATED 0x200000
1322+
1323+ /* This section should not be subject to garbage collection. */
1324+ #define SEC_KEEP 0x400000
1325+
1326+ /* This section contains "short" data, and should be placed
1327+ "near" the GP. */
1328+ #define SEC_SMALL_DATA 0x800000
1329+
1330+ /* Attempt to merge identical entities in the section.
1331+ Entity size is given in the entsize field. */
1332+ #define SEC_MERGE 0x1000000
1333+
1334+ /* If given with SEC_MERGE, entities to merge are zero terminated
1335+ strings where entsize specifies character size instead of fixed
1336+ size entries. */
1337+ #define SEC_STRINGS 0x2000000
1338+
1339+ /* This section contains data about section groups. */
1340+ #define SEC_GROUP 0x4000000
1341+
1342+ /* The section is a COFF shared library section. This flag is
1343+ only for the linker. If this type of section appears in
1344+ the input file, the linker must copy it to the output file
1345+ without changing the vma or size. FIXME: Although this
1346+ was originally intended to be general, it really is COFF
1347+ specific (and the flag was renamed to indicate this). It
1348+ might be cleaner to have some more general mechanism to
1349+ allow the back end to control what the linker does with
1350+ sections. */
1351+ #define SEC_COFF_SHARED_LIBRARY 0x10000000
1352+
1353+ /* This section contains data which may be shared with other
1354+ executables or shared objects. This is for COFF only. */
1355+ #define SEC_COFF_SHARED 0x20000000
1356+
1357+ /* When a section with this flag is being linked, then if the size of
1358+ the input section is less than a page, it should not cross a page
1359+ boundary. If the size of the input section is one page or more,
1360+ it should be aligned on a page boundary. This is for TI
1361+ TMS320C54X only. */
1362+ #define SEC_TIC54X_BLOCK 0x40000000
1363+
1364+ /* Conditionally link this section; do not link if there are no
1365+ references found to any symbol in the section. This is for TI
1366+ TMS320C54X only. */
1367+ #define SEC_TIC54X_CLINK 0x80000000
1368+
1369+ /* End of section flags. */
1370+
1371+ /* Some internal packed boolean fields. */
1372+
1373+ /* See the vma field. */
1374+ unsigned int user_set_vma : 1;
1375+
1376+ /* A mark flag used by some of the linker backends. */
1377+ unsigned int linker_mark : 1;
1378+
1379+ /* Another mark flag used by some of the linker backends. Set for
1380+ output sections that have an input section. */
1381+ unsigned int linker_has_input : 1;
1382+
1383+ /* A mark flag used by some linker backends for garbage collection. */
1384+ unsigned int gc_mark : 1;
1385+
1386+ /* The following flags are used by the ELF linker. */
1387+
1388+ /* Mark sections which have been allocated to segments. */
1389+ unsigned int segment_mark : 1;
1390+
1391+ /* Type of sec_info information. */
1392+ unsigned int sec_info_type:3;
1393+ #define ELF_INFO_TYPE_NONE 0
1394+ #define ELF_INFO_TYPE_STABS 1
1395+ #define ELF_INFO_TYPE_MERGE 2
1396+ #define ELF_INFO_TYPE_EH_FRAME 3
1397+ #define ELF_INFO_TYPE_JUST_SYMS 4
1398+
1399+ /* Nonzero if this section uses RELA relocations, rather than REL. */
1400+ unsigned int use_rela_p:1;
1401+
1402+ /* Bits used by various backends. The generic code doesn't touch
1403+ these fields. */
1404+
1405+ /* Nonzero if this section has TLS related relocations. */
1406+ unsigned int has_tls_reloc:1;
1407+
1408+ /* Nonzero if this section has a gp reloc. */
1409+ unsigned int has_gp_reloc:1;
1410+
1411+ /* Nonzero if this section needs the relax finalize pass. */
1412+ unsigned int need_finalize_relax:1;
1413+
1414+ /* Whether relocations have been processed. */
1415+ unsigned int reloc_done : 1;
1416+
1417+ /* End of internal packed boolean fields. */
1418+
1419+ /* The virtual memory address of the section - where it will be
1420+ at run time. The symbols are relocated against this. The
1421+ user_set_vma flag is maintained by bfd; if it's not set, the
1422+ backend can assign addresses (for example, in `a.out', where
1423+ the default address for `.data' is dependent on the specific
1424+ target and various flags). */
1425+ bfd_vma vma;
1426+
1427+ /* The load address of the section - where it would be in a
1428+ rom image; really only used for writing section header
1429+ information. */
1430+ bfd_vma lma;
1431+
1432+ /* The size of the section in octets, as it will be output.
1433+ Contains a value even if the section has no contents (e.g., the
1434+ size of `.bss'). */
1435+ bfd_size_type size;
1436+
1437+ /* For input sections, the original size on disk of the section, in
1438+ octets. This field is used by the linker relaxation code. It is
1439+ currently only set for sections where the linker relaxation scheme
1440+ doesn't cache altered section and reloc contents (stabs, eh_frame,
1441+ SEC_MERGE, some coff relaxing targets), and thus the original size
1442+ needs to be kept to read the section multiple times.
1443+ For output sections, rawsize holds the section size calculated on
1444+ a previous linker relaxation pass. */
1445+ bfd_size_type rawsize;
1446+
1447+ /* If this section is going to be output, then this value is the
1448+ offset in *bytes* into the output section of the first byte in the
1449+ input section (byte ==> smallest addressable unit on the
1450+ target). In most cases, if this was going to start at the
1451+ 100th octet (8-bit quantity) in the output section, this value
1452+ would be 100. However, if the target byte size is 16 bits
1453+ (bfd_octets_per_byte is "2"), this value would be 50. */
1454+ bfd_vma output_offset;
1455+
1456+ /* The output section through which to map on output. */
1457+ struct bfd_section *output_section;
1458+
1459+ /* The alignment requirement of the section, as an exponent of 2 -
1460+ e.g., 3 aligns to 2^3 (or 8). */
1461+ unsigned int alignment_power;
1462+
1463+ /* If an input section, a pointer to a vector of relocation
1464+ records for the data in this section. */
1465+ struct reloc_cache_entry *relocation;
1466+
1467+ /* If an output section, a pointer to a vector of pointers to
1468+ relocation records for the data in this section. */
1469+ struct reloc_cache_entry **orelocation;
1470+
1471+ /* The number of relocation records in one of the above. */
1472+ unsigned reloc_count;
1473+
1474+ /* Information below is back end specific - and not always used
1475+ or updated. */
1476+
1477+ /* File position of section data. */
1478+ file_ptr filepos;
1479+
1480+ /* File position of relocation info. */
1481+ file_ptr rel_filepos;
1482+
1483+ /* File position of line data. */
1484+ file_ptr line_filepos;
1485+
1486+ /* Pointer to data for applications. */
1487+ void *userdata;
1488+
1489+ /* If the SEC_IN_MEMORY flag is set, this points to the actual
1490+ contents. */
1491+ unsigned char *contents;
1492+
1493+ /* Attached line number information. */
1494+ alent *lineno;
1495+
1496+ /* Number of line number records. */
1497+ unsigned int lineno_count;
1498+
1499+ /* Entity size for merging purposes. */
1500+ unsigned int entsize;
1501+
1502+ /* Points to the kept section if this section is a link-once section,
1503+ and is discarded. */
1504+ struct bfd_section *kept_section;
1505+
1506+ /* When a section is being output, this value changes as more
1507+ linenumbers are written out. */
1508+ file_ptr moving_line_filepos;
1509+
1510+ /* What the section number is in the target world. */
1511+ int target_index;
1512+
1513+ void *used_by_bfd;
1514+
1515+ /* If this is a constructor section then here is a list of the
1516+ relocations created to relocate items within it. */
1517+ struct relent_chain *constructor_chain;
1518+
1519+ /* The BFD which owns the section. */
1520+ bfd *owner;
1521+
1522+ /* A symbol which points at this section only. */
1523+ struct bfd_symbol *symbol;
1524+ struct bfd_symbol **symbol_ptr_ptr;
1525+
1526+ struct bfd_link_order *link_order_head;
1527+ struct bfd_link_order *link_order_tail;
1528+ } asection;
1529+
1530+ /* These sections are global, and are managed by BFD. The application
1531+ and target back end are not permitted to change the values in
1532+ these sections. New code should use the section_ptr macros rather
1533+ than referring directly to the const sections. The const sections
1534+ may eventually vanish. */
1535+ #define BFD_ABS_SECTION_NAME "*ABS*"
1536+ #define BFD_UND_SECTION_NAME "*UND*"
1537+ #define BFD_COM_SECTION_NAME "*COM*"
1538+ #define BFD_IND_SECTION_NAME "*IND*"
1539+
1540+ /* The absolute section. */
1541+ extern asection bfd_abs_section;
1542+ #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
1543+ #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
1544+ /* Pointer to the undefined section. */
1545+ extern asection bfd_und_section;
1546+ #define bfd_und_section_ptr ((asection *) &bfd_und_section)
1547+ #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
1548+ /* Pointer to the common section. */
1549+ extern asection bfd_com_section;
1550+ #define bfd_com_section_ptr ((asection *) &bfd_com_section)
1551+ /* Pointer to the indirect section. */
1552+ extern asection bfd_ind_section;
1553+ #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
1554+ #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
1555+
1556+ #define bfd_is_const_section(SEC) \
1557+ ( ((SEC) == bfd_abs_section_ptr) \
1558+ || ((SEC) == bfd_und_section_ptr) \
1559+ || ((SEC) == bfd_com_section_ptr) \
1560+ || ((SEC) == bfd_ind_section_ptr))
1561+
1562+ extern const struct bfd_symbol * const bfd_abs_symbol;
1563+ extern const struct bfd_symbol * const bfd_com_symbol;
1564+ extern const struct bfd_symbol * const bfd_und_symbol;
1565+ extern const struct bfd_symbol * const bfd_ind_symbol;
1566+
1567+ /* Macros to handle insertion and deletion of a bfd's sections. These
1568+ only handle the list pointers, ie. do not adjust section_count,
1569+ target_index etc. */
1570+ #define bfd_section_list_remove(ABFD, PS) \
1571+ do \
1572+ { \
1573+ asection **_ps = PS; \
1574+ asection *_s = *_ps; \
1575+ *_ps = _s->next; \
1576+ if (_s->next == NULL) \
1577+ (ABFD)->section_tail = _ps; \
1578+ } \
1579+ while (0)
1580+ #define bfd_section_list_insert(ABFD, PS, S) \
1581+ do \
1582+ { \
1583+ asection **_ps = PS; \
1584+ asection *_s = S; \
1585+ _s->next = *_ps; \
1586+ *_ps = _s; \
1587+ if (_s->next == NULL) \
1588+ (ABFD)->section_tail = &_s->next; \
1589+ } \
1590+ while (0)
1591+
1592+
1593+File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections
1594+
1595+2.6.5 Section prototypes
1596+------------------------
1597+
1598+These are the functions exported by the section handling part of BFD.
1599+
1600+2.6.5.1 `bfd_section_list_clear'
1601+................................
1602+
1603+*Synopsis*
1604+ void bfd_section_list_clear (bfd *);
1605+ *Description*
1606+Clears the section list, and also resets the section count and hash
1607+table entries.
1608+
1609+2.6.5.2 `bfd_get_section_by_name'
1610+.................................
1611+
1612+*Synopsis*
1613+ asection *bfd_get_section_by_name (bfd *abfd, const char *name);
1614+ *Description*
1615+Run through ABFD and return the one of the `asection's whose name
1616+matches NAME, otherwise `NULL'. *Note Sections::, for more information.
1617+
1618+ This should only be used in special cases; the normal way to process
1619+all sections of a given name is to use `bfd_map_over_sections' and
1620+`strcmp' on the name (or better yet, base it on the section flags or
1621+something else) for each section.
1622+
1623+2.6.5.3 `bfd_get_section_by_name_if'
1624+....................................
1625+
1626+*Synopsis*
1627+ asection *bfd_get_section_by_name_if
1628+ (bfd *abfd,
1629+ const char *name,
1630+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
1631+ void *obj);
1632+ *Description*
1633+Call the provided function FUNC for each section attached to the BFD
1634+ABFD whose name matches NAME, passing OBJ as an argument. The function
1635+will be called as if by
1636+
1637+ func (abfd, the_section, obj);
1638+
1639+ It returns the first section for which FUNC returns true, otherwise
1640+`NULL'.
1641+
1642+2.6.5.4 `bfd_get_unique_section_name'
1643+.....................................
1644+
1645+*Synopsis*
1646+ char *bfd_get_unique_section_name
1647+ (bfd *abfd, const char *templat, int *count);
1648+ *Description*
1649+Invent a section name that is unique in ABFD by tacking a dot and a
1650+digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then it
1651+specifies the first number tried as a suffix to generate a unique name.
1652+The value pointed to by COUNT will be incremented in this case.
1653+
1654+2.6.5.5 `bfd_make_section_old_way'
1655+..................................
1656+
1657+*Synopsis*
1658+ asection *bfd_make_section_old_way (bfd *abfd, const char *name);
1659+ *Description*
1660+Create a new empty section called NAME and attach it to the end of the
1661+chain of sections for the BFD ABFD. An attempt to create a section with
1662+a name which is already in use returns its pointer without changing the
1663+section chain.
1664+
1665+ It has the funny name since this is the way it used to be before it
1666+was rewritten....
1667+
1668+ Possible errors are:
1669+ * `bfd_error_invalid_operation' - If output has already started for
1670+ this BFD.
1671+
1672+ * `bfd_error_no_memory' - If memory allocation fails.
1673+
1674+2.6.5.6 `bfd_make_section_anyway'
1675+.................................
1676+
1677+*Synopsis*
1678+ asection *bfd_make_section_anyway (bfd *abfd, const char *name);
1679+ *Description*
1680+Create a new empty section called NAME and attach it to the end of the
1681+chain of sections for ABFD. Create a new section even if there is
1682+already a section with that name.
1683+
1684+ Return `NULL' and set `bfd_error' on error; possible errors are:
1685+ * `bfd_error_invalid_operation' - If output has already started for
1686+ ABFD.
1687+
1688+ * `bfd_error_no_memory' - If memory allocation fails.
1689+
1690+2.6.5.7 `bfd_make_section'
1691+..........................
1692+
1693+*Synopsis*
1694+ asection *bfd_make_section (bfd *, const char *name);
1695+ *Description*
1696+Like `bfd_make_section_anyway', but return `NULL' (without calling
1697+bfd_set_error ()) without changing the section chain if there is
1698+already a section named NAME. If there is an error, return `NULL' and
1699+set `bfd_error'.
1700+
1701+2.6.5.8 `bfd_set_section_flags'
1702+...............................
1703+
1704+*Synopsis*
1705+ bfd_boolean bfd_set_section_flags
1706+ (bfd *abfd, asection *sec, flagword flags);
1707+ *Description*
1708+Set the attributes of the section SEC in the BFD ABFD to the value
1709+FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
1710+returns are:
1711+
1712+ * `bfd_error_invalid_operation' - The section cannot have one or
1713+ more of the attributes requested. For example, a .bss section in
1714+ `a.out' may not have the `SEC_HAS_CONTENTS' field set.
1715+
1716+2.6.5.9 `bfd_map_over_sections'
1717+...............................
1718+
1719+*Synopsis*
1720+ void bfd_map_over_sections
1721+ (bfd *abfd,
1722+ void (*func) (bfd *abfd, asection *sect, void *obj),
1723+ void *obj);
1724+ *Description*
1725+Call the provided function FUNC for each section attached to the BFD
1726+ABFD, passing OBJ as an argument. The function will be called as if by
1727+
1728+ func (abfd, the_section, obj);
1729+
1730+ This is the preferred method for iterating over sections; an
1731+alternative would be to use a loop:
1732+
1733+ section *p;
1734+ for (p = abfd->sections; p != NULL; p = p->next)
1735+ func (abfd, p, ...)
1736+
1737+2.6.5.10 `bfd_sections_find_if'
1738+...............................
1739+
1740+*Synopsis*
1741+ asection *bfd_sections_find_if
1742+ (bfd *abfd,
1743+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
1744+ void *obj);
1745+ *Description*
1746+Call the provided function OPERATION for each section attached to the
1747+BFD ABFD, passing OBJ as an argument. The function will be called as if
1748+by
1749+
1750+ operation (abfd, the_section, obj);
1751+
1752+ It returns the first section for which OPERATION returns true.
1753+
1754+2.6.5.11 `bfd_set_section_size'
1755+...............................
1756+
1757+*Synopsis*
1758+ bfd_boolean bfd_set_section_size
1759+ (bfd *abfd, asection *sec, bfd_size_type val);
1760+ *Description*
1761+Set SEC to the size VAL. If the operation is ok, then `TRUE' is
1762+returned, else `FALSE'.
1763+
1764+ Possible error returns:
1765+ * `bfd_error_invalid_operation' - Writing has started to the BFD, so
1766+ setting the size is invalid.
1767+
1768+2.6.5.12 `bfd_set_section_contents'
1769+...................................
1770+
1771+*Synopsis*
1772+ bfd_boolean bfd_set_section_contents
1773+ (bfd *abfd, asection *section, const void *data,
1774+ file_ptr offset, bfd_size_type count);
1775+ *Description*
1776+Sets the contents of the section SECTION in BFD ABFD to the data
1777+starting in memory at DATA. The data is written to the output section
1778+starting at offset OFFSET for COUNT octets.
1779+
1780+ Normally `TRUE' is returned, else `FALSE'. Possible error returns
1781+are:
1782+ * `bfd_error_no_contents' - The output section does not have the
1783+ `SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
1784+
1785+ * and some more too
1786+ This routine is front end to the back end function
1787+`_bfd_set_section_contents'.
1788+
1789+2.6.5.13 `bfd_get_section_contents'
1790+...................................
1791+
1792+*Synopsis*
1793+ bfd_boolean bfd_get_section_contents
1794+ (bfd *abfd, asection *section, void *location, file_ptr offset,
1795+ bfd_size_type count);
1796+ *Description*
1797+Read data from SECTION in BFD ABFD into memory starting at LOCATION.
1798+The data is read at an offset of OFFSET from the start of the input
1799+section, and is read for COUNT bytes.
1800+
1801+ If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set
1802+are requested or if the section does not have the `SEC_HAS_CONTENTS'
1803+flag set, then the LOCATION is filled with zeroes. If no errors occur,
1804+`TRUE' is returned, else `FALSE'.
1805+
1806+2.6.5.14 `bfd_malloc_and_get_section'
1807+.....................................
1808+
1809+*Synopsis*
1810+ bfd_boolean bfd_malloc_and_get_section
1811+ (bfd *abfd, asection *section, bfd_byte **buf);
1812+ *Description*
1813+Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by
1814+this function.
1815+
1816+2.6.5.15 `bfd_copy_private_section_data'
1817+........................................
1818+
1819+*Synopsis*
1820+ bfd_boolean bfd_copy_private_section_data
1821+ (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
1822+ *Description*
1823+Copy private section information from ISEC in the BFD IBFD to the
1824+section OSEC in the BFD OBFD. Return `TRUE' on success, `FALSE' on
1825+error. Possible error returns are:
1826+
1827+ * `bfd_error_no_memory' - Not enough memory exists to create private
1828+ data for OSEC.
1829+
1830+ #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
1831+ BFD_SEND (obfd, _bfd_copy_private_section_data, \
1832+ (ibfd, isection, obfd, osection))
1833+
1834+2.6.5.16 `_bfd_strip_section_from_output'
1835+.........................................
1836+
1837+*Synopsis*
1838+ void _bfd_strip_section_from_output
1839+ (struct bfd_link_info *info, asection *section);
1840+ *Description*
1841+Remove SECTION from the output. If the output section becomes empty,
1842+remove it from the output bfd.
1843+
1844+ This function won't actually do anything except twiddle flags if
1845+called too late in the linking process, when it's not safe to remove
1846+sections.
1847+
1848+2.6.5.17 `bfd_generic_is_group_section'
1849+.......................................
1850+
1851+*Synopsis*
1852+ bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
1853+ *Description*
1854+Returns TRUE if SEC is a member of a group.
1855+
1856+2.6.5.18 `bfd_generic_discard_group'
1857+....................................
1858+
1859+*Synopsis*
1860+ bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
1861+ *Description*
1862+Remove all members of GROUP from the output.
1863+
1864+
1865+File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end
1866+
1867+2.7 Symbols
1868+===========
1869+
1870+BFD tries to maintain as much symbol information as it can when it
1871+moves information from file to file. BFD passes information to
1872+applications though the `asymbol' structure. When the application
1873+requests the symbol table, BFD reads the table in the native form and
1874+translates parts of it into the internal format. To maintain more than
1875+the information passed to applications, some targets keep some
1876+information "behind the scenes" in a structure only the particular back
1877+end knows about. For example, the coff back end keeps the original
1878+symbol table structure as well as the canonical structure when a BFD is
1879+read in. On output, the coff back end can reconstruct the output symbol
1880+table so that no information is lost, even information unique to coff
1881+which BFD doesn't know or understand. If a coff symbol table were read,
1882+but were written through an a.out back end, all the coff specific
1883+information would be lost. The symbol table of a BFD is not necessarily
1884+read in until a canonicalize request is made. Then the BFD back end
1885+fills in a table provided by the application with pointers to the
1886+canonical information. To output symbols, the application provides BFD
1887+with a table of pointers to pointers to `asymbol's. This allows
1888+applications like the linker to output a symbol as it was read, since
1889+the "behind the scenes" information will be still available.
1890+
1891+* Menu:
1892+
1893+* Reading Symbols::
1894+* Writing Symbols::
1895+* Mini Symbols::
1896+* typedef asymbol::
1897+* symbol handling functions::
1898+
1899+
1900+File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols
1901+
1902+2.7.1 Reading symbols
1903+---------------------
1904+
1905+There are two stages to reading a symbol table from a BFD: allocating
1906+storage, and the actual reading process. This is an excerpt from an
1907+application which reads the symbol table:
1908+
1909+ long storage_needed;
1910+ asymbol **symbol_table;
1911+ long number_of_symbols;
1912+ long i;
1913+
1914+ storage_needed = bfd_get_symtab_upper_bound (abfd);
1915+
1916+ if (storage_needed < 0)
1917+ FAIL
1918+
1919+ if (storage_needed == 0)
1920+ return;
1921+
1922+ symbol_table = xmalloc (storage_needed);
1923+ ...
1924+ number_of_symbols =
1925+ bfd_canonicalize_symtab (abfd, symbol_table);
1926+
1927+ if (number_of_symbols < 0)
1928+ FAIL
1929+
1930+ for (i = 0; i < number_of_symbols; i++)
1931+ process_symbol (symbol_table[i]);
1932+
1933+ All storage for the symbols themselves is in an objalloc connected
1934+to the BFD; it is freed when the BFD is closed.
1935+
1936+
1937+File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols
1938+
1939+2.7.2 Writing symbols
1940+---------------------
1941+
1942+Writing of a symbol table is automatic when a BFD open for writing is
1943+closed. The application attaches a vector of pointers to pointers to
1944+symbols to the BFD being written, and fills in the symbol count. The
1945+close and cleanup code reads through the table provided and performs
1946+all the necessary operations. The BFD output code must always be
1947+provided with an "owned" symbol: one which has come from another BFD,
1948+or one which has been created using `bfd_make_empty_symbol'. Here is an
1949+example showing the creation of a symbol table with only one element:
1950+
1951+ #include "bfd.h"
1952+ int main (void)
1953+ {
1954+ bfd *abfd;
1955+ asymbol *ptrs[2];
1956+ asymbol *new;
1957+
1958+ abfd = bfd_openw ("foo","a.out-sunos-big");
1959+ bfd_set_format (abfd, bfd_object);
1960+ new = bfd_make_empty_symbol (abfd);
1961+ new->name = "dummy_symbol";
1962+ new->section = bfd_make_section_old_way (abfd, ".text");
1963+ new->flags = BSF_GLOBAL;
1964+ new->value = 0x12345;
1965+
1966+ ptrs[0] = new;
1967+ ptrs[1] = 0;
1968+
1969+ bfd_set_symtab (abfd, ptrs, 1);
1970+ bfd_close (abfd);
1971+ return 0;
1972+ }
1973+
1974+ ./makesym
1975+ nm foo
1976+ 00012345 A dummy_symbol
1977+
1978+ Many formats cannot represent arbitrary symbol information; for
1979+instance, the `a.out' object format does not allow an arbitrary number
1980+of sections. A symbol pointing to a section which is not one of
1981+`.text', `.data' or `.bss' cannot be described.
1982+
1983+
1984+File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols
1985+
1986+2.7.3 Mini Symbols
1987+------------------
1988+
1989+Mini symbols provide read-only access to the symbol table. They use
1990+less memory space, but require more time to access. They can be useful
1991+for tools like nm or objdump, which may have to handle symbol tables of
1992+extremely large executables.
1993+
1994+ The `bfd_read_minisymbols' function will read the symbols into
1995+memory in an internal form. It will return a `void *' pointer to a
1996+block of memory, a symbol count, and the size of each symbol. The
1997+pointer is allocated using `malloc', and should be freed by the caller
1998+when it is no longer needed.
1999+
2000+ The function `bfd_minisymbol_to_symbol' will take a pointer to a
2001+minisymbol, and a pointer to a structure returned by
2002+`bfd_make_empty_symbol', and return a `asymbol' structure. The return
2003+value may or may not be the same as the value from
2004+`bfd_make_empty_symbol' which was passed in.
2005+
2006+
2007+File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols
2008+
2009+2.7.4 typedef asymbol
2010+---------------------
2011+
2012+An `asymbol' has the form:
2013+
2014+
2015+ typedef struct bfd_symbol
2016+ {
2017+ /* A pointer to the BFD which owns the symbol. This information
2018+ is necessary so that a back end can work out what additional
2019+ information (invisible to the application writer) is carried
2020+ with the symbol.
2021+
2022+ This field is *almost* redundant, since you can use section->owner
2023+ instead, except that some symbols point to the global sections
2024+ bfd_{abs,com,und}_section. This could be fixed by making
2025+ these globals be per-bfd (or per-target-flavor). FIXME. */
2026+ struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
2027+
2028+ /* The text of the symbol. The name is left alone, and not copied; the
2029+ application may not alter it. */
2030+ const char *name;
2031+
2032+ /* The value of the symbol. This really should be a union of a
2033+ numeric value with a pointer, since some flags indicate that
2034+ a pointer to another symbol is stored here. */
2035+ symvalue value;
2036+
2037+ /* Attributes of a symbol. */
2038+ #define BSF_NO_FLAGS 0x00
2039+
2040+ /* The symbol has local scope; `static' in `C'. The value
2041+ is the offset into the section of the data. */
2042+ #define BSF_LOCAL 0x01
2043+
2044+ /* The symbol has global scope; initialized data in `C'. The
2045+ value is the offset into the section of the data. */
2046+ #define BSF_GLOBAL 0x02
2047+
2048+ /* The symbol has global scope and is exported. The value is
2049+ the offset into the section of the data. */
2050+ #define BSF_EXPORT BSF_GLOBAL /* No real difference. */
2051+
2052+ /* A normal C symbol would be one of:
2053+ `BSF_LOCAL', `BSF_FORT_COMM', `BSF_UNDEFINED' or
2054+ `BSF_GLOBAL'. */
2055+
2056+ /* The symbol is a debugging record. The value has an arbitrary
2057+ meaning, unless BSF_DEBUGGING_RELOC is also set. */
2058+ #define BSF_DEBUGGING 0x08
2059+
2060+ /* The symbol denotes a function entry point. Used in ELF,
2061+ perhaps others someday. */
2062+ #define BSF_FUNCTION 0x10
2063+
2064+ /* Used by the linker. */
2065+ #define BSF_KEEP 0x20
2066+ #define BSF_KEEP_G 0x40
2067+
2068+ /* A weak global symbol, overridable without warnings by
2069+ a regular global symbol of the same name. */
2070+ #define BSF_WEAK 0x80
2071+
2072+ /* This symbol was created to point to a section, e.g. ELF's
2073+ STT_SECTION symbols. */
2074+ #define BSF_SECTION_SYM 0x100
2075+
2076+ /* The symbol used to be a common symbol, but now it is
2077+ allocated. */
2078+ #define BSF_OLD_COMMON 0x200
2079+
2080+ /* The default value for common data. */
2081+ #define BFD_FORT_COMM_DEFAULT_VALUE 0
2082+
2083+ /* In some files the type of a symbol sometimes alters its
2084+ location in an output file - ie in coff a `ISFCN' symbol
2085+ which is also `C_EXT' symbol appears where it was
2086+ declared and not at the end of a section. This bit is set
2087+ by the target BFD part to convey this information. */
2088+ #define BSF_NOT_AT_END 0x400
2089+
2090+ /* Signal that the symbol is the label of constructor section. */
2091+ #define BSF_CONSTRUCTOR 0x800
2092+
2093+ /* Signal that the symbol is a warning symbol. The name is a
2094+ warning. The name of the next symbol is the one to warn about;
2095+ if a reference is made to a symbol with the same name as the next
2096+ symbol, a warning is issued by the linker. */
2097+ #define BSF_WARNING 0x1000
2098+
2099+ /* Signal that the symbol is indirect. This symbol is an indirect
2100+ pointer to the symbol with the same name as the next symbol. */
2101+ #define BSF_INDIRECT 0x2000
2102+
2103+ /* BSF_FILE marks symbols that contain a file name. This is used
2104+ for ELF STT_FILE symbols. */
2105+ #define BSF_FILE 0x4000
2106+
2107+ /* Symbol is from dynamic linking information. */
2108+ #define BSF_DYNAMIC 0x8000
2109+
2110+ /* The symbol denotes a data object. Used in ELF, and perhaps
2111+ others someday. */
2112+ #define BSF_OBJECT 0x10000
2113+
2114+ /* This symbol is a debugging symbol. The value is the offset
2115+ into the section of the data. BSF_DEBUGGING should be set
2116+ as well. */
2117+ #define BSF_DEBUGGING_RELOC 0x20000
2118+
2119+ /* This symbol is thread local. Used in ELF. */
2120+ #define BSF_THREAD_LOCAL 0x40000
2121+
2122+ flagword flags;
2123+
2124+ /* A pointer to the section to which this symbol is
2125+ relative. This will always be non NULL, there are special
2126+ sections for undefined and absolute symbols. */
2127+ struct bfd_section *section;
2128+
2129+ /* Back end special data. */
2130+ union
2131+ {
2132+ void *p;
2133+ bfd_vma i;
2134+ }
2135+ udata;
2136+ }
2137+ asymbol;
2138+
2139+
2140+File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols
2141+
2142+2.7.5 Symbol handling functions
2143+-------------------------------
2144+
2145+2.7.5.1 `bfd_get_symtab_upper_bound'
2146+....................................
2147+
2148+*Description*
2149+Return the number of bytes required to store a vector of pointers to
2150+`asymbols' for all the symbols in the BFD ABFD, including a terminal
2151+NULL pointer. If there are no symbols in the BFD, then return 0. If an
2152+error occurs, return -1.
2153+ #define bfd_get_symtab_upper_bound(abfd) \
2154+ BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
2155+
2156+2.7.5.2 `bfd_is_local_label'
2157+............................
2158+
2159+*Synopsis*
2160+ bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
2161+ *Description*
2162+Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
2163+generated local label, else return FALSE.
2164+
2165+2.7.5.3 `bfd_is_local_label_name'
2166+.................................
2167+
2168+*Synopsis*
2169+ bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
2170+ *Description*
2171+Return TRUE if a symbol with the name NAME in the BFD ABFD is a
2172+compiler generated local label, else return FALSE. This just checks
2173+whether the name has the form of a local label.
2174+ #define bfd_is_local_label_name(abfd, name) \
2175+ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
2176+
2177+2.7.5.4 `bfd_is_target_special_symbol'
2178+......................................
2179+
2180+*Synopsis*
2181+ bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
2182+ *Description*
2183+Return TRUE iff a symbol SYM in the BFD ABFD is something special to
2184+the particular target represented by the BFD. Such symbols should
2185+normally not be mentioned to the user.
2186+ #define bfd_is_target_special_symbol(abfd, sym) \
2187+ BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
2188+
2189+2.7.5.5 `bfd_canonicalize_symtab'
2190+.................................
2191+
2192+*Description*
2193+Read the symbols from the BFD ABFD, and fills in the vector LOCATION
2194+with pointers to the symbols and a trailing NULL. Return the actual
2195+number of symbol pointers, not including the NULL.
2196+ #define bfd_canonicalize_symtab(abfd, location) \
2197+ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
2198+
2199+2.7.5.6 `bfd_set_symtab'
2200+........................
2201+
2202+*Synopsis*
2203+ bfd_boolean bfd_set_symtab
2204+ (bfd *abfd, asymbol **location, unsigned int count);
2205+ *Description*
2206+Arrange that when the output BFD ABFD is closed, the table LOCATION of
2207+COUNT pointers to symbols will be written.
2208+
2209+2.7.5.7 `bfd_print_symbol_vandf'
2210+................................
2211+
2212+*Synopsis*
2213+ void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
2214+ *Description*
2215+Print the value and flags of the SYMBOL supplied to the stream FILE.
2216+
2217+2.7.5.8 `bfd_make_empty_symbol'
2218+...............................
2219+
2220+*Description*
2221+Create a new `asymbol' structure for the BFD ABFD and return a pointer
2222+to it.
2223+
2224+ This routine is necessary because each back end has private
2225+information surrounding the `asymbol'. Building your own `asymbol' and
2226+pointing to it will not create the private information, and will cause
2227+problems later on.
2228+ #define bfd_make_empty_symbol(abfd) \
2229+ BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
2230+
2231+2.7.5.9 `_bfd_generic_make_empty_symbol'
2232+........................................
2233+
2234+*Synopsis*
2235+ asymbol *_bfd_generic_make_empty_symbol (bfd *);
2236+ *Description*
2237+Create a new `asymbol' structure for the BFD ABFD and return a pointer
2238+to it. Used by core file routines, binary back-end and anywhere else
2239+where no private info is needed.
2240+
2241+2.7.5.10 `bfd_make_debug_symbol'
2242+................................
2243+
2244+*Description*
2245+Create a new `asymbol' structure for the BFD ABFD, to be used as a
2246+debugging symbol. Further details of its use have yet to be worked out.
2247+ #define bfd_make_debug_symbol(abfd,ptr,size) \
2248+ BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
2249+
2250+2.7.5.11 `bfd_decode_symclass'
2251+..............................
2252+
2253+*Description*
2254+Return a character corresponding to the symbol class of SYMBOL, or '?'
2255+for an unknown class.
2256+
2257+ *Synopsis*
2258+ int bfd_decode_symclass (asymbol *symbol);
2259+
2260+2.7.5.12 `bfd_is_undefined_symclass'
2261+....................................
2262+
2263+*Description*
2264+Returns non-zero if the class symbol returned by bfd_decode_symclass
2265+represents an undefined symbol. Returns zero otherwise.
2266+
2267+ *Synopsis*
2268+ bfd_boolean bfd_is_undefined_symclass (int symclass);
2269+
2270+2.7.5.13 `bfd_symbol_info'
2271+..........................
2272+
2273+*Description*
2274+Fill in the basic info about symbol that nm needs. Additional info may
2275+be added by the back-ends after calling this function.
2276+
2277+ *Synopsis*
2278+ void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
2279+
2280+2.7.5.14 `bfd_copy_private_symbol_data'
2281+.......................................
2282+
2283+*Synopsis*
2284+ bfd_boolean bfd_copy_private_symbol_data
2285+ (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
2286+ *Description*
2287+Copy private symbol information from ISYM in the BFD IBFD to the symbol
2288+OSYM in the BFD OBFD. Return `TRUE' on success, `FALSE' on error.
2289+Possible error returns are:
2290+
2291+ * `bfd_error_no_memory' - Not enough memory exists to create private
2292+ data for OSEC.
2293+
2294+ #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
2295+ BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
2296+ (ibfd, isymbol, obfd, osymbol))
2297+
2298+
2299+File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end
2300+
2301+2.8 Archives
2302+============
2303+
2304+*Description*
2305+An archive (or library) is just another BFD. It has a symbol table,
2306+although there's not much a user program will do with it.
2307+
2308+ The big difference between an archive BFD and an ordinary BFD is
2309+that the archive doesn't have sections. Instead it has a chain of BFDs
2310+that are considered its contents. These BFDs can be manipulated like
2311+any other. The BFDs contained in an archive opened for reading will
2312+all be opened for reading. You may put either input or output BFDs
2313+into an archive opened for output; they will be handled correctly when
2314+the archive is closed.
2315+
2316+ Use `bfd_openr_next_archived_file' to step through the contents of
2317+an archive opened for input. You don't have to read the entire archive
2318+if you don't want to! Read it until you find what you want.
2319+
2320+ Archive contents of output BFDs are chained through the `next'
2321+pointer in a BFD. The first one is findable through the `archive_head'
2322+slot of the archive. Set it with `bfd_set_archive_head' (q.v.). A
2323+given BFD may be in only one open output archive at a time.
2324+
2325+ As expected, the BFD archive code is more general than the archive
2326+code of any given environment. BFD archives may contain files of
2327+different formats (e.g., a.out and coff) and even different
2328+architectures. You may even place archives recursively into archives!
2329+
2330+ This can cause unexpected confusion, since some archive formats are
2331+more expressive than others. For instance, Intel COFF archives can
2332+preserve long filenames; SunOS a.out archives cannot. If you move a
2333+file from the first to the second format and back again, the filename
2334+may be truncated. Likewise, different a.out environments have different
2335+conventions as to how they truncate filenames, whether they preserve
2336+directory names in filenames, etc. When interoperating with native
2337+tools, be sure your files are homogeneous.
2338+
2339+ Beware: most of these formats do not react well to the presence of
2340+spaces in filenames. We do the best we can, but can't always handle
2341+this case due to restrictions in the format of archives. Many Unix
2342+utilities are braindead in regards to spaces and such in filenames
2343+anyway, so this shouldn't be much of a restriction.
2344+
2345+ Archives are supported in BFD in `archive.c'.
2346+
2347+2.8.0.1 `bfd_get_next_mapent'
2348+.............................
2349+
2350+*Synopsis*
2351+ symindex bfd_get_next_mapent
2352+ (bfd *abfd, symindex previous, carsym **sym);
2353+ *Description*
2354+Step through archive ABFD's symbol table (if it has one). Successively
2355+update SYM with the next symbol's information, returning that symbol's
2356+(internal) index into the symbol table.
2357+
2358+ Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
2359+one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
2360+
2361+ A `carsym' is a canonical archive symbol. The only user-visible
2362+element is its name, a null-terminated string.
2363+
2364+2.8.0.2 `bfd_set_archive_head'
2365+..............................
2366+
2367+*Synopsis*
2368+ bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
2369+ *Description*
2370+Set the head of the chain of BFDs contained in the archive OUTPUT to
2371+NEW_HEAD.
2372+
2373+2.8.0.3 `bfd_openr_next_archived_file'
2374+......................................
2375+
2376+*Synopsis*
2377+ bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
2378+ *Description*
2379+Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
2380+BFD on the first contained element and returns that. Subsequent calls
2381+should pass the archive and the previous return value to return a
2382+created BFD to the next contained element. NULL is returned when there
2383+are no more.
2384+
2385+
2386+File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end
2387+
2388+2.9 File formats
2389+================
2390+
2391+A format is a BFD concept of high level file contents type. The formats
2392+supported by BFD are:
2393+
2394+ * `bfd_object'
2395+ The BFD may contain data, symbols, relocations and debug info.
2396+
2397+ * `bfd_archive'
2398+ The BFD contains other BFDs and an optional index.
2399+
2400+ * `bfd_core'
2401+ The BFD contains the result of an executable core dump.
2402+
2403+2.9.0.1 `bfd_check_format'
2404+..........................
2405+
2406+*Synopsis*
2407+ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
2408+ *Description*
2409+Verify if the file attached to the BFD ABFD is compatible with the
2410+format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
2411+
2412+ If the BFD has been set to a specific target before the call, only
2413+the named target and format combination is checked. If the target has
2414+not been set, or has been set to `default', then all the known target
2415+backends is interrogated to determine a match. If the default target
2416+matches, it is used. If not, exactly one target must recognize the
2417+file, or an error results.
2418+
2419+ The function returns `TRUE' on success, otherwise `FALSE' with one
2420+of the following error codes:
2421+
2422+ * `bfd_error_invalid_operation' - if `format' is not one of
2423+ `bfd_object', `bfd_archive' or `bfd_core'.
2424+
2425+ * `bfd_error_system_call' - if an error occured during a read - even
2426+ some file mismatches can cause bfd_error_system_calls.
2427+
2428+ * `file_not_recognised' - none of the backends recognised the file
2429+ format.
2430+
2431+ * `bfd_error_file_ambiguously_recognized' - more than one backend
2432+ recognised the file format.
2433+
2434+2.9.0.2 `bfd_check_format_matches'
2435+..................................
2436+
2437+*Synopsis*
2438+ bfd_boolean bfd_check_format_matches
2439+ (bfd *abfd, bfd_format format, char ***matching);
2440+ *Description*
2441+Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
2442+set to `bfd_error_file_ambiguously_recognized'. In that case, if
2443+MATCHING is not NULL, it will be filled in with a NULL-terminated list
2444+of the names of the formats that matched, allocated with `malloc'.
2445+Then the user may choose a format and try again.
2446+
2447+ When done with the list that MATCHING points to, the caller should
2448+free it.
2449+
2450+2.9.0.3 `bfd_set_format'
2451+........................
2452+
2453+*Synopsis*
2454+ bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
2455+ *Description*
2456+This function sets the file format of the BFD ABFD to the format
2457+FORMAT. If the target set in the BFD does not support the format
2458+requested, the format is invalid, or the BFD is not open for writing,
2459+then an error occurs.
2460+
2461+2.9.0.4 `bfd_format_string'
2462+...........................
2463+
2464+*Synopsis*
2465+ const char *bfd_format_string (bfd_format format);
2466+ *Description*
2467+Return a pointer to a const string `invalid', `object', `archive',
2468+`core', or `unknown', depending upon the value of FORMAT.
2469+
2470+
2471+File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end
2472+
2473+2.10 Relocations
2474+================
2475+
2476+BFD maintains relocations in much the same way it maintains symbols:
2477+they are left alone until required, then read in en-masse and
2478+translated into an internal form. A common routine
2479+`bfd_perform_relocation' acts upon the canonical form to do the fixup.
2480+
2481+ Relocations are maintained on a per section basis, while symbols are
2482+maintained on a per BFD basis.
2483+
2484+ All that a back end has to do to fit the BFD interface is to create
2485+a `struct reloc_cache_entry' for each relocation in a particular
2486+section, and fill in the right bits of the structures.
2487+
2488+* Menu:
2489+
2490+* typedef arelent::
2491+* howto manager::
2492+
2493+
2494+File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations
2495+
2496+2.10.1 typedef arelent
2497+----------------------
2498+
2499+This is the structure of a relocation entry:
2500+
2501+
2502+ typedef enum bfd_reloc_status
2503+ {
2504+ /* No errors detected. */
2505+ bfd_reloc_ok,
2506+
2507+ /* The relocation was performed, but there was an overflow. */
2508+ bfd_reloc_overflow,
2509+
2510+ /* The address to relocate was not within the section supplied. */
2511+ bfd_reloc_outofrange,
2512+
2513+ /* Used by special functions. */
2514+ bfd_reloc_continue,
2515+
2516+ /* Unsupported relocation size requested. */
2517+ bfd_reloc_notsupported,
2518+
2519+ /* Unused. */
2520+ bfd_reloc_other,
2521+
2522+ /* The symbol to relocate against was undefined. */
2523+ bfd_reloc_undefined,
2524+
2525+ /* The relocation was performed, but may not be ok - presently
2526+ generated only when linking i960 coff files with i960 b.out
2527+ symbols. If this type is returned, the error_message argument
2528+ to bfd_perform_relocation will be set. */
2529+ bfd_reloc_dangerous
2530+ }
2531+ bfd_reloc_status_type;
2532+
2533+
2534+ typedef struct reloc_cache_entry
2535+ {
2536+ /* A pointer into the canonical table of pointers. */
2537+ struct bfd_symbol **sym_ptr_ptr;
2538+
2539+ /* offset in section. */
2540+ bfd_size_type address;
2541+
2542+ /* addend for relocation value. */
2543+ bfd_vma addend;
2544+
2545+ /* Pointer to how to perform the required relocation. */
2546+ reloc_howto_type *howto;
2547+
2548+ }
2549+ arelent;
2550+ *Description*
2551+Here is a description of each of the fields within an `arelent':
2552+
2553+ * `sym_ptr_ptr'
2554+ The symbol table pointer points to a pointer to the symbol
2555+associated with the relocation request. It is the pointer into the
2556+table returned by the back end's `canonicalize_symtab' action. *Note
2557+Symbols::. The symbol is referenced through a pointer to a pointer so
2558+that tools like the linker can fix up all the symbols of the same name
2559+by modifying only one pointer. The relocation routine looks in the
2560+symbol and uses the base of the section the symbol is attached to and
2561+the value of the symbol as the initial relocation offset. If the symbol
2562+pointer is zero, then the section provided is looked up.
2563+
2564+ * `address'
2565+ The `address' field gives the offset in bytes from the base of the
2566+section data which owns the relocation record to the first byte of
2567+relocatable information. The actual data relocated will be relative to
2568+this point; for example, a relocation type which modifies the bottom
2569+two bytes of a four byte word would not touch the first byte pointed to
2570+in a big endian world.
2571+
2572+ * `addend'
2573+ The `addend' is a value provided by the back end to be added (!) to
2574+the relocation offset. Its interpretation is dependent upon the howto.
2575+For example, on the 68k the code:
2576+
2577+ char foo[];
2578+ main()
2579+ {
2580+ return foo[0x12345678];
2581+ }
2582+
2583+ Could be compiled into:
2584+
2585+ linkw fp,#-4
2586+ moveb @#12345678,d0
2587+ extbl d0
2588+ unlk fp
2589+ rts
2590+
2591+ This could create a reloc pointing to `foo', but leave the offset in
2592+the data, something like:
2593+
2594+ RELOCATION RECORDS FOR [.text]:
2595+ offset type value
2596+ 00000006 32 _foo
2597+
2598+ 00000000 4e56 fffc ; linkw fp,#-4
2599+ 00000004 1039 1234 5678 ; moveb @#12345678,d0
2600+ 0000000a 49c0 ; extbl d0
2601+ 0000000c 4e5e ; unlk fp
2602+ 0000000e 4e75 ; rts
2603+
2604+ Using coff and an 88k, some instructions don't have enough space in
2605+them to represent the full address range, and pointers have to be
2606+loaded in two parts. So you'd get something like:
2607+
2608+ or.u r13,r0,hi16(_foo+0x12345678)
2609+ ld.b r2,r13,lo16(_foo+0x12345678)
2610+ jmp r1
2611+
2612+ This should create two relocs, both pointing to `_foo', and with
2613+0x12340000 in their addend field. The data would consist of:
2614+
2615+ RELOCATION RECORDS FOR [.text]:
2616+ offset type value
2617+ 00000002 HVRT16 _foo+0x12340000
2618+ 00000006 LVRT16 _foo+0x12340000
2619+
2620+ 00000000 5da05678 ; or.u r13,r0,0x5678
2621+ 00000004 1c4d5678 ; ld.b r2,r13,0x5678
2622+ 00000008 f400c001 ; jmp r1
2623+
2624+ The relocation routine digs out the value from the data, adds it to
2625+the addend to get the original offset, and then adds the value of
2626+`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
2627+with carry from bit 15 to bit 16.
2628+
2629+ One further example is the sparc and the a.out format. The sparc has
2630+a similar problem to the 88k, in that some instructions don't have room
2631+for an entire offset, but on the sparc the parts are created in odd
2632+sized lumps. The designers of the a.out format chose to not use the
2633+data within the section for storing part of the offset; all the offset
2634+is kept within the reloc. Anything in the data should be ignored.
2635+
2636+ save %sp,-112,%sp
2637+ sethi %hi(_foo+0x12345678),%g2
2638+ ldsb [%g2+%lo(_foo+0x12345678)],%i0
2639+ ret
2640+ restore
2641+
2642+ Both relocs contain a pointer to `foo', and the offsets contain junk.
2643+
2644+ RELOCATION RECORDS FOR [.text]:
2645+ offset type value
2646+ 00000004 HI22 _foo+0x12345678
2647+ 00000008 LO10 _foo+0x12345678
2648+
2649+ 00000000 9de3bf90 ; save %sp,-112,%sp
2650+ 00000004 05000000 ; sethi %hi(_foo+0),%g2
2651+ 00000008 f048a000 ; ldsb [%g2+%lo(_foo+0)],%i0
2652+ 0000000c 81c7e008 ; ret
2653+ 00000010 81e80000 ; restore
2654+
2655+ * `howto'
2656+ The `howto' field can be imagined as a relocation instruction. It is
2657+a pointer to a structure which contains information on what to do with
2658+all of the other information in the reloc record and data section. A
2659+back end would normally have a relocation instruction set and turn
2660+relocations into pointers to the correct structure on input - but it
2661+would be possible to create each howto field on demand.
2662+
2663+2.10.1.1 `enum complain_overflow'
2664+.................................
2665+
2666+Indicates what sort of overflow checking should be done when performing
2667+a relocation.
2668+
2669+
2670+ enum complain_overflow
2671+ {
2672+ /* Do not complain on overflow. */
2673+ complain_overflow_dont,
2674+
2675+ /* Complain if the bitfield overflows, whether it is considered
2676+ as signed or unsigned. */
2677+ complain_overflow_bitfield,
2678+
2679+ /* Complain if the value overflows when considered as signed
2680+ number. */
2681+ complain_overflow_signed,
2682+
2683+ /* Complain if the value overflows when considered as an
2684+ unsigned number. */
2685+ complain_overflow_unsigned
2686+ };
2687+
2688+2.10.1.2 `reloc_howto_type'
2689+...........................
2690+
2691+The `reloc_howto_type' is a structure which contains all the
2692+information that libbfd needs to know to tie up a back end's data.
2693+
2694+ struct bfd_symbol; /* Forward declaration. */
2695+
2696+ struct reloc_howto_struct
2697+ {
2698+ /* The type field has mainly a documentary use - the back end can
2699+ do what it wants with it, though normally the back end's
2700+ external idea of what a reloc number is stored
2701+ in this field. For example, a PC relative word relocation
2702+ in a coff environment has the type 023 - because that's
2703+ what the outside world calls a R_PCRWORD reloc. */
2704+ unsigned int type;
2705+
2706+ /* The value the final relocation is shifted right by. This drops
2707+ unwanted data from the relocation. */
2708+ unsigned int rightshift;
2709+
2710+ /* The size of the item to be relocated. This is *not* a
2711+ power-of-two measure. To get the number of bytes operated
2712+ on by a type of relocation, use bfd_get_reloc_size. */
2713+ int size;
2714+
2715+ /* The number of bits in the item to be relocated. This is used
2716+ when doing overflow checking. */
2717+ unsigned int bitsize;
2718+
2719+ /* Notes that the relocation is relative to the location in the
2720+ data section of the addend. The relocation function will
2721+ subtract from the relocation value the address of the location
2722+ being relocated. */
2723+ bfd_boolean pc_relative;
2724+
2725+ /* The bit position of the reloc value in the destination.
2726+ The relocated value is left shifted by this amount. */
2727+ unsigned int bitpos;
2728+
2729+ /* What type of overflow error should be checked for when
2730+ relocating. */
2731+ enum complain_overflow complain_on_overflow;
2732+
2733+ /* If this field is non null, then the supplied function is
2734+ called rather than the normal function. This allows really
2735+ strange relocation methods to be accommodated (e.g., i960 callj
2736+ instructions). */
2737+ bfd_reloc_status_type (*special_function)
2738+ (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
2739+ bfd *, char **);
2740+
2741+ /* The textual name of the relocation type. */
2742+ char *name;
2743+
2744+ /* Some formats record a relocation addend in the section contents
2745+ rather than with the relocation. For ELF formats this is the
2746+ distinction between USE_REL and USE_RELA (though the code checks
2747+ for USE_REL == 1/0). The value of this field is TRUE if the
2748+ addend is recorded with the section contents; when performing a
2749+ partial link (ld -r) the section contents (the data) will be
2750+ modified. The value of this field is FALSE if addends are
2751+ recorded with the relocation (in arelent.addend); when performing
2752+ a partial link the relocation will be modified.
2753+ All relocations for all ELF USE_RELA targets should set this field
2754+ to FALSE (values of TRUE should be looked on with suspicion).
2755+ However, the converse is not true: not all relocations of all ELF
2756+ USE_REL targets set this field to TRUE. Why this is so is peculiar
2757+ to each particular target. For relocs that aren't used in partial
2758+ links (e.g. GOT stuff) it doesn't matter what this is set to. */
2759+ bfd_boolean partial_inplace;
2760+
2761+ /* src_mask selects the part of the instruction (or data) to be used
2762+ in the relocation sum. If the target relocations don't have an
2763+ addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
2764+ dst_mask to extract the addend from the section contents. If
2765+ relocations do have an addend in the reloc, eg. ELF USE_RELA, this
2766+ field should be zero. Non-zero values for ELF USE_RELA targets are
2767+ bogus as in those cases the value in the dst_mask part of the
2768+ section contents should be treated as garbage. */
2769+ bfd_vma src_mask;
2770+
2771+ /* dst_mask selects which parts of the instruction (or data) are
2772+ replaced with a relocated value. */
2773+ bfd_vma dst_mask;
2774+
2775+ /* When some formats create PC relative instructions, they leave
2776+ the value of the pc of the place being relocated in the offset
2777+ slot of the instruction, so that a PC relative relocation can
2778+ be made just by adding in an ordinary offset (e.g., sun3 a.out).
2779+ Some formats leave the displacement part of an instruction
2780+ empty (e.g., m88k bcs); this flag signals the fact. */
2781+ bfd_boolean pcrel_offset;
2782+ };
2783+
2784+2.10.1.3 `The HOWTO Macro'
2785+..........................
2786+
2787+*Description*
2788+The HOWTO define is horrible and will go away.
2789+ #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
2790+ { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
2791+
2792+ *Description*
2793+And will be replaced with the totally magic way. But for the moment, we
2794+are compatible, so do it this way.
2795+ #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
2796+ HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
2797+ NAME, FALSE, 0, 0, IN)
2798+
2799+ *Description*
2800+This is used to fill in an empty howto entry in an array.
2801+ #define EMPTY_HOWTO(C) \
2802+ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
2803+ NULL, FALSE, 0, 0, FALSE)
2804+
2805+ *Description*
2806+Helper routine to turn a symbol into a relocation value.
2807+ #define HOWTO_PREPARE(relocation, symbol) \
2808+ { \
2809+ if (symbol != NULL) \
2810+ { \
2811+ if (bfd_is_com_section (symbol->section)) \
2812+ { \
2813+ relocation = 0; \
2814+ } \
2815+ else \
2816+ { \
2817+ relocation = symbol->value; \
2818+ } \
2819+ } \
2820+ }
2821+
2822+2.10.1.4 `bfd_get_reloc_size'
2823+.............................
2824+
2825+*Synopsis*
2826+ unsigned int bfd_get_reloc_size (reloc_howto_type *);
2827+ *Description*
2828+For a reloc_howto_type that operates on a fixed number of bytes, this
2829+returns the number of bytes operated on.
2830+
2831+2.10.1.5 `arelent_chain'
2832+........................
2833+
2834+*Description*
2835+How relocs are tied together in an `asection':
2836+ typedef struct relent_chain
2837+ {
2838+ arelent relent;
2839+ struct relent_chain *next;
2840+ }
2841+ arelent_chain;
2842+
2843+2.10.1.6 `bfd_check_overflow'
2844+.............................
2845+
2846+*Synopsis*
2847+ bfd_reloc_status_type bfd_check_overflow
2848+ (enum complain_overflow how,
2849+ unsigned int bitsize,
2850+ unsigned int rightshift,
2851+ unsigned int addrsize,
2852+ bfd_vma relocation);
2853+ *Description*
2854+Perform overflow checking on RELOCATION which has BITSIZE significant
2855+bits and will be shifted right by RIGHTSHIFT bits, on a machine with
2856+addresses containing ADDRSIZE significant bits. The result is either of
2857+`bfd_reloc_ok' or `bfd_reloc_overflow'.
2858+
2859+2.10.1.7 `bfd_perform_relocation'
2860+.................................
2861+
2862+*Synopsis*
2863+ bfd_reloc_status_type bfd_perform_relocation
2864+ (bfd *abfd,
2865+ arelent *reloc_entry,
2866+ void *data,
2867+ asection *input_section,
2868+ bfd *output_bfd,
2869+ char **error_message);
2870+ *Description*
2871+If OUTPUT_BFD is supplied to this function, the generated image will be
2872+relocatable; the relocations are copied to the output file after they
2873+have been changed to reflect the new state of the world. There are two
2874+ways of reflecting the results of partial linkage in an output file: by
2875+modifying the output data in place, and by modifying the relocation
2876+record. Some native formats (e.g., basic a.out and basic coff) have no
2877+way of specifying an addend in the relocation type, so the addend has
2878+to go in the output data. This is no big deal since in these formats
2879+the output data slot will always be big enough for the addend. Complex
2880+reloc types with addends were invented to solve just this problem. The
2881+ERROR_MESSAGE argument is set to an error message if this return
2882+`bfd_reloc_dangerous'.
2883+
2884+2.10.1.8 `bfd_install_relocation'
2885+.................................
2886+
2887+*Synopsis*
2888+ bfd_reloc_status_type bfd_install_relocation
2889+ (bfd *abfd,
2890+ arelent *reloc_entry,
2891+ void *data, bfd_vma data_start,
2892+ asection *input_section,
2893+ char **error_message);
2894+ *Description*
2895+This looks remarkably like `bfd_perform_relocation', except it does not
2896+expect that the section contents have been filled in. I.e., it's
2897+suitable for use when creating, rather than applying a relocation.
2898+
2899+ For now, this function should be considered reserved for the
2900+assembler.
2901+
2902+
2903+File: bfd.info, Node: howto manager, Prev: typedef arelent, Up: Relocations
2904+
2905+2.11 The howto manager
2906+======================
2907+
2908+When an application wants to create a relocation, but doesn't know what
2909+the target machine might call it, it can find out by using this bit of
2910+code.
2911+
2912+2.11.0.1 `bfd_reloc_code_type'
2913+..............................
2914+
2915+*Description*
2916+The insides of a reloc code. The idea is that, eventually, there will
2917+be one enumerator for every type of relocation we ever do. Pass one of
2918+these values to `bfd_reloc_type_lookup', and it'll return a howto
2919+pointer.
2920+
2921+ This does mean that the application must determine the correct
2922+enumerator value; you can't get a howto pointer from a random set of
2923+attributes.
2924+
2925+ Here are the possible values for `enum bfd_reloc_code_real':
2926+
2927+ -- : BFD_RELOC_64
2928+ -- : BFD_RELOC_32
2929+ -- : BFD_RELOC_26
2930+ -- : BFD_RELOC_24
2931+ -- : BFD_RELOC_16
2932+ -- : BFD_RELOC_14
2933+ -- : BFD_RELOC_8
2934+ Basic absolute relocations of N bits.
2935+
2936+ -- : BFD_RELOC_64_PCREL
2937+ -- : BFD_RELOC_32_PCREL
2938+ -- : BFD_RELOC_24_PCREL
2939+ -- : BFD_RELOC_16_PCREL
2940+ -- : BFD_RELOC_12_PCREL
2941+ -- : BFD_RELOC_8_PCREL
2942+ PC-relative relocations. Sometimes these are relative to the
2943+ address of the relocation itself; sometimes they are relative to
2944+ the start of the section containing the relocation. It depends on
2945+ the specific target.
2946+
2947+ The 24-bit relocation is used in some Intel 960 configurations.
2948+
2949+ -- : BFD_RELOC_32_SECREL
2950+ Section relative relocations. Some targets need this for DWARF2.
2951+
2952+ -- : BFD_RELOC_32_GOT_PCREL
2953+ -- : BFD_RELOC_16_GOT_PCREL
2954+ -- : BFD_RELOC_8_GOT_PCREL
2955+ -- : BFD_RELOC_32_GOTOFF
2956+ -- : BFD_RELOC_16_GOTOFF
2957+ -- : BFD_RELOC_LO16_GOTOFF
2958+ -- : BFD_RELOC_HI16_GOTOFF
2959+ -- : BFD_RELOC_HI16_S_GOTOFF
2960+ -- : BFD_RELOC_8_GOTOFF
2961+ -- : BFD_RELOC_64_PLT_PCREL
2962+ -- : BFD_RELOC_32_PLT_PCREL
2963+ -- : BFD_RELOC_24_PLT_PCREL
2964+ -- : BFD_RELOC_16_PLT_PCREL
2965+ -- : BFD_RELOC_8_PLT_PCREL
2966+ -- : BFD_RELOC_64_PLTOFF
2967+ -- : BFD_RELOC_32_PLTOFF
2968+ -- : BFD_RELOC_16_PLTOFF
2969+ -- : BFD_RELOC_LO16_PLTOFF
2970+ -- : BFD_RELOC_HI16_PLTOFF
2971+ -- : BFD_RELOC_HI16_S_PLTOFF
2972+ -- : BFD_RELOC_8_PLTOFF
2973+ For ELF.
2974+
2975+ -- : BFD_RELOC_68K_GLOB_DAT
2976+ -- : BFD_RELOC_68K_JMP_SLOT
2977+ -- : BFD_RELOC_68K_RELATIVE
2978+ Relocations used by 68K ELF.
2979+
2980+ -- : BFD_RELOC_32_BASEREL
2981+ -- : BFD_RELOC_16_BASEREL
2982+ -- : BFD_RELOC_LO16_BASEREL
2983+ -- : BFD_RELOC_HI16_BASEREL
2984+ -- : BFD_RELOC_HI16_S_BASEREL
2985+ -- : BFD_RELOC_8_BASEREL
2986+ -- : BFD_RELOC_RVA
2987+ Linkage-table relative.
2988+
2989+ -- : BFD_RELOC_8_FFnn
2990+ Absolute 8-bit relocation, but used to form an address like 0xFFnn.
2991+
2992+ -- : BFD_RELOC_32_PCREL_S2
2993+ -- : BFD_RELOC_16_PCREL_S2
2994+ -- : BFD_RELOC_23_PCREL_S2
2995+ These PC-relative relocations are stored as word displacements -
2996+ i.e., byte displacements shifted right two bits. The 30-bit word
2997+ displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
2998+ SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
2999+ signed 16-bit displacement is used on the MIPS, and the 23-bit
3000+ displacement is used on the Alpha.
3001+
3002+ -- : BFD_RELOC_HI22
3003+ -- : BFD_RELOC_LO10
3004+ High 22 bits and low 10 bits of 32-bit value, placed into lower
3005+ bits of the target word. These are used on the SPARC.
3006+
3007+ -- : BFD_RELOC_GPREL16
3008+ -- : BFD_RELOC_GPREL32
3009+ For systems that allocate a Global Pointer register, these are
3010+ displacements off that register. These relocation types are
3011+ handled specially, because the value the register will have is
3012+ decided relatively late.
3013+
3014+ -- : BFD_RELOC_I960_CALLJ
3015+ Reloc types used for i960/b.out.
3016+
3017+ -- : BFD_RELOC_NONE
3018+ -- : BFD_RELOC_SPARC_WDISP22
3019+ -- : BFD_RELOC_SPARC22
3020+ -- : BFD_RELOC_SPARC13
3021+ -- : BFD_RELOC_SPARC_GOT10
3022+ -- : BFD_RELOC_SPARC_GOT13
3023+ -- : BFD_RELOC_SPARC_GOT22
3024+ -- : BFD_RELOC_SPARC_PC10
3025+ -- : BFD_RELOC_SPARC_PC22
3026+ -- : BFD_RELOC_SPARC_WPLT30
3027+ -- : BFD_RELOC_SPARC_COPY
3028+ -- : BFD_RELOC_SPARC_GLOB_DAT
3029+ -- : BFD_RELOC_SPARC_JMP_SLOT
3030+ -- : BFD_RELOC_SPARC_RELATIVE
3031+ -- : BFD_RELOC_SPARC_UA16
3032+ -- : BFD_RELOC_SPARC_UA32
3033+ -- : BFD_RELOC_SPARC_UA64
3034+ SPARC ELF relocations. There is probably some overlap with other
3035+ relocation types already defined.
3036+
3037+ -- : BFD_RELOC_SPARC_BASE13
3038+ -- : BFD_RELOC_SPARC_BASE22
3039+ I think these are specific to SPARC a.out (e.g., Sun 4).
3040+
3041+ -- : BFD_RELOC_SPARC_64
3042+ -- : BFD_RELOC_SPARC_10
3043+ -- : BFD_RELOC_SPARC_11
3044+ -- : BFD_RELOC_SPARC_OLO10
3045+ -- : BFD_RELOC_SPARC_HH22
3046+ -- : BFD_RELOC_SPARC_HM10
3047+ -- : BFD_RELOC_SPARC_LM22
3048+ -- : BFD_RELOC_SPARC_PC_HH22
3049+ -- : BFD_RELOC_SPARC_PC_HM10
3050+ -- : BFD_RELOC_SPARC_PC_LM22
3051+ -- : BFD_RELOC_SPARC_WDISP16
3052+ -- : BFD_RELOC_SPARC_WDISP19
3053+ -- : BFD_RELOC_SPARC_7
3054+ -- : BFD_RELOC_SPARC_6
3055+ -- : BFD_RELOC_SPARC_5
3056+ -- : BFD_RELOC_SPARC_DISP64
3057+ -- : BFD_RELOC_SPARC_PLT32
3058+ -- : BFD_RELOC_SPARC_PLT64
3059+ -- : BFD_RELOC_SPARC_HIX22
3060+ -- : BFD_RELOC_SPARC_LOX10
3061+ -- : BFD_RELOC_SPARC_H44
3062+ -- : BFD_RELOC_SPARC_M44
3063+ -- : BFD_RELOC_SPARC_L44
3064+ -- : BFD_RELOC_SPARC_REGISTER
3065+ SPARC64 relocations
3066+
3067+ -- : BFD_RELOC_SPARC_REV32
3068+ SPARC little endian relocation
3069+
3070+ -- : BFD_RELOC_SPARC_TLS_GD_HI22
3071+ -- : BFD_RELOC_SPARC_TLS_GD_LO10
3072+ -- : BFD_RELOC_SPARC_TLS_GD_ADD
3073+ -- : BFD_RELOC_SPARC_TLS_GD_CALL
3074+ -- : BFD_RELOC_SPARC_TLS_LDM_HI22
3075+ -- : BFD_RELOC_SPARC_TLS_LDM_LO10
3076+ -- : BFD_RELOC_SPARC_TLS_LDM_ADD
3077+ -- : BFD_RELOC_SPARC_TLS_LDM_CALL
3078+ -- : BFD_RELOC_SPARC_TLS_LDO_HIX22
3079+ -- : BFD_RELOC_SPARC_TLS_LDO_LOX10
3080+ -- : BFD_RELOC_SPARC_TLS_LDO_ADD
3081+ -- : BFD_RELOC_SPARC_TLS_IE_HI22
3082+ -- : BFD_RELOC_SPARC_TLS_IE_LO10
3083+ -- : BFD_RELOC_SPARC_TLS_IE_LD
3084+ -- : BFD_RELOC_SPARC_TLS_IE_LDX
3085+ -- : BFD_RELOC_SPARC_TLS_IE_ADD
3086+ -- : BFD_RELOC_SPARC_TLS_LE_HIX22
3087+ -- : BFD_RELOC_SPARC_TLS_LE_LOX10
3088+ -- : BFD_RELOC_SPARC_TLS_DTPMOD32
3089+ -- : BFD_RELOC_SPARC_TLS_DTPMOD64
3090+ -- : BFD_RELOC_SPARC_TLS_DTPOFF32
3091+ -- : BFD_RELOC_SPARC_TLS_DTPOFF64
3092+ -- : BFD_RELOC_SPARC_TLS_TPOFF32
3093+ -- : BFD_RELOC_SPARC_TLS_TPOFF64
3094+ SPARC TLS relocations
3095+
3096+ -- : BFD_RELOC_ALPHA_GPDISP_HI16
3097+ Alpha ECOFF and ELF relocations. Some of these treat the symbol or
3098+ "addend" in some special way. For GPDISP_HI16 ("gpdisp")
3099+ relocations, the symbol is ignored when writing; when reading, it
3100+ will be the absolute section symbol. The addend is the
3101+ displacement in bytes of the "lda" instruction from the "ldah"
3102+ instruction (which is at the address of this reloc).
3103+
3104+ -- : BFD_RELOC_ALPHA_GPDISP_LO16
3105+ For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
3106+ with GPDISP_HI16 relocs. The addend is ignored when writing the
3107+ relocations out, and is filled in with the file's GP value on
3108+ reading, for convenience.
3109+
3110+ -- : BFD_RELOC_ALPHA_GPDISP
3111+ The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
3112+ relocation except that there is no accompanying GPDISP_LO16
3113+ relocation.
3114+
3115+ -- : BFD_RELOC_ALPHA_LITERAL
3116+ -- : BFD_RELOC_ALPHA_ELF_LITERAL
3117+ -- : BFD_RELOC_ALPHA_LITUSE
3118+ The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
3119+ the assembler turns it into a LDQ instruction to load the address
3120+ of the symbol, and then fills in a register in the real
3121+ instruction.
3122+
3123+ The LITERAL reloc, at the LDQ instruction, refers to the .lita
3124+ section symbol. The addend is ignored when writing, but is filled
3125+ in with the file's GP value on reading, for convenience, as with
3126+ the GPDISP_LO16 reloc.
3127+
3128+ The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
3129+ GPDISP_LO16. It should refer to the symbol to be referenced, as
3130+ with 16_GOTOFF, but it generates output not based on the position
3131+ within the .got section, but relative to the GP value chosen for
3132+ the file during the final link stage.
3133+
3134+ The LITUSE reloc, on the instruction using the loaded address,
3135+ gives information to the linker that it might be able to use to
3136+ optimize away some literal section references. The symbol is
3137+ ignored (read as the absolute section symbol), and the "addend"
3138+ indicates the type of instruction using the register: 1 - "memory"
3139+ fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
3140+ of branch)
3141+
3142+ -- : BFD_RELOC_ALPHA_HINT
3143+ The HINT relocation indicates a value that should be filled into
3144+ the "hint" field of a jmp/jsr/ret instruction, for possible branch-
3145+ prediction logic which may be provided on some processors.
3146+
3147+ -- : BFD_RELOC_ALPHA_LINKAGE
3148+ The LINKAGE relocation outputs a linkage pair in the object file,
3149+ which is filled by the linker.
3150+
3151+ -- : BFD_RELOC_ALPHA_CODEADDR
3152+ The CODEADDR relocation outputs a STO_CA in the object file, which
3153+ is filled by the linker.
3154+
3155+ -- : BFD_RELOC_ALPHA_GPREL_HI16
3156+ -- : BFD_RELOC_ALPHA_GPREL_LO16
3157+ The GPREL_HI/LO relocations together form a 32-bit offset from the
3158+ GP register.
3159+
3160+ -- : BFD_RELOC_ALPHA_BRSGP
3161+ Like BFD_RELOC_23_PCREL_S2, except that the source and target must
3162+ share a common GP, and the target address is adjusted for
3163+ STO_ALPHA_STD_GPLOAD.
3164+
3165+ -- : BFD_RELOC_ALPHA_TLSGD
3166+ -- : BFD_RELOC_ALPHA_TLSLDM
3167+ -- : BFD_RELOC_ALPHA_DTPMOD64
3168+ -- : BFD_RELOC_ALPHA_GOTDTPREL16
3169+ -- : BFD_RELOC_ALPHA_DTPREL64
3170+ -- : BFD_RELOC_ALPHA_DTPREL_HI16
3171+ -- : BFD_RELOC_ALPHA_DTPREL_LO16
3172+ -- : BFD_RELOC_ALPHA_DTPREL16
3173+ -- : BFD_RELOC_ALPHA_GOTTPREL16
3174+ -- : BFD_RELOC_ALPHA_TPREL64
3175+ -- : BFD_RELOC_ALPHA_TPREL_HI16
3176+ -- : BFD_RELOC_ALPHA_TPREL_LO16
3177+ -- : BFD_RELOC_ALPHA_TPREL16
3178+ Alpha thread-local storage relocations.
3179+
3180+ -- : BFD_RELOC_MIPS_JMP
3181+ Bits 27..2 of the relocation address shifted right 2 bits; simple
3182+ reloc otherwise.
3183+
3184+ -- : BFD_RELOC_MIPS16_JMP
3185+ The MIPS16 jump instruction.
3186+
3187+ -- : BFD_RELOC_MIPS16_GPREL
3188+ MIPS16 GP relative reloc.
3189+
3190+ -- : BFD_RELOC_HI16
3191+ High 16 bits of 32-bit value; simple reloc.
3192+
3193+ -- : BFD_RELOC_HI16_S
3194+ High 16 bits of 32-bit value but the low 16 bits will be sign
3195+ extended and added to form the final result. If the low 16 bits
3196+ form a negative number, we need to add one to the high value to
3197+ compensate for the borrow when the low bits are added.
3198+
3199+ -- : BFD_RELOC_LO16
3200+ Low 16 bits.
3201+
3202+ -- : BFD_RELOC_MIPS16_HI16
3203+ MIPS16 high 16 bits of 32-bit value.
3204+
3205+ -- : BFD_RELOC_MIPS16_HI16_S
3206+ MIPS16 high 16 bits of 32-bit value but the low 16 bits will be
3207+ sign extended and added to form the final result. If the low 16
3208+ bits form a negative number, we need to add one to the high value
3209+ to compensate for the borrow when the low bits are added.
3210+
3211+ -- : BFD_RELOC_MIPS16_LO16
3212+ MIPS16 low 16 bits.
3213+
3214+ -- : BFD_RELOC_MIPS_LITERAL
3215+ Relocation against a MIPS literal section.
3216+
3217+ -- : BFD_RELOC_MIPS_GOT16
3218+ -- : BFD_RELOC_MIPS_CALL16
3219+ -- : BFD_RELOC_MIPS_GOT_HI16
3220+ -- : BFD_RELOC_MIPS_GOT_LO16
3221+ -- : BFD_RELOC_MIPS_CALL_HI16
3222+ -- : BFD_RELOC_MIPS_CALL_LO16
3223+ -- : BFD_RELOC_MIPS_SUB
3224+ -- : BFD_RELOC_MIPS_GOT_PAGE
3225+ -- : BFD_RELOC_MIPS_GOT_OFST
3226+ -- : BFD_RELOC_MIPS_GOT_DISP
3227+ -- : BFD_RELOC_MIPS_SHIFT5
3228+ -- : BFD_RELOC_MIPS_SHIFT6
3229+ -- : BFD_RELOC_MIPS_INSERT_A
3230+ -- : BFD_RELOC_MIPS_INSERT_B
3231+ -- : BFD_RELOC_MIPS_DELETE
3232+ -- : BFD_RELOC_MIPS_HIGHEST
3233+ -- : BFD_RELOC_MIPS_HIGHER
3234+ -- : BFD_RELOC_MIPS_SCN_DISP
3235+ -- : BFD_RELOC_MIPS_REL16
3236+ -- : BFD_RELOC_MIPS_RELGOT
3237+ -- : BFD_RELOC_MIPS_JALR
3238+ -- : BFD_RELOC_MIPS_TLS_DTPMOD32
3239+ -- : BFD_RELOC_MIPS_TLS_DTPREL32
3240+ -- : BFD_RELOC_MIPS_TLS_DTPMOD64
3241+ -- : BFD_RELOC_MIPS_TLS_DTPREL64
3242+ -- : BFD_RELOC_MIPS_TLS_GD
3243+ -- : BFD_RELOC_MIPS_TLS_LDM
3244+ -- : BFD_RELOC_MIPS_TLS_DTPREL_HI16
3245+ -- : BFD_RELOC_MIPS_TLS_DTPREL_LO16
3246+ -- : BFD_RELOC_MIPS_TLS_GOTTPREL
3247+ -- : BFD_RELOC_MIPS_TLS_TPREL32
3248+ -- : BFD_RELOC_MIPS_TLS_TPREL64
3249+ -- : BFD_RELOC_MIPS_TLS_TPREL_HI16
3250+ -- : BFD_RELOC_MIPS_TLS_TPREL_LO16
3251+ MIPS ELF relocations.
3252+
3253+ -- : BFD_RELOC_FRV_LABEL16
3254+ -- : BFD_RELOC_FRV_LABEL24
3255+ -- : BFD_RELOC_FRV_LO16
3256+ -- : BFD_RELOC_FRV_HI16
3257+ -- : BFD_RELOC_FRV_GPREL12
3258+ -- : BFD_RELOC_FRV_GPRELU12
3259+ -- : BFD_RELOC_FRV_GPREL32
3260+ -- : BFD_RELOC_FRV_GPRELHI
3261+ -- : BFD_RELOC_FRV_GPRELLO
3262+ -- : BFD_RELOC_FRV_GOT12
3263+ -- : BFD_RELOC_FRV_GOTHI
3264+ -- : BFD_RELOC_FRV_GOTLO
3265+ -- : BFD_RELOC_FRV_FUNCDESC
3266+ -- : BFD_RELOC_FRV_FUNCDESC_GOT12
3267+ -- : BFD_RELOC_FRV_FUNCDESC_GOTHI
3268+ -- : BFD_RELOC_FRV_FUNCDESC_GOTLO
3269+ -- : BFD_RELOC_FRV_FUNCDESC_VALUE
3270+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFF12
3271+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFHI
3272+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
3273+ -- : BFD_RELOC_FRV_GOTOFF12
3274+ -- : BFD_RELOC_FRV_GOTOFFHI
3275+ -- : BFD_RELOC_FRV_GOTOFFLO
3276+ -- : BFD_RELOC_FRV_GETTLSOFF
3277+ -- : BFD_RELOC_FRV_TLSDESC_VALUE
3278+ -- : BFD_RELOC_FRV_GOTTLSDESC12
3279+ -- : BFD_RELOC_FRV_GOTTLSDESCHI
3280+ -- : BFD_RELOC_FRV_GOTTLSDESCLO
3281+ -- : BFD_RELOC_FRV_TLSMOFF12
3282+ -- : BFD_RELOC_FRV_TLSMOFFHI
3283+ -- : BFD_RELOC_FRV_TLSMOFFLO
3284+ -- : BFD_RELOC_FRV_GOTTLSOFF12
3285+ -- : BFD_RELOC_FRV_GOTTLSOFFHI
3286+ -- : BFD_RELOC_FRV_GOTTLSOFFLO
3287+ -- : BFD_RELOC_FRV_TLSOFF
3288+ -- : BFD_RELOC_FRV_TLSDESC_RELAX
3289+ -- : BFD_RELOC_FRV_GETTLSOFF_RELAX
3290+ -- : BFD_RELOC_FRV_TLSOFF_RELAX
3291+ -- : BFD_RELOC_FRV_TLSMOFF
3292+ Fujitsu Frv Relocations.
3293+
3294+ -- : BFD_RELOC_MN10300_GOTOFF24
3295+ This is a 24bit GOT-relative reloc for the mn10300.
3296+
3297+ -- : BFD_RELOC_MN10300_GOT32
3298+ This is a 32bit GOT-relative reloc for the mn10300, offset by two
3299+ bytes in the instruction.
3300+
3301+ -- : BFD_RELOC_MN10300_GOT24
3302+ This is a 24bit GOT-relative reloc for the mn10300, offset by two
3303+ bytes in the instruction.
3304+
3305+ -- : BFD_RELOC_MN10300_GOT16
3306+ This is a 16bit GOT-relative reloc for the mn10300, offset by two
3307+ bytes in the instruction.
3308+
3309+ -- : BFD_RELOC_MN10300_COPY
3310+ Copy symbol at runtime.
3311+
3312+ -- : BFD_RELOC_MN10300_GLOB_DAT
3313+ Create GOT entry.
3314+
3315+ -- : BFD_RELOC_MN10300_JMP_SLOT
3316+ Create PLT entry.
3317+
3318+ -- : BFD_RELOC_MN10300_RELATIVE
3319+ Adjust by program base.
3320+
3321+ -- : BFD_RELOC_386_GOT32
3322+ -- : BFD_RELOC_386_PLT32
3323+ -- : BFD_RELOC_386_COPY
3324+ -- : BFD_RELOC_386_GLOB_DAT
3325+ -- : BFD_RELOC_386_JUMP_SLOT
3326+ -- : BFD_RELOC_386_RELATIVE
3327+ -- : BFD_RELOC_386_GOTOFF
3328+ -- : BFD_RELOC_386_GOTPC
3329+ -- : BFD_RELOC_386_TLS_TPOFF
3330+ -- : BFD_RELOC_386_TLS_IE
3331+ -- : BFD_RELOC_386_TLS_GOTIE
3332+ -- : BFD_RELOC_386_TLS_LE
3333+ -- : BFD_RELOC_386_TLS_GD
3334+ -- : BFD_RELOC_386_TLS_LDM
3335+ -- : BFD_RELOC_386_TLS_LDO_32
3336+ -- : BFD_RELOC_386_TLS_IE_32
3337+ -- : BFD_RELOC_386_TLS_LE_32
3338+ -- : BFD_RELOC_386_TLS_DTPMOD32
3339+ -- : BFD_RELOC_386_TLS_DTPOFF32
3340+ -- : BFD_RELOC_386_TLS_TPOFF32
3341+ i386/elf relocations
3342+
3343+ -- : BFD_RELOC_X86_64_GOT32
3344+ -- : BFD_RELOC_X86_64_PLT32
3345+ -- : BFD_RELOC_X86_64_COPY
3346+ -- : BFD_RELOC_X86_64_GLOB_DAT
3347+ -- : BFD_RELOC_X86_64_JUMP_SLOT
3348+ -- : BFD_RELOC_X86_64_RELATIVE
3349+ -- : BFD_RELOC_X86_64_GOTPCREL
3350+ -- : BFD_RELOC_X86_64_32S
3351+ -- : BFD_RELOC_X86_64_DTPMOD64
3352+ -- : BFD_RELOC_X86_64_DTPOFF64
3353+ -- : BFD_RELOC_X86_64_TPOFF64
3354+ -- : BFD_RELOC_X86_64_TLSGD
3355+ -- : BFD_RELOC_X86_64_TLSLD
3356+ -- : BFD_RELOC_X86_64_DTPOFF32
3357+ -- : BFD_RELOC_X86_64_GOTTPOFF
3358+ -- : BFD_RELOC_X86_64_TPOFF32
3359+ x86-64/elf relocations
3360+
3361+ -- : BFD_RELOC_NS32K_IMM_8
3362+ -- : BFD_RELOC_NS32K_IMM_16
3363+ -- : BFD_RELOC_NS32K_IMM_32
3364+ -- : BFD_RELOC_NS32K_IMM_8_PCREL
3365+ -- : BFD_RELOC_NS32K_IMM_16_PCREL
3366+ -- : BFD_RELOC_NS32K_IMM_32_PCREL
3367+ -- : BFD_RELOC_NS32K_DISP_8
3368+ -- : BFD_RELOC_NS32K_DISP_16
3369+ -- : BFD_RELOC_NS32K_DISP_32
3370+ -- : BFD_RELOC_NS32K_DISP_8_PCREL
3371+ -- : BFD_RELOC_NS32K_DISP_16_PCREL
3372+ -- : BFD_RELOC_NS32K_DISP_32_PCREL
3373+ ns32k relocations
3374+
3375+ -- : BFD_RELOC_PDP11_DISP_8_PCREL
3376+ -- : BFD_RELOC_PDP11_DISP_6_PCREL
3377+ PDP11 relocations
3378+
3379+ -- : BFD_RELOC_PJ_CODE_HI16
3380+ -- : BFD_RELOC_PJ_CODE_LO16
3381+ -- : BFD_RELOC_PJ_CODE_DIR16
3382+ -- : BFD_RELOC_PJ_CODE_DIR32
3383+ -- : BFD_RELOC_PJ_CODE_REL16
3384+ -- : BFD_RELOC_PJ_CODE_REL32
3385+ Picojava relocs. Not all of these appear in object files.
3386+
3387+ -- : BFD_RELOC_PPC_B26
3388+ -- : BFD_RELOC_PPC_BA26
3389+ -- : BFD_RELOC_PPC_TOC16
3390+ -- : BFD_RELOC_PPC_B16
3391+ -- : BFD_RELOC_PPC_B16_BRTAKEN
3392+ -- : BFD_RELOC_PPC_B16_BRNTAKEN
3393+ -- : BFD_RELOC_PPC_BA16
3394+ -- : BFD_RELOC_PPC_BA16_BRTAKEN
3395+ -- : BFD_RELOC_PPC_BA16_BRNTAKEN
3396+ -- : BFD_RELOC_PPC_COPY
3397+ -- : BFD_RELOC_PPC_GLOB_DAT
3398+ -- : BFD_RELOC_PPC_JMP_SLOT
3399+ -- : BFD_RELOC_PPC_RELATIVE
3400+ -- : BFD_RELOC_PPC_LOCAL24PC
3401+ -- : BFD_RELOC_PPC_EMB_NADDR32
3402+ -- : BFD_RELOC_PPC_EMB_NADDR16
3403+ -- : BFD_RELOC_PPC_EMB_NADDR16_LO
3404+ -- : BFD_RELOC_PPC_EMB_NADDR16_HI
3405+ -- : BFD_RELOC_PPC_EMB_NADDR16_HA
3406+ -- : BFD_RELOC_PPC_EMB_SDAI16
3407+ -- : BFD_RELOC_PPC_EMB_SDA2I16
3408+ -- : BFD_RELOC_PPC_EMB_SDA2REL
3409+ -- : BFD_RELOC_PPC_EMB_SDA21
3410+ -- : BFD_RELOC_PPC_EMB_MRKREF
3411+ -- : BFD_RELOC_PPC_EMB_RELSEC16
3412+ -- : BFD_RELOC_PPC_EMB_RELST_LO
3413+ -- : BFD_RELOC_PPC_EMB_RELST_HI
3414+ -- : BFD_RELOC_PPC_EMB_RELST_HA
3415+ -- : BFD_RELOC_PPC_EMB_BIT_FLD
3416+ -- : BFD_RELOC_PPC_EMB_RELSDA
3417+ -- : BFD_RELOC_PPC64_HIGHER
3418+ -- : BFD_RELOC_PPC64_HIGHER_S
3419+ -- : BFD_RELOC_PPC64_HIGHEST
3420+ -- : BFD_RELOC_PPC64_HIGHEST_S
3421+ -- : BFD_RELOC_PPC64_TOC16_LO
3422+ -- : BFD_RELOC_PPC64_TOC16_HI
3423+ -- : BFD_RELOC_PPC64_TOC16_HA
3424+ -- : BFD_RELOC_PPC64_TOC
3425+ -- : BFD_RELOC_PPC64_PLTGOT16
3426+ -- : BFD_RELOC_PPC64_PLTGOT16_LO
3427+ -- : BFD_RELOC_PPC64_PLTGOT16_HI
3428+ -- : BFD_RELOC_PPC64_PLTGOT16_HA
3429+ -- : BFD_RELOC_PPC64_ADDR16_DS
3430+ -- : BFD_RELOC_PPC64_ADDR16_LO_DS
3431+ -- : BFD_RELOC_PPC64_GOT16_DS
3432+ -- : BFD_RELOC_PPC64_GOT16_LO_DS
3433+ -- : BFD_RELOC_PPC64_PLT16_LO_DS
3434+ -- : BFD_RELOC_PPC64_SECTOFF_DS
3435+ -- : BFD_RELOC_PPC64_SECTOFF_LO_DS
3436+ -- : BFD_RELOC_PPC64_TOC16_DS
3437+ -- : BFD_RELOC_PPC64_TOC16_LO_DS
3438+ -- : BFD_RELOC_PPC64_PLTGOT16_DS
3439+ -- : BFD_RELOC_PPC64_PLTGOT16_LO_DS
3440+ Power(rs6000) and PowerPC relocations.
3441+
3442+ -- : BFD_RELOC_PPC_TLS
3443+ -- : BFD_RELOC_PPC_DTPMOD
3444+ -- : BFD_RELOC_PPC_TPREL16
3445+ -- : BFD_RELOC_PPC_TPREL16_LO
3446+ -- : BFD_RELOC_PPC_TPREL16_HI
3447+ -- : BFD_RELOC_PPC_TPREL16_HA
3448+ -- : BFD_RELOC_PPC_TPREL
3449+ -- : BFD_RELOC_PPC_DTPREL16
3450+ -- : BFD_RELOC_PPC_DTPREL16_LO
3451+ -- : BFD_RELOC_PPC_DTPREL16_HI
3452+ -- : BFD_RELOC_PPC_DTPREL16_HA
3453+ -- : BFD_RELOC_PPC_DTPREL
3454+ -- : BFD_RELOC_PPC_GOT_TLSGD16
3455+ -- : BFD_RELOC_PPC_GOT_TLSGD16_LO
3456+ -- : BFD_RELOC_PPC_GOT_TLSGD16_HI
3457+ -- : BFD_RELOC_PPC_GOT_TLSGD16_HA
3458+ -- : BFD_RELOC_PPC_GOT_TLSLD16
3459+ -- : BFD_RELOC_PPC_GOT_TLSLD16_LO
3460+ -- : BFD_RELOC_PPC_GOT_TLSLD16_HI
3461+ -- : BFD_RELOC_PPC_GOT_TLSLD16_HA
3462+ -- : BFD_RELOC_PPC_GOT_TPREL16
3463+ -- : BFD_RELOC_PPC_GOT_TPREL16_LO
3464+ -- : BFD_RELOC_PPC_GOT_TPREL16_HI
3465+ -- : BFD_RELOC_PPC_GOT_TPREL16_HA
3466+ -- : BFD_RELOC_PPC_GOT_DTPREL16
3467+ -- : BFD_RELOC_PPC_GOT_DTPREL16_LO
3468+ -- : BFD_RELOC_PPC_GOT_DTPREL16_HI
3469+ -- : BFD_RELOC_PPC_GOT_DTPREL16_HA
3470+ -- : BFD_RELOC_PPC64_TPREL16_DS
3471+ -- : BFD_RELOC_PPC64_TPREL16_LO_DS
3472+ -- : BFD_RELOC_PPC64_TPREL16_HIGHER
3473+ -- : BFD_RELOC_PPC64_TPREL16_HIGHERA
3474+ -- : BFD_RELOC_PPC64_TPREL16_HIGHEST
3475+ -- : BFD_RELOC_PPC64_TPREL16_HIGHESTA
3476+ -- : BFD_RELOC_PPC64_DTPREL16_DS
3477+ -- : BFD_RELOC_PPC64_DTPREL16_LO_DS
3478+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHER
3479+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHERA
3480+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHEST
3481+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHESTA
3482+ PowerPC and PowerPC64 thread-local storage relocations.
3483+
3484+ -- : BFD_RELOC_I370_D12
3485+ IBM 370/390 relocations
3486+
3487+ -- : BFD_RELOC_CTOR
3488+ The type of reloc used to build a constructor table - at the moment
3489+ probably a 32 bit wide absolute relocation, but the target can
3490+ choose. It generally does map to one of the other relocation
3491+ types.
3492+
3493+ -- : BFD_RELOC_ARM_PCREL_BRANCH
3494+ ARM 26 bit pc-relative branch. The lowest two bits must be zero
3495+ and are not stored in the instruction.
3496+
3497+ -- : BFD_RELOC_ARM_PCREL_BLX
3498+ ARM 26 bit pc-relative branch. The lowest bit must be zero and is
3499+ not stored in the instruction. The 2nd lowest bit comes from a 1
3500+ bit field in the instruction.
3501+
3502+ -- : BFD_RELOC_THUMB_PCREL_BLX
3503+ Thumb 22 bit pc-relative branch. The lowest bit must be zero and
3504+ is not stored in the instruction. The 2nd lowest bit comes from a
3505+ 1 bit field in the instruction.
3506+
3507+ -- : BFD_RELOC_ARM_IMMEDIATE
3508+ -- : BFD_RELOC_ARM_ADRL_IMMEDIATE
3509+ -- : BFD_RELOC_ARM_OFFSET_IMM
3510+ -- : BFD_RELOC_ARM_SHIFT_IMM
3511+ -- : BFD_RELOC_ARM_SMI
3512+ -- : BFD_RELOC_ARM_SWI
3513+ -- : BFD_RELOC_ARM_MULTI
3514+ -- : BFD_RELOC_ARM_CP_OFF_IMM
3515+ -- : BFD_RELOC_ARM_CP_OFF_IMM_S2
3516+ -- : BFD_RELOC_ARM_ADR_IMM
3517+ -- : BFD_RELOC_ARM_LDR_IMM
3518+ -- : BFD_RELOC_ARM_LITERAL
3519+ -- : BFD_RELOC_ARM_IN_POOL
3520+ -- : BFD_RELOC_ARM_OFFSET_IMM8
3521+ -- : BFD_RELOC_ARM_HWLITERAL
3522+ -- : BFD_RELOC_ARM_THUMB_ADD
3523+ -- : BFD_RELOC_ARM_THUMB_IMM
3524+ -- : BFD_RELOC_ARM_THUMB_SHIFT
3525+ -- : BFD_RELOC_ARM_THUMB_OFFSET
3526+ -- : BFD_RELOC_ARM_GOT12
3527+ -- : BFD_RELOC_ARM_GOT32
3528+ -- : BFD_RELOC_ARM_JUMP_SLOT
3529+ -- : BFD_RELOC_ARM_COPY
3530+ -- : BFD_RELOC_ARM_GLOB_DAT
3531+ -- : BFD_RELOC_ARM_PLT32
3532+ -- : BFD_RELOC_ARM_RELATIVE
3533+ -- : BFD_RELOC_ARM_GOTOFF
3534+ -- : BFD_RELOC_ARM_GOTPC
3535+ These relocs are only used within the ARM assembler. They are not
3536+ (at present) written to any object files.
3537+
3538+ -- : BFD_RELOC_ARM_TARGET1
3539+ Pc-relative or absolute relocation depending on target. Used for
3540+ entries in .init_array sections.
3541+
3542+ -- : BFD_RELOC_ARM_ROSEGREL32
3543+ Read-only segment base relative address.
3544+
3545+ -- : BFD_RELOC_ARM_SBREL32
3546+ Data segment base relative address.
3547+
3548+ -- : BFD_RELOC_ARM_TARGET2
3549+ This reloc is used for References to RTTI dta from exception
3550+ handling tables. The actual definition depends on the target. It
3551+ may be a pc-relative or some form of GOT-indirect relocation.
3552+
3553+ -- : BFD_RELOC_ARM_PREL31
3554+ 31-bit PC relative address.
3555+
3556+ -- : BFD_RELOC_SH_PCDISP8BY2
3557+ -- : BFD_RELOC_SH_PCDISP12BY2
3558+ -- : BFD_RELOC_SH_IMM3
3559+ -- : BFD_RELOC_SH_IMM3U
3560+ -- : BFD_RELOC_SH_DISP12
3561+ -- : BFD_RELOC_SH_DISP12BY2
3562+ -- : BFD_RELOC_SH_DISP12BY4
3563+ -- : BFD_RELOC_SH_DISP12BY8
3564+ -- : BFD_RELOC_SH_DISP20
3565+ -- : BFD_RELOC_SH_DISP20BY8
3566+ -- : BFD_RELOC_SH_IMM4
3567+ -- : BFD_RELOC_SH_IMM4BY2
3568+ -- : BFD_RELOC_SH_IMM4BY4
3569+ -- : BFD_RELOC_SH_IMM8
3570+ -- : BFD_RELOC_SH_IMM8BY2
3571+ -- : BFD_RELOC_SH_IMM8BY4
3572+ -- : BFD_RELOC_SH_PCRELIMM8BY2
3573+ -- : BFD_RELOC_SH_PCRELIMM8BY4
3574+ -- : BFD_RELOC_SH_SWITCH16
3575+ -- : BFD_RELOC_SH_SWITCH32
3576+ -- : BFD_RELOC_SH_USES
3577+ -- : BFD_RELOC_SH_COUNT
3578+ -- : BFD_RELOC_SH_ALIGN
3579+ -- : BFD_RELOC_SH_CODE
3580+ -- : BFD_RELOC_SH_DATA
3581+ -- : BFD_RELOC_SH_LABEL
3582+ -- : BFD_RELOC_SH_LOOP_START
3583+ -- : BFD_RELOC_SH_LOOP_END
3584+ -- : BFD_RELOC_SH_COPY
3585+ -- : BFD_RELOC_SH_GLOB_DAT
3586+ -- : BFD_RELOC_SH_JMP_SLOT
3587+ -- : BFD_RELOC_SH_RELATIVE
3588+ -- : BFD_RELOC_SH_GOTPC
3589+ -- : BFD_RELOC_SH_GOT_LOW16
3590+ -- : BFD_RELOC_SH_GOT_MEDLOW16
3591+ -- : BFD_RELOC_SH_GOT_MEDHI16
3592+ -- : BFD_RELOC_SH_GOT_HI16
3593+ -- : BFD_RELOC_SH_GOTPLT_LOW16
3594+ -- : BFD_RELOC_SH_GOTPLT_MEDLOW16
3595+ -- : BFD_RELOC_SH_GOTPLT_MEDHI16
3596+ -- : BFD_RELOC_SH_GOTPLT_HI16
3597+ -- : BFD_RELOC_SH_PLT_LOW16
3598+ -- : BFD_RELOC_SH_PLT_MEDLOW16
3599+ -- : BFD_RELOC_SH_PLT_MEDHI16
3600+ -- : BFD_RELOC_SH_PLT_HI16
3601+ -- : BFD_RELOC_SH_GOTOFF_LOW16
3602+ -- : BFD_RELOC_SH_GOTOFF_MEDLOW16
3603+ -- : BFD_RELOC_SH_GOTOFF_MEDHI16
3604+ -- : BFD_RELOC_SH_GOTOFF_HI16
3605+ -- : BFD_RELOC_SH_GOTPC_LOW16
3606+ -- : BFD_RELOC_SH_GOTPC_MEDLOW16
3607+ -- : BFD_RELOC_SH_GOTPC_MEDHI16
3608+ -- : BFD_RELOC_SH_GOTPC_HI16
3609+ -- : BFD_RELOC_SH_COPY64
3610+ -- : BFD_RELOC_SH_GLOB_DAT64
3611+ -- : BFD_RELOC_SH_JMP_SLOT64
3612+ -- : BFD_RELOC_SH_RELATIVE64
3613+ -- : BFD_RELOC_SH_GOT10BY4
3614+ -- : BFD_RELOC_SH_GOT10BY8
3615+ -- : BFD_RELOC_SH_GOTPLT10BY4
3616+ -- : BFD_RELOC_SH_GOTPLT10BY8
3617+ -- : BFD_RELOC_SH_GOTPLT32
3618+ -- : BFD_RELOC_SH_SHMEDIA_CODE
3619+ -- : BFD_RELOC_SH_IMMU5
3620+ -- : BFD_RELOC_SH_IMMS6
3621+ -- : BFD_RELOC_SH_IMMS6BY32
3622+ -- : BFD_RELOC_SH_IMMU6
3623+ -- : BFD_RELOC_SH_IMMS10
3624+ -- : BFD_RELOC_SH_IMMS10BY2
3625+ -- : BFD_RELOC_SH_IMMS10BY4
3626+ -- : BFD_RELOC_SH_IMMS10BY8
3627+ -- : BFD_RELOC_SH_IMMS16
3628+ -- : BFD_RELOC_SH_IMMU16
3629+ -- : BFD_RELOC_SH_IMM_LOW16
3630+ -- : BFD_RELOC_SH_IMM_LOW16_PCREL
3631+ -- : BFD_RELOC_SH_IMM_MEDLOW16
3632+ -- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL
3633+ -- : BFD_RELOC_SH_IMM_MEDHI16
3634+ -- : BFD_RELOC_SH_IMM_MEDHI16_PCREL
3635+ -- : BFD_RELOC_SH_IMM_HI16
3636+ -- : BFD_RELOC_SH_IMM_HI16_PCREL
3637+ -- : BFD_RELOC_SH_PT_16
3638+ -- : BFD_RELOC_SH_TLS_GD_32
3639+ -- : BFD_RELOC_SH_TLS_LD_32
3640+ -- : BFD_RELOC_SH_TLS_LDO_32
3641+ -- : BFD_RELOC_SH_TLS_IE_32
3642+ -- : BFD_RELOC_SH_TLS_LE_32
3643+ -- : BFD_RELOC_SH_TLS_DTPMOD32
3644+ -- : BFD_RELOC_SH_TLS_DTPOFF32
3645+ -- : BFD_RELOC_SH_TLS_TPOFF32
3646+ Renesas / SuperH SH relocs. Not all of these appear in object
3647+ files.
3648+
3649+ -- : BFD_RELOC_THUMB_PCREL_BRANCH9
3650+ -- : BFD_RELOC_THUMB_PCREL_BRANCH12
3651+ -- : BFD_RELOC_THUMB_PCREL_BRANCH23
3652+ Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
3653+ be zero and is not stored in the instruction.
3654+
3655+ -- : BFD_RELOC_ARC_B22_PCREL
3656+ ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two
3657+ bits must be zero and are not stored in the instruction. The high
3658+ 20 bits are installed in bits 26 through 7 of the instruction.
3659+
3660+ -- : BFD_RELOC_ARC_B26
3661+ ARC 26 bit absolute branch. The lowest two bits must be zero and
3662+ are not stored in the instruction. The high 24 bits are installed
3663+ in bits 23 through 0.
3664+
3665+ -- : BFD_RELOC_D10V_10_PCREL_R
3666+ Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2
3667+ bits assumed to be 0.
3668+
3669+ -- : BFD_RELOC_D10V_10_PCREL_L
3670+ Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2
3671+ bits assumed to be 0. This is the same as the previous reloc
3672+ except it is in the left container, i.e., shifted left 15 bits.
3673+
3674+ -- : BFD_RELOC_D10V_18
3675+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3676+
3677+ -- : BFD_RELOC_D10V_18_PCREL
3678+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3679+
3680+ -- : BFD_RELOC_D30V_6
3681+ Mitsubishi D30V relocs. This is a 6-bit absolute reloc.
3682+
3683+ -- : BFD_RELOC_D30V_9_PCREL
3684+ This is a 6-bit pc-relative reloc with the right 3 bits assumed to
3685+ be 0.
3686+
3687+ -- : BFD_RELOC_D30V_9_PCREL_R
3688+ This is a 6-bit pc-relative reloc with the right 3 bits assumed to
3689+ be 0. Same as the previous reloc but on the right side of the
3690+ container.
3691+
3692+ -- : BFD_RELOC_D30V_15
3693+ This is a 12-bit absolute reloc with the right 3 bitsassumed to be
3694+ 0.
3695+
3696+ -- : BFD_RELOC_D30V_15_PCREL
3697+ This is a 12-bit pc-relative reloc with the right 3 bits assumed
3698+ to be 0.
3699+
3700+ -- : BFD_RELOC_D30V_15_PCREL_R
3701+ This is a 12-bit pc-relative reloc with the right 3 bits assumed
3702+ to be 0. Same as the previous reloc but on the right side of the
3703+ container.
3704+
3705+ -- : BFD_RELOC_D30V_21
3706+ This is an 18-bit absolute reloc with the right 3 bits assumed to
3707+ be 0.
3708+
3709+ -- : BFD_RELOC_D30V_21_PCREL
3710+ This is an 18-bit pc-relative reloc with the right 3 bits assumed
3711+ to be 0.
3712+
3713+ -- : BFD_RELOC_D30V_21_PCREL_R
3714+ This is an 18-bit pc-relative reloc with the right 3 bits assumed
3715+ to be 0. Same as the previous reloc but on the right side of the
3716+ container.
3717+
3718+ -- : BFD_RELOC_D30V_32
3719+ This is a 32-bit absolute reloc.
3720+
3721+ -- : BFD_RELOC_D30V_32_PCREL
3722+ This is a 32-bit pc-relative reloc.
3723+
3724+ -- : BFD_RELOC_DLX_HI16_S
3725+ DLX relocs
3726+
3727+ -- : BFD_RELOC_DLX_LO16
3728+ DLX relocs
3729+
3730+ -- : BFD_RELOC_DLX_JMP26
3731+ DLX relocs
3732+
3733+ -- : BFD_RELOC_M32R_24
3734+ Renesas M32R (formerly Mitsubishi M32R) relocs. This is a 24 bit
3735+ absolute address.
3736+
3737+ -- : BFD_RELOC_M32R_10_PCREL
3738+ This is a 10-bit pc-relative reloc with the right 2 bits assumed
3739+ to be 0.
3740+
3741+ -- : BFD_RELOC_M32R_18_PCREL
3742+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3743+
3744+ -- : BFD_RELOC_M32R_26_PCREL
3745+ This is a 26-bit reloc with the right 2 bits assumed to be 0.
3746+
3747+ -- : BFD_RELOC_M32R_HI16_ULO
3748+ This is a 16-bit reloc containing the high 16 bits of an address
3749+ used when the lower 16 bits are treated as unsigned.
3750+
3751+ -- : BFD_RELOC_M32R_HI16_SLO
3752+ This is a 16-bit reloc containing the high 16 bits of an address
3753+ used when the lower 16 bits are treated as signed.
3754+
3755+ -- : BFD_RELOC_M32R_LO16
3756+ This is a 16-bit reloc containing the lower 16 bits of an address.
3757+
3758+ -- : BFD_RELOC_M32R_SDA16
3759+ This is a 16-bit reloc containing the small data area offset for
3760+ use in add3, load, and store instructions.
3761+
3762+ -- : BFD_RELOC_M32R_GOT24
3763+ -- : BFD_RELOC_M32R_26_PLTREL
3764+ -- : BFD_RELOC_M32R_COPY
3765+ -- : BFD_RELOC_M32R_GLOB_DAT
3766+ -- : BFD_RELOC_M32R_JMP_SLOT
3767+ -- : BFD_RELOC_M32R_RELATIVE
3768+ -- : BFD_RELOC_M32R_GOTOFF
3769+ -- : BFD_RELOC_M32R_GOTOFF_HI_ULO
3770+ -- : BFD_RELOC_M32R_GOTOFF_HI_SLO
3771+ -- : BFD_RELOC_M32R_GOTOFF_LO
3772+ -- : BFD_RELOC_M32R_GOTPC24
3773+ -- : BFD_RELOC_M32R_GOT16_HI_ULO
3774+ -- : BFD_RELOC_M32R_GOT16_HI_SLO
3775+ -- : BFD_RELOC_M32R_GOT16_LO
3776+ -- : BFD_RELOC_M32R_GOTPC_HI_ULO
3777+ -- : BFD_RELOC_M32R_GOTPC_HI_SLO
3778+ -- : BFD_RELOC_M32R_GOTPC_LO
3779+ For PIC.
3780+
3781+ -- : BFD_RELOC_V850_9_PCREL
3782+ This is a 9-bit reloc
3783+
3784+ -- : BFD_RELOC_V850_22_PCREL
3785+ This is a 22-bit reloc
3786+
3787+ -- : BFD_RELOC_V850_SDA_16_16_OFFSET
3788+ This is a 16 bit offset from the short data area pointer.
3789+
3790+ -- : BFD_RELOC_V850_SDA_15_16_OFFSET
3791+ This is a 16 bit offset (of which only 15 bits are used) from the
3792+ short data area pointer.
3793+
3794+ -- : BFD_RELOC_V850_ZDA_16_16_OFFSET
3795+ This is a 16 bit offset from the zero data area pointer.
3796+
3797+ -- : BFD_RELOC_V850_ZDA_15_16_OFFSET
3798+ This is a 16 bit offset (of which only 15 bits are used) from the
3799+ zero data area pointer.
3800+
3801+ -- : BFD_RELOC_V850_TDA_6_8_OFFSET
3802+ This is an 8 bit offset (of which only 6 bits are used) from the
3803+ tiny data area pointer.
3804+
3805+ -- : BFD_RELOC_V850_TDA_7_8_OFFSET
3806+ This is an 8bit offset (of which only 7 bits are used) from the
3807+ tiny data area pointer.
3808+
3809+ -- : BFD_RELOC_V850_TDA_7_7_OFFSET
3810+ This is a 7 bit offset from the tiny data area pointer.
3811+
3812+ -- : BFD_RELOC_V850_TDA_16_16_OFFSET
3813+ This is a 16 bit offset from the tiny data area pointer.
3814+
3815+ -- : BFD_RELOC_V850_TDA_4_5_OFFSET
3816+ This is a 5 bit offset (of which only 4 bits are used) from the
3817+ tiny data area pointer.
3818+
3819+ -- : BFD_RELOC_V850_TDA_4_4_OFFSET
3820+ This is a 4 bit offset from the tiny data area pointer.
3821+
3822+ -- : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
3823+ This is a 16 bit offset from the short data area pointer, with the
3824+ bits placed non-contiguously in the instruction.
3825+
3826+ -- : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
3827+ This is a 16 bit offset from the zero data area pointer, with the
3828+ bits placed non-contiguously in the instruction.
3829+
3830+ -- : BFD_RELOC_V850_CALLT_6_7_OFFSET
3831+ This is a 6 bit offset from the call table base pointer.
3832+
3833+ -- : BFD_RELOC_V850_CALLT_16_16_OFFSET
3834+ This is a 16 bit offset from the call table base pointer.
3835+
3836+ -- : BFD_RELOC_V850_LONGCALL
3837+ Used for relaxing indirect function calls.
3838+
3839+ -- : BFD_RELOC_V850_LONGJUMP
3840+ Used for relaxing indirect jumps.
3841+
3842+ -- : BFD_RELOC_V850_ALIGN
3843+ Used to maintain alignment whilst relaxing.
3844+
3845+ -- : BFD_RELOC_V850_LO16_SPLIT_OFFSET
3846+ This is a variation of BFD_RELOC_LO16 that can be used in v850e
3847+ ld.bu instructions.
3848+
3849+ -- : BFD_RELOC_MN10300_32_PCREL
3850+ This is a 32bit pcrel reloc for the mn10300, offset by two bytes
3851+ in the instruction.
3852+
3853+ -- : BFD_RELOC_MN10300_16_PCREL
3854+ This is a 16bit pcrel reloc for the mn10300, offset by two bytes
3855+ in the instruction.
3856+
3857+ -- : BFD_RELOC_TIC30_LDP
3858+ This is a 8bit DP reloc for the tms320c30, where the most
3859+ significant 8 bits of a 24 bit word are placed into the least
3860+ significant 8 bits of the opcode.
3861+
3862+ -- : BFD_RELOC_TIC54X_PARTLS7
3863+ This is a 7bit reloc for the tms320c54x, where the least
3864+ significant 7 bits of a 16 bit word are placed into the least
3865+ significant 7 bits of the opcode.
3866+
3867+ -- : BFD_RELOC_TIC54X_PARTMS9
3868+ This is a 9bit DP reloc for the tms320c54x, where the most
3869+ significant 9 bits of a 16 bit word are placed into the least
3870+ significant 9 bits of the opcode.
3871+
3872+ -- : BFD_RELOC_TIC54X_23
3873+ This is an extended address 23-bit reloc for the tms320c54x.
3874+
3875+ -- : BFD_RELOC_TIC54X_16_OF_23
3876+ This is a 16-bit reloc for the tms320c54x, where the least
3877+ significant 16 bits of a 23-bit extended address are placed into
3878+ the opcode.
3879+
3880+ -- : BFD_RELOC_TIC54X_MS7_OF_23
3881+ This is a reloc for the tms320c54x, where the most significant 7
3882+ bits of a 23-bit extended address are placed into the opcode.
3883+
3884+ -- : BFD_RELOC_FR30_48
3885+ This is a 48 bit reloc for the FR30 that stores 32 bits.
3886+
3887+ -- : BFD_RELOC_FR30_20
3888+ This is a 32 bit reloc for the FR30 that stores 20 bits split up
3889+ into two sections.
3890+
3891+ -- : BFD_RELOC_FR30_6_IN_4
3892+ This is a 16 bit reloc for the FR30 that stores a 6 bit word
3893+ offset in 4 bits.
3894+
3895+ -- : BFD_RELOC_FR30_8_IN_8
3896+ This is a 16 bit reloc for the FR30 that stores an 8 bit byte
3897+ offset into 8 bits.
3898+
3899+ -- : BFD_RELOC_FR30_9_IN_8
3900+ This is a 16 bit reloc for the FR30 that stores a 9 bit short
3901+ offset into 8 bits.
3902+
3903+ -- : BFD_RELOC_FR30_10_IN_8
3904+ This is a 16 bit reloc for the FR30 that stores a 10 bit word
3905+ offset into 8 bits.
3906+
3907+ -- : BFD_RELOC_FR30_9_PCREL
3908+ This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
3909+ short offset into 8 bits.
3910+
3911+ -- : BFD_RELOC_FR30_12_PCREL
3912+ This is a 16 bit reloc for the FR30 that stores a 12 bit pc
3913+ relative short offset into 11 bits.
3914+
3915+ -- : BFD_RELOC_MCORE_PCREL_IMM8BY4
3916+ -- : BFD_RELOC_MCORE_PCREL_IMM11BY2
3917+ -- : BFD_RELOC_MCORE_PCREL_IMM4BY2
3918+ -- : BFD_RELOC_MCORE_PCREL_32
3919+ -- : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
3920+ -- : BFD_RELOC_MCORE_RVA
3921+ Motorola Mcore relocations.
3922+
3923+ -- : BFD_RELOC_MMIX_GETA
3924+ -- : BFD_RELOC_MMIX_GETA_1
3925+ -- : BFD_RELOC_MMIX_GETA_2
3926+ -- : BFD_RELOC_MMIX_GETA_3
3927+ These are relocations for the GETA instruction.
3928+
3929+ -- : BFD_RELOC_MMIX_CBRANCH
3930+ -- : BFD_RELOC_MMIX_CBRANCH_J
3931+ -- : BFD_RELOC_MMIX_CBRANCH_1
3932+ -- : BFD_RELOC_MMIX_CBRANCH_2
3933+ -- : BFD_RELOC_MMIX_CBRANCH_3
3934+ These are relocations for a conditional branch instruction.
3935+
3936+ -- : BFD_RELOC_MMIX_PUSHJ
3937+ -- : BFD_RELOC_MMIX_PUSHJ_1
3938+ -- : BFD_RELOC_MMIX_PUSHJ_2
3939+ -- : BFD_RELOC_MMIX_PUSHJ_3
3940+ -- : BFD_RELOC_MMIX_PUSHJ_STUBBABLE
3941+ These are relocations for the PUSHJ instruction.
3942+
3943+ -- : BFD_RELOC_MMIX_JMP
3944+ -- : BFD_RELOC_MMIX_JMP_1
3945+ -- : BFD_RELOC_MMIX_JMP_2
3946+ -- : BFD_RELOC_MMIX_JMP_3
3947+ These are relocations for the JMP instruction.
3948+
3949+ -- : BFD_RELOC_MMIX_ADDR19
3950+ This is a relocation for a relative address as in a GETA
3951+ instruction or a branch.
3952+
3953+ -- : BFD_RELOC_MMIX_ADDR27
3954+ This is a relocation for a relative address as in a JMP
3955+ instruction.
3956+
3957+ -- : BFD_RELOC_MMIX_REG_OR_BYTE
3958+ This is a relocation for an instruction field that may be a general
3959+ register or a value 0..255.
3960+
3961+ -- : BFD_RELOC_MMIX_REG
3962+ This is a relocation for an instruction field that may be a general
3963+ register.
3964+
3965+ -- : BFD_RELOC_MMIX_BASE_PLUS_OFFSET
3966+ This is a relocation for two instruction fields holding a register
3967+ and an offset, the equivalent of the relocation.
3968+
3969+ -- : BFD_RELOC_MMIX_LOCAL
3970+ This relocation is an assertion that the expression is not
3971+ allocated as a global register. It does not modify contents.
3972+
3973+ -- : BFD_RELOC_AVR_7_PCREL
3974+ This is a 16 bit reloc for the AVR that stores 8 bit pc relative
3975+ short offset into 7 bits.
3976+
3977+ -- : BFD_RELOC_AVR_13_PCREL
3978+ This is a 16 bit reloc for the AVR that stores 13 bit pc relative
3979+ short offset into 12 bits.
3980+
3981+ -- : BFD_RELOC_AVR_16_PM
3982+ This is a 16 bit reloc for the AVR that stores 17 bit value
3983+ (usually program memory address) into 16 bits.
3984+
3985+ -- : BFD_RELOC_AVR_LO8_LDI
3986+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
3987+ data memory address) into 8 bit immediate value of LDI insn.
3988+
3989+ -- : BFD_RELOC_AVR_HI8_LDI
3990+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
3991+ bit of data memory address) into 8 bit immediate value of LDI insn.
3992+
3993+ -- : BFD_RELOC_AVR_HH8_LDI
3994+ This is a 16 bit reloc for the AVR that stores 8 bit value (most
3995+ high 8 bit of program memory address) into 8 bit immediate value
3996+ of LDI insn.
3997+
3998+ -- : BFD_RELOC_AVR_LO8_LDI_NEG
3999+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4000+ (usually data memory address) into 8 bit immediate value of SUBI
4001+ insn.
4002+
4003+ -- : BFD_RELOC_AVR_HI8_LDI_NEG
4004+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4005+ (high 8 bit of data memory address) into 8 bit immediate value of
4006+ SUBI insn.
4007+
4008+ -- : BFD_RELOC_AVR_HH8_LDI_NEG
4009+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4010+ (most high 8 bit of program memory address) into 8 bit immediate
4011+ value of LDI or SUBI insn.
4012+
4013+ -- : BFD_RELOC_AVR_LO8_LDI_PM
4014+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4015+ command address) into 8 bit immediate value of LDI insn.
4016+
4017+ -- : BFD_RELOC_AVR_HI8_LDI_PM
4018+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
4019+ bit of command address) into 8 bit immediate value of LDI insn.
4020+
4021+ -- : BFD_RELOC_AVR_HH8_LDI_PM
4022+ This is a 16 bit reloc for the AVR that stores 8 bit value (most
4023+ high 8 bit of command address) into 8 bit immediate value of LDI
4024+ insn.
4025+
4026+ -- : BFD_RELOC_AVR_LO8_LDI_PM_NEG
4027+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4028+ (usually command address) into 8 bit immediate value of SUBI insn.
4029+
4030+ -- : BFD_RELOC_AVR_HI8_LDI_PM_NEG
4031+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4032+ (high 8 bit of 16 bit command address) into 8 bit immediate value
4033+ of SUBI insn.
4034+
4035+ -- : BFD_RELOC_AVR_HH8_LDI_PM_NEG
4036+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4037+ (high 6 bit of 22 bit command address) into 8 bit immediate value
4038+ of SUBI insn.
4039+
4040+ -- : BFD_RELOC_AVR_CALL
4041+ This is a 32 bit reloc for the AVR that stores 23 bit value into
4042+ 22 bits.
4043+
4044+ -- : BFD_RELOC_AVR_LDI
4045+ This is a 16 bit reloc for the AVR that stores all needed bits for
4046+ absolute addressing with ldi with overflow check to linktime
4047+
4048+ -- : BFD_RELOC_AVR_6
4049+ This is a 6 bit reloc for the AVR that stores offset for ldd/std
4050+ instructions
4051+
4052+ -- : BFD_RELOC_AVR_6_ADIW
4053+ This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
4054+ instructions
4055+
4056+ -- : BFD_RELOC_390_12
4057+ Direct 12 bit.
4058+
4059+ -- : BFD_RELOC_390_GOT12
4060+ 12 bit GOT offset.
4061+
4062+ -- : BFD_RELOC_390_PLT32
4063+ 32 bit PC relative PLT address.
4064+
4065+ -- : BFD_RELOC_390_COPY
4066+ Copy symbol at runtime.
4067+
4068+ -- : BFD_RELOC_390_GLOB_DAT
4069+ Create GOT entry.
4070+
4071+ -- : BFD_RELOC_390_JMP_SLOT
4072+ Create PLT entry.
4073+
4074+ -- : BFD_RELOC_390_RELATIVE
4075+ Adjust by program base.
4076+
4077+ -- : BFD_RELOC_390_GOTPC
4078+ 32 bit PC relative offset to GOT.
4079+
4080+ -- : BFD_RELOC_390_GOT16
4081+ 16 bit GOT offset.
4082+
4083+ -- : BFD_RELOC_390_PC16DBL
4084+ PC relative 16 bit shifted by 1.
4085+
4086+ -- : BFD_RELOC_390_PLT16DBL
4087+ 16 bit PC rel. PLT shifted by 1.
4088+
4089+ -- : BFD_RELOC_390_PC32DBL
4090+ PC relative 32 bit shifted by 1.
4091+
4092+ -- : BFD_RELOC_390_PLT32DBL
4093+ 32 bit PC rel. PLT shifted by 1.
4094+
4095+ -- : BFD_RELOC_390_GOTPCDBL
4096+ 32 bit PC rel. GOT shifted by 1.
4097+
4098+ -- : BFD_RELOC_390_GOT64
4099+ 64 bit GOT offset.
4100+
4101+ -- : BFD_RELOC_390_PLT64
4102+ 64 bit PC relative PLT address.
4103+
4104+ -- : BFD_RELOC_390_GOTENT
4105+ 32 bit rel. offset to GOT entry.
4106+
4107+ -- : BFD_RELOC_390_GOTOFF64
4108+ 64 bit offset to GOT.
4109+
4110+ -- : BFD_RELOC_390_GOTPLT12
4111+ 12-bit offset to symbol-entry within GOT, with PLT handling.
4112+
4113+ -- : BFD_RELOC_390_GOTPLT16
4114+ 16-bit offset to symbol-entry within GOT, with PLT handling.
4115+
4116+ -- : BFD_RELOC_390_GOTPLT32
4117+ 32-bit offset to symbol-entry within GOT, with PLT handling.
4118+
4119+ -- : BFD_RELOC_390_GOTPLT64
4120+ 64-bit offset to symbol-entry within GOT, with PLT handling.
4121+
4122+ -- : BFD_RELOC_390_GOTPLTENT
4123+ 32-bit rel. offset to symbol-entry within GOT, with PLT handling.
4124+
4125+ -- : BFD_RELOC_390_PLTOFF16
4126+ 16-bit rel. offset from the GOT to a PLT entry.
4127+
4128+ -- : BFD_RELOC_390_PLTOFF32
4129+ 32-bit rel. offset from the GOT to a PLT entry.
4130+
4131+ -- : BFD_RELOC_390_PLTOFF64
4132+ 64-bit rel. offset from the GOT to a PLT entry.
4133+
4134+ -- : BFD_RELOC_390_TLS_LOAD
4135+ -- : BFD_RELOC_390_TLS_GDCALL
4136+ -- : BFD_RELOC_390_TLS_LDCALL
4137+ -- : BFD_RELOC_390_TLS_GD32
4138+ -- : BFD_RELOC_390_TLS_GD64
4139+ -- : BFD_RELOC_390_TLS_GOTIE12
4140+ -- : BFD_RELOC_390_TLS_GOTIE32
4141+ -- : BFD_RELOC_390_TLS_GOTIE64
4142+ -- : BFD_RELOC_390_TLS_LDM32
4143+ -- : BFD_RELOC_390_TLS_LDM64
4144+ -- : BFD_RELOC_390_TLS_IE32
4145+ -- : BFD_RELOC_390_TLS_IE64
4146+ -- : BFD_RELOC_390_TLS_IEENT
4147+ -- : BFD_RELOC_390_TLS_LE32
4148+ -- : BFD_RELOC_390_TLS_LE64
4149+ -- : BFD_RELOC_390_TLS_LDO32
4150+ -- : BFD_RELOC_390_TLS_LDO64
4151+ -- : BFD_RELOC_390_TLS_DTPMOD
4152+ -- : BFD_RELOC_390_TLS_DTPOFF
4153+ -- : BFD_RELOC_390_TLS_TPOFF
4154+ s390 tls relocations.
4155+
4156+ -- : BFD_RELOC_390_20
4157+ -- : BFD_RELOC_390_GOT20
4158+ -- : BFD_RELOC_390_GOTPLT20
4159+ -- : BFD_RELOC_390_TLS_GOTIE20
4160+ Long displacement extension.
4161+
4162+ -- : BFD_RELOC_IP2K_FR9
4163+ Scenix IP2K - 9-bit register number / data address
4164+
4165+ -- : BFD_RELOC_IP2K_BANK
4166+ Scenix IP2K - 4-bit register/data bank number
4167+
4168+ -- : BFD_RELOC_IP2K_ADDR16CJP
4169+ Scenix IP2K - low 13 bits of instruction word address
4170+
4171+ -- : BFD_RELOC_IP2K_PAGE3
4172+ Scenix IP2K - high 3 bits of instruction word address
4173+
4174+ -- : BFD_RELOC_IP2K_LO8DATA
4175+ -- : BFD_RELOC_IP2K_HI8DATA
4176+ -- : BFD_RELOC_IP2K_EX8DATA
4177+ Scenix IP2K - ext/low/high 8 bits of data address
4178+
4179+ -- : BFD_RELOC_IP2K_LO8INSN
4180+ -- : BFD_RELOC_IP2K_HI8INSN
4181+ Scenix IP2K - low/high 8 bits of instruction word address
4182+
4183+ -- : BFD_RELOC_IP2K_PC_SKIP
4184+ Scenix IP2K - even/odd PC modifier to modify snb pcl.0
4185+
4186+ -- : BFD_RELOC_IP2K_TEXT
4187+ Scenix IP2K - 16 bit word address in text section.
4188+
4189+ -- : BFD_RELOC_IP2K_FR_OFFSET
4190+ Scenix IP2K - 7-bit sp or dp offset
4191+
4192+ -- : BFD_RELOC_VPE4KMATH_DATA
4193+ -- : BFD_RELOC_VPE4KMATH_INSN
4194+ Scenix VPE4K coprocessor - data/insn-space addressing
4195+
4196+ -- : BFD_RELOC_VTABLE_INHERIT
4197+ -- : BFD_RELOC_VTABLE_ENTRY
4198+ These two relocations are used by the linker to determine which of
4199+ the entries in a C++ virtual function table are actually used.
4200+ When the -gc-sections option is given, the linker will zero out
4201+ the entries that are not used, so that the code for those
4202+ functions need not be included in the output.
4203+
4204+ VTABLE_INHERIT is a zero-space relocation used to describe to the
4205+ linker the inheritance tree of a C++ virtual function table. The
4206+ relocation's symbol should be the parent class' vtable, and the
4207+ relocation should be located at the child vtable.
4208+
4209+ VTABLE_ENTRY is a zero-space relocation that describes the use of a
4210+ virtual function table entry. The reloc's symbol should refer to
4211+ the table of the class mentioned in the code. Off of that base,
4212+ an offset describes the entry that is being used. For Rela hosts,
4213+ this offset is stored in the reloc's addend. For Rel hosts, we
4214+ are forced to put this offset in the reloc's section offset.
4215+
4216+ -- : BFD_RELOC_IA64_IMM14
4217+ -- : BFD_RELOC_IA64_IMM22
4218+ -- : BFD_RELOC_IA64_IMM64
4219+ -- : BFD_RELOC_IA64_DIR32MSB
4220+ -- : BFD_RELOC_IA64_DIR32LSB
4221+ -- : BFD_RELOC_IA64_DIR64MSB
4222+ -- : BFD_RELOC_IA64_DIR64LSB
4223+ -- : BFD_RELOC_IA64_GPREL22
4224+ -- : BFD_RELOC_IA64_GPREL64I
4225+ -- : BFD_RELOC_IA64_GPREL32MSB
4226+ -- : BFD_RELOC_IA64_GPREL32LSB
4227+ -- : BFD_RELOC_IA64_GPREL64MSB
4228+ -- : BFD_RELOC_IA64_GPREL64LSB
4229+ -- : BFD_RELOC_IA64_LTOFF22
4230+ -- : BFD_RELOC_IA64_LTOFF64I
4231+ -- : BFD_RELOC_IA64_PLTOFF22
4232+ -- : BFD_RELOC_IA64_PLTOFF64I
4233+ -- : BFD_RELOC_IA64_PLTOFF64MSB
4234+ -- : BFD_RELOC_IA64_PLTOFF64LSB
4235+ -- : BFD_RELOC_IA64_FPTR64I
4236+ -- : BFD_RELOC_IA64_FPTR32MSB
4237+ -- : BFD_RELOC_IA64_FPTR32LSB
4238+ -- : BFD_RELOC_IA64_FPTR64MSB
4239+ -- : BFD_RELOC_IA64_FPTR64LSB
4240+ -- : BFD_RELOC_IA64_PCREL21B
4241+ -- : BFD_RELOC_IA64_PCREL21BI
4242+ -- : BFD_RELOC_IA64_PCREL21M
4243+ -- : BFD_RELOC_IA64_PCREL21F
4244+ -- : BFD_RELOC_IA64_PCREL22
4245+ -- : BFD_RELOC_IA64_PCREL60B
4246+ -- : BFD_RELOC_IA64_PCREL64I
4247+ -- : BFD_RELOC_IA64_PCREL32MSB
4248+ -- : BFD_RELOC_IA64_PCREL32LSB
4249+ -- : BFD_RELOC_IA64_PCREL64MSB
4250+ -- : BFD_RELOC_IA64_PCREL64LSB
4251+ -- : BFD_RELOC_IA64_LTOFF_FPTR22
4252+ -- : BFD_RELOC_IA64_LTOFF_FPTR64I
4253+ -- : BFD_RELOC_IA64_LTOFF_FPTR32MSB
4254+ -- : BFD_RELOC_IA64_LTOFF_FPTR32LSB
4255+ -- : BFD_RELOC_IA64_LTOFF_FPTR64MSB
4256+ -- : BFD_RELOC_IA64_LTOFF_FPTR64LSB
4257+ -- : BFD_RELOC_IA64_SEGREL32MSB
4258+ -- : BFD_RELOC_IA64_SEGREL32LSB
4259+ -- : BFD_RELOC_IA64_SEGREL64MSB
4260+ -- : BFD_RELOC_IA64_SEGREL64LSB
4261+ -- : BFD_RELOC_IA64_SECREL32MSB
4262+ -- : BFD_RELOC_IA64_SECREL32LSB
4263+ -- : BFD_RELOC_IA64_SECREL64MSB
4264+ -- : BFD_RELOC_IA64_SECREL64LSB
4265+ -- : BFD_RELOC_IA64_REL32MSB
4266+ -- : BFD_RELOC_IA64_REL32LSB
4267+ -- : BFD_RELOC_IA64_REL64MSB
4268+ -- : BFD_RELOC_IA64_REL64LSB
4269+ -- : BFD_RELOC_IA64_LTV32MSB
4270+ -- : BFD_RELOC_IA64_LTV32LSB
4271+ -- : BFD_RELOC_IA64_LTV64MSB
4272+ -- : BFD_RELOC_IA64_LTV64LSB
4273+ -- : BFD_RELOC_IA64_IPLTMSB
4274+ -- : BFD_RELOC_IA64_IPLTLSB
4275+ -- : BFD_RELOC_IA64_COPY
4276+ -- : BFD_RELOC_IA64_LTOFF22X
4277+ -- : BFD_RELOC_IA64_LDXMOV
4278+ -- : BFD_RELOC_IA64_TPREL14
4279+ -- : BFD_RELOC_IA64_TPREL22
4280+ -- : BFD_RELOC_IA64_TPREL64I
4281+ -- : BFD_RELOC_IA64_TPREL64MSB
4282+ -- : BFD_RELOC_IA64_TPREL64LSB
4283+ -- : BFD_RELOC_IA64_LTOFF_TPREL22
4284+ -- : BFD_RELOC_IA64_DTPMOD64MSB
4285+ -- : BFD_RELOC_IA64_DTPMOD64LSB
4286+ -- : BFD_RELOC_IA64_LTOFF_DTPMOD22
4287+ -- : BFD_RELOC_IA64_DTPREL14
4288+ -- : BFD_RELOC_IA64_DTPREL22
4289+ -- : BFD_RELOC_IA64_DTPREL64I
4290+ -- : BFD_RELOC_IA64_DTPREL32MSB
4291+ -- : BFD_RELOC_IA64_DTPREL32LSB
4292+ -- : BFD_RELOC_IA64_DTPREL64MSB
4293+ -- : BFD_RELOC_IA64_DTPREL64LSB
4294+ -- : BFD_RELOC_IA64_LTOFF_DTPREL22
4295+ Intel IA64 Relocations.
4296+
4297+ -- : BFD_RELOC_M68HC11_HI8
4298+ Motorola 68HC11 reloc. This is the 8 bit high part of an absolute
4299+ address.
4300+
4301+ -- : BFD_RELOC_M68HC11_LO8
4302+ Motorola 68HC11 reloc. This is the 8 bit low part of an absolute
4303+ address.
4304+
4305+ -- : BFD_RELOC_M68HC11_3B
4306+ Motorola 68HC11 reloc. This is the 3 bit of a value.
4307+
4308+ -- : BFD_RELOC_M68HC11_RL_JUMP
4309+ Motorola 68HC11 reloc. This reloc marks the beginning of a
4310+ jump/call instruction. It is used for linker relaxation to
4311+ correctly identify beginning of instruction and change some
4312+ branches to use PC-relative addressing mode.
4313+
4314+ -- : BFD_RELOC_M68HC11_RL_GROUP
4315+ Motorola 68HC11 reloc. This reloc marks a group of several
4316+ instructions that gcc generates and for which the linker
4317+ relaxation pass can modify and/or remove some of them.
4318+
4319+ -- : BFD_RELOC_M68HC11_LO16
4320+ Motorola 68HC11 reloc. This is the 16-bit lower part of an
4321+ address. It is used for 'call' instruction to specify the symbol
4322+ address without any special transformation (due to memory bank
4323+ window).
4324+
4325+ -- : BFD_RELOC_M68HC11_PAGE
4326+ Motorola 68HC11 reloc. This is a 8-bit reloc that specifies the
4327+ page number of an address. It is used by 'call' instruction to
4328+ specify the page number of the symbol.
4329+
4330+ -- : BFD_RELOC_M68HC11_24
4331+ Motorola 68HC11 reloc. This is a 24-bit reloc that represents the
4332+ address with a 16-bit value and a 8-bit page number. The symbol
4333+ address is transformed to follow the 16K memory bank of 68HC12
4334+ (seen as mapped in the window).
4335+
4336+ -- : BFD_RELOC_M68HC12_5B
4337+ Motorola 68HC12 reloc. This is the 5 bits of a value.
4338+
4339+ -- : BFD_RELOC_16C_NUM08
4340+ -- : BFD_RELOC_16C_NUM08_C
4341+ -- : BFD_RELOC_16C_NUM16
4342+ -- : BFD_RELOC_16C_NUM16_C
4343+ -- : BFD_RELOC_16C_NUM32
4344+ -- : BFD_RELOC_16C_NUM32_C
4345+ -- : BFD_RELOC_16C_DISP04
4346+ -- : BFD_RELOC_16C_DISP04_C
4347+ -- : BFD_RELOC_16C_DISP08
4348+ -- : BFD_RELOC_16C_DISP08_C
4349+ -- : BFD_RELOC_16C_DISP16
4350+ -- : BFD_RELOC_16C_DISP16_C
4351+ -- : BFD_RELOC_16C_DISP24
4352+ -- : BFD_RELOC_16C_DISP24_C
4353+ -- : BFD_RELOC_16C_DISP24a
4354+ -- : BFD_RELOC_16C_DISP24a_C
4355+ -- : BFD_RELOC_16C_REG04
4356+ -- : BFD_RELOC_16C_REG04_C
4357+ -- : BFD_RELOC_16C_REG04a
4358+ -- : BFD_RELOC_16C_REG04a_C
4359+ -- : BFD_RELOC_16C_REG14
4360+ -- : BFD_RELOC_16C_REG14_C
4361+ -- : BFD_RELOC_16C_REG16
4362+ -- : BFD_RELOC_16C_REG16_C
4363+ -- : BFD_RELOC_16C_REG20
4364+ -- : BFD_RELOC_16C_REG20_C
4365+ -- : BFD_RELOC_16C_ABS20
4366+ -- : BFD_RELOC_16C_ABS20_C
4367+ -- : BFD_RELOC_16C_ABS24
4368+ -- : BFD_RELOC_16C_ABS24_C
4369+ -- : BFD_RELOC_16C_IMM04
4370+ -- : BFD_RELOC_16C_IMM04_C
4371+ -- : BFD_RELOC_16C_IMM16
4372+ -- : BFD_RELOC_16C_IMM16_C
4373+ -- : BFD_RELOC_16C_IMM20
4374+ -- : BFD_RELOC_16C_IMM20_C
4375+ -- : BFD_RELOC_16C_IMM24
4376+ -- : BFD_RELOC_16C_IMM24_C
4377+ -- : BFD_RELOC_16C_IMM32
4378+ -- : BFD_RELOC_16C_IMM32_C
4379+ NS CR16C Relocations.
4380+
4381+ -- : BFD_RELOC_CRX_REL4
4382+ -- : BFD_RELOC_CRX_REL8
4383+ -- : BFD_RELOC_CRX_REL8_CMP
4384+ -- : BFD_RELOC_CRX_REL16
4385+ -- : BFD_RELOC_CRX_REL24
4386+ -- : BFD_RELOC_CRX_REL32
4387+ -- : BFD_RELOC_CRX_REGREL12
4388+ -- : BFD_RELOC_CRX_REGREL22
4389+ -- : BFD_RELOC_CRX_REGREL28
4390+ -- : BFD_RELOC_CRX_REGREL32
4391+ -- : BFD_RELOC_CRX_ABS16
4392+ -- : BFD_RELOC_CRX_ABS32
4393+ -- : BFD_RELOC_CRX_NUM8
4394+ -- : BFD_RELOC_CRX_NUM16
4395+ -- : BFD_RELOC_CRX_NUM32
4396+ -- : BFD_RELOC_CRX_IMM16
4397+ -- : BFD_RELOC_CRX_IMM32
4398+ -- : BFD_RELOC_CRX_SWITCH8
4399+ -- : BFD_RELOC_CRX_SWITCH16
4400+ -- : BFD_RELOC_CRX_SWITCH32
4401+ NS CRX Relocations.
4402+
4403+ -- : BFD_RELOC_CRIS_BDISP8
4404+ -- : BFD_RELOC_CRIS_UNSIGNED_5
4405+ -- : BFD_RELOC_CRIS_SIGNED_6
4406+ -- : BFD_RELOC_CRIS_UNSIGNED_6
4407+ -- : BFD_RELOC_CRIS_SIGNED_8
4408+ -- : BFD_RELOC_CRIS_UNSIGNED_8
4409+ -- : BFD_RELOC_CRIS_SIGNED_16
4410+ -- : BFD_RELOC_CRIS_UNSIGNED_16
4411+ -- : BFD_RELOC_CRIS_LAPCQ_OFFSET
4412+ -- : BFD_RELOC_CRIS_UNSIGNED_4
4413+ These relocs are only used within the CRIS assembler. They are not
4414+ (at present) written to any object files.
4415+
4416+ -- : BFD_RELOC_CRIS_COPY
4417+ -- : BFD_RELOC_CRIS_GLOB_DAT
4418+ -- : BFD_RELOC_CRIS_JUMP_SLOT
4419+ -- : BFD_RELOC_CRIS_RELATIVE
4420+ Relocs used in ELF shared libraries for CRIS.
4421+
4422+ -- : BFD_RELOC_CRIS_32_GOT
4423+ 32-bit offset to symbol-entry within GOT.
4424+
4425+ -- : BFD_RELOC_CRIS_16_GOT
4426+ 16-bit offset to symbol-entry within GOT.
4427+
4428+ -- : BFD_RELOC_CRIS_32_GOTPLT
4429+ 32-bit offset to symbol-entry within GOT, with PLT handling.
4430+
4431+ -- : BFD_RELOC_CRIS_16_GOTPLT
4432+ 16-bit offset to symbol-entry within GOT, with PLT handling.
4433+
4434+ -- : BFD_RELOC_CRIS_32_GOTREL
4435+ 32-bit offset to symbol, relative to GOT.
4436+
4437+ -- : BFD_RELOC_CRIS_32_PLT_GOTREL
4438+ 32-bit offset to symbol with PLT entry, relative to GOT.
4439+
4440+ -- : BFD_RELOC_CRIS_32_PLT_PCREL
4441+ 32-bit offset to symbol with PLT entry, relative to this
4442+ relocation.
4443+
4444+ -- : BFD_RELOC_860_COPY
4445+ -- : BFD_RELOC_860_GLOB_DAT
4446+ -- : BFD_RELOC_860_JUMP_SLOT
4447+ -- : BFD_RELOC_860_RELATIVE
4448+ -- : BFD_RELOC_860_PC26
4449+ -- : BFD_RELOC_860_PLT26
4450+ -- : BFD_RELOC_860_PC16
4451+ -- : BFD_RELOC_860_LOW0
4452+ -- : BFD_RELOC_860_SPLIT0
4453+ -- : BFD_RELOC_860_LOW1
4454+ -- : BFD_RELOC_860_SPLIT1
4455+ -- : BFD_RELOC_860_LOW2
4456+ -- : BFD_RELOC_860_SPLIT2
4457+ -- : BFD_RELOC_860_LOW3
4458+ -- : BFD_RELOC_860_LOGOT0
4459+ -- : BFD_RELOC_860_SPGOT0
4460+ -- : BFD_RELOC_860_LOGOT1
4461+ -- : BFD_RELOC_860_SPGOT1
4462+ -- : BFD_RELOC_860_LOGOTOFF0
4463+ -- : BFD_RELOC_860_SPGOTOFF0
4464+ -- : BFD_RELOC_860_LOGOTOFF1
4465+ -- : BFD_RELOC_860_SPGOTOFF1
4466+ -- : BFD_RELOC_860_LOGOTOFF2
4467+ -- : BFD_RELOC_860_LOGOTOFF3
4468+ -- : BFD_RELOC_860_LOPC
4469+ -- : BFD_RELOC_860_HIGHADJ
4470+ -- : BFD_RELOC_860_HAGOT
4471+ -- : BFD_RELOC_860_HAGOTOFF
4472+ -- : BFD_RELOC_860_HAPC
4473+ -- : BFD_RELOC_860_HIGH
4474+ -- : BFD_RELOC_860_HIGOT
4475+ -- : BFD_RELOC_860_HIGOTOFF
4476+ Intel i860 Relocations.
4477+
4478+ -- : BFD_RELOC_OPENRISC_ABS_26
4479+ -- : BFD_RELOC_OPENRISC_REL_26
4480+ OpenRISC Relocations.
4481+
4482+ -- : BFD_RELOC_H8_DIR16A8
4483+ -- : BFD_RELOC_H8_DIR16R8
4484+ -- : BFD_RELOC_H8_DIR24A8
4485+ -- : BFD_RELOC_H8_DIR24R8
4486+ -- : BFD_RELOC_H8_DIR32A16
4487+ H8 elf Relocations.
4488+
4489+ -- : BFD_RELOC_XSTORMY16_REL_12
4490+ -- : BFD_RELOC_XSTORMY16_12
4491+ -- : BFD_RELOC_XSTORMY16_24
4492+ -- : BFD_RELOC_XSTORMY16_FPTR16
4493+ Sony Xstormy16 Relocations.
4494+
4495+ -- : BFD_RELOC_VAX_GLOB_DAT
4496+ -- : BFD_RELOC_VAX_JMP_SLOT
4497+ -- : BFD_RELOC_VAX_RELATIVE
4498+ Relocations used by VAX ELF.
4499+
4500+ -- : BFD_RELOC_MSP430_10_PCREL
4501+ -- : BFD_RELOC_MSP430_16_PCREL
4502+ -- : BFD_RELOC_MSP430_16
4503+ -- : BFD_RELOC_MSP430_16_PCREL_BYTE
4504+ -- : BFD_RELOC_MSP430_16_BYTE
4505+ -- : BFD_RELOC_MSP430_2X_PCREL
4506+ -- : BFD_RELOC_MSP430_RL_PCREL
4507+ msp430 specific relocation codes
4508+
4509+ -- : BFD_RELOC_IQ2000_OFFSET_16
4510+ -- : BFD_RELOC_IQ2000_OFFSET_21
4511+ -- : BFD_RELOC_IQ2000_UHI16
4512+ IQ2000 Relocations.
4513+
4514+ -- : BFD_RELOC_XTENSA_RTLD
4515+ Special Xtensa relocation used only by PLT entries in ELF shared
4516+ objects to indicate that the runtime linker should set the value
4517+ to one of its own internal functions or data structures.
4518+
4519+ -- : BFD_RELOC_XTENSA_GLOB_DAT
4520+ -- : BFD_RELOC_XTENSA_JMP_SLOT
4521+ -- : BFD_RELOC_XTENSA_RELATIVE
4522+ Xtensa relocations for ELF shared objects.
4523+
4524+ -- : BFD_RELOC_XTENSA_PLT
4525+ Xtensa relocation used in ELF object files for symbols that may
4526+ require PLT entries. Otherwise, this is just a generic 32-bit
4527+ relocation.
4528+
4529+ -- : BFD_RELOC_XTENSA_DIFF8
4530+ -- : BFD_RELOC_XTENSA_DIFF16
4531+ -- : BFD_RELOC_XTENSA_DIFF32
4532+ Xtensa relocations to mark the difference of two local symbols.
4533+ These are only needed to support linker relaxation and can be
4534+ ignored when not relaxing. The field is set to the value of the
4535+ difference assuming no relaxation. The relocation encodes the
4536+ position of the first symbol so the linker can determine whether
4537+ to adjust the field value.
4538+
4539+ -- : BFD_RELOC_XTENSA_SLOT0_OP
4540+ -- : BFD_RELOC_XTENSA_SLOT1_OP
4541+ -- : BFD_RELOC_XTENSA_SLOT2_OP
4542+ -- : BFD_RELOC_XTENSA_SLOT3_OP
4543+ -- : BFD_RELOC_XTENSA_SLOT4_OP
4544+ -- : BFD_RELOC_XTENSA_SLOT5_OP
4545+ -- : BFD_RELOC_XTENSA_SLOT6_OP
4546+ -- : BFD_RELOC_XTENSA_SLOT7_OP
4547+ -- : BFD_RELOC_XTENSA_SLOT8_OP
4548+ -- : BFD_RELOC_XTENSA_SLOT9_OP
4549+ -- : BFD_RELOC_XTENSA_SLOT10_OP
4550+ -- : BFD_RELOC_XTENSA_SLOT11_OP
4551+ -- : BFD_RELOC_XTENSA_SLOT12_OP
4552+ -- : BFD_RELOC_XTENSA_SLOT13_OP
4553+ -- : BFD_RELOC_XTENSA_SLOT14_OP
4554+ Generic Xtensa relocations for instruction operands. Only the slot
4555+ number is encoded in the relocation. The relocation applies to the
4556+ last PC-relative immediate operand, or if there are no PC-relative
4557+ immediates, to the last immediate operand.
4558+
4559+ -- : BFD_RELOC_XTENSA_SLOT0_ALT
4560+ -- : BFD_RELOC_XTENSA_SLOT1_ALT
4561+ -- : BFD_RELOC_XTENSA_SLOT2_ALT
4562+ -- : BFD_RELOC_XTENSA_SLOT3_ALT
4563+ -- : BFD_RELOC_XTENSA_SLOT4_ALT
4564+ -- : BFD_RELOC_XTENSA_SLOT5_ALT
4565+ -- : BFD_RELOC_XTENSA_SLOT6_ALT
4566+ -- : BFD_RELOC_XTENSA_SLOT7_ALT
4567+ -- : BFD_RELOC_XTENSA_SLOT8_ALT
4568+ -- : BFD_RELOC_XTENSA_SLOT9_ALT
4569+ -- : BFD_RELOC_XTENSA_SLOT10_ALT
4570+ -- : BFD_RELOC_XTENSA_SLOT11_ALT
4571+ -- : BFD_RELOC_XTENSA_SLOT12_ALT
4572+ -- : BFD_RELOC_XTENSA_SLOT13_ALT
4573+ -- : BFD_RELOC_XTENSA_SLOT14_ALT
4574+ Alternate Xtensa relocations. Only the slot is encoded in the
4575+ relocation. The meaning of these relocations is opcode-specific.
4576+
4577+ -- : BFD_RELOC_XTENSA_OP0
4578+ -- : BFD_RELOC_XTENSA_OP1
4579+ -- : BFD_RELOC_XTENSA_OP2
4580+ Xtensa relocations for backward compatibility. These have all been
4581+ replaced by BFD_RELOC_XTENSA_SLOT0_OP.
4582+
4583+ -- : BFD_RELOC_XTENSA_ASM_EXPAND
4584+ Xtensa relocation to mark that the assembler expanded the
4585+ instructions from an original target. The expansion size is
4586+ encoded in the reloc size.
4587+
4588+ -- : BFD_RELOC_XTENSA_ASM_SIMPLIFY
4589+ Xtensa relocation to mark that the linker should simplify
4590+ assembler-expanded instructions. This is commonly used internally
4591+ by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND.
4592+
4593+
4594+ typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
4595+
4596+2.11.0.2 `bfd_reloc_type_lookup'
4597+................................
4598+
4599+*Synopsis*
4600+ reloc_howto_type *bfd_reloc_type_lookup
4601+ (bfd *abfd, bfd_reloc_code_real_type code);
4602+ *Description*
4603+Return a pointer to a howto structure which, when invoked, will perform
4604+the relocation CODE on data from the architecture noted.
4605+
4606+2.11.0.3 `bfd_default_reloc_type_lookup'
4607+........................................
4608+
4609+*Synopsis*
4610+ reloc_howto_type *bfd_default_reloc_type_lookup
4611+ (bfd *abfd, bfd_reloc_code_real_type code);
4612+ *Description*
4613+Provides a default relocation lookup routine for any architecture.
4614+
4615+2.11.0.4 `bfd_get_reloc_code_name'
4616+..................................
4617+
4618+*Synopsis*
4619+ const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
4620+ *Description*
4621+Provides a printable name for the supplied relocation code. Useful
4622+mainly for printing error messages.
4623+
4624+2.11.0.5 `bfd_generic_relax_section'
4625+....................................
4626+
4627+*Synopsis*
4628+ bfd_boolean bfd_generic_relax_section
4629+ (bfd *abfd,
4630+ asection *section,
4631+ struct bfd_link_info *,
4632+ bfd_boolean *);
4633+ *Description*
4634+Provides default handling for relaxing for back ends which don't do
4635+relaxing.
4636+
4637+2.11.0.6 `bfd_generic_gc_sections'
4638+..................................
4639+
4640+*Synopsis*
4641+ bfd_boolean bfd_generic_gc_sections
4642+ (bfd *, struct bfd_link_info *);
4643+ *Description*
4644+Provides default handling for relaxing for back ends which don't do
4645+section gc - i.e., does nothing.
4646+
4647+2.11.0.7 `bfd_generic_merge_sections'
4648+.....................................
4649+
4650+*Synopsis*
4651+ bfd_boolean bfd_generic_merge_sections
4652+ (bfd *, struct bfd_link_info *);
4653+ *Description*
4654+Provides default handling for SEC_MERGE section merging for back ends
4655+which don't have SEC_MERGE support - i.e., does nothing.
4656+
4657+2.11.0.8 `bfd_generic_get_relocated_section_contents'
4658+.....................................................
4659+
4660+*Synopsis*
4661+ bfd_byte *bfd_generic_get_relocated_section_contents
4662+ (bfd *abfd,
4663+ struct bfd_link_info *link_info,
4664+ struct bfd_link_order *link_order,
4665+ bfd_byte *data,
4666+ bfd_boolean relocatable,
4667+ asymbol **symbols);
4668+ *Description*
4669+Provides default handling of relocation effort for back ends which
4670+can't be bothered to do it efficiently.
4671+
4672+
4673+File: bfd.info, Node: Core Files, Next: Targets, Prev: Relocations, Up: BFD front end
4674+
4675+2.12 Core files
4676+===============
4677+
4678+*Description*
4679+These are functions pertaining to core files.
4680+
4681+2.12.0.1 `bfd_core_file_failing_command'
4682+........................................
4683+
4684+*Synopsis*
4685+ const char *bfd_core_file_failing_command (bfd *abfd);
4686+ *Description*
4687+Return a read-only string explaining which program was running when it
4688+failed and produced the core file ABFD.
4689+
4690+2.12.0.2 `bfd_core_file_failing_signal'
4691+.......................................
4692+
4693+*Synopsis*
4694+ int bfd_core_file_failing_signal (bfd *abfd);
4695+ *Description*
4696+Returns the signal number which caused the core dump which generated
4697+the file the BFD ABFD is attached to.
4698+
4699+2.12.0.3 `core_file_matches_executable_p'
4700+.........................................
4701+
4702+*Synopsis*
4703+ bfd_boolean core_file_matches_executable_p
4704+ (bfd *core_bfd, bfd *exec_bfd);
4705+ *Description*
4706+Return `TRUE' if the core file attached to CORE_BFD was generated by a
4707+run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
4708+
4709+
4710+File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end
4711+
4712+2.13 Targets
4713+============
4714+
4715+*Description*
4716+Each port of BFD to a different machine requires the creation of a
4717+target back end. All the back end provides to the root part of BFD is a
4718+structure containing pointers to functions which perform certain low
4719+level operations on files. BFD translates the applications's requests
4720+through a pointer into calls to the back end routines.
4721+
4722+ When a file is opened with `bfd_openr', its format and target are
4723+unknown. BFD uses various mechanisms to determine how to interpret the
4724+file. The operations performed are:
4725+
4726+ * Create a BFD by calling the internal routine `_bfd_new_bfd', then
4727+ call `bfd_find_target' with the target string supplied to
4728+ `bfd_openr' and the new BFD pointer.
4729+
4730+ * If a null target string was provided to `bfd_find_target', look up
4731+ the environment variable `GNUTARGET' and use that as the target
4732+ string.
4733+
4734+ * If the target string is still `NULL', or the target string is
4735+ `default', then use the first item in the target vector as the
4736+ target type, and set `target_defaulted' in the BFD to cause
4737+ `bfd_check_format' to loop through all the targets. *Note
4738+ bfd_target::. *Note Formats::.
4739+
4740+ * Otherwise, inspect the elements in the target vector one by one,
4741+ until a match on target name is found. When found, use it.
4742+
4743+ * Otherwise return the error `bfd_error_invalid_target' to
4744+ `bfd_openr'.
4745+
4746+ * `bfd_openr' attempts to open the file using `bfd_open_file', and
4747+ returns the BFD.
4748+ Once the BFD has been opened and the target selected, the file
4749+format may be determined. This is done by calling `bfd_check_format' on
4750+the BFD with a suggested format. If `target_defaulted' has been set,
4751+each possible target type is tried to see if it recognizes the
4752+specified format. `bfd_check_format' returns `TRUE' when the caller
4753+guesses right.
4754+
4755+* Menu:
4756+
4757+* bfd_target::
4758+
4759+
4760+File: bfd.info, Node: bfd_target, Prev: Targets, Up: Targets
4761+
4762+2.13.1 bfd_target
4763+-----------------
4764+
4765+*Description*
4766+This structure contains everything that BFD knows about a target. It
4767+includes things like its byte order, name, and which routines to call
4768+to do various operations.
4769+
4770+ Every BFD points to a target structure with its `xvec' member.
4771+
4772+ The macros below are used to dispatch to functions through the
4773+`bfd_target' vector. They are used in a number of macros further down
4774+in `bfd.h', and are also used when calling various routines by hand
4775+inside the BFD implementation. The ARGLIST argument must be
4776+parenthesized; it contains all the arguments to the called function.
4777+
4778+ They make the documentation (more) unpleasant to read, so if someone
4779+wants to fix this and not break the above, please do.
4780+ #define BFD_SEND(bfd, message, arglist) \
4781+ ((*((bfd)->xvec->message)) arglist)
4782+
4783+ #ifdef DEBUG_BFD_SEND
4784+ #undef BFD_SEND
4785+ #define BFD_SEND(bfd, message, arglist) \
4786+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4787+ ((*((bfd)->xvec->message)) arglist) : \
4788+ (bfd_assert (__FILE__,__LINE__), NULL))
4789+ #endif
4790+ For operations which index on the BFD format:
4791+ #define BFD_SEND_FMT(bfd, message, arglist) \
4792+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
4793+
4794+ #ifdef DEBUG_BFD_SEND
4795+ #undef BFD_SEND_FMT
4796+ #define BFD_SEND_FMT(bfd, message, arglist) \
4797+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4798+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
4799+ (bfd_assert (__FILE__,__LINE__), NULL))
4800+ #endif
4801+ This is the structure which defines the type of BFD this is. The
4802+`xvec' member of the struct `bfd' itself points here. Each module that
4803+implements access to a different target under BFD, defines one of these.
4804+
4805+ FIXME, these names should be rationalised with the names of the
4806+entry points which call them. Too bad we can't have one macro to define
4807+them both!
4808+ enum bfd_flavour
4809+ {
4810+ bfd_target_unknown_flavour,
4811+ bfd_target_aout_flavour,
4812+ bfd_target_coff_flavour,
4813+ bfd_target_ecoff_flavour,
4814+ bfd_target_xcoff_flavour,
4815+ bfd_target_elf_flavour,
4816+ bfd_target_ieee_flavour,
4817+ bfd_target_nlm_flavour,
4818+ bfd_target_oasys_flavour,
4819+ bfd_target_tekhex_flavour,
4820+ bfd_target_srec_flavour,
4821+ bfd_target_ihex_flavour,
4822+ bfd_target_som_flavour,
4823+ bfd_target_os9k_flavour,
4824+ bfd_target_versados_flavour,
4825+ bfd_target_msdos_flavour,
4826+ bfd_target_ovax_flavour,
4827+ bfd_target_evax_flavour,
4828+ bfd_target_mmo_flavour,
4829+ bfd_target_mach_o_flavour,
4830+ bfd_target_pef_flavour,
4831+ bfd_target_pef_xlib_flavour,
4832+ bfd_target_sym_flavour
4833+ };
4834+
4835+ enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
4836+
4837+ /* Forward declaration. */
4838+ typedef struct bfd_link_info _bfd_link_info;
4839+
4840+ typedef struct bfd_target
4841+ {
4842+ /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
4843+ char *name;
4844+
4845+ /* The "flavour" of a back end is a general indication about
4846+ the contents of a file. */
4847+ enum bfd_flavour flavour;
4848+
4849+ /* The order of bytes within the data area of a file. */
4850+ enum bfd_endian byteorder;
4851+
4852+ /* The order of bytes within the header parts of a file. */
4853+ enum bfd_endian header_byteorder;
4854+
4855+ /* A mask of all the flags which an executable may have set -
4856+ from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'. */
4857+ flagword object_flags;
4858+
4859+ /* A mask of all the flags which a section may have set - from
4860+ the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'. */
4861+ flagword section_flags;
4862+
4863+ /* The character normally found at the front of a symbol.
4864+ (if any), perhaps `_'. */
4865+ char symbol_leading_char;
4866+
4867+ /* The pad character for file names within an archive header. */
4868+ char ar_pad_char;
4869+
4870+ /* The maximum number of characters in an archive header. */
4871+ unsigned short ar_max_namelen;
4872+
4873+ /* Entries for byte swapping for data. These are different from the
4874+ other entry points, since they don't take a BFD as the first argument.
4875+ Certain other handlers could do the same. */
4876+ bfd_uint64_t (*bfd_getx64) (const void *);
4877+ bfd_int64_t (*bfd_getx_signed_64) (const void *);
4878+ void (*bfd_putx64) (bfd_uint64_t, void *);
4879+ bfd_vma (*bfd_getx32) (const void *);
4880+ bfd_signed_vma (*bfd_getx_signed_32) (const void *);
4881+ void (*bfd_putx32) (bfd_vma, void *);
4882+ bfd_vma (*bfd_getx16) (const void *);
4883+ bfd_signed_vma (*bfd_getx_signed_16) (const void *);
4884+ void (*bfd_putx16) (bfd_vma, void *);
4885+
4886+ /* Byte swapping for the headers. */
4887+ bfd_uint64_t (*bfd_h_getx64) (const void *);
4888+ bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
4889+ void (*bfd_h_putx64) (bfd_uint64_t, void *);
4890+ bfd_vma (*bfd_h_getx32) (const void *);
4891+ bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
4892+ void (*bfd_h_putx32) (bfd_vma, void *);
4893+ bfd_vma (*bfd_h_getx16) (const void *);
4894+ bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
4895+ void (*bfd_h_putx16) (bfd_vma, void *);
4896+
4897+ /* Format dependent routines: these are vectors of entry points
4898+ within the target vector structure, one for each format to check. */
4899+
4900+ /* Check the format of a file being read. Return a `bfd_target *' or zero. */
4901+ const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
4902+
4903+ /* Set the format of a file being written. */
4904+ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
4905+
4906+ /* Write cached information into a file being written, at `bfd_close'. */
4907+ bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
4908+ The general target vector. These vectors are initialized using the
4909+BFD_JUMP_TABLE macros.
4910+
4911+ /* Generic entry points. */
4912+ #define BFD_JUMP_TABLE_GENERIC(NAME) \
4913+ NAME##_close_and_cleanup, \
4914+ NAME##_bfd_free_cached_info, \
4915+ NAME##_new_section_hook, \
4916+ NAME##_get_section_contents, \
4917+ NAME##_get_section_contents_in_window
4918+
4919+ /* Called when the BFD is being closed to do any necessary cleanup. */
4920+ bfd_boolean (*_close_and_cleanup) (bfd *);
4921+ /* Ask the BFD to free all cached information. */
4922+ bfd_boolean (*_bfd_free_cached_info) (bfd *);
4923+ /* Called when a new section is created. */
4924+ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
4925+ /* Read the contents of a section. */
4926+ bfd_boolean (*_bfd_get_section_contents)
4927+ (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
4928+ bfd_boolean (*_bfd_get_section_contents_in_window)
4929+ (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
4930+
4931+ /* Entry points to copy private data. */
4932+ #define BFD_JUMP_TABLE_COPY(NAME) \
4933+ NAME##_bfd_copy_private_bfd_data, \
4934+ NAME##_bfd_merge_private_bfd_data, \
4935+ NAME##_bfd_copy_private_section_data, \
4936+ NAME##_bfd_copy_private_symbol_data, \
4937+ NAME##_bfd_copy_private_header_data, \
4938+ NAME##_bfd_set_private_flags, \
4939+ NAME##_bfd_print_private_bfd_data
4940+
4941+ /* Called to copy BFD general private data from one object file
4942+ to another. */
4943+ bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
4944+ /* Called to merge BFD general private data from one object file
4945+ to a common output file when linking. */
4946+ bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
4947+ /* Called to copy BFD private section data from one object file
4948+ to another. */
4949+ bfd_boolean (*_bfd_copy_private_section_data)
4950+ (bfd *, sec_ptr, bfd *, sec_ptr);
4951+ /* Called to copy BFD private symbol data from one symbol
4952+ to another. */
4953+ bfd_boolean (*_bfd_copy_private_symbol_data)
4954+ (bfd *, asymbol *, bfd *, asymbol *);
4955+ /* Called to copy BFD private header data from one object file
4956+ to another. */
4957+ bfd_boolean (*_bfd_copy_private_header_data)
4958+ (bfd *, bfd *);
4959+ /* Called to set private backend flags. */
4960+ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
4961+
4962+ /* Called to print private BFD data. */
4963+ bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
4964+
4965+ /* Core file entry points. */
4966+ #define BFD_JUMP_TABLE_CORE(NAME) \
4967+ NAME##_core_file_failing_command, \
4968+ NAME##_core_file_failing_signal, \
4969+ NAME##_core_file_matches_executable_p
4970+
4971+ char * (*_core_file_failing_command) (bfd *);
4972+ int (*_core_file_failing_signal) (bfd *);
4973+ bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
4974+
4975+ /* Archive entry points. */
4976+ #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
4977+ NAME##_slurp_armap, \
4978+ NAME##_slurp_extended_name_table, \
4979+ NAME##_construct_extended_name_table, \
4980+ NAME##_truncate_arname, \
4981+ NAME##_write_armap, \
4982+ NAME##_read_ar_hdr, \
4983+ NAME##_openr_next_archived_file, \
4984+ NAME##_get_elt_at_index, \
4985+ NAME##_generic_stat_arch_elt, \
4986+ NAME##_update_armap_timestamp
4987+
4988+ bfd_boolean (*_bfd_slurp_armap) (bfd *);
4989+ bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
4990+ bfd_boolean (*_bfd_construct_extended_name_table)
4991+ (bfd *, char **, bfd_size_type *, const char **);
4992+ void (*_bfd_truncate_arname) (bfd *, const char *, char *);
4993+ bfd_boolean (*write_armap)
4994+ (bfd *, unsigned int, struct orl *, unsigned int, int);
4995+ void * (*_bfd_read_ar_hdr_fn) (bfd *);
4996+ bfd * (*openr_next_archived_file) (bfd *, bfd *);
4997+ #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
4998+ bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
4999+ int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
5000+ bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
5001+
5002+ /* Entry points used for symbols. */
5003+ #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
5004+ NAME##_get_symtab_upper_bound, \
5005+ NAME##_canonicalize_symtab, \
5006+ NAME##_make_empty_symbol, \
5007+ NAME##_print_symbol, \
5008+ NAME##_get_symbol_info, \
5009+ NAME##_bfd_is_local_label_name, \
5010+ NAME##_bfd_is_target_special_symbol, \
5011+ NAME##_get_lineno, \
5012+ NAME##_find_nearest_line, \
5013+ NAME##_bfd_make_debug_symbol, \
5014+ NAME##_read_minisymbols, \
5015+ NAME##_minisymbol_to_symbol
5016+
5017+ long (*_bfd_get_symtab_upper_bound) (bfd *);
5018+ long (*_bfd_canonicalize_symtab)
5019+ (bfd *, struct bfd_symbol **);
5020+ struct bfd_symbol *
5021+ (*_bfd_make_empty_symbol) (bfd *);
5022+ void (*_bfd_print_symbol)
5023+ (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
5024+ #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
5025+ void (*_bfd_get_symbol_info)
5026+ (bfd *, struct bfd_symbol *, symbol_info *);
5027+ #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
5028+ bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
5029+ bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
5030+ alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
5031+ bfd_boolean (*_bfd_find_nearest_line)
5032+ (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
5033+ const char **, const char **, unsigned int *);
5034+ /* Back-door to allow format-aware applications to create debug symbols
5035+ while using BFD for everything else. Currently used by the assembler
5036+ when creating COFF files. */
5037+ asymbol * (*_bfd_make_debug_symbol)
5038+ (bfd *, void *, unsigned long size);
5039+ #define bfd_read_minisymbols(b, d, m, s) \
5040+ BFD_SEND (b, _read_minisymbols, (b, d, m, s))
5041+ long (*_read_minisymbols)
5042+ (bfd *, bfd_boolean, void **, unsigned int *);
5043+ #define bfd_minisymbol_to_symbol(b, d, m, f) \
5044+ BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
5045+ asymbol * (*_minisymbol_to_symbol)
5046+ (bfd *, bfd_boolean, const void *, asymbol *);
5047+
5048+ /* Routines for relocs. */
5049+ #define BFD_JUMP_TABLE_RELOCS(NAME) \
5050+ NAME##_get_reloc_upper_bound, \
5051+ NAME##_canonicalize_reloc, \
5052+ NAME##_bfd_reloc_type_lookup
5053+
5054+ long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
5055+ long (*_bfd_canonicalize_reloc)
5056+ (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
5057+ /* See documentation on reloc types. */
5058+ reloc_howto_type *
5059+ (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
5060+
5061+ /* Routines used when writing an object file. */
5062+ #define BFD_JUMP_TABLE_WRITE(NAME) \
5063+ NAME##_set_arch_mach, \
5064+ NAME##_set_section_contents
5065+
5066+ bfd_boolean (*_bfd_set_arch_mach)
5067+ (bfd *, enum bfd_architecture, unsigned long);
5068+ bfd_boolean (*_bfd_set_section_contents)
5069+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
5070+
5071+ /* Routines used by the linker. */
5072+ #define BFD_JUMP_TABLE_LINK(NAME) \
5073+ NAME##_sizeof_headers, \
5074+ NAME##_bfd_get_relocated_section_contents, \
5075+ NAME##_bfd_relax_section, \
5076+ NAME##_bfd_link_hash_table_create, \
5077+ NAME##_bfd_link_hash_table_free, \
5078+ NAME##_bfd_link_add_symbols, \
5079+ NAME##_bfd_link_just_syms, \
5080+ NAME##_bfd_final_link, \
5081+ NAME##_bfd_link_split_section, \
5082+ NAME##_bfd_gc_sections, \
5083+ NAME##_bfd_merge_sections, \
5084+ NAME##_bfd_is_group_section, \
5085+ NAME##_bfd_discard_group, \
5086+ NAME##_section_already_linked \
5087+
5088+ int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
5089+ bfd_byte * (*_bfd_get_relocated_section_contents)
5090+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
5091+ bfd_byte *, bfd_boolean, struct bfd_symbol **);
5092+
5093+ bfd_boolean (*_bfd_relax_section)
5094+ (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
5095+
5096+ /* Create a hash table for the linker. Different backends store
5097+ different information in this table. */
5098+ struct bfd_link_hash_table *
5099+ (*_bfd_link_hash_table_create) (bfd *);
5100+
5101+ /* Release the memory associated with the linker hash table. */
5102+ void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
5103+
5104+ /* Add symbols from this object file into the hash table. */
5105+ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
5106+
5107+ /* Indicate that we are only retrieving symbol values from this section. */
5108+ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
5109+
5110+ /* Do a link based on the link_order structures attached to each
5111+ section of the BFD. */
5112+ bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
5113+
5114+ /* Should this section be split up into smaller pieces during linking. */
5115+ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
5116+
5117+ /* Remove sections that are not referenced from the output. */
5118+ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
5119+
5120+ /* Attempt to merge SEC_MERGE sections. */
5121+ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
5122+
5123+ /* Is this section a member of a group? */
5124+ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
5125+
5126+ /* Discard members of a group. */
5127+ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
5128+
5129+ /* Check if SEC has been already linked during a reloceatable or
5130+ final link. */
5131+ void (*_section_already_linked) (bfd *, struct bfd_section *);
5132+
5133+ /* Routines to handle dynamic symbols and relocs. */
5134+ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
5135+ NAME##_get_dynamic_symtab_upper_bound, \
5136+ NAME##_canonicalize_dynamic_symtab, \
5137+ NAME##_get_synthetic_symtab, \
5138+ NAME##_get_dynamic_reloc_upper_bound, \
5139+ NAME##_canonicalize_dynamic_reloc
5140+
5141+ /* Get the amount of memory required to hold the dynamic symbols. */
5142+ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
5143+ /* Read in the dynamic symbols. */
5144+ long (*_bfd_canonicalize_dynamic_symtab)
5145+ (bfd *, struct bfd_symbol **);
5146+ /* Create synthetized symbols. */
5147+ long (*_bfd_get_synthetic_symtab)
5148+ (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
5149+ struct bfd_symbol **);
5150+ /* Get the amount of memory required to hold the dynamic relocs. */
5151+ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
5152+ /* Read in the dynamic relocs. */
5153+ long (*_bfd_canonicalize_dynamic_reloc)
5154+ (bfd *, arelent **, struct bfd_symbol **);
5155+ A pointer to an alternative bfd_target in case the current one is not
5156+satisfactory. This can happen when the target cpu supports both big
5157+and little endian code, and target chosen by the linker has the wrong
5158+endianness. The function open_output() in ld/ldlang.c uses this field
5159+to find an alternative output format that is suitable.
5160+ /* Opposite endian version of this target. */
5161+ const struct bfd_target * alternative_target;
5162+
5163+ /* Data for use by back-end routines, which isn't
5164+ generic enough to belong in this structure. */
5165+ const void *backend_data;
5166+
5167+ } bfd_target;
5168+
5169+2.13.1.1 `bfd_set_default_target'
5170+.................................
5171+
5172+*Synopsis*
5173+ bfd_boolean bfd_set_default_target (const char *name);
5174+ *Description*
5175+Set the default target vector to use when recognizing a BFD. This
5176+takes the name of the target, which may be a BFD target name or a
5177+configuration triplet.
5178+
5179+2.13.1.2 `bfd_find_target'
5180+..........................
5181+
5182+*Synopsis*
5183+ const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
5184+ *Description*
5185+Return a pointer to the transfer vector for the object target named
5186+TARGET_NAME. If TARGET_NAME is `NULL', choose the one in the
5187+environment variable `GNUTARGET'; if that is null or not defined, then
5188+choose the first entry in the target list. Passing in the string
5189+"default" or setting the environment variable to "default" will cause
5190+the first entry in the target list to be returned, and
5191+"target_defaulted" will be set in the BFD. This causes
5192+`bfd_check_format' to loop over all the targets to find the one that
5193+matches the file being read.
5194+
5195+2.13.1.3 `bfd_target_list'
5196+..........................
5197+
5198+*Synopsis*
5199+ const char ** bfd_target_list (void);
5200+ *Description*
5201+Return a freshly malloced NULL-terminated vector of the names of all
5202+the valid BFD targets. Do not modify the names.
5203+
5204+2.13.1.4 `bfd_seach_for_target'
5205+...............................
5206+
5207+*Synopsis*
5208+ const bfd_target *bfd_search_for_target
5209+ (int (*search_func) (const bfd_target *, void *),
5210+ void *);
5211+ *Description*
5212+Return a pointer to the first transfer vector in the list of transfer
5213+vectors maintained by BFD that produces a non-zero result when passed
5214+to the function SEARCH_FUNC. The parameter DATA is passed, unexamined,
5215+to the search function.
5216+
5217+
5218+File: bfd.info, Node: Architectures, Next: Opening and Closing, Prev: Targets, Up: BFD front end
5219+
5220+2.14 Architectures
5221+==================
5222+
5223+BFD keeps one atom in a BFD describing the architecture of the data
5224+attached to the BFD: a pointer to a `bfd_arch_info_type'.
5225+
5226+ Pointers to structures can be requested independently of a BFD so
5227+that an architecture's information can be interrogated without access
5228+to an open BFD.
5229+
5230+ The architecture information is provided by each architecture
5231+package. The set of default architectures is selected by the macro
5232+`SELECT_ARCHITECTURES'. This is normally set up in the
5233+`config/TARGET.mt' file of your choice. If the name is not defined,
5234+then all the architectures supported are included.
5235+
5236+ When BFD starts up, all the architectures are called with an
5237+initialize method. It is up to the architecture back end to insert as
5238+many items into the list of architectures as it wants to; generally
5239+this would be one for each machine and one for the default case (an
5240+item with a machine field of 0).
5241+
5242+ BFD's idea of an architecture is implemented in `archures.c'.
5243+
5244+2.14.1 bfd_architecture
5245+-----------------------
5246+
5247+*Description*
5248+This enum gives the object file's CPU architecture, in a global
5249+sense--i.e., what processor family does it belong to? Another field
5250+indicates which processor within the family is in use. The machine
5251+gives a number which distinguishes different versions of the
5252+architecture, containing, for example, 2 and 3 for Intel i960 KA and
5253+i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
5254+ enum bfd_architecture
5255+ {
5256+ bfd_arch_unknown, /* File arch not known. */
5257+ bfd_arch_obscure, /* Arch known, not one of these. */
5258+ bfd_arch_m68k, /* Motorola 68xxx */
5259+ #define bfd_mach_m68000 1
5260+ #define bfd_mach_m68008 2
5261+ #define bfd_mach_m68010 3
5262+ #define bfd_mach_m68020 4
5263+ #define bfd_mach_m68030 5
5264+ #define bfd_mach_m68040 6
5265+ #define bfd_mach_m68060 7
5266+ #define bfd_mach_cpu32 8
5267+ #define bfd_mach_mcf5200 9
5268+ #define bfd_mach_mcf5206e 10
5269+ #define bfd_mach_mcf5307 11
5270+ #define bfd_mach_mcf5407 12
5271+ #define bfd_mach_mcf528x 13
5272+ #define bfd_mach_mcfv4e 14
5273+ #define bfd_mach_mcf521x 15
5274+ #define bfd_mach_mcf5249 16
5275+ #define bfd_mach_mcf547x 17
5276+ #define bfd_mach_mcf548x 18
5277+ bfd_arch_vax, /* DEC Vax */
5278+ bfd_arch_i960, /* Intel 960 */
5279+ /* The order of the following is important.
5280+ lower number indicates a machine type that
5281+ only accepts a subset of the instructions
5282+ available to machines with higher numbers.
5283+ The exception is the "ca", which is
5284+ incompatible with all other machines except
5285+ "core". */
5286+
5287+ #define bfd_mach_i960_core 1
5288+ #define bfd_mach_i960_ka_sa 2
5289+ #define bfd_mach_i960_kb_sb 3
5290+ #define bfd_mach_i960_mc 4
5291+ #define bfd_mach_i960_xa 5
5292+ #define bfd_mach_i960_ca 6
5293+ #define bfd_mach_i960_jx 7
5294+ #define bfd_mach_i960_hx 8
5295+
5296+ bfd_arch_or32, /* OpenRISC 32 */
5297+
5298+ bfd_arch_a29k, /* AMD 29000 */
5299+ bfd_arch_sparc, /* SPARC */
5300+ #define bfd_mach_sparc 1
5301+ /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
5302+ #define bfd_mach_sparc_sparclet 2
5303+ #define bfd_mach_sparc_sparclite 3
5304+ #define bfd_mach_sparc_v8plus 4
5305+ #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
5306+ #define bfd_mach_sparc_sparclite_le 6
5307+ #define bfd_mach_sparc_v9 7
5308+ #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
5309+ #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
5310+ #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
5311+ /* Nonzero if MACH has the v9 instruction set. */
5312+ #define bfd_mach_sparc_v9_p(mach) \
5313+ ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
5314+ && (mach) != bfd_mach_sparc_sparclite_le)
5315+ /* Nonzero if MACH is a 64 bit sparc architecture. */
5316+ #define bfd_mach_sparc_64bit_p(mach) \
5317+ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
5318+ bfd_arch_mips, /* MIPS Rxxxx */
5319+ #define bfd_mach_mips3000 3000
5320+ #define bfd_mach_mips3900 3900
5321+ #define bfd_mach_mips4000 4000
5322+ #define bfd_mach_mips4010 4010
5323+ #define bfd_mach_mips4100 4100
5324+ #define bfd_mach_mips4111 4111
5325+ #define bfd_mach_mips4120 4120
5326+ #define bfd_mach_mips4300 4300
5327+ #define bfd_mach_mips4400 4400
5328+ #define bfd_mach_mips4600 4600
5329+ #define bfd_mach_mips4650 4650
5330+ #define bfd_mach_mips5000 5000
5331+ #define bfd_mach_mips5400 5400
5332+ #define bfd_mach_mips5500 5500
5333+ #define bfd_mach_mips6000 6000
5334+ #define bfd_mach_mips7000 7000
5335+ #define bfd_mach_mips8000 8000
5336+ #define bfd_mach_mips9000 9000
5337+ #define bfd_mach_mips10000 10000
5338+ #define bfd_mach_mips12000 12000
5339+ #define bfd_mach_mips16 16
5340+ #define bfd_mach_mips5 5
5341+ #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
5342+ #define bfd_mach_mipsisa32 32
5343+ #define bfd_mach_mipsisa32r2 33
5344+ #define bfd_mach_mipsisa64 64
5345+ #define bfd_mach_mipsisa64r2 65
5346+ bfd_arch_i386, /* Intel 386 */
5347+ #define bfd_mach_i386_i386 1
5348+ #define bfd_mach_i386_i8086 2
5349+ #define bfd_mach_i386_i386_intel_syntax 3
5350+ #define bfd_mach_x86_64 64
5351+ #define bfd_mach_x86_64_intel_syntax 65
5352+ bfd_arch_we32k, /* AT&T WE32xxx */
5353+ bfd_arch_tahoe, /* CCI/Harris Tahoe */
5354+ bfd_arch_i860, /* Intel 860 */
5355+ bfd_arch_i370, /* IBM 360/370 Mainframes */
5356+ bfd_arch_romp, /* IBM ROMP PC/RT */
5357+ bfd_arch_alliant, /* Alliant */
5358+ bfd_arch_convex, /* Convex */
5359+ bfd_arch_m88k, /* Motorola 88xxx */
5360+ bfd_arch_m98k, /* Motorola 98xxx */
5361+ bfd_arch_pyramid, /* Pyramid Technology */
5362+ bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300) */
5363+ #define bfd_mach_h8300 1
5364+ #define bfd_mach_h8300h 2
5365+ #define bfd_mach_h8300s 3
5366+ #define bfd_mach_h8300hn 4
5367+ #define bfd_mach_h8300sn 5
5368+ #define bfd_mach_h8300sx 6
5369+ #define bfd_mach_h8300sxn 7
5370+ bfd_arch_pdp11, /* DEC PDP-11 */
5371+ bfd_arch_powerpc, /* PowerPC */
5372+ #define bfd_mach_ppc 32
5373+ #define bfd_mach_ppc64 64
5374+ #define bfd_mach_ppc_403 403
5375+ #define bfd_mach_ppc_403gc 4030
5376+ #define bfd_mach_ppc_505 505
5377+ #define bfd_mach_ppc_601 601
5378+ #define bfd_mach_ppc_602 602
5379+ #define bfd_mach_ppc_603 603
5380+ #define bfd_mach_ppc_ec603e 6031
5381+ #define bfd_mach_ppc_604 604
5382+ #define bfd_mach_ppc_620 620
5383+ #define bfd_mach_ppc_630 630
5384+ #define bfd_mach_ppc_750 750
5385+ #define bfd_mach_ppc_860 860
5386+ #define bfd_mach_ppc_a35 35
5387+ #define bfd_mach_ppc_rs64ii 642
5388+ #define bfd_mach_ppc_rs64iii 643
5389+ #define bfd_mach_ppc_7400 7400
5390+ #define bfd_mach_ppc_e500 500
5391+ bfd_arch_rs6000, /* IBM RS/6000 */
5392+ #define bfd_mach_rs6k 6000
5393+ #define bfd_mach_rs6k_rs1 6001
5394+ #define bfd_mach_rs6k_rsc 6003
5395+ #define bfd_mach_rs6k_rs2 6002
5396+ bfd_arch_hppa, /* HP PA RISC */
5397+ #define bfd_mach_hppa10 10
5398+ #define bfd_mach_hppa11 11
5399+ #define bfd_mach_hppa20 20
5400+ #define bfd_mach_hppa20w 25
5401+ bfd_arch_d10v, /* Mitsubishi D10V */
5402+ #define bfd_mach_d10v 1
5403+ #define bfd_mach_d10v_ts2 2
5404+ #define bfd_mach_d10v_ts3 3
5405+ bfd_arch_d30v, /* Mitsubishi D30V */
5406+ bfd_arch_dlx, /* DLX */
5407+ bfd_arch_m68hc11, /* Motorola 68HC11 */
5408+ bfd_arch_m68hc12, /* Motorola 68HC12 */
5409+ #define bfd_mach_m6812_default 0
5410+ #define bfd_mach_m6812 1
5411+ #define bfd_mach_m6812s 2
5412+ bfd_arch_z8k, /* Zilog Z8000 */
5413+ #define bfd_mach_z8001 1
5414+ #define bfd_mach_z8002 2
5415+ bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */
5416+ bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */
5417+ #define bfd_mach_sh 1
5418+ #define bfd_mach_sh2 0x20
5419+ #define bfd_mach_sh_dsp 0x2d
5420+ #define bfd_mach_sh2a 0x2a
5421+ #define bfd_mach_sh2a_nofpu 0x2b
5422+ #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
5423+ #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
5424+ #define bfd_mach_sh2a_or_sh4 0x2a3
5425+ #define bfd_mach_sh2a_or_sh3e 0x2a4
5426+ #define bfd_mach_sh2e 0x2e
5427+ #define bfd_mach_sh3 0x30
5428+ #define bfd_mach_sh3_nommu 0x31
5429+ #define bfd_mach_sh3_dsp 0x3d
5430+ #define bfd_mach_sh3e 0x3e
5431+ #define bfd_mach_sh4 0x40
5432+ #define bfd_mach_sh4_nofpu 0x41
5433+ #define bfd_mach_sh4_nommu_nofpu 0x42
5434+ #define bfd_mach_sh4a 0x4a
5435+ #define bfd_mach_sh4a_nofpu 0x4b
5436+ #define bfd_mach_sh4al_dsp 0x4d
5437+ #define bfd_mach_sh5 0x50
5438+ bfd_arch_alpha, /* Dec Alpha */
5439+ #define bfd_mach_alpha_ev4 0x10
5440+ #define bfd_mach_alpha_ev5 0x20
5441+ #define bfd_mach_alpha_ev6 0x30
5442+ bfd_arch_arm, /* Advanced Risc Machines ARM. */
5443+ #define bfd_mach_arm_unknown 0
5444+ #define bfd_mach_arm_2 1
5445+ #define bfd_mach_arm_2a 2
5446+ #define bfd_mach_arm_3 3
5447+ #define bfd_mach_arm_3M 4
5448+ #define bfd_mach_arm_4 5
5449+ #define bfd_mach_arm_4T 6
5450+ #define bfd_mach_arm_5 7
5451+ #define bfd_mach_arm_5T 8
5452+ #define bfd_mach_arm_5TE 9
5453+ #define bfd_mach_arm_XScale 10
5454+ #define bfd_mach_arm_ep9312 11
5455+ #define bfd_mach_arm_iWMMXt 12
5456+ bfd_arch_ns32k, /* National Semiconductors ns32000 */
5457+ bfd_arch_w65, /* WDC 65816 */
5458+ bfd_arch_tic30, /* Texas Instruments TMS320C30 */
5459+ bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */
5460+ #define bfd_mach_tic3x 30
5461+ #define bfd_mach_tic4x 40
5462+ bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
5463+ bfd_arch_tic80, /* TI TMS320c80 (MVP) */
5464+ bfd_arch_v850, /* NEC V850 */
5465+ #define bfd_mach_v850 1
5466+ #define bfd_mach_v850e 'E'
5467+ #define bfd_mach_v850e1 '1'
5468+ bfd_arch_arc, /* ARC Cores */
5469+ #define bfd_mach_arc_5 5
5470+ #define bfd_mach_arc_6 6
5471+ #define bfd_mach_arc_7 7
5472+ #define bfd_mach_arc_8 8
5473+ bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */
5474+ #define bfd_mach_m32r 1 /* For backwards compatibility. */
5475+ #define bfd_mach_m32rx 'x'
5476+ #define bfd_mach_m32r2 '2'
5477+ bfd_arch_mn10200, /* Matsushita MN10200 */
5478+ bfd_arch_mn10300, /* Matsushita MN10300 */
5479+ #define bfd_mach_mn10300 300
5480+ #define bfd_mach_am33 330
5481+ #define bfd_mach_am33_2 332
5482+ bfd_arch_fr30,
5483+ #define bfd_mach_fr30 0x46523330
5484+ bfd_arch_frv,
5485+ #define bfd_mach_frv 1
5486+ #define bfd_mach_frvsimple 2
5487+ #define bfd_mach_fr300 300
5488+ #define bfd_mach_fr400 400
5489+ #define bfd_mach_fr450 450
5490+ #define bfd_mach_frvtomcat 499 /* fr500 prototype */
5491+ #define bfd_mach_fr500 500
5492+ #define bfd_mach_fr550 550
5493+ bfd_arch_mcore,
5494+ bfd_arch_ia64, /* HP/Intel ia64 */
5495+ #define bfd_mach_ia64_elf64 64
5496+ #define bfd_mach_ia64_elf32 32
5497+ bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
5498+ #define bfd_mach_ip2022 1
5499+ #define bfd_mach_ip2022ext 2
5500+ bfd_arch_iq2000, /* Vitesse IQ2000. */
5501+ #define bfd_mach_iq2000 1
5502+ #define bfd_mach_iq10 2
5503+ bfd_arch_pj,
5504+ bfd_arch_avr, /* Atmel AVR microcontrollers. */
5505+ #define bfd_mach_avr1 1
5506+ #define bfd_mach_avr2 2
5507+ #define bfd_mach_avr3 3
5508+ #define bfd_mach_avr4 4
5509+ #define bfd_mach_avr5 5
5510+ bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
5511+ #define bfd_mach_cr16c 1
5512+ bfd_arch_crx, /* National Semiconductor CRX. */
5513+ #define bfd_mach_crx 1
5514+ bfd_arch_cris, /* Axis CRIS */
5515+ #define bfd_mach_cris_v0_v10 255
5516+ #define bfd_mach_cris_v32 32
5517+ #define bfd_mach_cris_v10_v32 1032
5518+ bfd_arch_s390, /* IBM s390 */
5519+ #define bfd_mach_s390_31 31
5520+ #define bfd_mach_s390_64 64
5521+ bfd_arch_openrisc, /* OpenRISC */
5522+ bfd_arch_mmix, /* Donald Knuth's educational processor. */
5523+ bfd_arch_xstormy16,
5524+ #define bfd_mach_xstormy16 1
5525+ bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
5526+ #define bfd_mach_msp11 11
5527+ #define bfd_mach_msp110 110
5528+ #define bfd_mach_msp12 12
5529+ #define bfd_mach_msp13 13
5530+ #define bfd_mach_msp14 14
5531+ #define bfd_mach_msp15 15
5532+ #define bfd_mach_msp16 16
5533+ #define bfd_mach_msp31 31
5534+ #define bfd_mach_msp32 32
5535+ #define bfd_mach_msp33 33
5536+ #define bfd_mach_msp41 41
5537+ #define bfd_mach_msp42 42
5538+ #define bfd_mach_msp43 43
5539+ #define bfd_mach_msp44 44
5540+ bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
5541+ #define bfd_mach_xtensa 1
5542+ bfd_arch_maxq, /* Dallas MAXQ 10/20 */
5543+ #define bfd_mach_maxq10 10
5544+ #define bfd_mach_maxq20 20
5545+ bfd_arch_last
5546+ };
5547+
5548+2.14.2 bfd_arch_info
5549+--------------------
5550+
5551+*Description*
5552+This structure contains information on architectures for use within BFD.
5553+
5554+ typedef struct bfd_arch_info
5555+ {
5556+ int bits_per_word;
5557+ int bits_per_address;
5558+ int bits_per_byte;
5559+ enum bfd_architecture arch;
5560+ unsigned long mach;
5561+ const char *arch_name;
5562+ const char *printable_name;
5563+ unsigned int section_align_power;
5564+ /* TRUE if this is the default machine for the architecture.
5565+ The default arch should be the first entry for an arch so that
5566+ all the entries for that arch can be accessed via `next'. */
5567+ bfd_boolean the_default;
5568+ const struct bfd_arch_info * (*compatible)
5569+ (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
5570+
5571+ bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
5572+
5573+ const struct bfd_arch_info *next;
5574+ }
5575+ bfd_arch_info_type;
5576+
5577+2.14.2.1 `bfd_printable_name'
5578+.............................
5579+
5580+*Synopsis*
5581+ const char *bfd_printable_name (bfd *abfd);
5582+ *Description*
5583+Return a printable string representing the architecture and machine
5584+from the pointer to the architecture info structure.
5585+
5586+2.14.2.2 `bfd_scan_arch'
5587+........................
5588+
5589+*Synopsis*
5590+ const bfd_arch_info_type *bfd_scan_arch (const char *string);
5591+ *Description*
5592+Figure out if BFD supports any cpu which could be described with the
5593+name STRING. Return a pointer to an `arch_info' structure if a machine
5594+is found, otherwise NULL.
5595+
5596+2.14.2.3 `bfd_arch_list'
5597+........................
5598+
5599+*Synopsis*
5600+ const char **bfd_arch_list (void);
5601+ *Description*
5602+Return a freshly malloced NULL-terminated vector of the names of all
5603+the valid BFD architectures. Do not modify the names.
5604+
5605+2.14.2.4 `bfd_arch_get_compatible'
5606+..................................
5607+
5608+*Synopsis*
5609+ const bfd_arch_info_type *bfd_arch_get_compatible
5610+ (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
5611+ *Description*
5612+Determine whether two BFDs' architectures and machine types are
5613+compatible. Calculates the lowest common denominator between the two
5614+architectures and machine types implied by the BFDs and returns a
5615+pointer to an `arch_info' structure describing the compatible machine.
5616+
5617+2.14.2.5 `bfd_default_arch_struct'
5618+..................................
5619+
5620+*Description*
5621+The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
5622+has been initialized to a fairly generic state. A BFD starts life by
5623+pointing to this structure, until the correct back end has determined
5624+the real architecture of the file.
5625+ extern const bfd_arch_info_type bfd_default_arch_struct;
5626+
5627+2.14.2.6 `bfd_set_arch_info'
5628+............................
5629+
5630+*Synopsis*
5631+ void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
5632+ *Description*
5633+Set the architecture info of ABFD to ARG.
5634+
5635+2.14.2.7 `bfd_default_set_arch_mach'
5636+....................................
5637+
5638+*Synopsis*
5639+ bfd_boolean bfd_default_set_arch_mach
5640+ (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
5641+ *Description*
5642+Set the architecture and machine type in BFD ABFD to ARCH and MACH.
5643+Find the correct pointer to a structure and insert it into the
5644+`arch_info' pointer.
5645+
5646+2.14.2.8 `bfd_get_arch'
5647+.......................
5648+
5649+*Synopsis*
5650+ enum bfd_architecture bfd_get_arch (bfd *abfd);
5651+ *Description*
5652+Return the enumerated type which describes the BFD ABFD's architecture.
5653+
5654+2.14.2.9 `bfd_get_mach'
5655+.......................
5656+
5657+*Synopsis*
5658+ unsigned long bfd_get_mach (bfd *abfd);
5659+ *Description*
5660+Return the long type which describes the BFD ABFD's machine.
5661+
5662+2.14.2.10 `bfd_arch_bits_per_byte'
5663+..................................
5664+
5665+*Synopsis*
5666+ unsigned int bfd_arch_bits_per_byte (bfd *abfd);
5667+ *Description*
5668+Return the number of bits in one of the BFD ABFD's architecture's bytes.
5669+
5670+2.14.2.11 `bfd_arch_bits_per_address'
5671+.....................................
5672+
5673+*Synopsis*
5674+ unsigned int bfd_arch_bits_per_address (bfd *abfd);
5675+ *Description*
5676+Return the number of bits in one of the BFD ABFD's architecture's
5677+addresses.
5678+
5679+2.14.2.12 `bfd_default_compatible'
5680+..................................
5681+
5682+*Synopsis*
5683+ const bfd_arch_info_type *bfd_default_compatible
5684+ (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
5685+ *Description*
5686+The default function for testing for compatibility.
5687+
5688+2.14.2.13 `bfd_default_scan'
5689+............................
5690+
5691+*Synopsis*
5692+ bfd_boolean bfd_default_scan
5693+ (const struct bfd_arch_info *info, const char *string);
5694+ *Description*
5695+The default function for working out whether this is an architecture
5696+hit and a machine hit.
5697+
5698+2.14.2.14 `bfd_get_arch_info'
5699+.............................
5700+
5701+*Synopsis*
5702+ const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
5703+ *Description*
5704+Return the architecture info struct in ABFD.
5705+
5706+2.14.2.15 `bfd_lookup_arch'
5707+...........................
5708+
5709+*Synopsis*
5710+ const bfd_arch_info_type *bfd_lookup_arch
5711+ (enum bfd_architecture arch, unsigned long machine);
5712+ *Description*
5713+Look for the architecture info structure which matches the arguments
5714+ARCH and MACHINE. A machine of 0 matches the machine/architecture
5715+structure which marks itself as the default.
5716+
5717+2.14.2.16 `bfd_printable_arch_mach'
5718+...................................
5719+
5720+*Synopsis*
5721+ const char *bfd_printable_arch_mach
5722+ (enum bfd_architecture arch, unsigned long machine);
5723+ *Description*
5724+Return a printable string representing the architecture and machine
5725+type.
5726+
5727+ This routine is depreciated.
5728+
5729+2.14.2.17 `bfd_octets_per_byte'
5730+...............................
5731+
5732+*Synopsis*
5733+ unsigned int bfd_octets_per_byte (bfd *abfd);
5734+ *Description*
5735+Return the number of octets (8-bit quantities) per target byte (minimum
5736+addressable unit). In most cases, this will be one, but some DSP
5737+targets have 16, 32, or even 48 bits per byte.
5738+
5739+2.14.2.18 `bfd_arch_mach_octets_per_byte'
5740+.........................................
5741+
5742+*Synopsis*
5743+ unsigned int bfd_arch_mach_octets_per_byte
5744+ (enum bfd_architecture arch, unsigned long machine);
5745+ *Description*
5746+See bfd_octets_per_byte.
5747+
5748+ This routine is provided for those cases where a bfd * is not
5749+available
5750+
5751+
5752+File: bfd.info, Node: Opening and Closing, Next: Internal, Prev: Architectures, Up: BFD front end
5753+
5754+2.15 Opening and closing BFDs
5755+=============================
5756+
5757+2.15.0.1 `bfd_openr'
5758+....................
5759+
5760+*Synopsis*
5761+ bfd *bfd_openr (const char *filename, const char *target);
5762+ *Description*
5763+Open the file FILENAME (using `fopen') with the target TARGET. Return
5764+a pointer to the created BFD.
5765+
5766+ Calls `bfd_find_target', so TARGET is interpreted as by that
5767+function.
5768+
5769+ If `NULL' is returned then an error has occured. Possible errors
5770+are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
5771+error.
5772+
5773+2.15.0.2 `bfd_fdopenr'
5774+......................
5775+
5776+*Synopsis*
5777+ bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
5778+ *Description*
5779+`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'. It
5780+opens a BFD on a file already described by the FD supplied.
5781+
5782+ When the file is later `bfd_close'd, the file descriptor will be
5783+closed. If the caller desires that this file descriptor be cached by
5784+BFD (opened as needed, closed as needed to free descriptors for other
5785+opens), with the supplied FD used as an initial file descriptor (but
5786+subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
5787+returned BFD. The default is to assume no caching; the file descriptor
5788+will remain open until `bfd_close', and will not be affected by BFD
5789+operations on other files.
5790+
5791+ Possible errors are `bfd_error_no_memory',
5792+`bfd_error_invalid_target' and `bfd_error_system_call'.
5793+
5794+2.15.0.3 `bfd_openstreamr'
5795+..........................
5796+
5797+*Synopsis*
5798+ bfd *bfd_openstreamr (const char *, const char *, void *);
5799+ *Description*
5800+Open a BFD for read access on an existing stdio stream. When the BFD
5801+is passed to `bfd_close', the stream will be closed.
5802+
5803+2.15.0.4 `bfd_openr_iovec'
5804+..........................
5805+
5806+*Synopsis*
5807+ bfd *bfd_openr_iovec (const char *filename, const char *target,
5808+ void *(*open) (struct bfd *nbfd,
5809+ void *open_closure),
5810+ void *open_closure,
5811+ file_ptr (*pread) (struct bfd *nbfd,
5812+ void *stream,
5813+ void *buf,
5814+ file_ptr nbytes,
5815+ file_ptr offset),
5816+ int (*close) (struct bfd *nbfd,
5817+ void *stream));
5818+ *Description*
5819+Create and return a BFD backed by a read-only STREAM. The STREAM is
5820+created using OPEN, accessed using PREAD and destroyed using CLOSE.
5821+
5822+ Calls `bfd_find_target', so TARGET is interpreted as by that
5823+function.
5824+
5825+ Calls OPEN (which can call `bfd_zalloc' and `bfd_get_filename') to
5826+obtain the read-only stream backing the BFD. OPEN either succeeds
5827+returning the non-`NULL' STREAM, or fails returning `NULL' (setting
5828+`bfd_error').
5829+
5830+ Calls PREAD to request NBYTES of data from STREAM starting at OFFSET
5831+(e.g., via a call to `bfd_read'). PREAD either succeeds returning the
5832+number of bytes read (which can be less than NBYTES when end-of-file),
5833+or fails returning -1 (setting `bfd_error').
5834+
5835+ Calls CLOSE when the BFD is later closed using `bfd_close'. CLOSE
5836+either succeeds returning 0, or fails returning -1 (setting
5837+`bfd_error').
5838+
5839+ If `bfd_openr_iovec' returns `NULL' then an error has occurred.
5840+Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target'
5841+and `bfd_error_system_call'.
5842+
5843+2.15.0.5 `bfd_openw'
5844+....................
5845+
5846+*Synopsis*
5847+ bfd *bfd_openw (const char *filename, const char *target);
5848+ *Description*
5849+Create a BFD, associated with file FILENAME, using the file format
5850+TARGET, and return a pointer to it.
5851+
5852+ Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
5853+`bfd_error_invalid_target'.
5854+
5855+2.15.0.6 `bfd_close'
5856+....................
5857+
5858+*Synopsis*
5859+ bfd_boolean bfd_close (bfd *abfd);
5860+ *Description*
5861+Close a BFD. If the BFD was open for writing, then pending operations
5862+are completed and the file written out and closed. If the created file
5863+is executable, then `chmod' is called to mark it as such.
5864+
5865+ All memory attached to the BFD is released.
5866+
5867+ The file descriptor associated with the BFD is closed (even if it
5868+was passed in to BFD by `bfd_fdopenr').
5869+
5870+ *Returns*
5871+`TRUE' is returned if all is ok, otherwise `FALSE'.
5872+
5873+2.15.0.7 `bfd_close_all_done'
5874+.............................
5875+
5876+*Synopsis*
5877+ bfd_boolean bfd_close_all_done (bfd *);
5878+ *Description*
5879+Close a BFD. Differs from `bfd_close' since it does not complete any
5880+pending operations. This routine would be used if the application had
5881+just used BFD for swapping and didn't want to use any of the writing
5882+code.
5883+
5884+ If the created file is executable, then `chmod' is called to mark it
5885+as such.
5886+
5887+ All memory attached to the BFD is released.
5888+
5889+ *Returns*
5890+`TRUE' is returned if all is ok, otherwise `FALSE'.
5891+
5892+2.15.0.8 `bfd_create'
5893+.....................
5894+
5895+*Synopsis*
5896+ bfd *bfd_create (const char *filename, bfd *templ);
5897+ *Description*
5898+Create a new BFD in the manner of `bfd_openw', but without opening a
5899+file. The new BFD takes the target from the target used by TEMPLATE.
5900+The format is always set to `bfd_object'.
5901+
5902+2.15.0.9 `bfd_make_writable'
5903+............................
5904+
5905+*Synopsis*
5906+ bfd_boolean bfd_make_writable (bfd *abfd);
5907+ *Description*
5908+Takes a BFD as created by `bfd_create' and converts it into one like as
5909+returned by `bfd_openw'. It does this by converting the BFD to
5910+BFD_IN_MEMORY. It's assumed that you will call `bfd_make_readable' on
5911+this bfd later.
5912+
5913+ *Returns*
5914+`TRUE' is returned if all is ok, otherwise `FALSE'.
5915+
5916+2.15.0.10 `bfd_make_readable'
5917+.............................
5918+
5919+*Synopsis*
5920+ bfd_boolean bfd_make_readable (bfd *abfd);
5921+ *Description*
5922+Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
5923+converts it into one like as returned by `bfd_openr'. It does this by
5924+writing the contents out to the memory buffer, then reversing the
5925+direction.
5926+
5927+ *Returns*
5928+`TRUE' is returned if all is ok, otherwise `FALSE'.
5929+
5930+2.15.0.11 `bfd_alloc'
5931+.....................
5932+
5933+*Synopsis*
5934+ void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
5935+ *Description*
5936+Allocate a block of WANTED bytes of memory attached to `abfd' and
5937+return a pointer to it.
5938+
5939+2.15.0.12 `bfd_zalloc'
5940+......................
5941+
5942+*Synopsis*
5943+ void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
5944+ *Description*
5945+Allocate a block of WANTED bytes of zeroed memory attached to `abfd'
5946+and return a pointer to it.
5947+
5948+2.15.0.13 `bfd_calc_gnu_debuglink_crc32'
5949+........................................
5950+
5951+*Synopsis*
5952+ unsigned long bfd_calc_gnu_debuglink_crc32
5953+ (unsigned long crc, const unsigned char *buf, bfd_size_type len);
5954+ *Description*
5955+Computes a CRC value as used in the .gnu_debuglink section. Advances
5956+the previously computed CRC value by computing and adding in the crc32
5957+for LEN bytes of BUF.
5958+
5959+ *Returns*
5960+Return the updated CRC32 value.
5961+
5962+2.15.0.14 `get_debug_link_info'
5963+...............................
5964+
5965+*Synopsis*
5966+ char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
5967+ *Description*
5968+fetch the filename and CRC32 value for any separate debuginfo
5969+associated with ABFD. Return NULL if no such info found, otherwise
5970+return filename and update CRC32_OUT.
5971+
5972+2.15.0.15 `separate_debug_file_exists'
5973+......................................
5974+
5975+*Synopsis*
5976+ bfd_boolean separate_debug_file_exists
5977+ (char *name, unsigned long crc32);
5978+ *Description*
5979+Checks to see if NAME is a file and if its contents match CRC32.
5980+
5981+2.15.0.16 `find_separate_debug_file'
5982+....................................
5983+
5984+*Synopsis*
5985+ char *find_separate_debug_file (bfd *abfd);
5986+ *Description*
5987+Searches ABFD for a reference to separate debugging information, scans
5988+various locations in the filesystem, including the file tree rooted at
5989+DEBUG_FILE_DIRECTORY, and returns a filename of such debugging
5990+information if the file is found and has matching CRC32. Returns NULL
5991+if no reference to debugging file exists, or file cannot be found.
5992+
5993+2.15.0.17 `bfd_follow_gnu_debuglink'
5994+....................................
5995+
5996+*Synopsis*
5997+ char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
5998+ *Description*
5999+Takes a BFD and searches it for a .gnu_debuglink section. If this
6000+section is found, it examines the section for the name and checksum of
6001+a '.debug' file containing auxiliary debugging information. It then
6002+searches the filesystem for this .debug file in some standard
6003+locations, including the directory tree rooted at DIR, and if found
6004+returns the full filename.
6005+
6006+ If DIR is NULL, it will search a default path configured into libbfd
6007+at build time. [XXX this feature is not currently implemented].
6008+
6009+ *Returns*
6010+`NULL' on any errors or failure to locate the .debug file, otherwise a
6011+pointer to a heap-allocated string containing the filename. The caller
6012+is responsible for freeing this string.
6013+
6014+2.15.0.18 `bfd_create_gnu_debuglink_section'
6015+............................................
6016+
6017+*Synopsis*
6018+ struct bfd_section *bfd_create_gnu_debuglink_section
6019+ (bfd *abfd, const char *filename);
6020+ *Description*
6021+Takes a BFD and adds a .gnu_debuglink section to it. The section is
6022+sized to be big enough to contain a link to the specified FILENAME.
6023+
6024+ *Returns*
6025+A pointer to the new section is returned if all is ok. Otherwise
6026+`NULL' is returned and bfd_error is set.
6027+
6028+2.15.0.19 `bfd_fill_in_gnu_debuglink_section'
6029+.............................................
6030+
6031+*Synopsis*
6032+ bfd_boolean bfd_fill_in_gnu_debuglink_section
6033+ (bfd *abfd, struct bfd_section *sect, const char *filename);
6034+ *Description*
6035+Takes a BFD and containing a .gnu_debuglink section SECT and fills in
6036+the contents of the section to contain a link to the specified
6037+FILENAME. The filename should be relative to the current directory.
6038+
6039+ *Returns*
6040+`TRUE' is returned if all is ok. Otherwise `FALSE' is returned and
6041+bfd_error is set.
6042+
6043+
6044+File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end
6045+
6046+2.16 Internal functions
6047+=======================
6048+
6049+*Description*
6050+These routines are used within BFD. They are not intended for export,
6051+but are documented here for completeness.
6052+
6053+2.16.0.1 `bfd_write_bigendian_4byte_int'
6054+........................................
6055+
6056+*Synopsis*
6057+ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
6058+ *Description*
6059+Write a 4 byte integer I to the output BFD ABFD, in big endian order
6060+regardless of what else is going on. This is useful in archives.
6061+
6062+2.16.0.2 `bfd_put_size'
6063+.......................
6064+
6065+2.16.0.3 `bfd_get_size'
6066+.......................
6067+
6068+*Description*
6069+These macros as used for reading and writing raw data in sections; each
6070+access (except for bytes) is vectored through the target format of the
6071+BFD and mangled accordingly. The mangling performs any necessary endian
6072+translations and removes alignment restrictions. Note that types
6073+accepted and returned by these macros are identical so they can be
6074+swapped around in macros--for example, `libaout.h' defines `GET_WORD'
6075+to either `bfd_get_32' or `bfd_get_64'.
6076+
6077+ In the put routines, VAL must be a `bfd_vma'. If we are on a system
6078+without prototypes, the caller is responsible for making sure that is
6079+true, with a cast if necessary. We don't cast them in the macro
6080+definitions because that would prevent `lint' or `gcc -Wall' from
6081+detecting sins such as passing a pointer. To detect calling these with
6082+less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
6083+`bfd_vma''s.
6084+
6085+ /* Byte swapping macros for user section data. */
6086+
6087+ #define bfd_put_8(abfd, val, ptr) \
6088+ ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
6089+ #define bfd_put_signed_8 \
6090+ bfd_put_8
6091+ #define bfd_get_8(abfd, ptr) \
6092+ (*(unsigned char *) (ptr) & 0xff)
6093+ #define bfd_get_signed_8(abfd, ptr) \
6094+ (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
6095+
6096+ #define bfd_put_16(abfd, val, ptr) \
6097+ BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
6098+ #define bfd_put_signed_16 \
6099+ bfd_put_16
6100+ #define bfd_get_16(abfd, ptr) \
6101+ BFD_SEND (abfd, bfd_getx16, (ptr))
6102+ #define bfd_get_signed_16(abfd, ptr) \
6103+ BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
6104+
6105+ #define bfd_put_32(abfd, val, ptr) \
6106+ BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
6107+ #define bfd_put_signed_32 \
6108+ bfd_put_32
6109+ #define bfd_get_32(abfd, ptr) \
6110+ BFD_SEND (abfd, bfd_getx32, (ptr))
6111+ #define bfd_get_signed_32(abfd, ptr) \
6112+ BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
6113+
6114+ #define bfd_put_64(abfd, val, ptr) \
6115+ BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
6116+ #define bfd_put_signed_64 \
6117+ bfd_put_64
6118+ #define bfd_get_64(abfd, ptr) \
6119+ BFD_SEND (abfd, bfd_getx64, (ptr))
6120+ #define bfd_get_signed_64(abfd, ptr) \
6121+ BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
6122+
6123+ #define bfd_get(bits, abfd, ptr) \
6124+ ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
6125+ : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
6126+ : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
6127+ : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
6128+ : (abort (), (bfd_vma) - 1))
6129+
6130+ #define bfd_put(bits, abfd, val, ptr) \
6131+ ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
6132+ : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
6133+ : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
6134+ : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
6135+ : (abort (), (void) 0))
6136+
6137+2.16.0.4 `bfd_h_put_size'
6138+.........................
6139+
6140+*Description*
6141+These macros have the same function as their `bfd_get_x' brethren,
6142+except that they are used for removing information for the header
6143+records of object files. Believe it or not, some object files keep
6144+their header records in big endian order and their data in little
6145+endian order.
6146+
6147+ /* Byte swapping macros for file header data. */
6148+
6149+ #define bfd_h_put_8(abfd, val, ptr) \
6150+ bfd_put_8 (abfd, val, ptr)
6151+ #define bfd_h_put_signed_8(abfd, val, ptr) \
6152+ bfd_put_8 (abfd, val, ptr)
6153+ #define bfd_h_get_8(abfd, ptr) \
6154+ bfd_get_8 (abfd, ptr)
6155+ #define bfd_h_get_signed_8(abfd, ptr) \
6156+ bfd_get_signed_8 (abfd, ptr)
6157+
6158+ #define bfd_h_put_16(abfd, val, ptr) \
6159+ BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
6160+ #define bfd_h_put_signed_16 \
6161+ bfd_h_put_16
6162+ #define bfd_h_get_16(abfd, ptr) \
6163+ BFD_SEND (abfd, bfd_h_getx16, (ptr))
6164+ #define bfd_h_get_signed_16(abfd, ptr) \
6165+ BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
6166+
6167+ #define bfd_h_put_32(abfd, val, ptr) \
6168+ BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
6169+ #define bfd_h_put_signed_32 \
6170+ bfd_h_put_32
6171+ #define bfd_h_get_32(abfd, ptr) \
6172+ BFD_SEND (abfd, bfd_h_getx32, (ptr))
6173+ #define bfd_h_get_signed_32(abfd, ptr) \
6174+ BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
6175+
6176+ #define bfd_h_put_64(abfd, val, ptr) \
6177+ BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
6178+ #define bfd_h_put_signed_64 \
6179+ bfd_h_put_64
6180+ #define bfd_h_get_64(abfd, ptr) \
6181+ BFD_SEND (abfd, bfd_h_getx64, (ptr))
6182+ #define bfd_h_get_signed_64(abfd, ptr) \
6183+ BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
6184+
6185+ /* Aliases for the above, which should eventually go away. */
6186+
6187+ #define H_PUT_64 bfd_h_put_64
6188+ #define H_PUT_32 bfd_h_put_32
6189+ #define H_PUT_16 bfd_h_put_16
6190+ #define H_PUT_8 bfd_h_put_8
6191+ #define H_PUT_S64 bfd_h_put_signed_64
6192+ #define H_PUT_S32 bfd_h_put_signed_32
6193+ #define H_PUT_S16 bfd_h_put_signed_16
6194+ #define H_PUT_S8 bfd_h_put_signed_8
6195+ #define H_GET_64 bfd_h_get_64
6196+ #define H_GET_32 bfd_h_get_32
6197+ #define H_GET_16 bfd_h_get_16
6198+ #define H_GET_8 bfd_h_get_8
6199+ #define H_GET_S64 bfd_h_get_signed_64
6200+ #define H_GET_S32 bfd_h_get_signed_32
6201+ #define H_GET_S16 bfd_h_get_signed_16
6202+ #define H_GET_S8 bfd_h_get_signed_8
6203+
6204+2.16.0.5 `bfd_log2'
6205+...................
6206+
6207+*Synopsis*
6208+ unsigned int bfd_log2 (bfd_vma x);
6209+ *Description*
6210+Return the log base 2 of the value supplied, rounded up. E.g., an X of
6211+1025 returns 11. A X of 0 returns 0.
6212+
6213+
6214+File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end
6215+
6216+2.17 File caching
6217+=================
6218+
6219+The file caching mechanism is embedded within BFD and allows the
6220+application to open as many BFDs as it wants without regard to the
6221+underlying operating system's file descriptor limit (often as low as 20
6222+open files). The module in `cache.c' maintains a least recently used
6223+list of `BFD_CACHE_MAX_OPEN' files, and exports the name
6224+`bfd_cache_lookup', which runs around and makes sure that the required
6225+BFD is open. If not, then it chooses a file to close, closes it and
6226+opens the one wanted, returning its file handle.
6227+
6228+2.17.0.1 `BFD_CACHE_MAX_OPEN macro'
6229+...................................
6230+
6231+*Description*
6232+The maximum number of files which the cache will keep open at one time.
6233+ #define BFD_CACHE_MAX_OPEN 10
6234+
6235+2.17.0.2 `bfd_last_cache'
6236+.........................
6237+
6238+*Synopsis*
6239+ extern bfd *bfd_last_cache;
6240+ *Description*
6241+Zero, or a pointer to the topmost BFD on the chain. This is used by
6242+the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can
6243+avoid a function call.
6244+
6245+2.17.0.3 `bfd_cache_lookup'
6246+...........................
6247+
6248+*Description*
6249+Check to see if the required BFD is the same as the last one looked up.
6250+If so, then it can use the stream in the BFD with impunity, since it
6251+can't have changed since the last lookup; otherwise, it has to perform
6252+the complicated lookup function.
6253+ #define bfd_cache_lookup(x) \
6254+ ((x) == bfd_last_cache ? \
6255+ (FILE *) (bfd_last_cache->iostream): \
6256+ bfd_cache_lookup_worker (x))
6257+
6258+2.17.0.4 `bfd_cache_init'
6259+.........................
6260+
6261+*Synopsis*
6262+ bfd_boolean bfd_cache_init (bfd *abfd);
6263+ *Description*
6264+Add a newly opened BFD to the cache.
6265+
6266+2.17.0.5 `bfd_cache_close'
6267+..........................
6268+
6269+*Synopsis*
6270+ bfd_boolean bfd_cache_close (bfd *abfd);
6271+ *Description*
6272+Remove the BFD ABFD from the cache. If the attached file is open, then
6273+close it too.
6274+
6275+ *Returns*
6276+`FALSE' is returned if closing the file fails, `TRUE' is returned if
6277+all is well.
6278+
6279+2.17.0.6 `bfd_cache_close_all'
6280+..............................
6281+
6282+*Synopsis*
6283+ bfd_boolean bfd_cache_close_all (void);
6284+ *Description*
6285+Remove all BFDs from the cache. If the attached file is open, then
6286+close it too.
6287+
6288+ *Returns*
6289+`FALSE' is returned if closing one of the file fails, `TRUE' is
6290+returned if all is well.
6291+
6292+2.17.0.7 `bfd_open_file'
6293+........................
6294+
6295+*Synopsis*
6296+ FILE* bfd_open_file (bfd *abfd);
6297+ *Description*
6298+Call the OS to open a file for ABFD. Return the `FILE *' (possibly
6299+`NULL') that results from this operation. Set up the BFD so that
6300+future accesses know the file is open. If the `FILE *' returned is
6301+`NULL', then it won't have been put in the cache, so it won't have to
6302+be removed from it.
6303+
6304+2.17.0.8 `bfd_cache_lookup_worker'
6305+..................................
6306+
6307+*Synopsis*
6308+ FILE *bfd_cache_lookup_worker (bfd *abfd);
6309+ *Description*
6310+Called when the macro `bfd_cache_lookup' fails to find a quick answer.
6311+Find a file descriptor for ABFD. If necessary, it open it. If there
6312+are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to
6313+close one first, to avoid running out of file descriptors. It will
6314+abort rather than returning NULL if it is unable to (re)open the ABFD.
6315+
6316+
6317+File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end
6318+
6319+2.18 Linker Functions
6320+=====================
6321+
6322+The linker uses three special entry points in the BFD target vector.
6323+It is not necessary to write special routines for these entry points
6324+when creating a new BFD back end, since generic versions are provided.
6325+However, writing them can speed up linking and make it use
6326+significantly less runtime memory.
6327+
6328+ The first routine creates a hash table used by the other routines.
6329+The second routine adds the symbols from an object file to the hash
6330+table. The third routine takes all the object files and links them
6331+together to create the output file. These routines are designed so
6332+that the linker proper does not need to know anything about the symbols
6333+in the object files that it is linking. The linker merely arranges the
6334+sections as directed by the linker script and lets BFD handle the
6335+details of symbols and relocs.
6336+
6337+ The second routine and third routines are passed a pointer to a
6338+`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
6339+information relevant to the link, including the linker hash table
6340+(which was created by the first routine) and a set of callback
6341+functions to the linker proper.
6342+
6343+ The generic linker routines are in `linker.c', and use the header
6344+file `genlink.h'. As of this writing, the only back ends which have
6345+implemented versions of these routines are a.out (in `aoutx.h') and
6346+ECOFF (in `ecoff.c'). The a.out routines are used as examples
6347+throughout this section.
6348+
6349+* Menu:
6350+
6351+* Creating a Linker Hash Table::
6352+* Adding Symbols to the Hash Table::
6353+* Performing the Final Link::
6354+
6355+
6356+File: bfd.info, Node: Creating a Linker Hash Table, Next: Adding Symbols to the Hash Table, Prev: Linker Functions, Up: Linker Functions
6357+
6358+2.18.1 Creating a linker hash table
6359+-----------------------------------
6360+
6361+The linker routines must create a hash table, which must be derived
6362+from `struct bfd_link_hash_table' described in `bfdlink.c'. *Note Hash
6363+Tables::, for information on how to create a derived hash table. This
6364+entry point is called using the target vector of the linker output file.
6365+
6366+ The `_bfd_link_hash_table_create' entry point must allocate and
6367+initialize an instance of the desired hash table. If the back end does
6368+not require any additional information to be stored with the entries in
6369+the hash table, the entry point may simply create a `struct
6370+bfd_link_hash_table'. Most likely, however, some additional
6371+information will be needed.
6372+
6373+ For example, with each entry in the hash table the a.out linker
6374+keeps the index the symbol has in the final output file (this index
6375+number is used so that when doing a relocatable link the symbol index
6376+used in the output file can be quickly filled in when copying over a
6377+reloc). The a.out linker code defines the required structures and
6378+functions for a hash table derived from `struct bfd_link_hash_table'.
6379+The a.out linker hash table is created by the function
6380+`NAME(aout,link_hash_table_create)'; it simply allocates space for the
6381+hash table, initializes it, and returns a pointer to it.
6382+
6383+ When writing the linker routines for a new back end, you will
6384+generally not know exactly which fields will be required until you have
6385+finished. You should simply create a new hash table which defines no
6386+additional fields, and then simply add fields as they become necessary.
6387+
6388+
6389+File: bfd.info, Node: Adding Symbols to the Hash Table, Next: Performing the Final Link, Prev: Creating a Linker Hash Table, Up: Linker Functions
6390+
6391+2.18.2 Adding symbols to the hash table
6392+---------------------------------------
6393+
6394+The linker proper will call the `_bfd_link_add_symbols' entry point for
6395+each object file or archive which is to be linked (typically these are
6396+the files named on the command line, but some may also come from the
6397+linker script). The entry point is responsible for examining the file.
6398+For an object file, BFD must add any relevant symbol information to
6399+the hash table. For an archive, BFD must determine which elements of
6400+the archive should be used and adding them to the link.
6401+
6402+ The a.out version of this entry point is
6403+`NAME(aout,link_add_symbols)'.
6404+
6405+* Menu:
6406+
6407+* Differing file formats::
6408+* Adding symbols from an object file::
6409+* Adding symbols from an archive::
6410+
6411+
6412+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
6413+
6414+2.18.2.1 Differing file formats
6415+...............................
6416+
6417+Normally all the files involved in a link will be of the same format,
6418+but it is also possible to link together different format object files,
6419+and the back end must support that. The `_bfd_link_add_symbols' entry
6420+point is called via the target vector of the file to be added. This
6421+has an important consequence: the function may not assume that the hash
6422+table is the type created by the corresponding
6423+`_bfd_link_hash_table_create' vector. All the `_bfd_link_add_symbols'
6424+function can assume about the hash table is that it is derived from
6425+`struct bfd_link_hash_table'.
6426+
6427+ Sometimes the `_bfd_link_add_symbols' function must store some
6428+information in the hash table entry to be used by the `_bfd_final_link'
6429+function. In such a case the `creator' field of the hash table must be
6430+checked to make sure that the hash table was created by an object file
6431+of the same format.
6432+
6433+ The `_bfd_final_link' routine must be prepared to handle a hash
6434+entry without any extra information added by the
6435+`_bfd_link_add_symbols' function. A hash entry without extra
6436+information will also occur when the linker script directs the linker
6437+to create a symbol. Note that, regardless of how a hash table entry is
6438+added, all the fields will be initialized to some sort of null value by
6439+the hash table entry initialization function.
6440+
6441+ See `ecoff_link_add_externals' for an example of how to check the
6442+`creator' field before saving information (in this case, the ECOFF
6443+external symbol debugging information) in a hash table entry.
6444+
6445+
6446+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
6447+
6448+2.18.2.2 Adding symbols from an object file
6449+...........................................
6450+
6451+When the `_bfd_link_add_symbols' routine is passed an object file, it
6452+must add all externally visible symbols in that object file to the hash
6453+table. The actual work of adding the symbol to the hash table is
6454+normally handled by the function `_bfd_generic_link_add_one_symbol'.
6455+The `_bfd_link_add_symbols' routine is responsible for reading all the
6456+symbols from the object file and passing the correct information to
6457+`_bfd_generic_link_add_one_symbol'.
6458+
6459+ The `_bfd_link_add_symbols' routine should not use
6460+`bfd_canonicalize_symtab' to read the symbols. The point of providing
6461+this routine is to avoid the overhead of converting the symbols into
6462+generic `asymbol' structures.
6463+
6464+ `_bfd_generic_link_add_one_symbol' handles the details of combining
6465+common symbols, warning about multiple definitions, and so forth. It
6466+takes arguments which describe the symbol to add, notably symbol flags,
6467+a section, and an offset. The symbol flags include such things as
6468+`BSF_WEAK' or `BSF_INDIRECT'. The section is a section in the object
6469+file, or something like `bfd_und_section_ptr' for an undefined symbol
6470+or `bfd_com_section_ptr' for a common symbol.
6471+
6472+ If the `_bfd_final_link' routine is also going to need to read the
6473+symbol information, the `_bfd_link_add_symbols' routine should save it
6474+somewhere attached to the object file BFD. However, the information
6475+should only be saved if the `keep_memory' field of the `info' argument
6476+is TRUE, so that the `-no-keep-memory' linker switch is effective.
6477+
6478+ The a.out function which adds symbols from an object file is
6479+`aout_link_add_object_symbols', and most of the interesting work is in
6480+`aout_link_add_symbols'. The latter saves pointers to the hash tables
6481+entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
6482+number, so that the `_bfd_final_link' routine does not have to call the
6483+hash table lookup routine to locate the entry.
6484+
6485+
6486+File: bfd.info, Node: Adding symbols from an archive, Prev: Adding symbols from an object file, Up: Adding Symbols to the Hash Table
6487+
6488+2.18.2.3 Adding symbols from an archive
6489+.......................................
6490+
6491+When the `_bfd_link_add_symbols' routine is passed an archive, it must
6492+look through the symbols defined by the archive and decide which
6493+elements of the archive should be included in the link. For each such
6494+element it must call the `add_archive_element' linker callback, and it
6495+must add the symbols from the object file to the linker hash table.
6496+
6497+ In most cases the work of looking through the symbols in the archive
6498+should be done by the `_bfd_generic_link_add_archive_symbols' function.
6499+This function builds a hash table from the archive symbol table and
6500+looks through the list of undefined symbols to see which elements
6501+should be included. `_bfd_generic_link_add_archive_symbols' is passed
6502+a function to call to make the final decision about adding an archive
6503+element to the link and to do the actual work of adding the symbols to
6504+the linker hash table.
6505+
6506+ The function passed to `_bfd_generic_link_add_archive_symbols' must
6507+read the symbols of the archive element and decide whether the archive
6508+element should be included in the link. If the element is to be
6509+included, the `add_archive_element' linker callback routine must be
6510+called with the element as an argument, and the elements symbols must
6511+be added to the linker hash table just as though the element had itself
6512+been passed to the `_bfd_link_add_symbols' function.
6513+
6514+ When the a.out `_bfd_link_add_symbols' function receives an archive,
6515+it calls `_bfd_generic_link_add_archive_symbols' passing
6516+`aout_link_check_archive_element' as the function argument.
6517+`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
6518+If the latter decides to add the element (an element is only added if
6519+it provides a real, non-common, definition for a previously undefined
6520+or common symbol) it calls the `add_archive_element' callback and then
6521+`aout_link_check_archive_element' calls `aout_link_add_symbols' to
6522+actually add the symbols to the linker hash table.
6523+
6524+ The ECOFF back end is unusual in that it does not normally call
6525+`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
6526+contain a hash table of symbols. The ECOFF back end searches the
6527+archive itself to avoid the overhead of creating a new hash table.
6528+
6529+
6530+File: bfd.info, Node: Performing the Final Link, Prev: Adding Symbols to the Hash Table, Up: Linker Functions
6531+
6532+2.18.3 Performing the final link
6533+--------------------------------
6534+
6535+When all the input files have been processed, the linker calls the
6536+`_bfd_final_link' entry point of the output BFD. This routine is
6537+responsible for producing the final output file, which has several
6538+aspects. It must relocate the contents of the input sections and copy
6539+the data into the output sections. It must build an output symbol
6540+table including any local symbols from the input files and the global
6541+symbols from the hash table. When producing relocatable output, it must
6542+modify the input relocs and write them into the output file. There may
6543+also be object format dependent work to be done.
6544+
6545+ The linker will also call the `write_object_contents' entry point
6546+when the BFD is closed. The two entry points must work together in
6547+order to produce the correct output file.
6548+
6549+ The details of how this works are inevitably dependent upon the
6550+specific object file format. The a.out `_bfd_final_link' routine is
6551+`NAME(aout,final_link)'.
6552+
6553+* Menu:
6554+
6555+* Information provided by the linker::
6556+* Relocating the section contents::
6557+* Writing the symbol table::
6558+
6559+
6560+File: bfd.info, Node: Information provided by the linker, Next: Relocating the section contents, Prev: Performing the Final Link, Up: Performing the Final Link
6561+
6562+2.18.3.1 Information provided by the linker
6563+...........................................
6564+
6565+Before the linker calls the `_bfd_final_link' entry point, it sets up
6566+some data structures for the function to use.
6567+
6568+ The `input_bfds' field of the `bfd_link_info' structure will point
6569+to a list of all the input files included in the link. These files are
6570+linked through the `link_next' field of the `bfd' structure.
6571+
6572+ Each section in the output file will have a list of `link_order'
6573+structures attached to the `link_order_head' field (the `link_order'
6574+structure is defined in `bfdlink.h'). These structures describe how to
6575+create the contents of the output section in terms of the contents of
6576+various input sections, fill constants, and, eventually, other types of
6577+information. They also describe relocs that must be created by the BFD
6578+backend, but do not correspond to any input file; this is used to
6579+support -Ur, which builds constructors while generating a relocatable
6580+object file.
6581+
6582+
6583+File: bfd.info, Node: Relocating the section contents, Next: Writing the symbol table, Prev: Information provided by the linker, Up: Performing the Final Link
6584+
6585+2.18.3.2 Relocating the section contents
6586+........................................
6587+
6588+The `_bfd_final_link' function should look through the `link_order'
6589+structures attached to each section of the output file. Each
6590+`link_order' structure should either be handled specially, or it should
6591+be passed to the function `_bfd_default_link_order' which will do the
6592+right thing (`_bfd_default_link_order' is defined in `linker.c').
6593+
6594+ For efficiency, a `link_order' of type `bfd_indirect_link_order'
6595+whose associated section belongs to a BFD of the same format as the
6596+output BFD must be handled specially. This type of `link_order'
6597+describes part of an output section in terms of a section belonging to
6598+one of the input files. The `_bfd_final_link' function should read the
6599+contents of the section and any associated relocs, apply the relocs to
6600+the section contents, and write out the modified section contents. If
6601+performing a relocatable link, the relocs themselves must also be
6602+modified and written out.
6603+
6604+ The functions `_bfd_relocate_contents' and
6605+`_bfd_final_link_relocate' provide some general support for performing
6606+the actual relocations, notably overflow checking. Their arguments
6607+include information about the symbol the relocation is against and a
6608+`reloc_howto_type' argument which describes the relocation to perform.
6609+These functions are defined in `reloc.c'.
6610+
6611+ The a.out function which handles reading, relocating, and writing
6612+section contents is `aout_link_input_section'. The actual relocation
6613+is done in `aout_link_input_section_std' and
6614+`aout_link_input_section_ext'.
6615+
6616+
6617+File: bfd.info, Node: Writing the symbol table, Prev: Relocating the section contents, Up: Performing the Final Link
6618+
6619+2.18.3.3 Writing the symbol table
6620+.................................
6621+
6622+The `_bfd_final_link' function must gather all the symbols in the input
6623+files and write them out. It must also write out all the symbols in
6624+the global hash table. This must be controlled by the `strip' and
6625+`discard' fields of the `bfd_link_info' structure.
6626+
6627+ The local symbols of the input files will not have been entered into
6628+the linker hash table. The `_bfd_final_link' routine must consider
6629+each input file and include the symbols in the output file. It may be
6630+convenient to do this when looking through the `link_order' structures,
6631+or it may be done by stepping through the `input_bfds' list.
6632+
6633+ The `_bfd_final_link' routine must also traverse the global hash
6634+table to gather all the externally visible symbols. It is possible
6635+that most of the externally visible symbols may be written out when
6636+considering the symbols of each input file, but it is still necessary
6637+to traverse the hash table since the linker script may have defined
6638+some symbols that are not in any of the input files.
6639+
6640+ The `strip' field of the `bfd_link_info' structure controls which
6641+symbols are written out. The possible values are listed in
6642+`bfdlink.h'. If the value is `strip_some', then the `keep_hash' field
6643+of the `bfd_link_info' structure is a hash table of symbols to keep;
6644+each symbol should be looked up in this hash table, and only symbols
6645+which are present should be included in the output file.
6646+
6647+ If the `strip' field of the `bfd_link_info' structure permits local
6648+symbols to be written out, the `discard' field is used to further
6649+controls which local symbols are included in the output file. If the
6650+value is `discard_l', then all local symbols which begin with a certain
6651+prefix are discarded; this is controlled by the
6652+`bfd_is_local_label_name' entry point.
6653+
6654+ The a.out backend handles symbols by calling
6655+`aout_link_write_symbols' on each input BFD and then traversing the
6656+global hash table with the function `aout_link_write_other_symbol'. It
6657+builds a string table while writing out the symbols, which is written
6658+to the output file at the end of `NAME(aout,final_link)'.
6659+
6660+2.18.3.4 `bfd_link_split_section'
6661+.................................
6662+
6663+*Synopsis*
6664+ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
6665+ *Description*
6666+Return nonzero if SEC should be split during a reloceatable or final
6667+link.
6668+ #define bfd_link_split_section(abfd, sec) \
6669+ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
6670+
6671+2.18.3.5 `bfd_section_already_linked'
6672+.....................................
6673+
6674+*Synopsis*
6675+ void bfd_section_already_linked (bfd *abfd, asection *sec);
6676+ *Description*
6677+Check if SEC has been already linked during a reloceatable or final
6678+link.
6679+ #define bfd_section_already_linked(abfd, sec) \
6680+ BFD_SEND (abfd, _section_already_linked, (abfd, sec))
6681+
6682+
6683+File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end
6684+
6685+2.19 Hash Tables
6686+================
6687+
6688+BFD provides a simple set of hash table functions. Routines are
6689+provided to initialize a hash table, to free a hash table, to look up a
6690+string in a hash table and optionally create an entry for it, and to
6691+traverse a hash table. There is currently no routine to delete an
6692+string from a hash table.
6693+
6694+ The basic hash table does not permit any data to be stored with a
6695+string. However, a hash table is designed to present a base class from
6696+which other types of hash tables may be derived. These derived types
6697+may store additional information with the string. Hash tables were
6698+implemented in this way, rather than simply providing a data pointer in
6699+a hash table entry, because they were designed for use by the linker
6700+back ends. The linker may create thousands of hash table entries, and
6701+the overhead of allocating private data and storing and following
6702+pointers becomes noticeable.
6703+
6704+ The basic hash table code is in `hash.c'.
6705+
6706+* Menu:
6707+
6708+* Creating and Freeing a Hash Table::
6709+* Looking Up or Entering a String::
6710+* Traversing a Hash Table::
6711+* Deriving a New Hash Table Type::
6712+
6713+
6714+File: bfd.info, Node: Creating and Freeing a Hash Table, Next: Looking Up or Entering a String, Prev: Hash Tables, Up: Hash Tables
6715+
6716+2.19.1 Creating and freeing a hash table
6717+----------------------------------------
6718+
6719+To create a hash table, create an instance of a `struct bfd_hash_table'
6720+(defined in `bfd.h') and call `bfd_hash_table_init' (if you know
6721+approximately how many entries you will need, the function
6722+`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
6723+`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
6724+
6725+ The function `bfd_hash_table_init' take as an argument a function to
6726+use to create new entries. For a basic hash table, use the function
6727+`bfd_hash_newfunc'. *Note Deriving a New Hash Table Type::, for why
6728+you would want to use a different value for this argument.
6729+
6730+ `bfd_hash_table_init' will create an objalloc which will be used to
6731+allocate new entries. You may allocate memory on this objalloc using
6732+`bfd_hash_allocate'.
6733+
6734+ Use `bfd_hash_table_free' to free up all the memory that has been
6735+allocated for a hash table. This will not free up the `struct
6736+bfd_hash_table' itself, which you must provide.
6737+
6738+ Use `bfd_hash_set_default_size' to set the default size of hash
6739+table to use.
6740+
6741+
6742+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
6743+
6744+2.19.2 Looking up or entering a string
6745+--------------------------------------
6746+
6747+The function `bfd_hash_lookup' is used both to look up a string in the
6748+hash table and to create a new entry.
6749+
6750+ If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
6751+string. If the string is found, it will returns a pointer to a `struct
6752+bfd_hash_entry'. If the string is not found in the table
6753+`bfd_hash_lookup' will return `NULL'. You should not modify any of the
6754+fields in the returns `struct bfd_hash_entry'.
6755+
6756+ If the CREATE argument is `TRUE', the string will be entered into
6757+the hash table if it is not already there. Either way a pointer to a
6758+`struct bfd_hash_entry' will be returned, either to the existing
6759+structure or to a newly created one. In this case, a `NULL' return
6760+means that an error occurred.
6761+
6762+ If the CREATE argument is `TRUE', and a new entry is created, the
6763+COPY argument is used to decide whether to copy the string onto the
6764+hash table objalloc or not. If COPY is passed as `FALSE', you must be
6765+careful not to deallocate or modify the string as long as the hash table
6766+exists.
6767+
6768+
6769+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
6770+
6771+2.19.3 Traversing a hash table
6772+------------------------------
6773+
6774+The function `bfd_hash_traverse' may be used to traverse a hash table,
6775+calling a function on each element. The traversal is done in a random
6776+order.
6777+
6778+ `bfd_hash_traverse' takes as arguments a function and a generic
6779+`void *' pointer. The function is called with a hash table entry (a
6780+`struct bfd_hash_entry *') and the generic pointer passed to
6781+`bfd_hash_traverse'. The function must return a `boolean' value, which
6782+indicates whether to continue traversing the hash table. If the
6783+function returns `FALSE', `bfd_hash_traverse' will stop the traversal
6784+and return immediately.
6785+
6786+
6787+File: bfd.info, Node: Deriving a New Hash Table Type, Prev: Traversing a Hash Table, Up: Hash Tables
6788+
6789+2.19.4 Deriving a new hash table type
6790+-------------------------------------
6791+
6792+Many uses of hash tables want to store additional information which
6793+each entry in the hash table. Some also find it convenient to store
6794+additional information with the hash table itself. This may be done
6795+using a derived hash table.
6796+
6797+ Since C is not an object oriented language, creating a derived hash
6798+table requires sticking together some boilerplate routines with a few
6799+differences specific to the type of hash table you want to create.
6800+
6801+ An example of a derived hash table is the linker hash table. The
6802+structures for this are defined in `bfdlink.h'. The functions are in
6803+`linker.c'.
6804+
6805+ You may also derive a hash table from an already derived hash table.
6806+For example, the a.out linker backend code uses a hash table derived
6807+from the linker hash table.
6808+
6809+* Menu:
6810+
6811+* Define the Derived Structures::
6812+* Write the Derived Creation Routine::
6813+* Write Other Derived Routines::
6814+
6815+
6816+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
6817+
6818+2.19.4.1 Define the derived structures
6819+......................................
6820+
6821+You must define a structure for an entry in the hash table, and a
6822+structure for the hash table itself.
6823+
6824+ The first field in the structure for an entry in the hash table must
6825+be of the type used for an entry in the hash table you are deriving
6826+from. If you are deriving from a basic hash table this is `struct
6827+bfd_hash_entry', which is defined in `bfd.h'. The first field in the
6828+structure for the hash table itself must be of the type of the hash
6829+table you are deriving from itself. If you are deriving from a basic
6830+hash table, this is `struct bfd_hash_table'.
6831+
6832+ For example, the linker hash table defines `struct
6833+bfd_link_hash_entry' (in `bfdlink.h'). The first field, `root', is of
6834+type `struct bfd_hash_entry'. Similarly, the first field in `struct
6835+bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
6836+
6837+
6838+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
6839+
6840+2.19.4.2 Write the derived creation routine
6841+...........................................
6842+
6843+You must write a routine which will create and initialize an entry in
6844+the hash table. This routine is passed as the function argument to
6845+`bfd_hash_table_init'.
6846+
6847+ In order to permit other hash tables to be derived from the hash
6848+table you are creating, this routine must be written in a standard way.
6849+
6850+ The first argument to the creation routine is a pointer to a hash
6851+table entry. This may be `NULL', in which case the routine should
6852+allocate the right amount of space. Otherwise the space has already
6853+been allocated by a hash table type derived from this one.
6854+
6855+ After allocating space, the creation routine must call the creation
6856+routine of the hash table type it is derived from, passing in a pointer
6857+to the space it just allocated. This will initialize any fields used
6858+by the base hash table.
6859+
6860+ Finally the creation routine must initialize any local fields for
6861+the new hash table type.
6862+
6863+ Here is a boilerplate example of a creation routine. FUNCTION_NAME
6864+is the name of the routine. ENTRY_TYPE is the type of an entry in the
6865+hash table you are creating. BASE_NEWFUNC is the name of the creation
6866+routine of the hash table type your hash table is derived from.
6867+
6868+ struct bfd_hash_entry *
6869+ FUNCTION_NAME (entry, table, string)
6870+ struct bfd_hash_entry *entry;
6871+ struct bfd_hash_table *table;
6872+ const char *string;
6873+ {
6874+ struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
6875+
6876+ /* Allocate the structure if it has not already been allocated by a
6877+ derived class. */
6878+ if (ret == (ENTRY_TYPE *) NULL)
6879+ {
6880+ ret = ((ENTRY_TYPE *)
6881+ bfd_hash_allocate (table, sizeof (ENTRY_TYPE)));
6882+ if (ret == (ENTRY_TYPE *) NULL)
6883+ return NULL;
6884+ }
6885+
6886+ /* Call the allocation method of the base class. */
6887+ ret = ((ENTRY_TYPE *)
6888+ BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
6889+
6890+ /* Initialize the local fields here. */
6891+
6892+ return (struct bfd_hash_entry *) ret;
6893+ }
6894+ *Description*
6895+The creation routine for the linker hash table, which is in `linker.c',
6896+looks just like this example. FUNCTION_NAME is
6897+`_bfd_link_hash_newfunc'. ENTRY_TYPE is `struct bfd_link_hash_entry'.
6898+BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
6899+hash table.
6900+
6901+ `_bfd_link_hash_newfunc' also initializes the local fields in a
6902+linker hash table entry: `type', `written' and `next'.
6903+
6904+
6905+File: bfd.info, Node: Write Other Derived Routines, Prev: Write the Derived Creation Routine, Up: Deriving a New Hash Table Type
6906+
6907+2.19.4.3 Write other derived routines
6908+.....................................
6909+
6910+You will want to write other routines for your new hash table, as well.
6911+
6912+ You will want an initialization routine which calls the
6913+initialization routine of the hash table you are deriving from and
6914+initializes any other local fields. For the linker hash table, this is
6915+`_bfd_link_hash_table_init' in `linker.c'.
6916+
6917+ You will want a lookup routine which calls the lookup routine of the
6918+hash table you are deriving from and casts the result. The linker hash
6919+table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
6920+additional argument which it uses to decide how to return the looked up
6921+value).
6922+
6923+ You may want a traversal routine. This should just call the
6924+traversal routine of the hash table you are deriving from with
6925+appropriate casts. The linker hash table uses `bfd_link_hash_traverse'
6926+in `linker.c'.
6927+
6928+ These routines may simply be defined as macros. For example, the
6929+a.out backend linker hash table, which is derived from the linker hash
6930+table, uses macros for the lookup and traversal routines. These are
6931+`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
6932+
6933+
6934+File: bfd.info, Node: BFD back ends, Next: GNU Free Documentation License, Prev: BFD front end, Up: Top
6935+
6936+3 BFD back ends
6937+***************
6938+
6939+* Menu:
6940+
6941+* What to Put Where::
6942+* aout :: a.out backends
6943+* coff :: coff backends
6944+* elf :: elf backends
6945+* mmo :: mmo backend
6946+
6947+
6948+File: bfd.info, Node: What to Put Where, Next: aout, Prev: BFD back ends, Up: BFD back ends
6949+
6950+ All of BFD lives in one directory.
6951+
6952+
6953+File: bfd.info, Node: aout, Next: coff, Prev: What to Put Where, Up: BFD back ends
6954+
6955+3.1 a.out backends
6956+==================
6957+
6958+*Description*
6959+BFD supports a number of different flavours of a.out format, though the
6960+major differences are only the sizes of the structures on disk, and the
6961+shape of the relocation information.
6962+
6963+ The support is split into a basic support file `aoutx.h' and other
6964+files which derive functions from the base. One derivation file is
6965+`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
6966+support for sun3, sun4, 386 and 29k a.out files, to create a target
6967+jump vector for a specific target.
6968+
6969+ This information is further split out into more specific files for
6970+each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
6971+the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
6972+format.
6973+
6974+ The base file `aoutx.h' defines general mechanisms for reading and
6975+writing records to and from disk and various other methods which BFD
6976+requires. It is included by `aout32.c' and `aout64.c' to form the names
6977+`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
6978+
6979+ As an example, this is what goes on to make the back end for a sun4,
6980+from `aout32.c':
6981+
6982+ #define ARCH_SIZE 32
6983+ #include "aoutx.h"
6984+
6985+ Which exports names:
6986+
6987+ ...
6988+ aout_32_canonicalize_reloc
6989+ aout_32_find_nearest_line
6990+ aout_32_get_lineno
6991+ aout_32_get_reloc_upper_bound
6992+ ...
6993+
6994+ from `sunos.c':
6995+
6996+ #define TARGET_NAME "a.out-sunos-big"
6997+ #define VECNAME sunos_big_vec
6998+ #include "aoutf1.h"
6999+
7000+ requires all the names from `aout32.c', and produces the jump vector
7001+
7002+ sunos_big_vec
7003+
7004+ The file `host-aout.c' is a special case. It is for a large set of
7005+hosts that use "more or less standard" a.out files, and for which
7006+cross-debugging is not interesting. It uses the standard 32-bit a.out
7007+support routines, but determines the file offsets and addresses of the
7008+text, data, and BSS sections, the machine architecture and machine
7009+type, and the entry point address, in a host-dependent manner. Once
7010+these values have been determined, generic code is used to handle the
7011+object file.
7012+
7013+ When porting it to run on a new system, you must supply:
7014+
7015+ HOST_PAGE_SIZE
7016+ HOST_SEGMENT_SIZE
7017+ HOST_MACHINE_ARCH (optional)
7018+ HOST_MACHINE_MACHINE (optional)
7019+ HOST_TEXT_START_ADDR
7020+ HOST_STACK_END_ADDR
7021+
7022+ in the file `../include/sys/h-XXX.h' (for your host). These values,
7023+plus the structures and macros defined in `a.out.h' on your host
7024+system, will produce a BFD target that will access ordinary a.out files
7025+on your host. To configure a new machine to use `host-aout.c', specify:
7026+
7027+ TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
7028+ TDEPFILES= host-aout.o trad-core.o
7029+
7030+ in the `config/XXX.mt' file, and modify `configure.in' to use the
7031+`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
7032+is selected.
7033+
7034+3.1.1 Relocations
7035+-----------------
7036+
7037+*Description*
7038+The file `aoutx.h' provides for both the _standard_ and _extended_
7039+forms of a.out relocation records.
7040+
7041+ The standard records contain only an address, a symbol index, and a
7042+type field. The extended records (used on 29ks and sparcs) also have a
7043+full integer for an addend.
7044+
7045+3.1.2 Internal entry points
7046+---------------------------
7047+
7048+*Description*
7049+`aoutx.h' exports several routines for accessing the contents of an
7050+a.out file, which are gathered and exported in turn by various format
7051+specific files (eg sunos.c).
7052+
7053+3.1.2.1 `aout_SIZE_swap_exec_header_in'
7054+.......................................
7055+
7056+*Synopsis*
7057+ void aout_SIZE_swap_exec_header_in,
7058+ (bfd *abfd,
7059+ struct external_exec *raw_bytes,
7060+ struct internal_exec *execp);
7061+ *Description*
7062+Swap the information in an executable header RAW_BYTES taken from a raw
7063+byte stream memory image into the internal exec header structure EXECP.
7064+
7065+3.1.2.2 `aout_SIZE_swap_exec_header_out'
7066+........................................
7067+
7068+*Synopsis*
7069+ void aout_SIZE_swap_exec_header_out
7070+ (bfd *abfd,
7071+ struct internal_exec *execp,
7072+ struct external_exec *raw_bytes);
7073+ *Description*
7074+Swap the information in an internal exec header structure EXECP into
7075+the buffer RAW_BYTES ready for writing to disk.
7076+
7077+3.1.2.3 `aout_SIZE_some_aout_object_p'
7078+......................................
7079+
7080+*Synopsis*
7081+ const bfd_target *aout_SIZE_some_aout_object_p
7082+ (bfd *abfd,
7083+ const bfd_target *(*callback_to_real_object_p) ());
7084+ *Description*
7085+Some a.out variant thinks that the file open in ABFD checking is an
7086+a.out file. Do some more checking, and set up for access if it really
7087+is. Call back to the calling environment's "finish up" function just
7088+before returning, to handle any last-minute setup.
7089+
7090+3.1.2.4 `aout_SIZE_mkobject'
7091+............................
7092+
7093+*Synopsis*
7094+ bfd_boolean aout_SIZE_mkobject, (bfd *abfd);
7095+ *Description*
7096+Initialize BFD ABFD for use with a.out files.
7097+
7098+3.1.2.5 `aout_SIZE_machine_type'
7099+................................
7100+
7101+*Synopsis*
7102+ enum machine_type aout_SIZE_machine_type
7103+ (enum bfd_architecture arch,
7104+ unsigned long machine));
7105+ *Description*
7106+Keep track of machine architecture and machine type for a.out's. Return
7107+the `machine_type' for a particular architecture and machine, or
7108+`M_UNKNOWN' if that exact architecture and machine can't be represented
7109+in a.out format.
7110+
7111+ If the architecture is understood, machine type 0 (default) is
7112+always understood.
7113+
7114+3.1.2.6 `aout_SIZE_set_arch_mach'
7115+.................................
7116+
7117+*Synopsis*
7118+ bfd_boolean aout_SIZE_set_arch_mach,
7119+ (bfd *,
7120+ enum bfd_architecture arch,
7121+ unsigned long machine));
7122+ *Description*
7123+Set the architecture and the machine of the BFD ABFD to the values ARCH
7124+and MACHINE. Verify that ABFD's format can support the architecture
7125+required.
7126+
7127+3.1.2.7 `aout_SIZE_new_section_hook'
7128+....................................
7129+
7130+*Synopsis*
7131+ bfd_boolean aout_SIZE_new_section_hook,
7132+ (bfd *abfd,
7133+ asection *newsect));
7134+ *Description*
7135+Called by the BFD in response to a `bfd_make_section' request.
7136+
7137+
7138+File: bfd.info, Node: coff, Next: elf, Prev: aout, Up: BFD back ends
7139+
7140+3.2 coff backends
7141+=================
7142+
7143+BFD supports a number of different flavours of coff format. The major
7144+differences between formats are the sizes and alignments of fields in
7145+structures on disk, and the occasional extra field.
7146+
7147+ Coff in all its varieties is implemented with a few common files and
7148+a number of implementation specific files. For example, The 88k bcs
7149+coff format is implemented in the file `coff-m88k.c'. This file
7150+`#include's `coff/m88k.h' which defines the external structure of the
7151+coff format for the 88k, and `coff/internal.h' which defines the
7152+internal structure. `coff-m88k.c' also defines the relocations used by
7153+the 88k format *Note Relocations::.
7154+
7155+ The Intel i960 processor version of coff is implemented in
7156+`coff-i960.c'. This file has the same structure as `coff-m88k.c',
7157+except that it includes `coff/i960.h' rather than `coff-m88k.h'.
7158+
7159+3.2.1 Porting to a new version of coff
7160+--------------------------------------
7161+
7162+The recommended method is to select from the existing implementations
7163+the version of coff which is most like the one you want to use. For
7164+example, we'll say that i386 coff is the one you select, and that your
7165+coff flavour is called foo. Copy `i386coff.c' to `foocoff.c', copy
7166+`../include/coff/i386.h' to `../include/coff/foo.h', and add the lines
7167+to `targets.c' and `Makefile.in' so that your new back end is used.
7168+Alter the shapes of the structures in `../include/coff/foo.h' so that
7169+they match what you need. You will probably also have to add `#ifdef's
7170+to the code in `coff/internal.h' and `coffcode.h' if your version of
7171+coff is too wild.
7172+
7173+ You can verify that your new BFD backend works quite simply by
7174+building `objdump' from the `binutils' directory, and making sure that
7175+its version of what's going on and your host system's idea (assuming it
7176+has the pretty standard coff dump utility, usually called `att-dump' or
7177+just `dump') are the same. Then clean up your code, and send what
7178+you've done to Cygnus. Then your stuff will be in the next release, and
7179+you won't have to keep integrating it.
7180+
7181+3.2.2 How the coff backend works
7182+--------------------------------
7183+
7184+3.2.2.1 File layout
7185+...................
7186+
7187+The Coff backend is split into generic routines that are applicable to
7188+any Coff target and routines that are specific to a particular target.
7189+The target-specific routines are further split into ones which are
7190+basically the same for all Coff targets except that they use the
7191+external symbol format or use different values for certain constants.
7192+
7193+ The generic routines are in `coffgen.c'. These routines work for
7194+any Coff target. They use some hooks into the target specific code;
7195+the hooks are in a `bfd_coff_backend_data' structure, one of which
7196+exists for each target.
7197+
7198+ The essentially similar target-specific routines are in
7199+`coffcode.h'. This header file includes executable C code. The
7200+various Coff targets first include the appropriate Coff header file,
7201+make any special defines that are needed, and then include `coffcode.h'.
7202+
7203+ Some of the Coff targets then also have additional routines in the
7204+target source file itself.
7205+
7206+ For example, `coff-i960.c' includes `coff/internal.h' and
7207+`coff/i960.h'. It then defines a few constants, such as `I960', and
7208+includes `coffcode.h'. Since the i960 has complex relocation types,
7209+`coff-i960.c' also includes some code to manipulate the i960 relocs.
7210+This code is not in `coffcode.h' because it would not be used by any
7211+other target.
7212+
7213+3.2.2.2 Bit twiddling
7214+.....................
7215+
7216+Each flavour of coff supported in BFD has its own header file
7217+describing the external layout of the structures. There is also an
7218+internal description of the coff layout, in `coff/internal.h'. A major
7219+function of the coff backend is swapping the bytes and twiddling the
7220+bits to translate the external form of the structures into the normal
7221+internal form. This is all performed in the `bfd_swap'_thing_direction
7222+routines. Some elements are different sizes between different versions
7223+of coff; it is the duty of the coff version specific include file to
7224+override the definitions of various packing routines in `coffcode.h'.
7225+E.g., the size of line number entry in coff is sometimes 16 bits, and
7226+sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
7227+will select the correct one. No doubt, some day someone will find a
7228+version of coff which has a varying field size not catered to at the
7229+moment. To port BFD, that person will have to add more `#defines'.
7230+Three of the bit twiddling routines are exported to `gdb';
7231+`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
7232+reads the symbol table on its own, but uses BFD to fix things up. More
7233+of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
7234+`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
7235+`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
7236+`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
7237+table and reloc drudgery itself, thereby saving the internal BFD
7238+overhead, but uses BFD to swap things on the way out, making cross
7239+ports much safer. Doing so also allows BFD (and thus the linker) to
7240+use the same header files as `gas', which makes one avenue to disaster
7241+disappear.
7242+
7243+3.2.2.3 Symbol reading
7244+......................
7245+
7246+The simple canonical form for symbols used by BFD is not rich enough to
7247+keep all the information available in a coff symbol table. The back end
7248+gets around this problem by keeping the original symbol table around,
7249+"behind the scenes".
7250+
7251+ When a symbol table is requested (through a call to
7252+`bfd_canonicalize_symtab'), a request gets through to
7253+`coff_get_normalized_symtab'. This reads the symbol table from the coff
7254+file and swaps all the structures inside into the internal form. It
7255+also fixes up all the pointers in the table (represented in the file by
7256+offsets from the first symbol in the table) into physical pointers to
7257+elements in the new internal table. This involves some work since the
7258+meanings of fields change depending upon context: a field that is a
7259+pointer to another structure in the symbol table at one moment may be
7260+the size in bytes of a structure at the next. Another pass is made
7261+over the table. All symbols which mark file names (`C_FILE' symbols)
7262+are modified so that the internal string points to the value in the
7263+auxent (the real filename) rather than the normal text associated with
7264+the symbol (`".file"').
7265+
7266+ At this time the symbol names are moved around. Coff stores all
7267+symbols less than nine characters long physically within the symbol
7268+table; longer strings are kept at the end of the file in the string
7269+table. This pass moves all strings into memory and replaces them with
7270+pointers to the strings.
7271+
7272+ The symbol table is massaged once again, this time to create the
7273+canonical table used by the BFD application. Each symbol is inspected
7274+in turn, and a decision made (using the `sclass' field) about the
7275+various flags to set in the `asymbol'. *Note Symbols::. The generated
7276+canonical table shares strings with the hidden internal symbol table.
7277+
7278+ Any linenumbers are read from the coff file too, and attached to the
7279+symbols which own the functions the linenumbers belong to.
7280+
7281+3.2.2.4 Symbol writing
7282+......................
7283+
7284+Writing a symbol to a coff file which didn't come from a coff file will
7285+lose any debugging information. The `asymbol' structure remembers the
7286+BFD from which the symbol was taken, and on output the back end makes
7287+sure that the same destination target as source target is present.
7288+
7289+ When the symbols have come from a coff file then all the debugging
7290+information is preserved.
7291+
7292+ Symbol tables are provided for writing to the back end in a vector
7293+of pointers to pointers. This allows applications like the linker to
7294+accumulate and output large symbol tables without having to do too much
7295+byte copying.
7296+
7297+ This function runs through the provided symbol table and patches
7298+each symbol marked as a file place holder (`C_FILE') to point to the
7299+next file place holder in the list. It also marks each `offset' field
7300+in the list with the offset from the first symbol of the current symbol.
7301+
7302+ Another function of this procedure is to turn the canonical value
7303+form of BFD into the form used by coff. Internally, BFD expects symbol
7304+values to be offsets from a section base; so a symbol physically at
7305+0x120, but in a section starting at 0x100, would have the value 0x20.
7306+Coff expects symbols to contain their final value, so symbols have
7307+their values changed at this point to reflect their sum with their
7308+owning section. This transformation uses the `output_section' field of
7309+the `asymbol''s `asection' *Note Sections::.
7310+
7311+ * `coff_mangle_symbols'
7312+ This routine runs though the provided symbol table and uses the
7313+offsets generated by the previous pass and the pointers generated when
7314+the symbol table was read in to create the structured hierarchy
7315+required by coff. It changes each pointer to a symbol into the index
7316+into the symbol table of the asymbol.
7317+
7318+ * `coff_write_symbols'
7319+ This routine runs through the symbol table and patches up the
7320+symbols from their internal form into the coff way, calls the bit
7321+twiddlers, and writes out the table to the file.
7322+
7323+3.2.2.5 `coff_symbol_type'
7324+..........................
7325+
7326+*Description*
7327+The hidden information for an `asymbol' is described in a
7328+`combined_entry_type':
7329+
7330+
7331+ typedef struct coff_ptr_struct
7332+ {
7333+ /* Remembers the offset from the first symbol in the file for
7334+ this symbol. Generated by coff_renumber_symbols. */
7335+ unsigned int offset;
7336+
7337+ /* Should the value of this symbol be renumbered. Used for
7338+ XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
7339+ unsigned int fix_value : 1;
7340+
7341+ /* Should the tag field of this symbol be renumbered.
7342+ Created by coff_pointerize_aux. */
7343+ unsigned int fix_tag : 1;
7344+
7345+ /* Should the endidx field of this symbol be renumbered.
7346+ Created by coff_pointerize_aux. */
7347+ unsigned int fix_end : 1;
7348+
7349+ /* Should the x_csect.x_scnlen field be renumbered.
7350+ Created by coff_pointerize_aux. */
7351+ unsigned int fix_scnlen : 1;
7352+
7353+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
7354+ index into the line number entries. Set by coff_slurp_symbol_table. */
7355+ unsigned int fix_line : 1;
7356+
7357+ /* The container for the symbol structure as read and translated
7358+ from the file. */
7359+ union
7360+ {
7361+ union internal_auxent auxent;
7362+ struct internal_syment syment;
7363+ } u;
7364+ } combined_entry_type;
7365+
7366+
7367+ /* Each canonical asymbol really looks like this: */
7368+
7369+ typedef struct coff_symbol_struct
7370+ {
7371+ /* The actual symbol which the rest of BFD works with */
7372+ asymbol symbol;
7373+
7374+ /* A pointer to the hidden information for this symbol */
7375+ combined_entry_type *native;
7376+
7377+ /* A pointer to the linenumber information for this symbol */
7378+ struct lineno_cache_entry *lineno;
7379+
7380+ /* Have the line numbers been relocated yet ? */
7381+ bfd_boolean done_lineno;
7382+ } coff_symbol_type;
7383+
7384+3.2.2.6 `bfd_coff_backend_data'
7385+...............................
7386+
7387+ /* COFF symbol classifications. */
7388+
7389+ enum coff_symbol_classification
7390+ {
7391+ /* Global symbol. */
7392+ COFF_SYMBOL_GLOBAL,
7393+ /* Common symbol. */
7394+ COFF_SYMBOL_COMMON,
7395+ /* Undefined symbol. */
7396+ COFF_SYMBOL_UNDEFINED,
7397+ /* Local symbol. */
7398+ COFF_SYMBOL_LOCAL,
7399+ /* PE section symbol. */
7400+ COFF_SYMBOL_PE_SECTION
7401+ };
7402+Special entry points for gdb to swap in coff symbol table parts:
7403+ typedef struct
7404+ {
7405+ void (*_bfd_coff_swap_aux_in)
7406+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
7407+
7408+ void (*_bfd_coff_swap_sym_in)
7409+ PARAMS ((bfd *, PTR, PTR));
7410+
7411+ void (*_bfd_coff_swap_lineno_in)
7412+ PARAMS ((bfd *, PTR, PTR));
7413+
7414+ unsigned int (*_bfd_coff_swap_aux_out)
7415+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
7416+
7417+ unsigned int (*_bfd_coff_swap_sym_out)
7418+ PARAMS ((bfd *, PTR, PTR));
7419+
7420+ unsigned int (*_bfd_coff_swap_lineno_out)
7421+ PARAMS ((bfd *, PTR, PTR));
7422+
7423+ unsigned int (*_bfd_coff_swap_reloc_out)
7424+ PARAMS ((bfd *, PTR, PTR));
7425+
7426+ unsigned int (*_bfd_coff_swap_filehdr_out)
7427+ PARAMS ((bfd *, PTR, PTR));
7428+
7429+ unsigned int (*_bfd_coff_swap_aouthdr_out)
7430+ PARAMS ((bfd *, PTR, PTR));
7431+
7432+ unsigned int (*_bfd_coff_swap_scnhdr_out)
7433+ PARAMS ((bfd *, PTR, PTR));
7434+
7435+ unsigned int _bfd_filhsz;
7436+ unsigned int _bfd_aoutsz;
7437+ unsigned int _bfd_scnhsz;
7438+ unsigned int _bfd_symesz;
7439+ unsigned int _bfd_auxesz;
7440+ unsigned int _bfd_relsz;
7441+ unsigned int _bfd_linesz;
7442+ unsigned int _bfd_filnmlen;
7443+ bfd_boolean _bfd_coff_long_filenames;
7444+ bfd_boolean _bfd_coff_long_section_names;
7445+ unsigned int _bfd_coff_default_section_alignment_power;
7446+ bfd_boolean _bfd_coff_force_symnames_in_strings;
7447+ unsigned int _bfd_coff_debug_string_prefix_length;
7448+
7449+ void (*_bfd_coff_swap_filehdr_in)
7450+ PARAMS ((bfd *, PTR, PTR));
7451+
7452+ void (*_bfd_coff_swap_aouthdr_in)
7453+ PARAMS ((bfd *, PTR, PTR));
7454+
7455+ void (*_bfd_coff_swap_scnhdr_in)
7456+ PARAMS ((bfd *, PTR, PTR));
7457+
7458+ void (*_bfd_coff_swap_reloc_in)
7459+ PARAMS ((bfd *abfd, PTR, PTR));
7460+
7461+ bfd_boolean (*_bfd_coff_bad_format_hook)
7462+ PARAMS ((bfd *, PTR));
7463+
7464+ bfd_boolean (*_bfd_coff_set_arch_mach_hook)
7465+ PARAMS ((bfd *, PTR));
7466+
7467+ PTR (*_bfd_coff_mkobject_hook)
7468+ PARAMS ((bfd *, PTR, PTR));
7469+
7470+ bfd_boolean (*_bfd_styp_to_sec_flags_hook)
7471+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
7472+
7473+ void (*_bfd_set_alignment_hook)
7474+ PARAMS ((bfd *, asection *, PTR));
7475+
7476+ bfd_boolean (*_bfd_coff_slurp_symbol_table)
7477+ PARAMS ((bfd *));
7478+
7479+ bfd_boolean (*_bfd_coff_symname_in_debug)
7480+ PARAMS ((bfd *, struct internal_syment *));
7481+
7482+ bfd_boolean (*_bfd_coff_pointerize_aux_hook)
7483+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
7484+ unsigned int, combined_entry_type *));
7485+
7486+ bfd_boolean (*_bfd_coff_print_aux)
7487+ PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
7488+ combined_entry_type *, unsigned int));
7489+
7490+ void (*_bfd_coff_reloc16_extra_cases)
7491+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
7492+ bfd_byte *, unsigned int *, unsigned int *));
7493+
7494+ int (*_bfd_coff_reloc16_estimate)
7495+ PARAMS ((bfd *, asection *, arelent *, unsigned int,
7496+ struct bfd_link_info *));
7497+
7498+ enum coff_symbol_classification (*_bfd_coff_classify_symbol)
7499+ PARAMS ((bfd *, struct internal_syment *));
7500+
7501+ bfd_boolean (*_bfd_coff_compute_section_file_positions)
7502+ PARAMS ((bfd *));
7503+
7504+ bfd_boolean (*_bfd_coff_start_final_link)
7505+ PARAMS ((bfd *, struct bfd_link_info *));
7506+
7507+ bfd_boolean (*_bfd_coff_relocate_section)
7508+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
7509+ struct internal_reloc *, struct internal_syment *, asection **));
7510+
7511+ reloc_howto_type *(*_bfd_coff_rtype_to_howto)
7512+ PARAMS ((bfd *, asection *, struct internal_reloc *,
7513+ struct coff_link_hash_entry *, struct internal_syment *,
7514+ bfd_vma *));
7515+
7516+ bfd_boolean (*_bfd_coff_adjust_symndx)
7517+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
7518+ struct internal_reloc *, bfd_boolean *));
7519+
7520+ bfd_boolean (*_bfd_coff_link_add_one_symbol)
7521+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
7522+ asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
7523+ struct bfd_link_hash_entry **));
7524+
7525+ bfd_boolean (*_bfd_coff_link_output_has_begun)
7526+ PARAMS ((bfd *, struct coff_final_link_info *));
7527+
7528+ bfd_boolean (*_bfd_coff_final_link_postscript)
7529+ PARAMS ((bfd *, struct coff_final_link_info *));
7530+
7531+ } bfd_coff_backend_data;
7532+
7533+ #define coff_backend_info(abfd) \
7534+ ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
7535+
7536+ #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
7537+ ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
7538+
7539+ #define bfd_coff_swap_sym_in(a,e,i) \
7540+ ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
7541+
7542+ #define bfd_coff_swap_lineno_in(a,e,i) \
7543+ ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
7544+
7545+ #define bfd_coff_swap_reloc_out(abfd, i, o) \
7546+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
7547+
7548+ #define bfd_coff_swap_lineno_out(abfd, i, o) \
7549+ ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
7550+
7551+ #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
7552+ ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
7553+
7554+ #define bfd_coff_swap_sym_out(abfd, i,o) \
7555+ ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
7556+
7557+ #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
7558+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
7559+
7560+ #define bfd_coff_swap_filehdr_out(abfd, i,o) \
7561+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
7562+
7563+ #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
7564+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
7565+
7566+ #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
7567+ #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
7568+ #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
7569+ #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
7570+ #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
7571+ #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
7572+ #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
7573+ #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
7574+ #define bfd_coff_long_filenames(abfd) \
7575+ (coff_backend_info (abfd)->_bfd_coff_long_filenames)
7576+ #define bfd_coff_long_section_names(abfd) \
7577+ (coff_backend_info (abfd)->_bfd_coff_long_section_names)
7578+ #define bfd_coff_default_section_alignment_power(abfd) \
7579+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
7580+ #define bfd_coff_swap_filehdr_in(abfd, i,o) \
7581+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
7582+
7583+ #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
7584+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
7585+
7586+ #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
7587+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
7588+
7589+ #define bfd_coff_swap_reloc_in(abfd, i, o) \
7590+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
7591+
7592+ #define bfd_coff_bad_format_hook(abfd, filehdr) \
7593+ ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
7594+
7595+ #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
7596+ ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
7597+ #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
7598+ ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
7599+ (abfd, filehdr, aouthdr))
7600+
7601+ #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
7602+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
7603+ (abfd, scnhdr, name, section, flags_ptr))
7604+
7605+ #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
7606+ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
7607+
7608+ #define bfd_coff_slurp_symbol_table(abfd)\
7609+ ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
7610+
7611+ #define bfd_coff_symname_in_debug(abfd, sym)\
7612+ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
7613+
7614+ #define bfd_coff_force_symnames_in_strings(abfd)\
7615+ (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
7616+
7617+ #define bfd_coff_debug_string_prefix_length(abfd)\
7618+ (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
7619+
7620+ #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
7621+ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
7622+ (abfd, file, base, symbol, aux, indaux))
7623+
7624+ #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
7625+ reloc, data, src_ptr, dst_ptr)\
7626+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
7627+ (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
7628+
7629+ #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
7630+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
7631+ (abfd, section, reloc, shrink, link_info))
7632+
7633+ #define bfd_coff_classify_symbol(abfd, sym)\
7634+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
7635+ (abfd, sym))
7636+
7637+ #define bfd_coff_compute_section_file_positions(abfd)\
7638+ ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
7639+ (abfd))
7640+
7641+ #define bfd_coff_start_final_link(obfd, info)\
7642+ ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
7643+ (obfd, info))
7644+ #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
7645+ ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
7646+ (obfd, info, ibfd, o, con, rel, isyms, secs))
7647+ #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
7648+ ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
7649+ (abfd, sec, rel, h, sym, addendp))
7650+ #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
7651+ ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
7652+ (obfd, info, ibfd, sec, rel, adjustedp))
7653+ #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
7654+ value, string, cp, coll, hashp)\
7655+ ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
7656+ (info, abfd, name, flags, section, value, string, cp, coll, hashp))
7657+
7658+ #define bfd_coff_link_output_has_begun(a,p) \
7659+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
7660+ #define bfd_coff_final_link_postscript(a,p) \
7661+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
7662+
7663+3.2.2.7 Writing relocations
7664+...........................
7665+
7666+To write relocations, the back end steps though the canonical
7667+relocation table and create an `internal_reloc'. The symbol index to
7668+use is removed from the `offset' field in the symbol table supplied.
7669+The address comes directly from the sum of the section base address and
7670+the relocation offset; the type is dug directly from the howto field.
7671+Then the `internal_reloc' is swapped into the shape of an
7672+`external_reloc' and written out to disk.
7673+
7674+3.2.2.8 Reading linenumbers
7675+...........................
7676+
7677+Creating the linenumber table is done by reading in the entire coff
7678+linenumber table, and creating another table for internal use.
7679+
7680+ A coff linenumber table is structured so that each function is
7681+marked as having a line number of 0. Each line within the function is
7682+an offset from the first line in the function. The base of the line
7683+number information for the table is stored in the symbol associated
7684+with the function.
7685+
7686+ Note: The PE format uses line number 0 for a flag indicating a new
7687+source file.
7688+
7689+ The information is copied from the external to the internal table,
7690+and each symbol which marks a function is marked by pointing its...
7691+
7692+ How does this work ?
7693+
7694+3.2.2.9 Reading relocations
7695+...........................
7696+
7697+Coff relocations are easily transformed into the internal BFD form
7698+(`arelent').
7699+
7700+ Reading a coff relocation table is done in the following stages:
7701+
7702+ * Read the entire coff relocation table into memory.
7703+
7704+ * Process each relocation in turn; first swap it from the external
7705+ to the internal form.
7706+
7707+ * Turn the symbol referenced in the relocation's symbol index into a
7708+ pointer into the canonical symbol table. This table is the same
7709+ as the one returned by a call to `bfd_canonicalize_symtab'. The
7710+ back end will call that routine and save the result if a
7711+ canonicalization hasn't been done.
7712+
7713+ * The reloc index is turned into a pointer to a howto structure, in
7714+ a back end specific way. For instance, the 386 and 960 use the
7715+ `r_type' to directly produce an index into a howto table vector;
7716+ the 88k subtracts a number from the `r_type' field and creates an
7717+ addend field.
7718+
7719+
7720+File: bfd.info, Node: elf, Next: mmo, Prev: coff, Up: BFD back ends
7721+
7722+3.3
7723+===
7724+
7725+ELF backends
7726+
7727+ BFD support for ELF formats is being worked on. Currently, the best
7728+supported back ends are for sparc and i386 (running svr4 or Solaris 2).
7729+
7730+ Documentation of the internals of the support code still needs to be
7731+written. The code is changing quickly enough that we haven't bothered
7732+yet.
7733+
7734+3.3.0.1 `bfd_elf_find_section'
7735+..............................
7736+
7737+*Synopsis*
7738+ struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
7739+ *Description*
7740+Helper functions for GDB to locate the string tables. Since BFD hides
7741+string tables from callers, GDB needs to use an internal hook to find
7742+them. Sun's .stabstr, in particular, isn't even pointed to by the
7743+.stab section, so ordinary mechanisms wouldn't work to find it, even if
7744+we had some.
7745+
7746+
7747+File: bfd.info, Node: mmo, Prev: elf, Up: BFD back ends
7748+
7749+3.4 mmo backend
7750+===============
7751+
7752+The mmo object format is used exclusively together with Professor
7753+Donald E. Knuth's educational 64-bit processor MMIX. The simulator
7754+`mmix' which is available at
7755+`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'
7756+understands this format. That package also includes a combined
7757+assembler and linker called `mmixal'. The mmo format has no advantages
7758+feature-wise compared to e.g. ELF. It is a simple non-relocatable
7759+object format with no support for archives or debugging information,
7760+except for symbol value information and line numbers (which is not yet
7761+implemented in BFD). See
7762+`http://www-cs-faculty.stanford.edu/~knuth/mmix.html' for more
7763+information about MMIX. The ELF format is used for intermediate object
7764+files in the BFD implementation.
7765+
7766+* Menu:
7767+
7768+* File layout::
7769+* Symbol-table::
7770+* mmo section mapping::
7771+
7772+
7773+File: bfd.info, Node: File layout, Next: Symbol-table, Prev: mmo, Up: mmo
7774+
7775+3.4.1 File layout
7776+-----------------
7777+
7778+The mmo file contents is not partitioned into named sections as with
7779+e.g. ELF. Memory areas is formed by specifying the location of the
7780+data that follows. Only the memory area `0x0000...00' to `0x01ff...ff'
7781+is executable, so it is used for code (and constants) and the area
7782+`0x2000...00' to `0x20ff...ff' is used for writable data. *Note mmo
7783+section mapping::.
7784+
7785+ There is provision for specifying "special data" of 65536 different
7786+types. We use type 80 (decimal), arbitrarily chosen the same as the
7787+ELF `e_machine' number for MMIX, filling it with section information
7788+normally found in ELF objects. *Note mmo section mapping::.
7789+
7790+ Contents is entered as 32-bit words, xor:ed over previous contents,
7791+always zero-initialized. A word that starts with the byte `0x98' forms
7792+a command called a `lopcode', where the next byte distinguished between
7793+the thirteen lopcodes. The two remaining bytes, called the `Y' and `Z'
7794+fields, or the `YZ' field (a 16-bit big-endian number), are used for
7795+various purposes different for each lopcode. As documented in
7796+`http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz', the
7797+lopcodes are:
7798+
7799+`lop_quote'
7800+ 0x98000001. The next word is contents, regardless of whether it
7801+ starts with 0x98 or not.
7802+
7803+`lop_loc'
7804+ 0x9801YYZZ, where `Z' is 1 or 2. This is a location directive,
7805+ setting the location for the next data to the next 32-bit word
7806+ (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56. Normally
7807+ `Y' is 0 for the text segment and 2 for the data segment.
7808+
7809+`lop_skip'
7810+ 0x9802YYZZ. Increase the current location by `YZ' bytes.
7811+
7812+`lop_fixo'
7813+ 0x9803YYZZ, where `Z' is 1 or 2. Store the current location as 64
7814+ bits into the location pointed to by the next 32-bit (Z = 1) or
7815+ 64-bit (Z = 2) word, plus Y * 2^56.
7816+
7817+`lop_fixr'
7818+ 0x9804YYZZ. `YZ' is stored into the current location plus 2 - 4 *
7819+ YZ.
7820+
7821+`lop_fixrx'
7822+ 0x980500ZZ. `Z' is 16 or 24. A value `L' derived from the
7823+ following 32-bit word are used in a manner similar to `YZ' in
7824+ lop_fixr: it is xor:ed into the current location minus 4 * L. The
7825+ first byte of the word is 0 or 1. If it is 1, then L = (LOWEST 24
7826+ BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
7827+
7828+`lop_file'
7829+ 0x9806YYZZ. `Y' is the file number, `Z' is count of 32-bit words.
7830+ Set the file number to `Y' and the line counter to 0. The next Z
7831+ * 4 bytes contain the file name, padded with zeros if the count is
7832+ not a multiple of four. The same `Y' may occur multiple times,
7833+ but `Z' must be 0 for all but the first occurrence.
7834+
7835+`lop_line'
7836+ 0x9807YYZZ. `YZ' is the line number. Together with lop_file, it
7837+ forms the source location for the next 32-bit word. Note that for
7838+ each non-lopcode 32-bit word, line numbers are assumed incremented
7839+ by one.
7840+
7841+`lop_spec'
7842+ 0x9808YYZZ. `YZ' is the type number. Data until the next lopcode
7843+ other than lop_quote forms special data of type `YZ'. *Note mmo
7844+ section mapping::.
7845+
7846+ Other types than 80, (or type 80 with a content that does not
7847+ parse) is stored in sections named `.MMIX.spec_data.N' where N is
7848+ the `YZ'-type. The flags for such a sections say not to allocate
7849+ or load the data. The vma is 0. Contents of multiple occurrences
7850+ of special data N is concatenated to the data of the previous
7851+ lop_spec Ns. The location in data or code at which the lop_spec
7852+ occurred is lost.
7853+
7854+`lop_pre'
7855+ 0x980901ZZ. The first lopcode in a file. The `Z' field forms the
7856+ length of header information in 32-bit words, where the first word
7857+ tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
7858+
7859+`lop_post'
7860+ 0x980a00ZZ. Z > 32. This lopcode follows after all
7861+ content-generating lopcodes in a program. The `Z' field denotes
7862+ the value of `rG' at the beginning of the program. The following
7863+ 256 - Z big-endian 64-bit words are loaded into global registers
7864+ `$G' ... `$255'.
7865+
7866+`lop_stab'
7867+ 0x980b0000. The next-to-last lopcode in a program. Must follow
7868+ immediately after the lop_post lopcode and its data. After this
7869+ lopcode follows all symbols in a compressed format (*note
7870+ Symbol-table::).
7871+
7872+`lop_end'
7873+ 0x980cYYZZ. The last lopcode in a program. It must follow the
7874+ lop_stab lopcode and its data. The `YZ' field contains the number
7875+ of 32-bit words of symbol table information after the preceding
7876+ lop_stab lopcode.
7877+
7878+ Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
7879+`lop_fixo' are not generated by BFD, but are handled. They are
7880+generated by `mmixal'.
7881+
7882+ This trivial one-label, one-instruction file:
7883+
7884+ :Main TRAP 1,2,3
7885+
7886+ can be represented this way in mmo:
7887+
7888+ 0x98090101 - lop_pre, one 32-bit word with timestamp.
7889+ <timestamp>
7890+ 0x98010002 - lop_loc, text segment, using a 64-bit address.
7891+ Note that mmixal does not emit this for the file above.
7892+ 0x00000000 - Address, high 32 bits.
7893+ 0x00000000 - Address, low 32 bits.
7894+ 0x98060002 - lop_file, 2 32-bit words for file-name.
7895+ 0x74657374 - "test"
7896+ 0x2e730000 - ".s\0\0"
7897+ 0x98070001 - lop_line, line 1.
7898+ 0x00010203 - TRAP 1,2,3
7899+ 0x980a00ff - lop_post, setting $255 to 0.
7900+ 0x00000000
7901+ 0x00000000
7902+ 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
7903+ 0x203a4040 *Note Symbol-table::.
7904+ 0x10404020
7905+ 0x4d206120
7906+ 0x69016e00
7907+ 0x81000000
7908+ 0x980c0005 - lop_end; symbol table contained five 32-bit words.
7909+
7910+
7911+File: bfd.info, Node: Symbol-table, Next: mmo section mapping, Prev: File layout, Up: mmo
7912+
7913+3.4.2 Symbol table format
7914+-------------------------
7915+
7916+From mmixal.w (or really, the generated mmixal.tex) in
7917+`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'):
7918+"Symbols are stored and retrieved by means of a `ternary search trie',
7919+following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on
7920+Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C'
7921+(Reading, Mass. Addison-Wesley, 1998), `15.4'.) Each trie node stores
7922+a character, and there are branches to subtries for the cases where a
7923+given character is less than, equal to, or greater than the character
7924+in the trie. There also is a pointer to a symbol table entry if a
7925+symbol ends at the current node."
7926+
7927+ So it's a tree encoded as a stream of bytes. The stream of bytes
7928+acts on a single virtual global symbol, adding and removing characters
7929+and signalling complete symbol points. Here, we read the stream and
7930+create symbols at the completion points.
7931+
7932+ First, there's a control byte `m'. If any of the listed bits in `m'
7933+is nonzero, we execute what stands at the right, in the listed order:
7934+
7935+ (MMO3_LEFT)
7936+ 0x40 - Traverse left trie.
7937+ (Read a new command byte and recurse.)
7938+
7939+ (MMO3_SYMBITS)
7940+ 0x2f - Read the next byte as a character and store it in the
7941+ current character position; increment character position.
7942+ Test the bits of `m':
7943+
7944+ (MMO3_WCHAR)
7945+ 0x80 - The character is 16-bit (so read another byte,
7946+ merge into current character.
7947+
7948+ (MMO3_TYPEBITS)
7949+ 0xf - We have a complete symbol; parse the type, value
7950+ and serial number and do what should be done
7951+ with a symbol. The type and length information
7952+ is in j = (m & 0xf).
7953+
7954+ (MMO3_REGQUAL_BITS)
7955+ j == 0xf: A register variable. The following
7956+ byte tells which register.
7957+ j <= 8: An absolute symbol. Read j bytes as the
7958+ big-endian number the symbol equals.
7959+ A j = 2 with two zero bytes denotes an
7960+ unknown symbol.
7961+ j > 8: As with j <= 8, but add (0x20 << 56)
7962+ to the value in the following j - 8
7963+ bytes.
7964+
7965+ Then comes the serial number, as a variant of
7966+ uleb128, but better named ubeb128:
7967+ Read bytes and shift the previous value left 7
7968+ (multiply by 128). Add in the new byte, repeat
7969+ until a byte has bit 7 set. The serial number
7970+ is the computed value minus 128.
7971+
7972+ (MMO3_MIDDLE)
7973+ 0x20 - Traverse middle trie. (Read a new command byte
7974+ and recurse.) Decrement character position.
7975+
7976+ (MMO3_RIGHT)
7977+ 0x10 - Traverse right trie. (Read a new command byte and
7978+ recurse.)
7979+
7980+ Let's look again at the `lop_stab' for the trivial file (*note File
7981+layout::).
7982+
7983+ 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
7984+ 0x203a4040
7985+ 0x10404020
7986+ 0x4d206120
7987+ 0x69016e00
7988+ 0x81000000
7989+
7990+ This forms the trivial trie (note that the path between ":" and "M"
7991+is redundant):
7992+
7993+ 203a ":"
7994+ 40 /
7995+ 40 /
7996+ 10 \
7997+ 40 /
7998+ 40 /
7999+ 204d "M"
8000+ 2061 "a"
8001+ 2069 "i"
8002+ 016e "n" is the last character in a full symbol, and
8003+ with a value represented in one byte.
8004+ 00 The value is 0.
8005+ 81 The serial number is 1.
8006+
8007+
8008+File: bfd.info, Node: mmo section mapping, Prev: Symbol-table, Up: mmo
8009+
8010+3.4.3 mmo section mapping
8011+-------------------------
8012+
8013+The implementation in BFD uses special data type 80 (decimal) to
8014+encapsulate and describe named sections, containing e.g. debug
8015+information. If needed, any datum in the encapsulation will be quoted
8016+using lop_quote. First comes a 32-bit word holding the number of
8017+32-bit words containing the zero-terminated zero-padded segment name.
8018+After the name there's a 32-bit word holding flags describing the
8019+section type. Then comes a 64-bit big-endian word with the section
8020+length (in bytes), then another with the section start address.
8021+Depending on the type of section, the contents might follow,
8022+zero-padded to 32-bit boundary. For a loadable section (such as data
8023+or code), the contents might follow at some later point, not
8024+necessarily immediately, as a lop_loc with the same start address as in
8025+the section description, followed by the contents. This in effect
8026+forms a descriptor that must be emitted before the actual contents.
8027+Sections described this way must not overlap.
8028+
8029+ For areas that don't have such descriptors, synthetic sections are
8030+formed by BFD. Consecutive contents in the two memory areas
8031+`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
8032+entered in sections named `.text' and `.data' respectively. If an area
8033+is not otherwise described, but would together with a neighboring lower
8034+area be less than `0x40000000' bytes long, it is joined with the lower
8035+area and the gap is zero-filled. For other cases, a new section is
8036+formed, named `.MMIX.sec.N'. Here, N is a number, a running count
8037+through the mmo file, starting at 0.
8038+
8039+ A loadable section specified as:
8040+
8041+ .section secname,"ax"
8042+ TETRA 1,2,3,4,-1,-2009
8043+ BYTE 80
8044+
8045+ and linked to address `0x4', is represented by the sequence:
8046+
8047+ 0x98080050 - lop_spec 80
8048+ 0x00000002 - two 32-bit words for the section name
8049+ 0x7365636e - "secn"
8050+ 0x616d6500 - "ame\0"
8051+ 0x00000033 - flags CODE, READONLY, LOAD, ALLOC
8052+ 0x00000000 - high 32 bits of section length
8053+ 0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
8054+ 0x00000000 - high 32 bits of section address
8055+ 0x00000004 - section address is 4
8056+ 0x98010002 - 64 bits with address of following data
8057+ 0x00000000 - high 32 bits of address
8058+ 0x00000004 - low 32 bits: data starts at address 4
8059+ 0x00000001 - 1
8060+ 0x00000002 - 2
8061+ 0x00000003 - 3
8062+ 0x00000004 - 4
8063+ 0xffffffff - -1
8064+ 0xfffff827 - -2009
8065+ 0x50000000 - 80 as a byte, padded with zeros.
8066+
8067+ Note that the lop_spec wrapping does not include the section
8068+contents. Compare this to a non-loaded section specified as:
8069+
8070+ .section thirdsec
8071+ TETRA 200001,100002
8072+ BYTE 38,40
8073+
8074+ This, when linked to address `0x200000000000001c', is represented by:
8075+
8076+ 0x98080050 - lop_spec 80
8077+ 0x00000002 - two 32-bit words for the section name
8078+ 0x7365636e - "thir"
8079+ 0x616d6500 - "dsec"
8080+ 0x00000010 - flag READONLY
8081+ 0x00000000 - high 32 bits of section length
8082+ 0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
8083+ 0x20000000 - high 32 bits of address
8084+ 0x0000001c - low 32 bits of address 0x200000000000001c
8085+ 0x00030d41 - 200001
8086+ 0x000186a2 - 100002
8087+ 0x26280000 - 38, 40 as bytes, padded with zeros
8088+
8089+ For the latter example, the section contents must not be loaded in
8090+memory, and is therefore specified as part of the special data. The
8091+address is usually unimportant but might provide information for e.g.
8092+the DWARF 2 debugging format.
8093+
8094+
8095+File: bfd.info, Node: GNU Free Documentation License, Next: Index, Prev: BFD back ends, Up: Top
8096+
8097+Appendix A GNU Free Documentation License
8098+*****************************************
8099+
8100+ Version 1.1, March 2000
8101+
8102+ Copyright (C) 2000, 2003 Free Software Foundation, Inc.
8103+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8104+
8105+ Everyone is permitted to copy and distribute verbatim copies
8106+ of this license document, but changing it is not allowed.
8107+
8108+
8109+ 0. PREAMBLE
8110+
8111+ The purpose of this License is to make a manual, textbook, or other
8112+ written document "free" in the sense of freedom: to assure everyone
8113+ the effective freedom to copy and redistribute it, with or without
8114+ modifying it, either commercially or noncommercially. Secondarily,
8115+ this License preserves for the author and publisher a way to get
8116+ credit for their work, while not being considered responsible for
8117+ modifications made by others.
8118+
8119+ This License is a kind of "copyleft", which means that derivative
8120+ works of the document must themselves be free in the same sense.
8121+ It complements the GNU General Public License, which is a copyleft
8122+ license designed for free software.
8123+
8124+ We have designed this License in order to use it for manuals for
8125+ free software, because free software needs free documentation: a
8126+ free program should come with manuals providing the same freedoms
8127+ that the software does. But this License is not limited to
8128+ software manuals; it can be used for any textual work, regardless
8129+ of subject matter or whether it is published as a printed book.
8130+ We recommend this License principally for works whose purpose is
8131+ instruction or reference.
8132+
8133+
8134+ 1. APPLICABILITY AND DEFINITIONS
8135+
8136+ This License applies to any manual or other work that contains a
8137+ notice placed by the copyright holder saying it can be distributed
8138+ under the terms of this License. The "Document", below, refers to
8139+ any such manual or work. Any member of the public is a licensee,
8140+ and is addressed as "you."
8141+
8142+ A "Modified Version" of the Document means any work containing the
8143+ Document or a portion of it, either copied verbatim, or with
8144+ modifications and/or translated into another language.
8145+
8146+ A "Secondary Section" is a named appendix or a front-matter
8147+ section of the Document that deals exclusively with the
8148+ relationship of the publishers or authors of the Document to the
8149+ Document's overall subject (or to related matters) and contains
8150+ nothing that could fall directly within that overall subject.
8151+ (For example, if the Document is in part a textbook of
8152+ mathematics, a Secondary Section may not explain any mathematics.)
8153+ The relationship could be a matter of historical connection with
8154+ the subject or with related matters, or of legal, commercial,
8155+ philosophical, ethical or political position regarding them.
8156+
8157+ The "Invariant Sections" are certain Secondary Sections whose
8158+ titles are designated, as being those of Invariant Sections, in
8159+ the notice that says that the Document is released under this
8160+ License.
8161+
8162+ The "Cover Texts" are certain short passages of text that are
8163+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
8164+ that says that the Document is released under this License.
8165+
8166+ A "Transparent" copy of the Document means a machine-readable copy,
8167+ represented in a format whose specification is available to the
8168+ general public, whose contents can be viewed and edited directly
8169+ and straightforwardly with generic text editors or (for images
8170+ composed of pixels) generic paint programs or (for drawings) some
8171+ widely available drawing editor, and that is suitable for input to
8172+ text formatters or for automatic translation to a variety of
8173+ formats suitable for input to text formatters. A copy made in an
8174+ otherwise Transparent file format whose markup has been designed
8175+ to thwart or discourage subsequent modification by readers is not
8176+ Transparent. A copy that is not "Transparent" is called "Opaque."
8177+
8178+ Examples of suitable formats for Transparent copies include plain
8179+ ASCII without markup, Texinfo input format, LaTeX input format,
8180+ SGML or XML using a publicly available DTD, and
8181+ standard-conforming simple HTML designed for human modification.
8182+ Opaque formats include PostScript, PDF, proprietary formats that
8183+ can be read and edited only by proprietary word processors, SGML
8184+ or XML for which the DTD and/or processing tools are not generally
8185+ available, and the machine-generated HTML produced by some word
8186+ processors for output purposes only.
8187+
8188+ The "Title Page" means, for a printed book, the title page itself,
8189+ plus such following pages as are needed to hold, legibly, the
8190+ material this License requires to appear in the title page. For
8191+ works in formats which do not have any title page as such, "Title
8192+ Page" means the text near the most prominent appearance of the
8193+ work's title, preceding the beginning of the body of the text.
8194+
8195+ 2. VERBATIM COPYING
8196+
8197+ You may copy and distribute the Document in any medium, either
8198+ commercially or noncommercially, provided that this License, the
8199+ copyright notices, and the license notice saying this License
8200+ applies to the Document are reproduced in all copies, and that you
8201+ add no other conditions whatsoever to those of this License. You
8202+ may not use technical measures to obstruct or control the reading
8203+ or further copying of the copies you make or distribute. However,
8204+ you may accept compensation in exchange for copies. If you
8205+ distribute a large enough number of copies you must also follow
8206+ the conditions in section 3.
8207+
8208+ You may also lend copies, under the same conditions stated above,
8209+ and you may publicly display copies.
8210+
8211+ 3. COPYING IN QUANTITY
8212+
8213+ If you publish printed copies of the Document numbering more than
8214+ 100, and the Document's license notice requires Cover Texts, you
8215+ must enclose the copies in covers that carry, clearly and legibly,
8216+ all these Cover Texts: Front-Cover Texts on the front cover, and
8217+ Back-Cover Texts on the back cover. Both covers must also clearly
8218+ and legibly identify you as the publisher of these copies. The
8219+ front cover must present the full title with all words of the
8220+ title equally prominent and visible. You may add other material
8221+ on the covers in addition. Copying with changes limited to the
8222+ covers, as long as they preserve the title of the Document and
8223+ satisfy these conditions, can be treated as verbatim copying in
8224+ other respects.
8225+
8226+ If the required texts for either cover are too voluminous to fit
8227+ legibly, you should put the first ones listed (as many as fit
8228+ reasonably) on the actual cover, and continue the rest onto
8229+ adjacent pages.
8230+
8231+ If you publish or distribute Opaque copies of the Document
8232+ numbering more than 100, you must either include a
8233+ machine-readable Transparent copy along with each Opaque copy, or
8234+ state in or with each Opaque copy a publicly-accessible
8235+ computer-network location containing a complete Transparent copy
8236+ of the Document, free of added material, which the general
8237+ network-using public has access to download anonymously at no
8238+ charge using public-standard network protocols. If you use the
8239+ latter option, you must take reasonably prudent steps, when you
8240+ begin distribution of Opaque copies in quantity, to ensure that
8241+ this Transparent copy will remain thus accessible at the stated
8242+ location until at least one year after the last time you
8243+ distribute an Opaque copy (directly or through your agents or
8244+ retailers) of that edition to the public.
8245+
8246+ It is requested, but not required, that you contact the authors of
8247+ the Document well before redistributing any large number of
8248+ copies, to give them a chance to provide you with an updated
8249+ version of the Document.
8250+
8251+ 4. MODIFICATIONS
8252+
8253+ You may copy and distribute a Modified Version of the Document
8254+ under the conditions of sections 2 and 3 above, provided that you
8255+ release the Modified Version under precisely this License, with
8256+ the Modified Version filling the role of the Document, thus
8257+ licensing distribution and modification of the Modified Version to
8258+ whoever possesses a copy of it. In addition, you must do these
8259+ things in the Modified Version:
8260+
8261+ A. Use in the Title Page (and on the covers, if any) a title
8262+ distinct from that of the Document, and from those of previous
8263+ versions (which should, if there were any, be listed in the
8264+ History section of the Document). You may use the same title
8265+ as a previous version if the original publisher of that version
8266+ gives permission.
8267+ B. List on the Title Page, as authors, one or more persons or
8268+ entities responsible for authorship of the modifications in the
8269+ Modified Version, together with at least five of the principal
8270+ authors of the Document (all of its principal authors, if it
8271+ has less than five).
8272+ C. State on the Title page the name of the publisher of the
8273+ Modified Version, as the publisher.
8274+ D. Preserve all the copyright notices of the Document.
8275+ E. Add an appropriate copyright notice for your modifications
8276+ adjacent to the other copyright notices.
8277+ F. Include, immediately after the copyright notices, a license
8278+ notice giving the public permission to use the Modified Version
8279+ under the terms of this License, in the form shown in the
8280+ Addendum below.
8281+ G. Preserve in that license notice the full lists of Invariant
8282+ Sections and required Cover Texts given in the Document's
8283+ license notice.
8284+ H. Include an unaltered copy of this License.
8285+ I. Preserve the section entitled "History", and its title, and add
8286+ to it an item stating at least the title, year, new authors, and
8287+ publisher of the Modified Version as given on the Title Page.
8288+ If there is no section entitled "History" in the Document,
8289+ create one stating the title, year, authors, and publisher of
8290+ the Document as given on its Title Page, then add an item
8291+ describing the Modified Version as stated in the previous
8292+ sentence.
8293+ J. Preserve the network location, if any, given in the Document for
8294+ public access to a Transparent copy of the Document, and
8295+ likewise the network locations given in the Document for
8296+ previous versions it was based on. These may be placed in the
8297+ "History" section. You may omit a network location for a work
8298+ that was published at least four years before the Document
8299+ itself, or if the original publisher of the version it refers
8300+ to gives permission.
8301+ K. In any section entitled "Acknowledgements" or "Dedications",
8302+ preserve the section's title, and preserve in the section all the
8303+ substance and tone of each of the contributor acknowledgements
8304+ and/or dedications given therein.
8305+ L. Preserve all the Invariant Sections of the Document,
8306+ unaltered in their text and in their titles. Section numbers
8307+ or the equivalent are not considered part of the section titles.
8308+ M. Delete any section entitled "Endorsements." Such a section
8309+ may not be included in the Modified Version.
8310+ N. Do not retitle any existing section as "Endorsements" or to
8311+ conflict in title with any Invariant Section.
8312+
8313+ If the Modified Version includes new front-matter sections or
8314+ appendices that qualify as Secondary Sections and contain no
8315+ material copied from the Document, you may at your option
8316+ designate some or all of these sections as invariant. To do this,
8317+ add their titles to the list of Invariant Sections in the Modified
8318+ Version's license notice. These titles must be distinct from any
8319+ other section titles.
8320+
8321+ You may add a section entitled "Endorsements", provided it contains
8322+ nothing but endorsements of your Modified Version by various
8323+ parties-for example, statements of peer review or that the text has
8324+ been approved by an organization as the authoritative definition
8325+ of a standard.
8326+
8327+ You may add a passage of up to five words as a Front-Cover Text,
8328+ and a passage of up to 25 words as a Back-Cover Text, to the end
8329+ of the list of Cover Texts in the Modified Version. Only one
8330+ passage of Front-Cover Text and one of Back-Cover Text may be
8331+ added by (or through arrangements made by) any one entity. If the
8332+ Document already includes a cover text for the same cover,
8333+ previously added by you or by arrangement made by the same entity
8334+ you are acting on behalf of, you may not add another; but you may
8335+ replace the old one, on explicit permission from the previous
8336+ publisher that added the old one.
8337+
8338+ The author(s) and publisher(s) of the Document do not by this
8339+ License give permission to use their names for publicity for or to
8340+ assert or imply endorsement of any Modified Version.
8341+
8342+ 5. COMBINING DOCUMENTS
8343+
8344+ You may combine the Document with other documents released under
8345+ this License, under the terms defined in section 4 above for
8346+ modified versions, provided that you include in the combination
8347+ all of the Invariant Sections of all of the original documents,
8348+ unmodified, and list them all as Invariant Sections of your
8349+ combined work in its license notice.
8350+
8351+ The combined work need only contain one copy of this License, and
8352+ multiple identical Invariant Sections may be replaced with a single
8353+ copy. If there are multiple Invariant Sections with the same name
8354+ but different contents, make the title of each such section unique
8355+ by adding at the end of it, in parentheses, the name of the
8356+ original author or publisher of that section if known, or else a
8357+ unique number. Make the same adjustment to the section titles in
8358+ the list of Invariant Sections in the license notice of the
8359+ combined work.
8360+
8361+ In the combination, you must combine any sections entitled
8362+ "History" in the various original documents, forming one section
8363+ entitled "History"; likewise combine any sections entitled
8364+ "Acknowledgements", and any sections entitled "Dedications." You
8365+ must delete all sections entitled "Endorsements."
8366+
8367+ 6. COLLECTIONS OF DOCUMENTS
8368+
8369+ You may make a collection consisting of the Document and other
8370+ documents released under this License, and replace the individual
8371+ copies of this License in the various documents with a single copy
8372+ that is included in the collection, provided that you follow the
8373+ rules of this License for verbatim copying of each of the
8374+ documents in all other respects.
8375+
8376+ You may extract a single document from such a collection, and
8377+ distribute it individually under this License, provided you insert
8378+ a copy of this License into the extracted document, and follow
8379+ this License in all other respects regarding verbatim copying of
8380+ that document.
8381+
8382+ 7. AGGREGATION WITH INDEPENDENT WORKS
8383+
8384+ A compilation of the Document or its derivatives with other
8385+ separate and independent documents or works, in or on a volume of
8386+ a storage or distribution medium, does not as a whole count as a
8387+ Modified Version of the Document, provided no compilation
8388+ copyright is claimed for the compilation. Such a compilation is
8389+ called an "aggregate", and this License does not apply to the
8390+ other self-contained works thus compiled with the Document, on
8391+ account of their being thus compiled, if they are not themselves
8392+ derivative works of the Document.
8393+
8394+ If the Cover Text requirement of section 3 is applicable to these
8395+ copies of the Document, then if the Document is less than one
8396+ quarter of the entire aggregate, the Document's Cover Texts may be
8397+ placed on covers that surround only the Document within the
8398+ aggregate. Otherwise they must appear on covers around the whole
8399+ aggregate.
8400+
8401+ 8. TRANSLATION
8402+
8403+ Translation is considered a kind of modification, so you may
8404+ distribute translations of the Document under the terms of section
8405+ 4. Replacing Invariant Sections with translations requires special
8406+ permission from their copyright holders, but you may include
8407+ translations of some or all Invariant Sections in addition to the
8408+ original versions of these Invariant Sections. You may include a
8409+ translation of this License provided that you also include the
8410+ original English version of this License. In case of a
8411+ disagreement between the translation and the original English
8412+ version of this License, the original English version will prevail.
8413+
8414+ 9. TERMINATION
8415+
8416+ You may not copy, modify, sublicense, or distribute the Document
8417+ except as expressly provided for under this License. Any other
8418+ attempt to copy, modify, sublicense or distribute the Document is
8419+ void, and will automatically terminate your rights under this
8420+ License. However, parties who have received copies, or rights,
8421+ from you under this License will not have their licenses
8422+ terminated so long as such parties remain in full compliance.
8423+
8424+ 10. FUTURE REVISIONS OF THIS LICENSE
8425+
8426+ The Free Software Foundation may publish new, revised versions of
8427+ the GNU Free Documentation License from time to time. Such new
8428+ versions will be similar in spirit to the present version, but may
8429+ differ in detail to address new problems or concerns. See
8430+ http://www.gnu.org/copyleft/.
8431+
8432+ Each version of the License is given a distinguishing version
8433+ number. If the Document specifies that a particular numbered
8434+ version of this License "or any later version" applies to it, you
8435+ have the option of following the terms and conditions either of
8436+ that specified version or of any later version that has been
8437+ published (not as a draft) by the Free Software Foundation. If
8438+ the Document does not specify a version number of this License,
8439+ you may choose any version ever published (not as a draft) by the
8440+ Free Software Foundation.
8441+
8442+
8443+ADDENDUM: How to use this License for your documents
8444+====================================================
8445+
8446+To use this License in a document you have written, include a copy of
8447+the License in the document and put the following copyright and license
8448+notices just after the title page:
8449+
8450+ Copyright (C) YEAR YOUR NAME.
8451+ Permission is granted to copy, distribute and/or modify this document
8452+ under the terms of the GNU Free Documentation License, Version 1.1
8453+ or any later version published by the Free Software Foundation;
8454+ with the Invariant Sections being LIST THEIR TITLES, with the
8455+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
8456+ A copy of the license is included in the section entitled "GNU
8457+ Free Documentation License."
8458+
8459+ If you have no Invariant Sections, write "with no Invariant Sections"
8460+instead of saying which ones are invariant. If you have no Front-Cover
8461+Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
8462+LIST"; likewise for Back-Cover Texts.
8463+
8464+ If your document contains nontrivial examples of program code, we
8465+recommend releasing these examples in parallel under your choice of
8466+free software license, such as the GNU General Public License, to
8467+permit their use in free software.
8468+
8469+
8470+File: bfd.info, Node: Index, Prev: GNU Free Documentation License, Up: Top
8471+
8472+Index
8473+*****
8474+
8475+[index]
8476+* Menu:
8477+
8478+* _bfd_final_link_relocate: Relocating the section contents.
8479+ (line 22)
8480+* _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
8481+ (line 12)
8482+* _bfd_generic_link_add_one_symbol: Adding symbols from an object file.
8483+ (line 19)
8484+* _bfd_generic_make_empty_symbol: symbol handling functions.
8485+ (line 92)
8486+* _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
8487+ (line 6)
8488+* _bfd_link_final_link in target vector: Performing the Final Link.
8489+ (line 6)
8490+* _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
8491+ (line 6)
8492+* _bfd_relocate_contents: Relocating the section contents.
8493+ (line 22)
8494+* _bfd_strip_section_from_output: section prototypes. (line 242)
8495+* aout_SIZE_machine_type: aout. (line 146)
8496+* aout_SIZE_mkobject: aout. (line 138)
8497+* aout_SIZE_new_section_hook: aout. (line 175)
8498+* aout_SIZE_set_arch_mach: aout. (line 162)
8499+* aout_SIZE_some_aout_object_p: aout. (line 125)
8500+* aout_SIZE_swap_exec_header_in: aout. (line 101)
8501+* aout_SIZE_swap_exec_header_out: aout. (line 113)
8502+* arelent_chain: typedef arelent. (line 338)
8503+* BFD: Overview. (line 6)
8504+* BFD canonical format: Canonical format. (line 11)
8505+* bfd_alloc: Opening and Closing.
8506+ (line 179)
8507+* bfd_alt_mach_code: BFD front end. (line 588)
8508+* bfd_arch_bits_per_address: Architectures. (line 453)
8509+* bfd_arch_bits_per_byte: Architectures. (line 445)
8510+* bfd_arch_get_compatible: Architectures. (line 388)
8511+* bfd_arch_list: Architectures. (line 379)
8512+* bfd_arch_mach_octets_per_byte: Architectures. (line 522)
8513+* bfd_cache_close: File Caching. (line 53)
8514+* bfd_cache_close_all: File Caching. (line 66)
8515+* bfd_cache_init: File Caching. (line 45)
8516+* bfd_cache_lookup: File Caching. (line 32)
8517+* bfd_cache_lookup_worker: File Caching. (line 91)
8518+* BFD_CACHE_MAX_OPEN macro: File Caching. (line 15)
8519+* bfd_calc_gnu_debuglink_crc32: Opening and Closing.
8520+ (line 197)
8521+* bfd_canonicalize_reloc: BFD front end. (line 315)
8522+* bfd_canonicalize_symtab: symbol handling functions.
8523+ (line 50)
8524+* bfd_check_format: Formats. (line 18)
8525+* bfd_check_format_matches: Formats. (line 49)
8526+* bfd_check_overflow: typedef arelent. (line 350)
8527+* bfd_close: Opening and Closing.
8528+ (line 104)
8529+* bfd_close_all_done: Opening and Closing.
8530+ (line 122)
8531+* bfd_coff_backend_data: coff. (line 246)
8532+* bfd_copy_private_bfd_data: BFD front end. (line 454)
8533+* bfd_copy_private_header_data: BFD front end. (line 436)
8534+* bfd_copy_private_section_data: section prototypes. (line 224)
8535+* bfd_copy_private_symbol_data: symbol handling functions.
8536+ (line 140)
8537+* bfd_core_file_failing_command: Core Files. (line 9)
8538+* bfd_core_file_failing_signal: Core Files. (line 18)
8539+* bfd_create: Opening and Closing.
8540+ (line 141)
8541+* bfd_create_gnu_debuglink_section: Opening and Closing.
8542+ (line 263)
8543+* bfd_decode_symclass: symbol handling functions.
8544+ (line 111)
8545+* bfd_default_arch_struct: Architectures. (line 400)
8546+* bfd_default_compatible: Architectures. (line 462)
8547+* bfd_default_reloc_type_lookup: howto manager. (line 1704)
8548+* bfd_default_scan: Architectures. (line 471)
8549+* bfd_default_set_arch_mach: Architectures. (line 418)
8550+* bfd_elf_find_section: elf. (line 15)
8551+* bfd_errmsg: BFD front end. (line 243)
8552+* bfd_fdopenr: Opening and Closing.
8553+ (line 22)
8554+* bfd_fill_in_gnu_debuglink_section: Opening and Closing.
8555+ (line 277)
8556+* bfd_find_target: bfd_target. (line 420)
8557+* bfd_follow_gnu_debuglink: Opening and Closing.
8558+ (line 242)
8559+* bfd_format_string: Formats. (line 76)
8560+* bfd_generic_discard_group: section prototypes. (line 264)
8561+* bfd_generic_gc_sections: howto manager. (line 1735)
8562+* bfd_generic_get_relocated_section_contents: howto manager. (line 1755)
8563+* bfd_generic_is_group_section: section prototypes. (line 256)
8564+* bfd_generic_merge_sections: howto manager. (line 1745)
8565+* bfd_generic_relax_section: howto manager. (line 1722)
8566+* bfd_get_arch: Architectures. (line 429)
8567+* bfd_get_arch_info: Architectures. (line 481)
8568+* bfd_get_arch_size: BFD front end. (line 359)
8569+* bfd_get_error: BFD front end. (line 226)
8570+* bfd_get_error_handler: BFD front end. (line 294)
8571+* bfd_get_gp_size: BFD front end. (line 400)
8572+* bfd_get_mach: Architectures. (line 437)
8573+* bfd_get_mtime: BFD front end. (line 676)
8574+* bfd_get_next_mapent: Archives. (line 49)
8575+* bfd_get_reloc_code_name: howto manager. (line 1713)
8576+* bfd_get_reloc_size: typedef arelent. (line 329)
8577+* bfd_get_reloc_upper_bound: BFD front end. (line 305)
8578+* bfd_get_section_by_name: section prototypes. (line 17)
8579+* bfd_get_section_by_name_if: section prototypes. (line 31)
8580+* bfd_get_section_contents: section prototypes. (line 197)
8581+* bfd_get_sign_extend_vma: BFD front end. (line 372)
8582+* bfd_get_size <1>: Internal. (line 22)
8583+* bfd_get_size: BFD front end. (line 685)
8584+* bfd_get_symtab_upper_bound: symbol handling functions.
8585+ (line 6)
8586+* bfd_get_unique_section_name: section prototypes. (line 50)
8587+* bfd_h_put_size: Internal. (line 94)
8588+* bfd_hash_allocate: Creating and Freeing a Hash Table.
8589+ (line 17)
8590+* bfd_hash_lookup: Looking Up or Entering a String.
8591+ (line 6)
8592+* bfd_hash_newfunc: Creating and Freeing a Hash Table.
8593+ (line 12)
8594+* bfd_hash_set_default_size: Creating and Freeing a Hash Table.
8595+ (line 25)
8596+* bfd_hash_table_free: Creating and Freeing a Hash Table.
8597+ (line 21)
8598+* bfd_hash_table_init: Creating and Freeing a Hash Table.
8599+ (line 6)
8600+* bfd_hash_table_init_n: Creating and Freeing a Hash Table.
8601+ (line 6)
8602+* bfd_hash_traverse: Traversing a Hash Table.
8603+ (line 6)
8604+* bfd_init: Initialization. (line 8)
8605+* bfd_install_relocation: typedef arelent. (line 391)
8606+* bfd_is_local_label: symbol handling functions.
8607+ (line 17)
8608+* bfd_is_local_label_name: symbol handling functions.
8609+ (line 26)
8610+* bfd_is_target_special_symbol: symbol handling functions.
8611+ (line 38)
8612+* bfd_is_undefined_symclass: symbol handling functions.
8613+ (line 120)
8614+* bfd_last_cache: File Caching. (line 22)
8615+* bfd_link_split_section: Writing the symbol table.
8616+ (line 44)
8617+* bfd_log2: Internal. (line 161)
8618+* bfd_lookup_arch: Architectures. (line 489)
8619+* bfd_make_debug_symbol: symbol handling functions.
8620+ (line 102)
8621+* bfd_make_empty_symbol: symbol handling functions.
8622+ (line 78)
8623+* bfd_make_readable: Opening and Closing.
8624+ (line 165)
8625+* bfd_make_section: section prototypes. (line 98)
8626+* bfd_make_section_anyway: section prototypes. (line 82)
8627+* bfd_make_section_old_way: section prototypes. (line 62)
8628+* bfd_make_writable: Opening and Closing.
8629+ (line 151)
8630+* bfd_malloc_and_get_section: section prototypes. (line 214)
8631+* bfd_map_over_sections: section prototypes. (line 124)
8632+* bfd_merge_private_bfd_data: BFD front end. (line 470)
8633+* bfd_octets_per_byte: Architectures. (line 512)
8634+* bfd_open_file: File Caching. (line 79)
8635+* bfd_openr: Opening and Closing.
8636+ (line 6)
8637+* bfd_openr_iovec: Opening and Closing.
8638+ (line 52)
8639+* bfd_openr_next_archived_file: Archives. (line 75)
8640+* bfd_openstreamr: Opening and Closing.
8641+ (line 43)
8642+* bfd_openw: Opening and Closing.
8643+ (line 92)
8644+* bfd_perform_relocation: typedef arelent. (line 366)
8645+* bfd_perror: BFD front end. (line 252)
8646+* bfd_preserve_finish: BFD front end. (line 636)
8647+* bfd_preserve_restore: BFD front end. (line 626)
8648+* bfd_preserve_save: BFD front end. (line 610)
8649+* bfd_print_symbol_vandf: symbol handling functions.
8650+ (line 70)
8651+* bfd_printable_arch_mach: Architectures. (line 500)
8652+* bfd_printable_name: Architectures. (line 360)
8653+* bfd_put_size: Internal. (line 19)
8654+* BFD_RELOC_12_PCREL: howto manager. (line 39)
8655+* BFD_RELOC_14: howto manager. (line 31)
8656+* BFD_RELOC_16: howto manager. (line 30)
8657+* BFD_RELOC_16_BASEREL: howto manager. (line 80)
8658+* BFD_RELOC_16_GOT_PCREL: howto manager. (line 52)
8659+* BFD_RELOC_16_GOTOFF: howto manager. (line 55)
8660+* BFD_RELOC_16_PCREL: howto manager. (line 38)
8661+* BFD_RELOC_16_PCREL_S2: howto manager. (line 92)
8662+* BFD_RELOC_16_PLT_PCREL: howto manager. (line 63)
8663+* BFD_RELOC_16_PLTOFF: howto manager. (line 67)
8664+* BFD_RELOC_16C_ABS20: howto manager. (line 1464)
8665+* BFD_RELOC_16C_ABS20_C: howto manager. (line 1465)
8666+* BFD_RELOC_16C_ABS24: howto manager. (line 1466)
8667+* BFD_RELOC_16C_ABS24_C: howto manager. (line 1467)
8668+* BFD_RELOC_16C_DISP04: howto manager. (line 1444)
8669+* BFD_RELOC_16C_DISP04_C: howto manager. (line 1445)
8670+* BFD_RELOC_16C_DISP08: howto manager. (line 1446)
8671+* BFD_RELOC_16C_DISP08_C: howto manager. (line 1447)
8672+* BFD_RELOC_16C_DISP16: howto manager. (line 1448)
8673+* BFD_RELOC_16C_DISP16_C: howto manager. (line 1449)
8674+* BFD_RELOC_16C_DISP24: howto manager. (line 1450)
8675+* BFD_RELOC_16C_DISP24_C: howto manager. (line 1451)
8676+* BFD_RELOC_16C_DISP24a: howto manager. (line 1452)
8677+* BFD_RELOC_16C_DISP24a_C: howto manager. (line 1453)
8678+* BFD_RELOC_16C_IMM04: howto manager. (line 1468)
8679+* BFD_RELOC_16C_IMM04_C: howto manager. (line 1469)
8680+* BFD_RELOC_16C_IMM16: howto manager. (line 1470)
8681+* BFD_RELOC_16C_IMM16_C: howto manager. (line 1471)
8682+* BFD_RELOC_16C_IMM20: howto manager. (line 1472)
8683+* BFD_RELOC_16C_IMM20_C: howto manager. (line 1473)
8684+* BFD_RELOC_16C_IMM24: howto manager. (line 1474)
8685+* BFD_RELOC_16C_IMM24_C: howto manager. (line 1475)
8686+* BFD_RELOC_16C_IMM32: howto manager. (line 1476)
8687+* BFD_RELOC_16C_IMM32_C: howto manager. (line 1477)
8688+* BFD_RELOC_16C_NUM08: howto manager. (line 1438)
8689+* BFD_RELOC_16C_NUM08_C: howto manager. (line 1439)
8690+* BFD_RELOC_16C_NUM16: howto manager. (line 1440)
8691+* BFD_RELOC_16C_NUM16_C: howto manager. (line 1441)
8692+* BFD_RELOC_16C_NUM32: howto manager. (line 1442)
8693+* BFD_RELOC_16C_NUM32_C: howto manager. (line 1443)
8694+* BFD_RELOC_16C_REG04: howto manager. (line 1454)
8695+* BFD_RELOC_16C_REG04_C: howto manager. (line 1455)
8696+* BFD_RELOC_16C_REG04a: howto manager. (line 1456)
8697+* BFD_RELOC_16C_REG04a_C: howto manager. (line 1457)
8698+* BFD_RELOC_16C_REG14: howto manager. (line 1458)
8699+* BFD_RELOC_16C_REG14_C: howto manager. (line 1459)
8700+* BFD_RELOC_16C_REG16: howto manager. (line 1460)
8701+* BFD_RELOC_16C_REG16_C: howto manager. (line 1461)
8702+* BFD_RELOC_16C_REG20: howto manager. (line 1462)
8703+* BFD_RELOC_16C_REG20_C: howto manager. (line 1463)
8704+* BFD_RELOC_23_PCREL_S2: howto manager. (line 93)
8705+* BFD_RELOC_24: howto manager. (line 29)
8706+* BFD_RELOC_24_PCREL: howto manager. (line 37)
8707+* BFD_RELOC_24_PLT_PCREL: howto manager. (line 62)
8708+* BFD_RELOC_26: howto manager. (line 28)
8709+* BFD_RELOC_32: howto manager. (line 27)
8710+* BFD_RELOC_32_BASEREL: howto manager. (line 79)
8711+* BFD_RELOC_32_GOT_PCREL: howto manager. (line 51)
8712+* BFD_RELOC_32_GOTOFF: howto manager. (line 54)
8713+* BFD_RELOC_32_PCREL: howto manager. (line 36)
8714+* BFD_RELOC_32_PCREL_S2: howto manager. (line 91)
8715+* BFD_RELOC_32_PLT_PCREL: howto manager. (line 61)
8716+* BFD_RELOC_32_PLTOFF: howto manager. (line 66)
8717+* BFD_RELOC_32_SECREL: howto manager. (line 48)
8718+* BFD_RELOC_386_COPY: howto manager. (line 422)
8719+* BFD_RELOC_386_GLOB_DAT: howto manager. (line 423)
8720+* BFD_RELOC_386_GOT32: howto manager. (line 420)
8721+* BFD_RELOC_386_GOTOFF: howto manager. (line 426)
8722+* BFD_RELOC_386_GOTPC: howto manager. (line 427)
8723+* BFD_RELOC_386_JUMP_SLOT: howto manager. (line 424)
8724+* BFD_RELOC_386_PLT32: howto manager. (line 421)
8725+* BFD_RELOC_386_RELATIVE: howto manager. (line 425)
8726+* BFD_RELOC_386_TLS_DTPMOD32: howto manager. (line 437)
8727+* BFD_RELOC_386_TLS_DTPOFF32: howto manager. (line 438)
8728+* BFD_RELOC_386_TLS_GD: howto manager. (line 432)
8729+* BFD_RELOC_386_TLS_GOTIE: howto manager. (line 430)
8730+* BFD_RELOC_386_TLS_IE: howto manager. (line 429)
8731+* BFD_RELOC_386_TLS_IE_32: howto manager. (line 435)
8732+* BFD_RELOC_386_TLS_LDM: howto manager. (line 433)
8733+* BFD_RELOC_386_TLS_LDO_32: howto manager. (line 434)
8734+* BFD_RELOC_386_TLS_LE: howto manager. (line 431)
8735+* BFD_RELOC_386_TLS_LE_32: howto manager. (line 436)
8736+* BFD_RELOC_386_TLS_TPOFF: howto manager. (line 428)
8737+* BFD_RELOC_386_TLS_TPOFF32: howto manager. (line 439)
8738+* BFD_RELOC_390_12: howto manager. (line 1155)
8739+* BFD_RELOC_390_20: howto manager. (line 1255)
8740+* BFD_RELOC_390_COPY: howto manager. (line 1164)
8741+* BFD_RELOC_390_GLOB_DAT: howto manager. (line 1167)
8742+* BFD_RELOC_390_GOT12: howto manager. (line 1158)
8743+* BFD_RELOC_390_GOT16: howto manager. (line 1179)
8744+* BFD_RELOC_390_GOT20: howto manager. (line 1256)
8745+* BFD_RELOC_390_GOT64: howto manager. (line 1197)
8746+* BFD_RELOC_390_GOTENT: howto manager. (line 1203)
8747+* BFD_RELOC_390_GOTOFF64: howto manager. (line 1206)
8748+* BFD_RELOC_390_GOTPC: howto manager. (line 1176)
8749+* BFD_RELOC_390_GOTPCDBL: howto manager. (line 1194)
8750+* BFD_RELOC_390_GOTPLT12: howto manager. (line 1209)
8751+* BFD_RELOC_390_GOTPLT16: howto manager. (line 1212)
8752+* BFD_RELOC_390_GOTPLT20: howto manager. (line 1257)
8753+* BFD_RELOC_390_GOTPLT32: howto manager. (line 1215)
8754+* BFD_RELOC_390_GOTPLT64: howto manager. (line 1218)
8755+* BFD_RELOC_390_GOTPLTENT: howto manager. (line 1221)
8756+* BFD_RELOC_390_JMP_SLOT: howto manager. (line 1170)
8757+* BFD_RELOC_390_PC16DBL: howto manager. (line 1182)
8758+* BFD_RELOC_390_PC32DBL: howto manager. (line 1188)
8759+* BFD_RELOC_390_PLT16DBL: howto manager. (line 1185)
8760+* BFD_RELOC_390_PLT32: howto manager. (line 1161)
8761+* BFD_RELOC_390_PLT32DBL: howto manager. (line 1191)
8762+* BFD_RELOC_390_PLT64: howto manager. (line 1200)
8763+* BFD_RELOC_390_PLTOFF16: howto manager. (line 1224)
8764+* BFD_RELOC_390_PLTOFF32: howto manager. (line 1227)
8765+* BFD_RELOC_390_PLTOFF64: howto manager. (line 1230)
8766+* BFD_RELOC_390_RELATIVE: howto manager. (line 1173)
8767+* BFD_RELOC_390_TLS_DTPMOD: howto manager. (line 1250)
8768+* BFD_RELOC_390_TLS_DTPOFF: howto manager. (line 1251)
8769+* BFD_RELOC_390_TLS_GD32: howto manager. (line 1236)
8770+* BFD_RELOC_390_TLS_GD64: howto manager. (line 1237)
8771+* BFD_RELOC_390_TLS_GDCALL: howto manager. (line 1234)
8772+* BFD_RELOC_390_TLS_GOTIE12: howto manager. (line 1238)
8773+* BFD_RELOC_390_TLS_GOTIE20: howto manager. (line 1258)
8774+* BFD_RELOC_390_TLS_GOTIE32: howto manager. (line 1239)
8775+* BFD_RELOC_390_TLS_GOTIE64: howto manager. (line 1240)
8776+* BFD_RELOC_390_TLS_IE32: howto manager. (line 1243)
8777+* BFD_RELOC_390_TLS_IE64: howto manager. (line 1244)
8778+* BFD_RELOC_390_TLS_IEENT: howto manager. (line 1245)
8779+* BFD_RELOC_390_TLS_LDCALL: howto manager. (line 1235)
8780+* BFD_RELOC_390_TLS_LDM32: howto manager. (line 1241)
8781+* BFD_RELOC_390_TLS_LDM64: howto manager. (line 1242)
8782+* BFD_RELOC_390_TLS_LDO32: howto manager. (line 1248)
8783+* BFD_RELOC_390_TLS_LDO64: howto manager. (line 1249)
8784+* BFD_RELOC_390_TLS_LE32: howto manager. (line 1246)
8785+* BFD_RELOC_390_TLS_LE64: howto manager. (line 1247)
8786+* BFD_RELOC_390_TLS_LOAD: howto manager. (line 1233)
8787+* BFD_RELOC_390_TLS_TPOFF: howto manager. (line 1252)
8788+* BFD_RELOC_64: howto manager. (line 26)
8789+* BFD_RELOC_64_PCREL: howto manager. (line 35)
8790+* BFD_RELOC_64_PLT_PCREL: howto manager. (line 60)
8791+* BFD_RELOC_64_PLTOFF: howto manager. (line 65)
8792+* BFD_RELOC_68K_GLOB_DAT: howto manager. (line 74)
8793+* BFD_RELOC_68K_JMP_SLOT: howto manager. (line 75)
8794+* BFD_RELOC_68K_RELATIVE: howto manager. (line 76)
8795+* BFD_RELOC_8: howto manager. (line 32)
8796+* BFD_RELOC_860_COPY: howto manager. (line 1543)
8797+* BFD_RELOC_860_GLOB_DAT: howto manager. (line 1544)
8798+* BFD_RELOC_860_HAGOT: howto manager. (line 1569)
8799+* BFD_RELOC_860_HAGOTOFF: howto manager. (line 1570)
8800+* BFD_RELOC_860_HAPC: howto manager. (line 1571)
8801+* BFD_RELOC_860_HIGH: howto manager. (line 1572)
8802+* BFD_RELOC_860_HIGHADJ: howto manager. (line 1568)
8803+* BFD_RELOC_860_HIGOT: howto manager. (line 1573)
8804+* BFD_RELOC_860_HIGOTOFF: howto manager. (line 1574)
8805+* BFD_RELOC_860_JUMP_SLOT: howto manager. (line 1545)
8806+* BFD_RELOC_860_LOGOT0: howto manager. (line 1557)
8807+* BFD_RELOC_860_LOGOT1: howto manager. (line 1559)
8808+* BFD_RELOC_860_LOGOTOFF0: howto manager. (line 1561)
8809+* BFD_RELOC_860_LOGOTOFF1: howto manager. (line 1563)
8810+* BFD_RELOC_860_LOGOTOFF2: howto manager. (line 1565)
8811+* BFD_RELOC_860_LOGOTOFF3: howto manager. (line 1566)
8812+* BFD_RELOC_860_LOPC: howto manager. (line 1567)
8813+* BFD_RELOC_860_LOW0: howto manager. (line 1550)
8814+* BFD_RELOC_860_LOW1: howto manager. (line 1552)
8815+* BFD_RELOC_860_LOW2: howto manager. (line 1554)
8816+* BFD_RELOC_860_LOW3: howto manager. (line 1556)
8817+* BFD_RELOC_860_PC16: howto manager. (line 1549)
8818+* BFD_RELOC_860_PC26: howto manager. (line 1547)
8819+* BFD_RELOC_860_PLT26: howto manager. (line 1548)
8820+* BFD_RELOC_860_RELATIVE: howto manager. (line 1546)
8821+* BFD_RELOC_860_SPGOT0: howto manager. (line 1558)
8822+* BFD_RELOC_860_SPGOT1: howto manager. (line 1560)
8823+* BFD_RELOC_860_SPGOTOFF0: howto manager. (line 1562)
8824+* BFD_RELOC_860_SPGOTOFF1: howto manager. (line 1564)
8825+* BFD_RELOC_860_SPLIT0: howto manager. (line 1551)
8826+* BFD_RELOC_860_SPLIT1: howto manager. (line 1553)
8827+* BFD_RELOC_860_SPLIT2: howto manager. (line 1555)
8828+* BFD_RELOC_8_BASEREL: howto manager. (line 84)
8829+* BFD_RELOC_8_FFnn: howto manager. (line 88)
8830+* BFD_RELOC_8_GOT_PCREL: howto manager. (line 53)
8831+* BFD_RELOC_8_GOTOFF: howto manager. (line 59)
8832+* BFD_RELOC_8_PCREL: howto manager. (line 40)
8833+* BFD_RELOC_8_PLT_PCREL: howto manager. (line 64)
8834+* BFD_RELOC_8_PLTOFF: howto manager. (line 71)
8835+* BFD_RELOC_ALPHA_BRSGP: howto manager. (line 259)
8836+* BFD_RELOC_ALPHA_CODEADDR: howto manager. (line 250)
8837+* BFD_RELOC_ALPHA_DTPMOD64: howto manager. (line 266)
8838+* BFD_RELOC_ALPHA_DTPREL16: howto manager. (line 271)
8839+* BFD_RELOC_ALPHA_DTPREL64: howto manager. (line 268)
8840+* BFD_RELOC_ALPHA_DTPREL_HI16: howto manager. (line 269)
8841+* BFD_RELOC_ALPHA_DTPREL_LO16: howto manager. (line 270)
8842+* BFD_RELOC_ALPHA_ELF_LITERAL: howto manager. (line 215)
8843+* BFD_RELOC_ALPHA_GOTDTPREL16: howto manager. (line 267)
8844+* BFD_RELOC_ALPHA_GOTTPREL16: howto manager. (line 272)
8845+* BFD_RELOC_ALPHA_GPDISP: howto manager. (line 209)
8846+* BFD_RELOC_ALPHA_GPDISP_HI16: howto manager. (line 195)
8847+* BFD_RELOC_ALPHA_GPDISP_LO16: howto manager. (line 203)
8848+* BFD_RELOC_ALPHA_GPREL_HI16: howto manager. (line 254)
8849+* BFD_RELOC_ALPHA_GPREL_LO16: howto manager. (line 255)
8850+* BFD_RELOC_ALPHA_HINT: howto manager. (line 241)
8851+* BFD_RELOC_ALPHA_LINKAGE: howto manager. (line 246)
8852+* BFD_RELOC_ALPHA_LITERAL: howto manager. (line 214)
8853+* BFD_RELOC_ALPHA_LITUSE: howto manager. (line 216)
8854+* BFD_RELOC_ALPHA_TLSGD: howto manager. (line 264)
8855+* BFD_RELOC_ALPHA_TLSLDM: howto manager. (line 265)
8856+* BFD_RELOC_ALPHA_TPREL16: howto manager. (line 276)
8857+* BFD_RELOC_ALPHA_TPREL64: howto manager. (line 273)
8858+* BFD_RELOC_ALPHA_TPREL_HI16: howto manager. (line 274)
8859+* BFD_RELOC_ALPHA_TPREL_LO16: howto manager. (line 275)
8860+* BFD_RELOC_ARC_B22_PCREL: howto manager. (line 754)
8861+* BFD_RELOC_ARC_B26: howto manager. (line 759)
8862+* BFD_RELOC_ARM_ADR_IMM: howto manager. (line 615)
8863+* BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager. (line 607)
8864+* BFD_RELOC_ARM_COPY: howto manager. (line 628)
8865+* BFD_RELOC_ARM_CP_OFF_IMM: howto manager. (line 613)
8866+* BFD_RELOC_ARM_CP_OFF_IMM_S2: howto manager. (line 614)
8867+* BFD_RELOC_ARM_GLOB_DAT: howto manager. (line 629)
8868+* BFD_RELOC_ARM_GOT12: howto manager. (line 625)
8869+* BFD_RELOC_ARM_GOT32: howto manager. (line 626)
8870+* BFD_RELOC_ARM_GOTOFF: howto manager. (line 632)
8871+* BFD_RELOC_ARM_GOTPC: howto manager. (line 633)
8872+* BFD_RELOC_ARM_HWLITERAL: howto manager. (line 620)
8873+* BFD_RELOC_ARM_IMMEDIATE: howto manager. (line 606)
8874+* BFD_RELOC_ARM_IN_POOL: howto manager. (line 618)
8875+* BFD_RELOC_ARM_JUMP_SLOT: howto manager. (line 627)
8876+* BFD_RELOC_ARM_LDR_IMM: howto manager. (line 616)
8877+* BFD_RELOC_ARM_LITERAL: howto manager. (line 617)
8878+* BFD_RELOC_ARM_MULTI: howto manager. (line 612)
8879+* BFD_RELOC_ARM_OFFSET_IMM: howto manager. (line 608)
8880+* BFD_RELOC_ARM_OFFSET_IMM8: howto manager. (line 619)
8881+* BFD_RELOC_ARM_PCREL_BLX: howto manager. (line 596)
8882+* BFD_RELOC_ARM_PCREL_BRANCH: howto manager. (line 592)
8883+* BFD_RELOC_ARM_PLT32: howto manager. (line 630)
8884+* BFD_RELOC_ARM_PREL31: howto manager. (line 652)
8885+* BFD_RELOC_ARM_RELATIVE: howto manager. (line 631)
8886+* BFD_RELOC_ARM_ROSEGREL32: howto manager. (line 641)
8887+* BFD_RELOC_ARM_SBREL32: howto manager. (line 644)
8888+* BFD_RELOC_ARM_SHIFT_IMM: howto manager. (line 609)
8889+* BFD_RELOC_ARM_SMI: howto manager. (line 610)
8890+* BFD_RELOC_ARM_SWI: howto manager. (line 611)
8891+* BFD_RELOC_ARM_TARGET1: howto manager. (line 637)
8892+* BFD_RELOC_ARM_TARGET2: howto manager. (line 647)
8893+* BFD_RELOC_ARM_THUMB_ADD: howto manager. (line 621)
8894+* BFD_RELOC_ARM_THUMB_IMM: howto manager. (line 622)
8895+* BFD_RELOC_ARM_THUMB_OFFSET: howto manager. (line 624)
8896+* BFD_RELOC_ARM_THUMB_SHIFT: howto manager. (line 623)
8897+* BFD_RELOC_AVR_13_PCREL: howto manager. (line 1076)
8898+* BFD_RELOC_AVR_16_PM: howto manager. (line 1080)
8899+* BFD_RELOC_AVR_6: howto manager. (line 1147)
8900+* BFD_RELOC_AVR_6_ADIW: howto manager. (line 1151)
8901+* BFD_RELOC_AVR_7_PCREL: howto manager. (line 1072)
8902+* BFD_RELOC_AVR_CALL: howto manager. (line 1139)
8903+* BFD_RELOC_AVR_HH8_LDI: howto manager. (line 1092)
8904+* BFD_RELOC_AVR_HH8_LDI_NEG: howto manager. (line 1107)
8905+* BFD_RELOC_AVR_HH8_LDI_PM: howto manager. (line 1120)
8906+* BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager. (line 1134)
8907+* BFD_RELOC_AVR_HI8_LDI: howto manager. (line 1088)
8908+* BFD_RELOC_AVR_HI8_LDI_NEG: howto manager. (line 1102)
8909+* BFD_RELOC_AVR_HI8_LDI_PM: howto manager. (line 1116)
8910+* BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager. (line 1129)
8911+* BFD_RELOC_AVR_LDI: howto manager. (line 1143)
8912+* BFD_RELOC_AVR_LO8_LDI: howto manager. (line 1084)
8913+* BFD_RELOC_AVR_LO8_LDI_NEG: howto manager. (line 1097)
8914+* BFD_RELOC_AVR_LO8_LDI_PM: howto manager. (line 1112)
8915+* BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager. (line 1125)
8916+* bfd_reloc_code_type: howto manager. (line 10)
8917+* BFD_RELOC_CRIS_16_GOT: howto manager. (line 1524)
8918+* BFD_RELOC_CRIS_16_GOTPLT: howto manager. (line 1530)
8919+* BFD_RELOC_CRIS_32_GOT: howto manager. (line 1521)
8920+* BFD_RELOC_CRIS_32_GOTPLT: howto manager. (line 1527)
8921+* BFD_RELOC_CRIS_32_GOTREL: howto manager. (line 1533)
8922+* BFD_RELOC_CRIS_32_PLT_GOTREL: howto manager. (line 1536)
8923+* BFD_RELOC_CRIS_32_PLT_PCREL: howto manager. (line 1539)
8924+* BFD_RELOC_CRIS_BDISP8: howto manager. (line 1502)
8925+* BFD_RELOC_CRIS_COPY: howto manager. (line 1515)
8926+* BFD_RELOC_CRIS_GLOB_DAT: howto manager. (line 1516)
8927+* BFD_RELOC_CRIS_JUMP_SLOT: howto manager. (line 1517)
8928+* BFD_RELOC_CRIS_LAPCQ_OFFSET: howto manager. (line 1510)
8929+* BFD_RELOC_CRIS_RELATIVE: howto manager. (line 1518)
8930+* BFD_RELOC_CRIS_SIGNED_16: howto manager. (line 1508)
8931+* BFD_RELOC_CRIS_SIGNED_6: howto manager. (line 1504)
8932+* BFD_RELOC_CRIS_SIGNED_8: howto manager. (line 1506)
8933+* BFD_RELOC_CRIS_UNSIGNED_16: howto manager. (line 1509)
8934+* BFD_RELOC_CRIS_UNSIGNED_4: howto manager. (line 1511)
8935+* BFD_RELOC_CRIS_UNSIGNED_5: howto manager. (line 1503)
8936+* BFD_RELOC_CRIS_UNSIGNED_6: howto manager. (line 1505)
8937+* BFD_RELOC_CRIS_UNSIGNED_8: howto manager. (line 1507)
8938+* BFD_RELOC_CRX_ABS16: howto manager. (line 1490)
8939+* BFD_RELOC_CRX_ABS32: howto manager. (line 1491)
8940+* BFD_RELOC_CRX_IMM16: howto manager. (line 1495)
8941+* BFD_RELOC_CRX_IMM32: howto manager. (line 1496)
8942+* BFD_RELOC_CRX_NUM16: howto manager. (line 1493)
8943+* BFD_RELOC_CRX_NUM32: howto manager. (line 1494)
8944+* BFD_RELOC_CRX_NUM8: howto manager. (line 1492)
8945+* BFD_RELOC_CRX_REGREL12: howto manager. (line 1486)
8946+* BFD_RELOC_CRX_REGREL22: howto manager. (line 1487)
8947+* BFD_RELOC_CRX_REGREL28: howto manager. (line 1488)
8948+* BFD_RELOC_CRX_REGREL32: howto manager. (line 1489)
8949+* BFD_RELOC_CRX_REL16: howto manager. (line 1483)
8950+* BFD_RELOC_CRX_REL24: howto manager. (line 1484)
8951+* BFD_RELOC_CRX_REL32: howto manager. (line 1485)
8952+* BFD_RELOC_CRX_REL4: howto manager. (line 1480)
8953+* BFD_RELOC_CRX_REL8: howto manager. (line 1481)
8954+* BFD_RELOC_CRX_REL8_CMP: howto manager. (line 1482)
8955+* BFD_RELOC_CRX_SWITCH16: howto manager. (line 1498)
8956+* BFD_RELOC_CRX_SWITCH32: howto manager. (line 1499)
8957+* BFD_RELOC_CRX_SWITCH8: howto manager. (line 1497)
8958+* BFD_RELOC_CTOR: howto manager. (line 586)
8959+* BFD_RELOC_D10V_10_PCREL_L: howto manager. (line 768)
8960+* BFD_RELOC_D10V_10_PCREL_R: howto manager. (line 764)
8961+* BFD_RELOC_D10V_18: howto manager. (line 773)
8962+* BFD_RELOC_D10V_18_PCREL: howto manager. (line 776)
8963+* BFD_RELOC_D30V_15: howto manager. (line 791)
8964+* BFD_RELOC_D30V_15_PCREL: howto manager. (line 795)
8965+* BFD_RELOC_D30V_15_PCREL_R: howto manager. (line 799)
8966+* BFD_RELOC_D30V_21: howto manager. (line 804)
8967+* BFD_RELOC_D30V_21_PCREL: howto manager. (line 808)
8968+* BFD_RELOC_D30V_21_PCREL_R: howto manager. (line 812)
8969+* BFD_RELOC_D30V_32: howto manager. (line 817)
8970+* BFD_RELOC_D30V_32_PCREL: howto manager. (line 820)
8971+* BFD_RELOC_D30V_6: howto manager. (line 779)
8972+* BFD_RELOC_D30V_9_PCREL: howto manager. (line 782)
8973+* BFD_RELOC_D30V_9_PCREL_R: howto manager. (line 786)
8974+* BFD_RELOC_DLX_HI16_S: howto manager. (line 823)
8975+* BFD_RELOC_DLX_JMP26: howto manager. (line 829)
8976+* BFD_RELOC_DLX_LO16: howto manager. (line 826)
8977+* BFD_RELOC_FR30_10_IN_8: howto manager. (line 1002)
8978+* BFD_RELOC_FR30_12_PCREL: howto manager. (line 1010)
8979+* BFD_RELOC_FR30_20: howto manager. (line 986)
8980+* BFD_RELOC_FR30_48: howto manager. (line 983)
8981+* BFD_RELOC_FR30_6_IN_4: howto manager. (line 990)
8982+* BFD_RELOC_FR30_8_IN_8: howto manager. (line 994)
8983+* BFD_RELOC_FR30_9_IN_8: howto manager. (line 998)
8984+* BFD_RELOC_FR30_9_PCREL: howto manager. (line 1006)
8985+* BFD_RELOC_FRV_FUNCDESC: howto manager. (line 364)
8986+* BFD_RELOC_FRV_FUNCDESC_GOT12: howto manager. (line 365)
8987+* BFD_RELOC_FRV_FUNCDESC_GOTHI: howto manager. (line 366)
8988+* BFD_RELOC_FRV_FUNCDESC_GOTLO: howto manager. (line 367)
8989+* BFD_RELOC_FRV_FUNCDESC_GOTOFF12: howto manager. (line 369)
8990+* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: howto manager. (line 370)
8991+* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: howto manager. (line 371)
8992+* BFD_RELOC_FRV_FUNCDESC_VALUE: howto manager. (line 368)
8993+* BFD_RELOC_FRV_GETTLSOFF: howto manager. (line 375)
8994+* BFD_RELOC_FRV_GETTLSOFF_RELAX: howto manager. (line 388)
8995+* BFD_RELOC_FRV_GOT12: howto manager. (line 361)
8996+* BFD_RELOC_FRV_GOTHI: howto manager. (line 362)
8997+* BFD_RELOC_FRV_GOTLO: howto manager. (line 363)
8998+* BFD_RELOC_FRV_GOTOFF12: howto manager. (line 372)
8999+* BFD_RELOC_FRV_GOTOFFHI: howto manager. (line 373)
9000+* BFD_RELOC_FRV_GOTOFFLO: howto manager. (line 374)
9001+* BFD_RELOC_FRV_GOTTLSDESC12: howto manager. (line 377)
9002+* BFD_RELOC_FRV_GOTTLSDESCHI: howto manager. (line 378)
9003+* BFD_RELOC_FRV_GOTTLSDESCLO: howto manager. (line 379)
9004+* BFD_RELOC_FRV_GOTTLSOFF12: howto manager. (line 383)
9005+* BFD_RELOC_FRV_GOTTLSOFFHI: howto manager. (line 384)
9006+* BFD_RELOC_FRV_GOTTLSOFFLO: howto manager. (line 385)
9007+* BFD_RELOC_FRV_GPREL12: howto manager. (line 356)
9008+* BFD_RELOC_FRV_GPREL32: howto manager. (line 358)
9009+* BFD_RELOC_FRV_GPRELHI: howto manager. (line 359)
9010+* BFD_RELOC_FRV_GPRELLO: howto manager. (line 360)
9011+* BFD_RELOC_FRV_GPRELU12: howto manager. (line 357)
9012+* BFD_RELOC_FRV_HI16: howto manager. (line 355)
9013+* BFD_RELOC_FRV_LABEL16: howto manager. (line 352)
9014+* BFD_RELOC_FRV_LABEL24: howto manager. (line 353)
9015+* BFD_RELOC_FRV_LO16: howto manager. (line 354)
9016+* BFD_RELOC_FRV_TLSDESC_RELAX: howto manager. (line 387)
9017+* BFD_RELOC_FRV_TLSDESC_VALUE: howto manager. (line 376)
9018+* BFD_RELOC_FRV_TLSMOFF: howto manager. (line 390)
9019+* BFD_RELOC_FRV_TLSMOFF12: howto manager. (line 380)
9020+* BFD_RELOC_FRV_TLSMOFFHI: howto manager. (line 381)
9021+* BFD_RELOC_FRV_TLSMOFFLO: howto manager. (line 382)
9022+* BFD_RELOC_FRV_TLSOFF: howto manager. (line 386)
9023+* BFD_RELOC_FRV_TLSOFF_RELAX: howto manager. (line 389)
9024+* BFD_RELOC_GPREL16: howto manager. (line 106)
9025+* BFD_RELOC_GPREL32: howto manager. (line 107)
9026+* BFD_RELOC_H8_DIR16A8: howto manager. (line 1581)
9027+* BFD_RELOC_H8_DIR16R8: howto manager. (line 1582)
9028+* BFD_RELOC_H8_DIR24A8: howto manager. (line 1583)
9029+* BFD_RELOC_H8_DIR24R8: howto manager. (line 1584)
9030+* BFD_RELOC_H8_DIR32A16: howto manager. (line 1585)
9031+* BFD_RELOC_HI16: howto manager. (line 289)
9032+* BFD_RELOC_HI16_BASEREL: howto manager. (line 82)
9033+* BFD_RELOC_HI16_GOTOFF: howto manager. (line 57)
9034+* BFD_RELOC_HI16_PLTOFF: howto manager. (line 69)
9035+* BFD_RELOC_HI16_S: howto manager. (line 292)
9036+* BFD_RELOC_HI16_S_BASEREL: howto manager. (line 83)
9037+* BFD_RELOC_HI16_S_GOTOFF: howto manager. (line 58)
9038+* BFD_RELOC_HI16_S_PLTOFF: howto manager. (line 70)
9039+* BFD_RELOC_HI22: howto manager. (line 101)
9040+* BFD_RELOC_I370_D12: howto manager. (line 583)
9041+* BFD_RELOC_I960_CALLJ: howto manager. (line 113)
9042+* BFD_RELOC_IA64_COPY: howto manager. (line 1374)
9043+* BFD_RELOC_IA64_DIR32LSB: howto manager. (line 1319)
9044+* BFD_RELOC_IA64_DIR32MSB: howto manager. (line 1318)
9045+* BFD_RELOC_IA64_DIR64LSB: howto manager. (line 1321)
9046+* BFD_RELOC_IA64_DIR64MSB: howto manager. (line 1320)
9047+* BFD_RELOC_IA64_DTPMOD64LSB: howto manager. (line 1384)
9048+* BFD_RELOC_IA64_DTPMOD64MSB: howto manager. (line 1383)
9049+* BFD_RELOC_IA64_DTPREL14: howto manager. (line 1386)
9050+* BFD_RELOC_IA64_DTPREL22: howto manager. (line 1387)
9051+* BFD_RELOC_IA64_DTPREL32LSB: howto manager. (line 1390)
9052+* BFD_RELOC_IA64_DTPREL32MSB: howto manager. (line 1389)
9053+* BFD_RELOC_IA64_DTPREL64I: howto manager. (line 1388)
9054+* BFD_RELOC_IA64_DTPREL64LSB: howto manager. (line 1392)
9055+* BFD_RELOC_IA64_DTPREL64MSB: howto manager. (line 1391)
9056+* BFD_RELOC_IA64_FPTR32LSB: howto manager. (line 1336)
9057+* BFD_RELOC_IA64_FPTR32MSB: howto manager. (line 1335)
9058+* BFD_RELOC_IA64_FPTR64I: howto manager. (line 1334)
9059+* BFD_RELOC_IA64_FPTR64LSB: howto manager. (line 1338)
9060+* BFD_RELOC_IA64_FPTR64MSB: howto manager. (line 1337)
9061+* BFD_RELOC_IA64_GPREL22: howto manager. (line 1322)
9062+* BFD_RELOC_IA64_GPREL32LSB: howto manager. (line 1325)
9063+* BFD_RELOC_IA64_GPREL32MSB: howto manager. (line 1324)
9064+* BFD_RELOC_IA64_GPREL64I: howto manager. (line 1323)
9065+* BFD_RELOC_IA64_GPREL64LSB: howto manager. (line 1327)
9066+* BFD_RELOC_IA64_GPREL64MSB: howto manager. (line 1326)
9067+* BFD_RELOC_IA64_IMM14: howto manager. (line 1315)
9068+* BFD_RELOC_IA64_IMM22: howto manager. (line 1316)
9069+* BFD_RELOC_IA64_IMM64: howto manager. (line 1317)
9070+* BFD_RELOC_IA64_IPLTLSB: howto manager. (line 1373)
9071+* BFD_RELOC_IA64_IPLTMSB: howto manager. (line 1372)
9072+* BFD_RELOC_IA64_LDXMOV: howto manager. (line 1376)
9073+* BFD_RELOC_IA64_LTOFF22: howto manager. (line 1328)
9074+* BFD_RELOC_IA64_LTOFF22X: howto manager. (line 1375)
9075+* BFD_RELOC_IA64_LTOFF64I: howto manager. (line 1329)
9076+* BFD_RELOC_IA64_LTOFF_DTPMOD22: howto manager. (line 1385)
9077+* BFD_RELOC_IA64_LTOFF_DTPREL22: howto manager. (line 1393)
9078+* BFD_RELOC_IA64_LTOFF_FPTR22: howto manager. (line 1350)
9079+* BFD_RELOC_IA64_LTOFF_FPTR32LSB: howto manager. (line 1353)
9080+* BFD_RELOC_IA64_LTOFF_FPTR32MSB: howto manager. (line 1352)
9081+* BFD_RELOC_IA64_LTOFF_FPTR64I: howto manager. (line 1351)
9082+* BFD_RELOC_IA64_LTOFF_FPTR64LSB: howto manager. (line 1355)
9083+* BFD_RELOC_IA64_LTOFF_FPTR64MSB: howto manager. (line 1354)
9084+* BFD_RELOC_IA64_LTOFF_TPREL22: howto manager. (line 1382)
9085+* BFD_RELOC_IA64_LTV32LSB: howto manager. (line 1369)
9086+* BFD_RELOC_IA64_LTV32MSB: howto manager. (line 1368)
9087+* BFD_RELOC_IA64_LTV64LSB: howto manager. (line 1371)
9088+* BFD_RELOC_IA64_LTV64MSB: howto manager. (line 1370)
9089+* BFD_RELOC_IA64_PCREL21B: howto manager. (line 1339)
9090+* BFD_RELOC_IA64_PCREL21BI: howto manager. (line 1340)
9091+* BFD_RELOC_IA64_PCREL21F: howto manager. (line 1342)
9092+* BFD_RELOC_IA64_PCREL21M: howto manager. (line 1341)
9093+* BFD_RELOC_IA64_PCREL22: howto manager. (line 1343)
9094+* BFD_RELOC_IA64_PCREL32LSB: howto manager. (line 1347)
9095+* BFD_RELOC_IA64_PCREL32MSB: howto manager. (line 1346)
9096+* BFD_RELOC_IA64_PCREL60B: howto manager. (line 1344)
9097+* BFD_RELOC_IA64_PCREL64I: howto manager. (line 1345)
9098+* BFD_RELOC_IA64_PCREL64LSB: howto manager. (line 1349)
9099+* BFD_RELOC_IA64_PCREL64MSB: howto manager. (line 1348)
9100+* BFD_RELOC_IA64_PLTOFF22: howto manager. (line 1330)
9101+* BFD_RELOC_IA64_PLTOFF64I: howto manager. (line 1331)
9102+* BFD_RELOC_IA64_PLTOFF64LSB: howto manager. (line 1333)
9103+* BFD_RELOC_IA64_PLTOFF64MSB: howto manager. (line 1332)
9104+* BFD_RELOC_IA64_REL32LSB: howto manager. (line 1365)
9105+* BFD_RELOC_IA64_REL32MSB: howto manager. (line 1364)
9106+* BFD_RELOC_IA64_REL64LSB: howto manager. (line 1367)
9107+* BFD_RELOC_IA64_REL64MSB: howto manager. (line 1366)
9108+* BFD_RELOC_IA64_SECREL32LSB: howto manager. (line 1361)
9109+* BFD_RELOC_IA64_SECREL32MSB: howto manager. (line 1360)
9110+* BFD_RELOC_IA64_SECREL64LSB: howto manager. (line 1363)
9111+* BFD_RELOC_IA64_SECREL64MSB: howto manager. (line 1362)
9112+* BFD_RELOC_IA64_SEGREL32LSB: howto manager. (line 1357)
9113+* BFD_RELOC_IA64_SEGREL32MSB: howto manager. (line 1356)
9114+* BFD_RELOC_IA64_SEGREL64LSB: howto manager. (line 1359)
9115+* BFD_RELOC_IA64_SEGREL64MSB: howto manager. (line 1358)
9116+* BFD_RELOC_IA64_TPREL14: howto manager. (line 1377)
9117+* BFD_RELOC_IA64_TPREL22: howto manager. (line 1378)
9118+* BFD_RELOC_IA64_TPREL64I: howto manager. (line 1379)
9119+* BFD_RELOC_IA64_TPREL64LSB: howto manager. (line 1381)
9120+* BFD_RELOC_IA64_TPREL64MSB: howto manager. (line 1380)
9121+* BFD_RELOC_IP2K_ADDR16CJP: howto manager. (line 1267)
9122+* BFD_RELOC_IP2K_BANK: howto manager. (line 1264)
9123+* BFD_RELOC_IP2K_EX8DATA: howto manager. (line 1275)
9124+* BFD_RELOC_IP2K_FR9: howto manager. (line 1261)
9125+* BFD_RELOC_IP2K_FR_OFFSET: howto manager. (line 1288)
9126+* BFD_RELOC_IP2K_HI8DATA: howto manager. (line 1274)
9127+* BFD_RELOC_IP2K_HI8INSN: howto manager. (line 1279)
9128+* BFD_RELOC_IP2K_LO8DATA: howto manager. (line 1273)
9129+* BFD_RELOC_IP2K_LO8INSN: howto manager. (line 1278)
9130+* BFD_RELOC_IP2K_PAGE3: howto manager. (line 1270)
9131+* BFD_RELOC_IP2K_PC_SKIP: howto manager. (line 1282)
9132+* BFD_RELOC_IP2K_TEXT: howto manager. (line 1285)
9133+* BFD_RELOC_IQ2000_OFFSET_16: howto manager. (line 1608)
9134+* BFD_RELOC_IQ2000_OFFSET_21: howto manager. (line 1609)
9135+* BFD_RELOC_IQ2000_UHI16: howto manager. (line 1610)
9136+* BFD_RELOC_LO10: howto manager. (line 102)
9137+* BFD_RELOC_LO16: howto manager. (line 298)
9138+* BFD_RELOC_LO16_BASEREL: howto manager. (line 81)
9139+* BFD_RELOC_LO16_GOTOFF: howto manager. (line 56)
9140+* BFD_RELOC_LO16_PLTOFF: howto manager. (line 68)
9141+* BFD_RELOC_M32R_10_PCREL: howto manager. (line 836)
9142+* BFD_RELOC_M32R_18_PCREL: howto manager. (line 840)
9143+* BFD_RELOC_M32R_24: howto manager. (line 832)
9144+* BFD_RELOC_M32R_26_PCREL: howto manager. (line 843)
9145+* BFD_RELOC_M32R_26_PLTREL: howto manager. (line 862)
9146+* BFD_RELOC_M32R_COPY: howto manager. (line 863)
9147+* BFD_RELOC_M32R_GLOB_DAT: howto manager. (line 864)
9148+* BFD_RELOC_M32R_GOT16_HI_SLO: howto manager. (line 873)
9149+* BFD_RELOC_M32R_GOT16_HI_ULO: howto manager. (line 872)
9150+* BFD_RELOC_M32R_GOT16_LO: howto manager. (line 874)
9151+* BFD_RELOC_M32R_GOT24: howto manager. (line 861)
9152+* BFD_RELOC_M32R_GOTOFF: howto manager. (line 867)
9153+* BFD_RELOC_M32R_GOTOFF_HI_SLO: howto manager. (line 869)
9154+* BFD_RELOC_M32R_GOTOFF_HI_ULO: howto manager. (line 868)
9155+* BFD_RELOC_M32R_GOTOFF_LO: howto manager. (line 870)
9156+* BFD_RELOC_M32R_GOTPC24: howto manager. (line 871)
9157+* BFD_RELOC_M32R_GOTPC_HI_SLO: howto manager. (line 876)
9158+* BFD_RELOC_M32R_GOTPC_HI_ULO: howto manager. (line 875)
9159+* BFD_RELOC_M32R_GOTPC_LO: howto manager. (line 877)
9160+* BFD_RELOC_M32R_HI16_SLO: howto manager. (line 850)
9161+* BFD_RELOC_M32R_HI16_ULO: howto manager. (line 846)
9162+* BFD_RELOC_M32R_JMP_SLOT: howto manager. (line 865)
9163+* BFD_RELOC_M32R_LO16: howto manager. (line 854)
9164+* BFD_RELOC_M32R_RELATIVE: howto manager. (line 866)
9165+* BFD_RELOC_M32R_SDA16: howto manager. (line 857)
9166+* BFD_RELOC_M68HC11_24: howto manager. (line 1429)
9167+* BFD_RELOC_M68HC11_3B: howto manager. (line 1404)
9168+* BFD_RELOC_M68HC11_HI8: howto manager. (line 1396)
9169+* BFD_RELOC_M68HC11_LO16: howto manager. (line 1418)
9170+* BFD_RELOC_M68HC11_LO8: howto manager. (line 1400)
9171+* BFD_RELOC_M68HC11_PAGE: howto manager. (line 1424)
9172+* BFD_RELOC_M68HC11_RL_GROUP: howto manager. (line 1413)
9173+* BFD_RELOC_M68HC11_RL_JUMP: howto manager. (line 1407)
9174+* BFD_RELOC_M68HC12_5B: howto manager. (line 1435)
9175+* BFD_RELOC_MCORE_PCREL_32: howto manager. (line 1017)
9176+* BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager. (line 1015)
9177+* BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager. (line 1016)
9178+* BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager. (line 1014)
9179+* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager. (line 1018)
9180+* BFD_RELOC_MCORE_RVA: howto manager. (line 1019)
9181+* BFD_RELOC_MIPS16_GPREL: howto manager. (line 286)
9182+* BFD_RELOC_MIPS16_HI16: howto manager. (line 301)
9183+* BFD_RELOC_MIPS16_HI16_S: howto manager. (line 304)
9184+* BFD_RELOC_MIPS16_JMP: howto manager. (line 283)
9185+* BFD_RELOC_MIPS16_LO16: howto manager. (line 310)
9186+* BFD_RELOC_MIPS_CALL16: howto manager. (line 317)
9187+* BFD_RELOC_MIPS_CALL_HI16: howto manager. (line 320)
9188+* BFD_RELOC_MIPS_CALL_LO16: howto manager. (line 321)
9189+* BFD_RELOC_MIPS_DELETE: howto manager. (line 330)
9190+* BFD_RELOC_MIPS_GOT16: howto manager. (line 316)
9191+* BFD_RELOC_MIPS_GOT_DISP: howto manager. (line 325)
9192+* BFD_RELOC_MIPS_GOT_HI16: howto manager. (line 318)
9193+* BFD_RELOC_MIPS_GOT_LO16: howto manager. (line 319)
9194+* BFD_RELOC_MIPS_GOT_OFST: howto manager. (line 324)
9195+* BFD_RELOC_MIPS_GOT_PAGE: howto manager. (line 323)
9196+* BFD_RELOC_MIPS_HIGHER: howto manager. (line 332)
9197+* BFD_RELOC_MIPS_HIGHEST: howto manager. (line 331)
9198+* BFD_RELOC_MIPS_INSERT_A: howto manager. (line 328)
9199+* BFD_RELOC_MIPS_INSERT_B: howto manager. (line 329)
9200+* BFD_RELOC_MIPS_JALR: howto manager. (line 336)
9201+* BFD_RELOC_MIPS_JMP: howto manager. (line 279)
9202+* BFD_RELOC_MIPS_LITERAL: howto manager. (line 313)
9203+* BFD_RELOC_MIPS_REL16: howto manager. (line 334)
9204+* BFD_RELOC_MIPS_RELGOT: howto manager. (line 335)
9205+* BFD_RELOC_MIPS_SCN_DISP: howto manager. (line 333)
9206+* BFD_RELOC_MIPS_SHIFT5: howto manager. (line 326)
9207+* BFD_RELOC_MIPS_SHIFT6: howto manager. (line 327)
9208+* BFD_RELOC_MIPS_SUB: howto manager. (line 322)
9209+* BFD_RELOC_MIPS_TLS_DTPMOD32: howto manager. (line 337)
9210+* BFD_RELOC_MIPS_TLS_DTPMOD64: howto manager. (line 339)
9211+* BFD_RELOC_MIPS_TLS_DTPREL32: howto manager. (line 338)
9212+* BFD_RELOC_MIPS_TLS_DTPREL64: howto manager. (line 340)
9213+* BFD_RELOC_MIPS_TLS_DTPREL_HI16: howto manager. (line 343)
9214+* BFD_RELOC_MIPS_TLS_DTPREL_LO16: howto manager. (line 344)
9215+* BFD_RELOC_MIPS_TLS_GD: howto manager. (line 341)
9216+* BFD_RELOC_MIPS_TLS_GOTTPREL: howto manager. (line 345)
9217+* BFD_RELOC_MIPS_TLS_LDM: howto manager. (line 342)
9218+* BFD_RELOC_MIPS_TLS_TPREL32: howto manager. (line 346)
9219+* BFD_RELOC_MIPS_TLS_TPREL64: howto manager. (line 347)
9220+* BFD_RELOC_MIPS_TLS_TPREL_HI16: howto manager. (line 348)
9221+* BFD_RELOC_MIPS_TLS_TPREL_LO16: howto manager. (line 349)
9222+* BFD_RELOC_MMIX_ADDR19: howto manager. (line 1048)
9223+* BFD_RELOC_MMIX_ADDR27: howto manager. (line 1052)
9224+* BFD_RELOC_MMIX_BASE_PLUS_OFFSET: howto manager. (line 1064)
9225+* BFD_RELOC_MMIX_CBRANCH: howto manager. (line 1028)
9226+* BFD_RELOC_MMIX_CBRANCH_1: howto manager. (line 1030)
9227+* BFD_RELOC_MMIX_CBRANCH_2: howto manager. (line 1031)
9228+* BFD_RELOC_MMIX_CBRANCH_3: howto manager. (line 1032)
9229+* BFD_RELOC_MMIX_CBRANCH_J: howto manager. (line 1029)
9230+* BFD_RELOC_MMIX_GETA: howto manager. (line 1022)
9231+* BFD_RELOC_MMIX_GETA_1: howto manager. (line 1023)
9232+* BFD_RELOC_MMIX_GETA_2: howto manager. (line 1024)
9233+* BFD_RELOC_MMIX_GETA_3: howto manager. (line 1025)
9234+* BFD_RELOC_MMIX_JMP: howto manager. (line 1042)
9235+* BFD_RELOC_MMIX_JMP_1: howto manager. (line 1043)
9236+* BFD_RELOC_MMIX_JMP_2: howto manager. (line 1044)
9237+* BFD_RELOC_MMIX_JMP_3: howto manager. (line 1045)
9238+* BFD_RELOC_MMIX_LOCAL: howto manager. (line 1068)
9239+* BFD_RELOC_MMIX_PUSHJ: howto manager. (line 1035)
9240+* BFD_RELOC_MMIX_PUSHJ_1: howto manager. (line 1036)
9241+* BFD_RELOC_MMIX_PUSHJ_2: howto manager. (line 1037)
9242+* BFD_RELOC_MMIX_PUSHJ_3: howto manager. (line 1038)
9243+* BFD_RELOC_MMIX_PUSHJ_STUBBABLE: howto manager. (line 1039)
9244+* BFD_RELOC_MMIX_REG: howto manager. (line 1060)
9245+* BFD_RELOC_MMIX_REG_OR_BYTE: howto manager. (line 1056)
9246+* BFD_RELOC_MN10300_16_PCREL: howto manager. (line 952)
9247+* BFD_RELOC_MN10300_32_PCREL: howto manager. (line 948)
9248+* BFD_RELOC_MN10300_COPY: howto manager. (line 408)
9249+* BFD_RELOC_MN10300_GLOB_DAT: howto manager. (line 411)
9250+* BFD_RELOC_MN10300_GOT16: howto manager. (line 404)
9251+* BFD_RELOC_MN10300_GOT24: howto manager. (line 400)
9252+* BFD_RELOC_MN10300_GOT32: howto manager. (line 396)
9253+* BFD_RELOC_MN10300_GOTOFF24: howto manager. (line 393)
9254+* BFD_RELOC_MN10300_JMP_SLOT: howto manager. (line 414)
9255+* BFD_RELOC_MN10300_RELATIVE: howto manager. (line 417)
9256+* BFD_RELOC_MSP430_10_PCREL: howto manager. (line 1599)
9257+* BFD_RELOC_MSP430_16: howto manager. (line 1601)
9258+* BFD_RELOC_MSP430_16_BYTE: howto manager. (line 1603)
9259+* BFD_RELOC_MSP430_16_PCREL: howto manager. (line 1600)
9260+* BFD_RELOC_MSP430_16_PCREL_BYTE: howto manager. (line 1602)
9261+* BFD_RELOC_MSP430_2X_PCREL: howto manager. (line 1604)
9262+* BFD_RELOC_MSP430_RL_PCREL: howto manager. (line 1605)
9263+* BFD_RELOC_NONE: howto manager. (line 116)
9264+* BFD_RELOC_NS32K_DISP_16: howto manager. (line 467)
9265+* BFD_RELOC_NS32K_DISP_16_PCREL: howto manager. (line 470)
9266+* BFD_RELOC_NS32K_DISP_32: howto manager. (line 468)
9267+* BFD_RELOC_NS32K_DISP_32_PCREL: howto manager. (line 471)
9268+* BFD_RELOC_NS32K_DISP_8: howto manager. (line 466)
9269+* BFD_RELOC_NS32K_DISP_8_PCREL: howto manager. (line 469)
9270+* BFD_RELOC_NS32K_IMM_16: howto manager. (line 461)
9271+* BFD_RELOC_NS32K_IMM_16_PCREL: howto manager. (line 464)
9272+* BFD_RELOC_NS32K_IMM_32: howto manager. (line 462)
9273+* BFD_RELOC_NS32K_IMM_32_PCREL: howto manager. (line 465)
9274+* BFD_RELOC_NS32K_IMM_8: howto manager. (line 460)
9275+* BFD_RELOC_NS32K_IMM_8_PCREL: howto manager. (line 463)
9276+* BFD_RELOC_OPENRISC_ABS_26: howto manager. (line 1577)
9277+* BFD_RELOC_OPENRISC_REL_26: howto manager. (line 1578)
9278+* BFD_RELOC_PDP11_DISP_6_PCREL: howto manager. (line 475)
9279+* BFD_RELOC_PDP11_DISP_8_PCREL: howto manager. (line 474)
9280+* BFD_RELOC_PJ_CODE_DIR16: howto manager. (line 480)
9281+* BFD_RELOC_PJ_CODE_DIR32: howto manager. (line 481)
9282+* BFD_RELOC_PJ_CODE_HI16: howto manager. (line 478)
9283+* BFD_RELOC_PJ_CODE_LO16: howto manager. (line 479)
9284+* BFD_RELOC_PJ_CODE_REL16: howto manager. (line 482)
9285+* BFD_RELOC_PJ_CODE_REL32: howto manager. (line 483)
9286+* BFD_RELOC_PPC64_ADDR16_DS: howto manager. (line 528)
9287+* BFD_RELOC_PPC64_ADDR16_LO_DS: howto manager. (line 529)
9288+* BFD_RELOC_PPC64_DTPREL16_DS: howto manager. (line 575)
9289+* BFD_RELOC_PPC64_DTPREL16_HIGHER: howto manager. (line 577)
9290+* BFD_RELOC_PPC64_DTPREL16_HIGHERA: howto manager. (line 578)
9291+* BFD_RELOC_PPC64_DTPREL16_HIGHEST: howto manager. (line 579)
9292+* BFD_RELOC_PPC64_DTPREL16_HIGHESTA: howto manager. (line 580)
9293+* BFD_RELOC_PPC64_DTPREL16_LO_DS: howto manager. (line 576)
9294+* BFD_RELOC_PPC64_GOT16_DS: howto manager. (line 530)
9295+* BFD_RELOC_PPC64_GOT16_LO_DS: howto manager. (line 531)
9296+* BFD_RELOC_PPC64_HIGHER: howto manager. (line 516)
9297+* BFD_RELOC_PPC64_HIGHER_S: howto manager. (line 517)
9298+* BFD_RELOC_PPC64_HIGHEST: howto manager. (line 518)
9299+* BFD_RELOC_PPC64_HIGHEST_S: howto manager. (line 519)
9300+* BFD_RELOC_PPC64_PLT16_LO_DS: howto manager. (line 532)
9301+* BFD_RELOC_PPC64_PLTGOT16: howto manager. (line 524)
9302+* BFD_RELOC_PPC64_PLTGOT16_DS: howto manager. (line 537)
9303+* BFD_RELOC_PPC64_PLTGOT16_HA: howto manager. (line 527)
9304+* BFD_RELOC_PPC64_PLTGOT16_HI: howto manager. (line 526)
9305+* BFD_RELOC_PPC64_PLTGOT16_LO: howto manager. (line 525)
9306+* BFD_RELOC_PPC64_PLTGOT16_LO_DS: howto manager. (line 538)
9307+* BFD_RELOC_PPC64_SECTOFF_DS: howto manager. (line 533)
9308+* BFD_RELOC_PPC64_SECTOFF_LO_DS: howto manager. (line 534)
9309+* BFD_RELOC_PPC64_TOC: howto manager. (line 523)
9310+* BFD_RELOC_PPC64_TOC16_DS: howto manager. (line 535)
9311+* BFD_RELOC_PPC64_TOC16_HA: howto manager. (line 522)
9312+* BFD_RELOC_PPC64_TOC16_HI: howto manager. (line 521)
9313+* BFD_RELOC_PPC64_TOC16_LO: howto manager. (line 520)
9314+* BFD_RELOC_PPC64_TOC16_LO_DS: howto manager. (line 536)
9315+* BFD_RELOC_PPC64_TPREL16_DS: howto manager. (line 569)
9316+* BFD_RELOC_PPC64_TPREL16_HIGHER: howto manager. (line 571)
9317+* BFD_RELOC_PPC64_TPREL16_HIGHERA: howto manager. (line 572)
9318+* BFD_RELOC_PPC64_TPREL16_HIGHEST: howto manager. (line 573)
9319+* BFD_RELOC_PPC64_TPREL16_HIGHESTA: howto manager. (line 574)
9320+* BFD_RELOC_PPC64_TPREL16_LO_DS: howto manager. (line 570)
9321+* BFD_RELOC_PPC_B16: howto manager. (line 489)
9322+* BFD_RELOC_PPC_B16_BRNTAKEN: howto manager. (line 491)
9323+* BFD_RELOC_PPC_B16_BRTAKEN: howto manager. (line 490)
9324+* BFD_RELOC_PPC_B26: howto manager. (line 486)
9325+* BFD_RELOC_PPC_BA16: howto manager. (line 492)
9326+* BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager. (line 494)
9327+* BFD_RELOC_PPC_BA16_BRTAKEN: howto manager. (line 493)
9328+* BFD_RELOC_PPC_BA26: howto manager. (line 487)
9329+* BFD_RELOC_PPC_COPY: howto manager. (line 495)
9330+* BFD_RELOC_PPC_DTPMOD: howto manager. (line 542)
9331+* BFD_RELOC_PPC_DTPREL: howto manager. (line 552)
9332+* BFD_RELOC_PPC_DTPREL16: howto manager. (line 548)
9333+* BFD_RELOC_PPC_DTPREL16_HA: howto manager. (line 551)
9334+* BFD_RELOC_PPC_DTPREL16_HI: howto manager. (line 550)
9335+* BFD_RELOC_PPC_DTPREL16_LO: howto manager. (line 549)
9336+* BFD_RELOC_PPC_EMB_BIT_FLD: howto manager. (line 514)
9337+* BFD_RELOC_PPC_EMB_MRKREF: howto manager. (line 509)
9338+* BFD_RELOC_PPC_EMB_NADDR16: howto manager. (line 501)
9339+* BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager. (line 504)
9340+* BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager. (line 503)
9341+* BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager. (line 502)
9342+* BFD_RELOC_PPC_EMB_NADDR32: howto manager. (line 500)
9343+* BFD_RELOC_PPC_EMB_RELSDA: howto manager. (line 515)
9344+* BFD_RELOC_PPC_EMB_RELSEC16: howto manager. (line 510)
9345+* BFD_RELOC_PPC_EMB_RELST_HA: howto manager. (line 513)
9346+* BFD_RELOC_PPC_EMB_RELST_HI: howto manager. (line 512)
9347+* BFD_RELOC_PPC_EMB_RELST_LO: howto manager. (line 511)
9348+* BFD_RELOC_PPC_EMB_SDA21: howto manager. (line 508)
9349+* BFD_RELOC_PPC_EMB_SDA2I16: howto manager. (line 506)
9350+* BFD_RELOC_PPC_EMB_SDA2REL: howto manager. (line 507)
9351+* BFD_RELOC_PPC_EMB_SDAI16: howto manager. (line 505)
9352+* BFD_RELOC_PPC_GLOB_DAT: howto manager. (line 496)
9353+* BFD_RELOC_PPC_GOT_DTPREL16: howto manager. (line 565)
9354+* BFD_RELOC_PPC_GOT_DTPREL16_HA: howto manager. (line 568)
9355+* BFD_RELOC_PPC_GOT_DTPREL16_HI: howto manager. (line 567)
9356+* BFD_RELOC_PPC_GOT_DTPREL16_LO: howto manager. (line 566)
9357+* BFD_RELOC_PPC_GOT_TLSGD16: howto manager. (line 553)
9358+* BFD_RELOC_PPC_GOT_TLSGD16_HA: howto manager. (line 556)
9359+* BFD_RELOC_PPC_GOT_TLSGD16_HI: howto manager. (line 555)
9360+* BFD_RELOC_PPC_GOT_TLSGD16_LO: howto manager. (line 554)
9361+* BFD_RELOC_PPC_GOT_TLSLD16: howto manager. (line 557)
9362+* BFD_RELOC_PPC_GOT_TLSLD16_HA: howto manager. (line 560)
9363+* BFD_RELOC_PPC_GOT_TLSLD16_HI: howto manager. (line 559)
9364+* BFD_RELOC_PPC_GOT_TLSLD16_LO: howto manager. (line 558)
9365+* BFD_RELOC_PPC_GOT_TPREL16: howto manager. (line 561)
9366+* BFD_RELOC_PPC_GOT_TPREL16_HA: howto manager. (line 564)
9367+* BFD_RELOC_PPC_GOT_TPREL16_HI: howto manager. (line 563)
9368+* BFD_RELOC_PPC_GOT_TPREL16_LO: howto manager. (line 562)
9369+* BFD_RELOC_PPC_JMP_SLOT: howto manager. (line 497)
9370+* BFD_RELOC_PPC_LOCAL24PC: howto manager. (line 499)
9371+* BFD_RELOC_PPC_RELATIVE: howto manager. (line 498)
9372+* BFD_RELOC_PPC_TLS: howto manager. (line 541)
9373+* BFD_RELOC_PPC_TOC16: howto manager. (line 488)
9374+* BFD_RELOC_PPC_TPREL: howto manager. (line 547)
9375+* BFD_RELOC_PPC_TPREL16: howto manager. (line 543)
9376+* BFD_RELOC_PPC_TPREL16_HA: howto manager. (line 546)
9377+* BFD_RELOC_PPC_TPREL16_HI: howto manager. (line 545)
9378+* BFD_RELOC_PPC_TPREL16_LO: howto manager. (line 544)
9379+* BFD_RELOC_RVA: howto manager. (line 85)
9380+* BFD_RELOC_SH_ALIGN: howto manager. (line 677)
9381+* BFD_RELOC_SH_CODE: howto manager. (line 678)
9382+* BFD_RELOC_SH_COPY: howto manager. (line 683)
9383+* BFD_RELOC_SH_COPY64: howto manager. (line 708)
9384+* BFD_RELOC_SH_COUNT: howto manager. (line 676)
9385+* BFD_RELOC_SH_DATA: howto manager. (line 679)
9386+* BFD_RELOC_SH_DISP12: howto manager. (line 659)
9387+* BFD_RELOC_SH_DISP12BY2: howto manager. (line 660)
9388+* BFD_RELOC_SH_DISP12BY4: howto manager. (line 661)
9389+* BFD_RELOC_SH_DISP12BY8: howto manager. (line 662)
9390+* BFD_RELOC_SH_DISP20: howto manager. (line 663)
9391+* BFD_RELOC_SH_DISP20BY8: howto manager. (line 664)
9392+* BFD_RELOC_SH_GLOB_DAT: howto manager. (line 684)
9393+* BFD_RELOC_SH_GLOB_DAT64: howto manager. (line 709)
9394+* BFD_RELOC_SH_GOT10BY4: howto manager. (line 712)
9395+* BFD_RELOC_SH_GOT10BY8: howto manager. (line 713)
9396+* BFD_RELOC_SH_GOT_HI16: howto manager. (line 691)
9397+* BFD_RELOC_SH_GOT_LOW16: howto manager. (line 688)
9398+* BFD_RELOC_SH_GOT_MEDHI16: howto manager. (line 690)
9399+* BFD_RELOC_SH_GOT_MEDLOW16: howto manager. (line 689)
9400+* BFD_RELOC_SH_GOTOFF_HI16: howto manager. (line 703)
9401+* BFD_RELOC_SH_GOTOFF_LOW16: howto manager. (line 700)
9402+* BFD_RELOC_SH_GOTOFF_MEDHI16: howto manager. (line 702)
9403+* BFD_RELOC_SH_GOTOFF_MEDLOW16: howto manager. (line 701)
9404+* BFD_RELOC_SH_GOTPC: howto manager. (line 687)
9405+* BFD_RELOC_SH_GOTPC_HI16: howto manager. (line 707)
9406+* BFD_RELOC_SH_GOTPC_LOW16: howto manager. (line 704)
9407+* BFD_RELOC_SH_GOTPC_MEDHI16: howto manager. (line 706)
9408+* BFD_RELOC_SH_GOTPC_MEDLOW16: howto manager. (line 705)
9409+* BFD_RELOC_SH_GOTPLT10BY4: howto manager. (line 714)
9410+* BFD_RELOC_SH_GOTPLT10BY8: howto manager. (line 715)
9411+* BFD_RELOC_SH_GOTPLT32: howto manager. (line 716)
9412+* BFD_RELOC_SH_GOTPLT_HI16: howto manager. (line 695)
9413+* BFD_RELOC_SH_GOTPLT_LOW16: howto manager. (line 692)
9414+* BFD_RELOC_SH_GOTPLT_MEDHI16: howto manager. (line 694)
9415+* BFD_RELOC_SH_GOTPLT_MEDLOW16: howto manager. (line 693)
9416+* BFD_RELOC_SH_IMM3: howto manager. (line 657)
9417+* BFD_RELOC_SH_IMM3U: howto manager. (line 658)
9418+* BFD_RELOC_SH_IMM4: howto manager. (line 665)
9419+* BFD_RELOC_SH_IMM4BY2: howto manager. (line 666)
9420+* BFD_RELOC_SH_IMM4BY4: howto manager. (line 667)
9421+* BFD_RELOC_SH_IMM8: howto manager. (line 668)
9422+* BFD_RELOC_SH_IMM8BY2: howto manager. (line 669)
9423+* BFD_RELOC_SH_IMM8BY4: howto manager. (line 670)
9424+* BFD_RELOC_SH_IMM_HI16: howto manager. (line 734)
9425+* BFD_RELOC_SH_IMM_HI16_PCREL: howto manager. (line 735)
9426+* BFD_RELOC_SH_IMM_LOW16: howto manager. (line 728)
9427+* BFD_RELOC_SH_IMM_LOW16_PCREL: howto manager. (line 729)
9428+* BFD_RELOC_SH_IMM_MEDHI16: howto manager. (line 732)
9429+* BFD_RELOC_SH_IMM_MEDHI16_PCREL: howto manager. (line 733)
9430+* BFD_RELOC_SH_IMM_MEDLOW16: howto manager. (line 730)
9431+* BFD_RELOC_SH_IMM_MEDLOW16_PCREL: howto manager. (line 731)
9432+* BFD_RELOC_SH_IMMS10: howto manager. (line 722)
9433+* BFD_RELOC_SH_IMMS10BY2: howto manager. (line 723)
9434+* BFD_RELOC_SH_IMMS10BY4: howto manager. (line 724)
9435+* BFD_RELOC_SH_IMMS10BY8: howto manager. (line 725)
9436+* BFD_RELOC_SH_IMMS16: howto manager. (line 726)
9437+* BFD_RELOC_SH_IMMS6: howto manager. (line 719)
9438+* BFD_RELOC_SH_IMMS6BY32: howto manager. (line 720)
9439+* BFD_RELOC_SH_IMMU16: howto manager. (line 727)
9440+* BFD_RELOC_SH_IMMU5: howto manager. (line 718)
9441+* BFD_RELOC_SH_IMMU6: howto manager. (line 721)
9442+* BFD_RELOC_SH_JMP_SLOT: howto manager. (line 685)
9443+* BFD_RELOC_SH_JMP_SLOT64: howto manager. (line 710)
9444+* BFD_RELOC_SH_LABEL: howto manager. (line 680)
9445+* BFD_RELOC_SH_LOOP_END: howto manager. (line 682)
9446+* BFD_RELOC_SH_LOOP_START: howto manager. (line 681)
9447+* BFD_RELOC_SH_PCDISP12BY2: howto manager. (line 656)
9448+* BFD_RELOC_SH_PCDISP8BY2: howto manager. (line 655)
9449+* BFD_RELOC_SH_PCRELIMM8BY2: howto manager. (line 671)
9450+* BFD_RELOC_SH_PCRELIMM8BY4: howto manager. (line 672)
9451+* BFD_RELOC_SH_PLT_HI16: howto manager. (line 699)
9452+* BFD_RELOC_SH_PLT_LOW16: howto manager. (line 696)
9453+* BFD_RELOC_SH_PLT_MEDHI16: howto manager. (line 698)
9454+* BFD_RELOC_SH_PLT_MEDLOW16: howto manager. (line 697)
9455+* BFD_RELOC_SH_PT_16: howto manager. (line 736)
9456+* BFD_RELOC_SH_RELATIVE: howto manager. (line 686)
9457+* BFD_RELOC_SH_RELATIVE64: howto manager. (line 711)
9458+* BFD_RELOC_SH_SHMEDIA_CODE: howto manager. (line 717)
9459+* BFD_RELOC_SH_SWITCH16: howto manager. (line 673)
9460+* BFD_RELOC_SH_SWITCH32: howto manager. (line 674)
9461+* BFD_RELOC_SH_TLS_DTPMOD32: howto manager. (line 742)
9462+* BFD_RELOC_SH_TLS_DTPOFF32: howto manager. (line 743)
9463+* BFD_RELOC_SH_TLS_GD_32: howto manager. (line 737)
9464+* BFD_RELOC_SH_TLS_IE_32: howto manager. (line 740)
9465+* BFD_RELOC_SH_TLS_LD_32: howto manager. (line 738)
9466+* BFD_RELOC_SH_TLS_LDO_32: howto manager. (line 739)
9467+* BFD_RELOC_SH_TLS_LE_32: howto manager. (line 741)
9468+* BFD_RELOC_SH_TLS_TPOFF32: howto manager. (line 744)
9469+* BFD_RELOC_SH_USES: howto manager. (line 675)
9470+* BFD_RELOC_SPARC13: howto manager. (line 119)
9471+* BFD_RELOC_SPARC22: howto manager. (line 118)
9472+* BFD_RELOC_SPARC_10: howto manager. (line 141)
9473+* BFD_RELOC_SPARC_11: howto manager. (line 142)
9474+* BFD_RELOC_SPARC_5: howto manager. (line 154)
9475+* BFD_RELOC_SPARC_6: howto manager. (line 153)
9476+* BFD_RELOC_SPARC_64: howto manager. (line 140)
9477+* BFD_RELOC_SPARC_7: howto manager. (line 152)
9478+* BFD_RELOC_SPARC_BASE13: howto manager. (line 136)
9479+* BFD_RELOC_SPARC_BASE22: howto manager. (line 137)
9480+* BFD_RELOC_SPARC_COPY: howto manager. (line 126)
9481+* BFD_RELOC_SPARC_DISP64: howto manager. (line 155)
9482+* BFD_RELOC_SPARC_GLOB_DAT: howto manager. (line 127)
9483+* BFD_RELOC_SPARC_GOT10: howto manager. (line 120)
9484+* BFD_RELOC_SPARC_GOT13: howto manager. (line 121)
9485+* BFD_RELOC_SPARC_GOT22: howto manager. (line 122)
9486+* BFD_RELOC_SPARC_H44: howto manager. (line 160)
9487+* BFD_RELOC_SPARC_HH22: howto manager. (line 144)
9488+* BFD_RELOC_SPARC_HIX22: howto manager. (line 158)
9489+* BFD_RELOC_SPARC_HM10: howto manager. (line 145)
9490+* BFD_RELOC_SPARC_JMP_SLOT: howto manager. (line 128)
9491+* BFD_RELOC_SPARC_L44: howto manager. (line 162)
9492+* BFD_RELOC_SPARC_LM22: howto manager. (line 146)
9493+* BFD_RELOC_SPARC_LOX10: howto manager. (line 159)
9494+* BFD_RELOC_SPARC_M44: howto manager. (line 161)
9495+* BFD_RELOC_SPARC_OLO10: howto manager. (line 143)
9496+* BFD_RELOC_SPARC_PC10: howto manager. (line 123)
9497+* BFD_RELOC_SPARC_PC22: howto manager. (line 124)
9498+* BFD_RELOC_SPARC_PC_HH22: howto manager. (line 147)
9499+* BFD_RELOC_SPARC_PC_HM10: howto manager. (line 148)
9500+* BFD_RELOC_SPARC_PC_LM22: howto manager. (line 149)
9501+* BFD_RELOC_SPARC_PLT32: howto manager. (line 156)
9502+* BFD_RELOC_SPARC_PLT64: howto manager. (line 157)
9503+* BFD_RELOC_SPARC_REGISTER: howto manager. (line 163)
9504+* BFD_RELOC_SPARC_RELATIVE: howto manager. (line 129)
9505+* BFD_RELOC_SPARC_REV32: howto manager. (line 166)
9506+* BFD_RELOC_SPARC_TLS_DTPMOD32: howto manager. (line 187)
9507+* BFD_RELOC_SPARC_TLS_DTPMOD64: howto manager. (line 188)
9508+* BFD_RELOC_SPARC_TLS_DTPOFF32: howto manager. (line 189)
9509+* BFD_RELOC_SPARC_TLS_DTPOFF64: howto manager. (line 190)
9510+* BFD_RELOC_SPARC_TLS_GD_ADD: howto manager. (line 171)
9511+* BFD_RELOC_SPARC_TLS_GD_CALL: howto manager. (line 172)
9512+* BFD_RELOC_SPARC_TLS_GD_HI22: howto manager. (line 169)
9513+* BFD_RELOC_SPARC_TLS_GD_LO10: howto manager. (line 170)
9514+* BFD_RELOC_SPARC_TLS_IE_ADD: howto manager. (line 184)
9515+* BFD_RELOC_SPARC_TLS_IE_HI22: howto manager. (line 180)
9516+* BFD_RELOC_SPARC_TLS_IE_LD: howto manager. (line 182)
9517+* BFD_RELOC_SPARC_TLS_IE_LDX: howto manager. (line 183)
9518+* BFD_RELOC_SPARC_TLS_IE_LO10: howto manager. (line 181)
9519+* BFD_RELOC_SPARC_TLS_LDM_ADD: howto manager. (line 175)
9520+* BFD_RELOC_SPARC_TLS_LDM_CALL: howto manager. (line 176)
9521+* BFD_RELOC_SPARC_TLS_LDM_HI22: howto manager. (line 173)
9522+* BFD_RELOC_SPARC_TLS_LDM_LO10: howto manager. (line 174)
9523+* BFD_RELOC_SPARC_TLS_LDO_ADD: howto manager. (line 179)
9524+* BFD_RELOC_SPARC_TLS_LDO_HIX22: howto manager. (line 177)
9525+* BFD_RELOC_SPARC_TLS_LDO_LOX10: howto manager. (line 178)
9526+* BFD_RELOC_SPARC_TLS_LE_HIX22: howto manager. (line 185)
9527+* BFD_RELOC_SPARC_TLS_LE_LOX10: howto manager. (line 186)
9528+* BFD_RELOC_SPARC_TLS_TPOFF32: howto manager. (line 191)
9529+* BFD_RELOC_SPARC_TLS_TPOFF64: howto manager. (line 192)
9530+* BFD_RELOC_SPARC_UA16: howto manager. (line 130)
9531+* BFD_RELOC_SPARC_UA32: howto manager. (line 131)
9532+* BFD_RELOC_SPARC_UA64: howto manager. (line 132)
9533+* BFD_RELOC_SPARC_WDISP16: howto manager. (line 150)
9534+* BFD_RELOC_SPARC_WDISP19: howto manager. (line 151)
9535+* BFD_RELOC_SPARC_WDISP22: howto manager. (line 117)
9536+* BFD_RELOC_SPARC_WPLT30: howto manager. (line 125)
9537+* BFD_RELOC_THUMB_PCREL_BLX: howto manager. (line 601)
9538+* BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager. (line 749)
9539+* BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager. (line 750)
9540+* BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager. (line 748)
9541+* BFD_RELOC_TIC30_LDP: howto manager. (line 956)
9542+* BFD_RELOC_TIC54X_16_OF_23: howto manager. (line 974)
9543+* BFD_RELOC_TIC54X_23: howto manager. (line 971)
9544+* BFD_RELOC_TIC54X_MS7_OF_23: howto manager. (line 979)
9545+* BFD_RELOC_TIC54X_PARTLS7: howto manager. (line 961)
9546+* BFD_RELOC_TIC54X_PARTMS9: howto manager. (line 966)
9547+* bfd_reloc_type_lookup: howto manager. (line 1693)
9548+* BFD_RELOC_V850_22_PCREL: howto manager. (line 883)
9549+* BFD_RELOC_V850_9_PCREL: howto manager. (line 880)
9550+* BFD_RELOC_V850_ALIGN: howto manager. (line 941)
9551+* BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager. (line 932)
9552+* BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager. (line 929)
9553+* BFD_RELOC_V850_LO16_SPLIT_OFFSET: howto manager. (line 944)
9554+* BFD_RELOC_V850_LONGCALL: howto manager. (line 935)
9555+* BFD_RELOC_V850_LONGJUMP: howto manager. (line 938)
9556+* BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager. (line 889)
9557+* BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager. (line 886)
9558+* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager. (line 921)
9559+* BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager. (line 911)
9560+* BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager. (line 918)
9561+* BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager. (line 914)
9562+* BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager. (line 900)
9563+* BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager. (line 908)
9564+* BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager. (line 904)
9565+* BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager. (line 896)
9566+* BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager. (line 893)
9567+* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager. (line 925)
9568+* BFD_RELOC_VAX_GLOB_DAT: howto manager. (line 1594)
9569+* BFD_RELOC_VAX_JMP_SLOT: howto manager. (line 1595)
9570+* BFD_RELOC_VAX_RELATIVE: howto manager. (line 1596)
9571+* BFD_RELOC_VPE4KMATH_DATA: howto manager. (line 1291)
9572+* BFD_RELOC_VPE4KMATH_INSN: howto manager. (line 1292)
9573+* BFD_RELOC_VTABLE_ENTRY: howto manager. (line 1296)
9574+* BFD_RELOC_VTABLE_INHERIT: howto manager. (line 1295)
9575+* BFD_RELOC_X86_64_32S: howto manager. (line 449)
9576+* BFD_RELOC_X86_64_COPY: howto manager. (line 444)
9577+* BFD_RELOC_X86_64_DTPMOD64: howto manager. (line 450)
9578+* BFD_RELOC_X86_64_DTPOFF32: howto manager. (line 455)
9579+* BFD_RELOC_X86_64_DTPOFF64: howto manager. (line 451)
9580+* BFD_RELOC_X86_64_GLOB_DAT: howto manager. (line 445)
9581+* BFD_RELOC_X86_64_GOT32: howto manager. (line 442)
9582+* BFD_RELOC_X86_64_GOTPCREL: howto manager. (line 448)
9583+* BFD_RELOC_X86_64_GOTTPOFF: howto manager. (line 456)
9584+* BFD_RELOC_X86_64_JUMP_SLOT: howto manager. (line 446)
9585+* BFD_RELOC_X86_64_PLT32: howto manager. (line 443)
9586+* BFD_RELOC_X86_64_RELATIVE: howto manager. (line 447)
9587+* BFD_RELOC_X86_64_TLSGD: howto manager. (line 453)
9588+* BFD_RELOC_X86_64_TLSLD: howto manager. (line 454)
9589+* BFD_RELOC_X86_64_TPOFF32: howto manager. (line 457)
9590+* BFD_RELOC_X86_64_TPOFF64: howto manager. (line 452)
9591+* BFD_RELOC_XSTORMY16_12: howto manager. (line 1589)
9592+* BFD_RELOC_XSTORMY16_24: howto manager. (line 1590)
9593+* BFD_RELOC_XSTORMY16_FPTR16: howto manager. (line 1591)
9594+* BFD_RELOC_XSTORMY16_REL_12: howto manager. (line 1588)
9595+* BFD_RELOC_XTENSA_ASM_EXPAND: howto manager. (line 1682)
9596+* BFD_RELOC_XTENSA_ASM_SIMPLIFY: howto manager. (line 1687)
9597+* BFD_RELOC_XTENSA_DIFF16: howto manager. (line 1629)
9598+* BFD_RELOC_XTENSA_DIFF32: howto manager. (line 1630)
9599+* BFD_RELOC_XTENSA_DIFF8: howto manager. (line 1628)
9600+* BFD_RELOC_XTENSA_GLOB_DAT: howto manager. (line 1618)
9601+* BFD_RELOC_XTENSA_JMP_SLOT: howto manager. (line 1619)
9602+* BFD_RELOC_XTENSA_OP0: howto manager. (line 1676)
9603+* BFD_RELOC_XTENSA_OP1: howto manager. (line 1677)
9604+* BFD_RELOC_XTENSA_OP2: howto manager. (line 1678)
9605+* BFD_RELOC_XTENSA_PLT: howto manager. (line 1623)
9606+* BFD_RELOC_XTENSA_RELATIVE: howto manager. (line 1620)
9607+* BFD_RELOC_XTENSA_RTLD: howto manager. (line 1613)
9608+* BFD_RELOC_XTENSA_SLOT0_ALT: howto manager. (line 1658)
9609+* BFD_RELOC_XTENSA_SLOT0_OP: howto manager. (line 1638)
9610+* BFD_RELOC_XTENSA_SLOT10_ALT: howto manager. (line 1668)
9611+* BFD_RELOC_XTENSA_SLOT10_OP: howto manager. (line 1648)
9612+* BFD_RELOC_XTENSA_SLOT11_ALT: howto manager. (line 1669)
9613+* BFD_RELOC_XTENSA_SLOT11_OP: howto manager. (line 1649)
9614+* BFD_RELOC_XTENSA_SLOT12_ALT: howto manager. (line 1670)
9615+* BFD_RELOC_XTENSA_SLOT12_OP: howto manager. (line 1650)
9616+* BFD_RELOC_XTENSA_SLOT13_ALT: howto manager. (line 1671)
9617+* BFD_RELOC_XTENSA_SLOT13_OP: howto manager. (line 1651)
9618+* BFD_RELOC_XTENSA_SLOT14_ALT: howto manager. (line 1672)
9619+* BFD_RELOC_XTENSA_SLOT14_OP: howto manager. (line 1652)
9620+* BFD_RELOC_XTENSA_SLOT1_ALT: howto manager. (line 1659)
9621+* BFD_RELOC_XTENSA_SLOT1_OP: howto manager. (line 1639)
9622+* BFD_RELOC_XTENSA_SLOT2_ALT: howto manager. (line 1660)
9623+* BFD_RELOC_XTENSA_SLOT2_OP: howto manager. (line 1640)
9624+* BFD_RELOC_XTENSA_SLOT3_ALT: howto manager. (line 1661)
9625+* BFD_RELOC_XTENSA_SLOT3_OP: howto manager. (line 1641)
9626+* BFD_RELOC_XTENSA_SLOT4_ALT: howto manager. (line 1662)
9627+* BFD_RELOC_XTENSA_SLOT4_OP: howto manager. (line 1642)
9628+* BFD_RELOC_XTENSA_SLOT5_ALT: howto manager. (line 1663)
9629+* BFD_RELOC_XTENSA_SLOT5_OP: howto manager. (line 1643)
9630+* BFD_RELOC_XTENSA_SLOT6_ALT: howto manager. (line 1664)
9631+* BFD_RELOC_XTENSA_SLOT6_OP: howto manager. (line 1644)
9632+* BFD_RELOC_XTENSA_SLOT7_ALT: howto manager. (line 1665)
9633+* BFD_RELOC_XTENSA_SLOT7_OP: howto manager. (line 1645)
9634+* BFD_RELOC_XTENSA_SLOT8_ALT: howto manager. (line 1666)
9635+* BFD_RELOC_XTENSA_SLOT8_OP: howto manager. (line 1646)
9636+* BFD_RELOC_XTENSA_SLOT9_ALT: howto manager. (line 1667)
9637+* BFD_RELOC_XTENSA_SLOT9_OP: howto manager. (line 1647)
9638+* bfd_scan_arch: Architectures. (line 369)
9639+* bfd_scan_vma: BFD front end. (line 420)
9640+* bfd_seach_for_target: bfd_target. (line 445)
9641+* bfd_section_already_linked: Writing the symbol table.
9642+ (line 55)
9643+* bfd_section_list_clear: section prototypes. (line 8)
9644+* bfd_sections_find_if: section prototypes. (line 145)
9645+* bfd_set_arch_info: Architectures. (line 410)
9646+* bfd_set_archive_head: Archives. (line 66)
9647+* bfd_set_default_target: bfd_target. (line 410)
9648+* bfd_set_error: BFD front end. (line 235)
9649+* bfd_set_error_handler: BFD front end. (line 275)
9650+* bfd_set_error_program_name: BFD front end. (line 284)
9651+* bfd_set_file_flags: BFD front end. (line 340)
9652+* bfd_set_format: Formats. (line 65)
9653+* bfd_set_gp_size: BFD front end. (line 410)
9654+* bfd_set_private_flags: BFD front end. (line 487)
9655+* bfd_set_reloc: BFD front end. (line 330)
9656+* bfd_set_section_contents: section prototypes. (line 176)
9657+* bfd_set_section_flags: section prototypes. (line 109)
9658+* bfd_set_section_size: section prototypes. (line 162)
9659+* bfd_set_start_address: BFD front end. (line 389)
9660+* bfd_set_symtab: symbol handling functions.
9661+ (line 60)
9662+* bfd_symbol_info: symbol handling functions.
9663+ (line 130)
9664+* bfd_target_list: bfd_target. (line 436)
9665+* bfd_write_bigendian_4byte_int: Internal. (line 10)
9666+* bfd_zalloc: Opening and Closing.
9667+ (line 188)
9668+* coff_symbol_type: coff. (line 186)
9669+* core_file_matches_executable_p: Core Files. (line 27)
9670+* find_separate_debug_file: Opening and Closing.
9671+ (line 230)
9672+* get_debug_link_info: Opening and Closing.
9673+ (line 211)
9674+* Hash tables: Hash Tables. (line 6)
9675+* internal object-file format: Canonical format. (line 11)
9676+* Linker: Linker Functions. (line 6)
9677+* Other functions: BFD front end. (line 502)
9678+* separate_debug_file_exists: Opening and Closing.
9679+ (line 221)
9680+* struct bfd_iovec: BFD front end. (line 646)
9681+* target vector (_bfd_final_link): Performing the Final Link.
9682+ (line 6)
9683+* target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
9684+ (line 6)
9685+* target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
9686+ (line 6)
9687+* The HOWTO Macro: typedef arelent. (line 290)
9688+* what is it?: Overview. (line 6)
9689+
9690+
239691 
249692 Tag Table:
25-(Indirect)
26-Node: Top724
27-Node: Overview1056
28-Node: History2107
29-Node: How It Works3053
30-Node: What BFD Version 2 Can Do4595
31-Node: BFD information loss5910
32-Node: Canonical format8442
33-Node: BFD front end12814
34-Node: Memory Usage38041
35-Node: Initialization39269
36-Node: Sections39665
37-Node: Section Input40148
38-Node: Section Output41513
39-Node: typedef asection43999
40-Node: section prototypes61598
41-Node: Symbols70581
42-Node: Reading Symbols72176
43-Node: Writing Symbols73283
44-Node: Mini Symbols74992
45-Node: typedef asymbol75966
46-Node: symbol handling functions80884
47-Node: Archives86226
48-Node: Formats89903
49-Node: Relocations92794
50-Node: typedef arelent93521
51-Node: howto manager109239
52-Node: Core Files165412
53-Node: Targets166491
54-Node: bfd_target168461
55-Node: Architectures187781
56-Node: Opening and Closing208078
57-Node: Internal217791
58-Node: File Caching224063
59-Node: Linker Functions227370
60-Node: Creating a Linker Hash Table229043
61-Node: Adding Symbols to the Hash Table230781
62-Node: Differing file formats231681
63-Node: Adding symbols from an object file233429
64-Node: Adding symbols from an archive235580
65-Node: Performing the Final Link237994
66-Node: Information provided by the linker239236
67-Node: Relocating the section contents240386
68-Node: Writing the symbol table242137
69-Node: Hash Tables245130
70-Node: Creating and Freeing a Hash Table246328
71-Node: Looking Up or Entering a String247578
72-Node: Traversing a Hash Table248831
73-Node: Deriving a New Hash Table Type249620
74-Node: Define the Derived Structures250686
75-Node: Write the Derived Creation Routine251767
76-Node: Write Other Derived Routines254461
77-Node: BFD back ends255776
78-Node: What to Put Where256046
79-Node: aout256184
80-Node: coff262435
81-Node: elf287111
82-Node: mmo287965
83-Node: File layout288893
84-Node: Symbol-table294540
85-Node: mmo section mapping298309
86-Node: GNU Free Documentation License301961
87-Node: Index321681
9693+Node: Top734
9694+Node: Overview1066
9695+Node: History2117
9696+Node: How It Works3063
9697+Node: What BFD Version 2 Can Do4605
9698+Node: BFD information loss5920
9699+Node: Canonical format8452
9700+Node: BFD front end12824
9701+Node: Memory Usage38051
9702+Node: Initialization39279
9703+Node: Sections39675
9704+Node: Section Input40158
9705+Node: Section Output41523
9706+Node: typedef asection44009
9707+Node: section prototypes61608
9708+Node: Symbols70591
9709+Node: Reading Symbols72186
9710+Node: Writing Symbols73293
9711+Node: Mini Symbols75002
9712+Node: typedef asymbol75976
9713+Node: symbol handling functions80894
9714+Node: Archives86236
9715+Node: Formats89913
9716+Node: Relocations92804
9717+Node: typedef arelent93531
9718+Node: howto manager109249
9719+Node: Core Files165422
9720+Node: Targets166501
9721+Node: bfd_target168471
9722+Node: Architectures187791
9723+Node: Opening and Closing208088
9724+Node: Internal217801
9725+Node: File Caching224073
9726+Node: Linker Functions227380
9727+Node: Creating a Linker Hash Table229053
9728+Node: Adding Symbols to the Hash Table230791
9729+Node: Differing file formats231691
9730+Node: Adding symbols from an object file233439
9731+Node: Adding symbols from an archive235590
9732+Node: Performing the Final Link238004
9733+Node: Information provided by the linker239246
9734+Node: Relocating the section contents240396
9735+Node: Writing the symbol table242147
9736+Node: Hash Tables245140
9737+Node: Creating and Freeing a Hash Table246338
9738+Node: Looking Up or Entering a String247588
9739+Node: Traversing a Hash Table248841
9740+Node: Deriving a New Hash Table Type249630
9741+Node: Define the Derived Structures250696
9742+Node: Write the Derived Creation Routine251777
9743+Node: Write Other Derived Routines254471
9744+Node: BFD back ends255786
9745+Node: What to Put Where256056
9746+Node: aout256194
9747+Node: coff262445
9748+Node: elf287121
9749+Node: mmo287975
9750+Node: File layout288903
9751+Node: Symbol-table294550
9752+Node: mmo section mapping298319
9753+Node: GNU Free Documentation License301971
9754+Node: Index321691
889755 
899756 End Tag Table
--- a/bfd/doc/bfd.info-1
+++ /dev/null
@@ -1,8006 +0,0 @@
1-This is ../.././bfd/doc/bfd.info, produced by makeinfo version 4.7 from
2-../.././bfd/doc/bfd.texinfo.
3-
4-START-INFO-DIR-ENTRY
5-* Bfd: (bfd). The Binary File Descriptor library.
6-END-INFO-DIR-ENTRY
7-
8- This file documents the BFD library.
9-
10- Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
11-
12- Permission is granted to copy, distribute and/or modify this document
13- under the terms of the GNU Free Documentation License, Version 1.1
14- or any later version published by the Free Software Foundation;
15- with no Invariant Sections, with no Front-Cover Texts, and with no
16- Back-Cover Texts. A copy of the license is included in the
17-section entitled "GNU Free Documentation License".
18-
19-
20-File: bfd.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
21-
22- This file documents the binary file descriptor library libbfd.
23-
24-* Menu:
25-
26-* Overview:: Overview of BFD
27-* BFD front end:: BFD front end
28-* BFD back ends:: BFD back ends
29-* GNU Free Documentation License:: GNU Free Documentation License
30-* Index:: Index
31-
32-
33-File: bfd.info, Node: Overview, Next: BFD front end, Prev: Top, Up: Top
34-
35-1 Introduction
36-**************
37-
38-BFD is a package which allows applications to use the same routines to
39-operate on object files whatever the object file format. A new object
40-file format can be supported simply by creating a new BFD back end and
41-adding it to the library.
42-
43- BFD is split into two parts: the front end, and the back ends (one
44-for each object file format).
45- * The front end of BFD provides the interface to the user. It manages
46- memory and various canonical data structures. The front end also
47- decides which back end to use and when to call back end routines.
48-
49- * The back ends provide BFD its view of the real world. Each back
50- end provides a set of calls which the BFD front end can use to
51- maintain its canonical form. The back ends also may keep around
52- information for their own use, for greater efficiency.
53-
54-* Menu:
55-
56-* History:: History
57-* How It Works:: How It Works
58-* What BFD Version 2 Can Do:: What BFD Version 2 Can Do
59-
60-
61-File: bfd.info, Node: History, Next: How It Works, Prev: Overview, Up: Overview
62-
63-1.1 History
64-===========
65-
66-One spur behind BFD was the desire, on the part of the GNU 960 team at
67-Intel Oregon, for interoperability of applications on their COFF and
68-b.out file formats. Cygnus was providing GNU support for the team, and
69-was contracted to provide the required functionality.
70-
71- The name came from a conversation David Wallace was having with
72-Richard Stallman about the library: RMS said that it would be quite
73-hard--David said "BFD". Stallman was right, but the name stuck.
74-
75- At the same time, Ready Systems wanted much the same thing, but for
76-different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k
77-coff.
78-
79- BFD was first implemented by members of Cygnus Support; Steve
80-Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K.
81-Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace
82-(`gumby@cygnus.com').
83-
84-
85-File: bfd.info, Node: How It Works, Next: What BFD Version 2 Can Do, Prev: History, Up: Overview
86-
87-1.2 How To Use BFD
88-==================
89-
90-To use the library, include `bfd.h' and link with `libbfd.a'.
91-
92- BFD provides a common interface to the parts of an object file for a
93-calling application.
94-
95- When an application sucessfully opens a target file (object,
96-archive, or whatever), a pointer to an internal structure is returned.
97-This pointer points to a structure called `bfd', described in `bfd.h'.
98-Our convention is to call this pointer a BFD, and instances of it
99-within code `abfd'. All operations on the target object file are
100-applied as methods to the BFD. The mapping is defined within `bfd.h'
101-in a set of macros, all beginning with `bfd_' to reduce namespace
102-pollution.
103-
104- For example, this sequence does what you would probably expect:
105-return the number of sections in an object file attached to a BFD
106-`abfd'.
107-
108- #include "bfd.h"
109-
110- unsigned int number_of_sections (abfd)
111- bfd *abfd;
112- {
113- return bfd_count_sections (abfd);
114- }
115-
116- The abstraction used within BFD is that an object file has:
117-
118- * a header,
119-
120- * a number of sections containing raw data (*note Sections::),
121-
122- * a set of relocations (*note Relocations::), and
123-
124- * some symbol information (*note Symbols::).
125- Also, BFDs opened for archives have the additional attribute of an
126-index and contain subordinate BFDs. This approach is fine for a.out and
127-coff, but loses efficiency when applied to formats such as S-records and
128-IEEE-695.
129-
130-
131-File: bfd.info, Node: What BFD Version 2 Can Do, Prev: How It Works, Up: Overview
132-
133-1.3 What BFD Version 2 Can Do
134-=============================
135-
136-When an object file is opened, BFD subroutines automatically determine
137-the format of the input object file. They then build a descriptor in
138-memory with pointers to routines that will be used to access elements of
139-the object file's data structures.
140-
141- As different information from the object files is required, BFD
142-reads from different sections of the file and processes them. For
143-example, a very common operation for the linker is processing symbol
144-tables. Each BFD back end provides a routine for converting between
145-the object file's representation of symbols and an internal canonical
146-format. When the linker asks for the symbol table of an object file, it
147-calls through a memory pointer to the routine from the relevant BFD
148-back end which reads and converts the table into a canonical form. The
149-linker then operates upon the canonical form. When the link is finished
150-and the linker writes the output file's symbol table, another BFD back
151-end routine is called to take the newly created symbol table and
152-convert it into the chosen output format.
153-
154-* Menu:
155-
156-* BFD information loss:: Information Loss
157-* Canonical format:: The BFD canonical object-file format
158-
159-
160-File: bfd.info, Node: BFD information loss, Next: Canonical format, Up: What BFD Version 2 Can Do
161-
162-1.3.1 Information Loss
163-----------------------
164-
165-_Information can be lost during output._ The output formats supported
166-by BFD do not provide identical facilities, and information which can
167-be described in one form has nowhere to go in another format. One
168-example of this is alignment information in `b.out'. There is nowhere
169-in an `a.out' format file to store alignment information on the
170-contained data, so when a file is linked from `b.out' and an `a.out'
171-image is produced, alignment information will not propagate to the
172-output file. (The linker will still use the alignment information
173-internally, so the link is performed correctly).
174-
175- Another example is COFF section names. COFF files may contain an
176-unlimited number of sections, each one with a textual section name. If
177-the target of the link is a format which does not have many sections
178-(e.g., `a.out') or has sections without names (e.g., the Oasys format),
179-the link cannot be done simply. You can circumvent this problem by
180-describing the desired input-to-output section mapping with the linker
181-command language.
182-
183- _Information can be lost during canonicalization._ The BFD internal
184-canonical form of the external formats is not exhaustive; there are
185-structures in input formats for which there is no direct representation
186-internally. This means that the BFD back ends cannot maintain all
187-possible data richness through the transformation between external to
188-internal and back to external formats.
189-
190- This limitation is only a problem when an application reads one
191-format and writes another. Each BFD back end is responsible for
192-maintaining as much data as possible, and the internal BFD canonical
193-form has structures which are opaque to the BFD core, and exported only
194-to the back ends. When a file is read in one format, the canonical form
195-is generated for BFD and the application. At the same time, the back
196-end saves away any information which may otherwise be lost. If the data
197-is then written back in the same format, the back end routine will be
198-able to use the canonical form provided by the BFD core as well as the
199-information it prepared earlier. Since there is a great deal of
200-commonality between back ends, there is no information lost when
201-linking or copying big endian COFF to little endian COFF, or `a.out' to
202-`b.out'. When a mixture of formats is linked, the information is only
203-lost from the files whose format differs from the destination.
204-
205-
206-File: bfd.info, Node: Canonical format, Prev: BFD information loss, Up: What BFD Version 2 Can Do
207-
208-1.3.2 The BFD canonical object-file format
209-------------------------------------------
210-
211-The greatest potential for loss of information occurs when there is the
212-least overlap between the information provided by the source format,
213-that stored by the canonical format, and that needed by the destination
214-format. A brief description of the canonical form may help you
215-understand which kinds of data you can count on preserving across
216-conversions.
217-
218-_files_
219- Information stored on a per-file basis includes target machine
220- architecture, particular implementation format type, a demand
221- pageable bit, and a write protected bit. Information like Unix
222- magic numbers is not stored here--only the magic numbers' meaning,
223- so a `ZMAGIC' file would have both the demand pageable bit and the
224- write protected text bit set. The byte order of the target is
225- stored on a per-file basis, so that big- and little-endian object
226- files may be used with one another.
227-
228-_sections_
229- Each section in the input file contains the name of the section,
230- the section's original address in the object file, size and
231- alignment information, various flags, and pointers into other BFD
232- data structures.
233-
234-_symbols_
235- Each symbol contains a pointer to the information for the object
236- file which originally defined it, its name, its value, and various
237- flag bits. When a BFD back end reads in a symbol table, it
238- relocates all symbols to make them relative to the base of the
239- section where they were defined. Doing this ensures that each
240- symbol points to its containing section. Each symbol also has a
241- varying amount of hidden private data for the BFD back end. Since
242- the symbol points to the original file, the private data format
243- for that symbol is accessible. `ld' can operate on a collection
244- of symbols of wildly different formats without problems.
245-
246- Normal global and simple local symbols are maintained on output,
247- so an output file (no matter its format) will retain symbols
248- pointing to functions and to global, static, and common variables.
249- Some symbol information is not worth retaining; in `a.out', type
250- information is stored in the symbol table as long symbol names.
251- This information would be useless to most COFF debuggers; the
252- linker has command line switches to allow users to throw it away.
253-
254- There is one word of type information within the symbol, so if the
255- format supports symbol type information within symbols (for
256- example, COFF, IEEE, Oasys) and the type is simple enough to fit
257- within one word (nearly everything but aggregates), the
258- information will be preserved.
259-
260-_relocation level_
261- Each canonical BFD relocation record contains a pointer to the
262- symbol to relocate to, the offset of the data to relocate, the
263- section the data is in, and a pointer to a relocation type
264- descriptor. Relocation is performed by passing messages through
265- the relocation type descriptor and the symbol pointer. Therefore,
266- relocations can be performed on output data using a relocation
267- method that is only available in one of the input formats. For
268- instance, Oasys provides a byte relocation format. A relocation
269- record requesting this relocation type would point indirectly to a
270- routine to perform this, so the relocation may be performed on a
271- byte being written to a 68k COFF file, even though 68k COFF has no
272- such relocation type.
273-
274-_line numbers_
275- Object formats can contain, for debugging purposes, some form of
276- mapping between symbols, source line numbers, and addresses in the
277- output file. These addresses have to be relocated along with the
278- symbol information. Each symbol with an associated list of line
279- number records points to the first record of the list. The head
280- of a line number list consists of a pointer to the symbol, which
281- allows finding out the address of the function whose line number
282- is being described. The rest of the list is made up of pairs:
283- offsets into the section and line numbers. Any format which can
284- simply derive this information can pass it successfully between
285- formats (COFF, IEEE and Oasys).
286-
287-
288-File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up: Top
289-
290-2 BFD Front End
291-***************
292-
293-2.1 `typedef bfd'
294-=================
295-
296-A BFD has type `bfd'; objects of this type are the cornerstone of any
297-application using BFD. Using BFD consists of making references though
298-the BFD and to data in the BFD.
299-
300- Here is the structure that defines the type `bfd'. It contains the
301-major data about the file and pointers to the rest of the data.
302-
303-
304- struct bfd
305- {
306- /* A unique identifier of the BFD */
307- unsigned int id;
308-
309- /* The filename the application opened the BFD with. */
310- const char *filename;
311-
312- /* A pointer to the target jump table. */
313- const struct bfd_target *xvec;
314-
315- /* The IOSTREAM, and corresponding IO vector that provide access
316- to the file backing the BFD. */
317- void *iostream;
318- const struct bfd_iovec *iovec;
319-
320- /* Is the file descriptor being cached? That is, can it be closed as
321- needed, and re-opened when accessed later? */
322- bfd_boolean cacheable;
323-
324- /* Marks whether there was a default target specified when the
325- BFD was opened. This is used to select which matching algorithm
326- to use to choose the back end. */
327- bfd_boolean target_defaulted;
328-
329- /* The caching routines use these to maintain a
330- least-recently-used list of BFDs. */
331- struct bfd *lru_prev, *lru_next;
332-
333- /* When a file is closed by the caching routines, BFD retains
334- state information on the file here... */
335- ufile_ptr where;
336-
337- /* ... and here: (``once'' means at least once). */
338- bfd_boolean opened_once;
339-
340- /* Set if we have a locally maintained mtime value, rather than
341- getting it from the file each time. */
342- bfd_boolean mtime_set;
343-
344- /* File modified time, if mtime_set is TRUE. */
345- long mtime;
346-
347- /* Reserved for an unimplemented file locking extension. */
348- int ifd;
349-
350- /* The format which belongs to the BFD. (object, core, etc.) */
351- bfd_format format;
352-
353- /* The direction with which the BFD was opened. */
354- enum bfd_direction
355- {
356- no_direction = 0,
357- read_direction = 1,
358- write_direction = 2,
359- both_direction = 3
360- }
361- direction;
362-
363- /* Format_specific flags. */
364- flagword flags;
365-
366- /* Currently my_archive is tested before adding origin to
367- anything. I believe that this can become always an add of
368- origin, with origin set to 0 for non archive files. */
369- ufile_ptr origin;
370-
371- /* Remember when output has begun, to stop strange things
372- from happening. */
373- bfd_boolean output_has_begun;
374-
375- /* A hash table for section names. */
376- struct bfd_hash_table section_htab;
377-
378- /* Pointer to linked list of sections. */
379- struct bfd_section *sections;
380-
381- /* The place where we add to the section list. */
382- struct bfd_section **section_tail;
383-
384- /* The number of sections. */
385- unsigned int section_count;
386-
387- /* Stuff only useful for object files:
388- The start address. */
389- bfd_vma start_address;
390-
391- /* Used for input and output. */
392- unsigned int symcount;
393-
394- /* Symbol table for output BFD (with symcount entries). */
395- struct bfd_symbol **outsymbols;
396-
397- /* Used for slurped dynamic symbol tables. */
398- unsigned int dynsymcount;
399-
400- /* Pointer to structure which contains architecture information. */
401- const struct bfd_arch_info *arch_info;
402-
403- /* Flag set if symbols from this BFD should not be exported. */
404- bfd_boolean no_export;
405-
406- /* Stuff only useful for archives. */
407- void *arelt_data;
408- struct bfd *my_archive; /* The containing archive BFD. */
409- struct bfd *next; /* The next BFD in the archive. */
410- struct bfd *archive_head; /* The first BFD in the archive. */
411- bfd_boolean has_armap;
412-
413- /* A chain of BFD structures involved in a link. */
414- struct bfd *link_next;
415-
416- /* A field used by _bfd_generic_link_add_archive_symbols. This will
417- be used only for archive elements. */
418- int archive_pass;
419-
420- /* Used by the back end to hold private data. */
421- union
422- {
423- struct aout_data_struct *aout_data;
424- struct artdata *aout_ar_data;
425- struct _oasys_data *oasys_obj_data;
426- struct _oasys_ar_data *oasys_ar_data;
427- struct coff_tdata *coff_obj_data;
428- struct pe_tdata *pe_obj_data;
429- struct xcoff_tdata *xcoff_obj_data;
430- struct ecoff_tdata *ecoff_obj_data;
431- struct ieee_data_struct *ieee_data;
432- struct ieee_ar_data_struct *ieee_ar_data;
433- struct srec_data_struct *srec_data;
434- struct ihex_data_struct *ihex_data;
435- struct tekhex_data_struct *tekhex_data;
436- struct elf_obj_tdata *elf_obj_data;
437- struct nlm_obj_tdata *nlm_obj_data;
438- struct bout_data_struct *bout_data;
439- struct mmo_data_struct *mmo_data;
440- struct sun_core_struct *sun_core_data;
441- struct sco5_core_struct *sco5_core_data;
442- struct trad_core_struct *trad_core_data;
443- struct som_data_struct *som_data;
444- struct hpux_core_struct *hpux_core_data;
445- struct hppabsd_core_struct *hppabsd_core_data;
446- struct sgi_core_struct *sgi_core_data;
447- struct lynx_core_struct *lynx_core_data;
448- struct osf_core_struct *osf_core_data;
449- struct cisco_core_struct *cisco_core_data;
450- struct versados_data_struct *versados_data;
451- struct netbsd_core_struct *netbsd_core_data;
452- struct mach_o_data_struct *mach_o_data;
453- struct mach_o_fat_data_struct *mach_o_fat_data;
454- struct bfd_pef_data_struct *pef_data;
455- struct bfd_pef_xlib_data_struct *pef_xlib_data;
456- struct bfd_sym_data_struct *sym_data;
457- void *any;
458- }
459- tdata;
460-
461- /* Used by the application to hold private data. */
462- void *usrdata;
463-
464- /* Where all the allocated stuff under this BFD goes. This is a
465- struct objalloc *, but we use void * to avoid requiring the inclusion
466- of objalloc.h. */
467- void *memory;
468- };
469-
470-2.2 Error reporting
471-===================
472-
473-Most BFD functions return nonzero on success (check their individual
474-documentation for precise semantics). On an error, they call
475-`bfd_set_error' to set an error condition that callers can check by
476-calling `bfd_get_error'. If that returns `bfd_error_system_call', then
477-check `errno'.
478-
479- The easiest way to report a BFD error to the user is to use
480-`bfd_perror'.
481-
482-2.2.1 Type `bfd_error_type'
483----------------------------
484-
485-The values returned by `bfd_get_error' are defined by the enumerated
486-type `bfd_error_type'.
487-
488-
489- typedef enum bfd_error
490- {
491- bfd_error_no_error = 0,
492- bfd_error_system_call,
493- bfd_error_invalid_target,
494- bfd_error_wrong_format,
495- bfd_error_wrong_object_format,
496- bfd_error_invalid_operation,
497- bfd_error_no_memory,
498- bfd_error_no_symbols,
499- bfd_error_no_armap,
500- bfd_error_no_more_archived_files,
501- bfd_error_malformed_archive,
502- bfd_error_file_not_recognized,
503- bfd_error_file_ambiguously_recognized,
504- bfd_error_no_contents,
505- bfd_error_nonrepresentable_section,
506- bfd_error_no_debug_section,
507- bfd_error_bad_value,
508- bfd_error_file_truncated,
509- bfd_error_file_too_big,
510- bfd_error_invalid_error_code
511- }
512- bfd_error_type;
513-
514-2.2.1.1 `bfd_get_error'
515-.......................
516-
517-*Synopsis*
518- bfd_error_type bfd_get_error (void);
519- *Description*
520-Return the current BFD error condition.
521-
522-2.2.1.2 `bfd_set_error'
523-.......................
524-
525-*Synopsis*
526- void bfd_set_error (bfd_error_type error_tag);
527- *Description*
528-Set the BFD error condition to be ERROR_TAG.
529-
530-2.2.1.3 `bfd_errmsg'
531-....................
532-
533-*Synopsis*
534- const char *bfd_errmsg (bfd_error_type error_tag);
535- *Description*
536-Return a string describing the error ERROR_TAG, or the system error if
537-ERROR_TAG is `bfd_error_system_call'.
538-
539-2.2.1.4 `bfd_perror'
540-....................
541-
542-*Synopsis*
543- void bfd_perror (const char *message);
544- *Description*
545-Print to the standard error stream a string describing the last BFD
546-error that occurred, or the last system error if the last BFD error was
547-a system call failure. If MESSAGE is non-NULL and non-empty, the error
548-string printed is preceded by MESSAGE, a colon, and a space. It is
549-followed by a newline.
550-
551-2.2.2 BFD error handler
552------------------------
553-
554-Some BFD functions want to print messages describing the problem. They
555-call a BFD error handler function. This function may be overridden by
556-the program.
557-
558- The BFD error handler acts like printf.
559-
560-
561- typedef void (*bfd_error_handler_type) (const char *, ...);
562-
563-2.2.2.1 `bfd_set_error_handler'
564-...............................
565-
566-*Synopsis*
567- bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
568- *Description*
569-Set the BFD error handler function. Returns the previous function.
570-
571-2.2.2.2 `bfd_set_error_program_name'
572-....................................
573-
574-*Synopsis*
575- void bfd_set_error_program_name (const char *);
576- *Description*
577-Set the program name to use when printing a BFD error. This is printed
578-before the error message followed by a colon and space. The string
579-must not be changed after it is passed to this function.
580-
581-2.2.2.3 `bfd_get_error_handler'
582-...............................
583-
584-*Synopsis*
585- bfd_error_handler_type bfd_get_error_handler (void);
586- *Description*
587-Return the BFD error handler function.
588-
589-2.3 Symbols
590-===========
591-
592-2.3.0.1 `bfd_get_reloc_upper_bound'
593-...................................
594-
595-*Synopsis*
596- long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
597- *Description*
598-Return the number of bytes required to store the relocation information
599-associated with section SECT attached to bfd ABFD. If an error occurs,
600-return -1.
601-
602-2.3.0.2 `bfd_canonicalize_reloc'
603-................................
604-
605-*Synopsis*
606- long bfd_canonicalize_reloc
607- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
608- *Description*
609-Call the back end associated with the open BFD ABFD and translate the
610-external form of the relocation information attached to SEC into the
611-internal canonical form. Place the table into memory at LOC, which has
612-been preallocated, usually by a call to `bfd_get_reloc_upper_bound'.
613-Returns the number of relocs, or -1 on error.
614-
615- The SYMS table is also needed for horrible internal magic reasons.
616-
617-2.3.0.3 `bfd_set_reloc'
618-.......................
619-
620-*Synopsis*
621- void bfd_set_reloc
622- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
623- *Description*
624-Set the relocation pointer and count within section SEC to the values
625-REL and COUNT. The argument ABFD is ignored.
626-
627-2.3.0.4 `bfd_set_file_flags'
628-............................
629-
630-*Synopsis*
631- bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
632- *Description*
633-Set the flag word in the BFD ABFD to the value FLAGS.
634-
635- Possible errors are:
636- * `bfd_error_wrong_format' - The target bfd was not of object format.
637-
638- * `bfd_error_invalid_operation' - The target bfd was open for
639- reading.
640-
641- * `bfd_error_invalid_operation' - The flag word contained a bit
642- which was not applicable to the type of file. E.g., an attempt
643- was made to set the `D_PAGED' bit on a BFD format which does not
644- support demand paging.
645-
646-2.3.0.5 `bfd_get_arch_size'
647-...........................
648-
649-*Synopsis*
650- int bfd_get_arch_size (bfd *abfd);
651- *Description*
652-Returns the architecture address size, in bits, as determined by the
653-object file's format. For ELF, this information is included in the
654-header.
655-
656- *Returns*
657-Returns the arch size in bits if known, `-1' otherwise.
658-
659-2.3.0.6 `bfd_get_sign_extend_vma'
660-.................................
661-
662-*Synopsis*
663- int bfd_get_sign_extend_vma (bfd *abfd);
664- *Description*
665-Indicates if the target architecture "naturally" sign extends an
666-address. Some architectures implicitly sign extend address values when
667-they are converted to types larger than the size of an address. For
668-instance, bfd_get_start_address() will return an address sign extended
669-to fill a bfd_vma when this is the case.
670-
671- *Returns*
672-Returns `1' if the target architecture is known to sign extend
673-addresses, `0' if the target architecture is known to not sign extend
674-addresses, and `-1' otherwise.
675-
676-2.3.0.7 `bfd_set_start_address'
677-...............................
678-
679-*Synopsis*
680- bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
681- *Description*
682-Make VMA the entry point of output BFD ABFD.
683-
684- *Returns*
685-Returns `TRUE' on success, `FALSE' otherwise.
686-
687-2.3.0.8 `bfd_get_gp_size'
688-.........................
689-
690-*Synopsis*
691- unsigned int bfd_get_gp_size (bfd *abfd);
692- *Description*
693-Return the maximum size of objects to be optimized using the GP
694-register under MIPS ECOFF. This is typically set by the `-G' argument
695-to the compiler, assembler or linker.
696-
697-2.3.0.9 `bfd_set_gp_size'
698-.........................
699-
700-*Synopsis*
701- void bfd_set_gp_size (bfd *abfd, unsigned int i);
702- *Description*
703-Set the maximum size of objects to be optimized using the GP register
704-under ECOFF or MIPS ELF. This is typically set by the `-G' argument to
705-the compiler, assembler or linker.
706-
707-2.3.0.10 `bfd_scan_vma'
708-.......................
709-
710-*Synopsis*
711- bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
712- *Description*
713-Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
714-integer, and return that integer. (Though without as many bells and
715-whistles as `strtoul'.) The expression is assumed to be unsigned
716-(i.e., positive). If given a BASE, it is used as the base for
717-conversion. A base of 0 causes the function to interpret the string in
718-hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
719-zero is found, otherwise in decimal.
720-
721- If the value would overflow, the maximum `bfd_vma' value is returned.
722-
723-2.3.0.11 `bfd_copy_private_header_data'
724-.......................................
725-
726-*Synopsis*
727- bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
728- *Description*
729-Copy private BFD header information from the BFD IBFD to the the BFD
730-OBFD. This copies information that may require sections to exist, but
731-does not require symbol tables. Return `true' on success, `false' on
732-error. Possible error returns are:
733-
734- * `bfd_error_no_memory' - Not enough memory exists to create private
735- data for OBFD.
736-
737- #define bfd_copy_private_header_data(ibfd, obfd) \
738- BFD_SEND (obfd, _bfd_copy_private_header_data, \
739- (ibfd, obfd))
740-
741-2.3.0.12 `bfd_copy_private_bfd_data'
742-....................................
743-
744-*Synopsis*
745- bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
746- *Description*
747-Copy private BFD information from the BFD IBFD to the the BFD OBFD.
748-Return `TRUE' on success, `FALSE' on error. Possible error returns are:
749-
750- * `bfd_error_no_memory' - Not enough memory exists to create private
751- data for OBFD.
752-
753- #define bfd_copy_private_bfd_data(ibfd, obfd) \
754- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
755- (ibfd, obfd))
756-
757-2.3.0.13 `bfd_merge_private_bfd_data'
758-.....................................
759-
760-*Synopsis*
761- bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
762- *Description*
763-Merge private BFD information from the BFD IBFD to the the output file
764-BFD OBFD when linking. Return `TRUE' on success, `FALSE' on error.
765-Possible error returns are:
766-
767- * `bfd_error_no_memory' - Not enough memory exists to create private
768- data for OBFD.
769-
770- #define bfd_merge_private_bfd_data(ibfd, obfd) \
771- BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
772- (ibfd, obfd))
773-
774-2.3.0.14 `bfd_set_private_flags'
775-................................
776-
777-*Synopsis*
778- bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
779- *Description*
780-Set private BFD flag information in the BFD ABFD. Return `TRUE' on
781-success, `FALSE' on error. Possible error returns are:
782-
783- * `bfd_error_no_memory' - Not enough memory exists to create private
784- data for OBFD.
785-
786- #define bfd_set_private_flags(abfd, flags) \
787- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
788-
789-2.3.0.15 `Other functions'
790-..........................
791-
792-*Description*
793-The following functions exist but have not yet been documented.
794- #define bfd_sizeof_headers(abfd, reloc) \
795- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
796-
797- #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
798- BFD_SEND (abfd, _bfd_find_nearest_line, \
799- (abfd, sec, syms, off, file, func, line))
800-
801- #define bfd_debug_info_start(abfd) \
802- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
803-
804- #define bfd_debug_info_end(abfd) \
805- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
806-
807- #define bfd_debug_info_accumulate(abfd, section) \
808- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
809-
810- #define bfd_stat_arch_elt(abfd, stat) \
811- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
812-
813- #define bfd_update_armap_timestamp(abfd) \
814- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
815-
816- #define bfd_set_arch_mach(abfd, arch, mach)\
817- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
818-
819- #define bfd_relax_section(abfd, section, link_info, again) \
820- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
821-
822- #define bfd_gc_sections(abfd, link_info) \
823- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
824-
825- #define bfd_merge_sections(abfd, link_info) \
826- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
827-
828- #define bfd_is_group_section(abfd, sec) \
829- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
830-
831- #define bfd_discard_group(abfd, sec) \
832- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
833-
834- #define bfd_link_hash_table_create(abfd) \
835- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
836-
837- #define bfd_link_hash_table_free(abfd, hash) \
838- BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
839-
840- #define bfd_link_add_symbols(abfd, info) \
841- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
842-
843- #define bfd_link_just_syms(abfd, sec, info) \
844- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
845-
846- #define bfd_final_link(abfd, info) \
847- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
848-
849- #define bfd_free_cached_info(abfd) \
850- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
851-
852- #define bfd_get_dynamic_symtab_upper_bound(abfd) \
853- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
854-
855- #define bfd_print_private_bfd_data(abfd, file)\
856- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
857-
858- #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
859- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
860-
861- #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
862- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
863- dyncount, dynsyms, ret))
864-
865- #define bfd_get_dynamic_reloc_upper_bound(abfd) \
866- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
867-
868- #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
869- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
870-
871- extern bfd_byte *bfd_get_relocated_section_contents
872- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
873- bfd_boolean, asymbol **);
874-
875-2.3.0.16 `bfd_alt_mach_code'
876-............................
877-
878-*Synopsis*
879- bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
880- *Description*
881-When more than one machine code number is available for the same
882-machine type, this function can be used to switch between the preferred
883-one (alternative == 0) and any others. Currently, only ELF supports
884-this feature, with up to two alternate machine codes.
885-
886- struct bfd_preserve
887- {
888- void *marker;
889- void *tdata;
890- flagword flags;
891- const struct bfd_arch_info *arch_info;
892- struct bfd_section *sections;
893- struct bfd_section **section_tail;
894- unsigned int section_count;
895- struct bfd_hash_table section_htab;
896- };
897-
898-2.3.0.17 `bfd_preserve_save'
899-............................
900-
901-*Synopsis*
902- bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
903- *Description*
904-When testing an object for compatibility with a particular target
905-back-end, the back-end object_p function needs to set up certain fields
906-in the bfd on successfully recognizing the object. This typically
907-happens in a piecemeal fashion, with failures possible at many points.
908-On failure, the bfd is supposed to be restored to its initial state,
909-which is virtually impossible. However, restoring a subset of the bfd
910-state works in practice. This function stores the subset and
911-reinitializes the bfd.
912-
913-2.3.0.18 `bfd_preserve_restore'
914-...............................
915-
916-*Synopsis*
917- void bfd_preserve_restore (bfd *, struct bfd_preserve *);
918- *Description*
919-This function restores bfd state saved by bfd_preserve_save. If MARKER
920-is non-NULL in struct bfd_preserve then that block and all subsequently
921-bfd_alloc'd memory is freed.
922-
923-2.3.0.19 `bfd_preserve_finish'
924-..............................
925-
926-*Synopsis*
927- void bfd_preserve_finish (bfd *, struct bfd_preserve *);
928- *Description*
929-This function should be called when the bfd state saved by
930-bfd_preserve_save is no longer needed. ie. when the back-end object_p
931-function returns with success.
932-
933-2.3.0.20 `struct bfd_iovec'
934-...........................
935-
936-*Description*
937-The `struct bfd_iovec' contains the internal file I/O class. Each
938-`BFD' has an instance of this class and all file I/O is routed through
939-it (it is assumed that the instance implements all methods listed
940-below).
941- struct bfd_iovec
942- {
943- /* To avoid problems with macros, a "b" rather than "f"
944- prefix is prepended to each method name. */
945- /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
946- bytes starting at PTR. Return the number of bytes actually
947- transfered (a read past end-of-file returns less than NBYTES),
948- or -1 (setting `bfd_error') if an error occurs. */
949- file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
950- file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
951- file_ptr nbytes);
952- /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error'
953- if an error occurs. */
954- file_ptr (*btell) (struct bfd *abfd);
955- /* For the following, on successful completion a value of 0 is returned.
956- Otherwise, a value of -1 is returned (and `bfd_error' is set). */
957- int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
958- int (*bclose) (struct bfd *abfd);
959- int (*bflush) (struct bfd *abfd);
960- int (*bstat) (struct bfd *abfd, struct stat *sb);
961- };
962-
963-2.3.0.21 `bfd_get_mtime'
964-........................
965-
966-*Synopsis*
967- long bfd_get_mtime (bfd *abfd);
968- *Description*
969-Return the file modification time (as read from the file system, or
970-from the archive header for archive members).
971-
972-2.3.0.22 `bfd_get_size'
973-.......................
974-
975-*Synopsis*
976- long bfd_get_size (bfd *abfd);
977- *Description*
978-Return the file size (as read from file system) for the file associated
979-with BFD ABFD.
980-
981- The initial motivation for, and use of, this routine is not so we
982-can get the exact size of the object the BFD applies to, since that
983-might not be generally possible (archive members for example). It
984-would be ideal if someone could eventually modify it so that such
985-results were guaranteed.
986-
987- Instead, we want to ask questions like "is this NNN byte sized
988-object I'm about to try read from file offset YYY reasonable?" As as
989-example of where we might do this, some object formats use string
990-tables for which the first `sizeof (long)' bytes of the table contain
991-the size of the table itself, including the size bytes. If an
992-application tries to read what it thinks is one of these string tables,
993-without some way to validate the size, and for some reason the size is
994-wrong (byte swapping error, wrong location for the string table, etc.),
995-the only clue is likely to be a read error when it tries to read the
996-table, or a "virtual memory exhausted" error when it tries to allocate
997-15 bazillon bytes of space for the 15 bazillon byte table it is about
998-to read. This function at least allows us to answer the question, "is
999-the size reasonable?".
1000-
1001-* Menu:
1002-
1003-* Memory Usage::
1004-* Initialization::
1005-* Sections::
1006-* Symbols::
1007-* Archives::
1008-* Formats::
1009-* Relocations::
1010-* Core Files::
1011-* Targets::
1012-* Architectures::
1013-* Opening and Closing::
1014-* Internal::
1015-* File Caching::
1016-* Linker Functions::
1017-* Hash Tables::
1018-
1019-
1020-File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: BFD front end, Up: BFD front end
1021-
1022-2.4 Memory Usage
1023-================
1024-
1025-BFD keeps all of its internal structures in obstacks. There is one
1026-obstack per open BFD file, into which the current state is stored. When
1027-a BFD is closed, the obstack is deleted, and so everything which has
1028-been allocated by BFD for the closing file is thrown away.
1029-
1030- BFD does not free anything created by an application, but pointers
1031-into `bfd' structures become invalid on a `bfd_close'; for example,
1032-after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
1033-still around, since it has been allocated by the application, but the
1034-data that it pointed to are lost.
1035-
1036- The general rule is to not close a BFD until all operations dependent
1037-upon data from the BFD have been completed, or all the data from within
1038-the file has been copied. To help with the management of memory, there
1039-is a function (`bfd_alloc_size') which returns the number of bytes in
1040-obstacks associated with the supplied BFD. This could be used to select
1041-the greediest open BFD, close it to reclaim the memory, perform some
1042-operation and reopen the BFD again, to get a fresh copy of the data
1043-structures.
1044-
1045-
1046-File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end
1047-
1048-2.5 Initialization
1049-==================
1050-
1051-These are the functions that handle initializing a BFD.
1052-
1053-2.5.0.1 `bfd_init'
1054-..................
1055-
1056-*Synopsis*
1057- void bfd_init (void);
1058- *Description*
1059-This routine must be called before any other BFD function to initialize
1060-magical internal data structures.
1061-
1062-
1063-File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end
1064-
1065-2.6 Sections
1066-============
1067-
1068-The raw data contained within a BFD is maintained through the section
1069-abstraction. A single BFD may have any number of sections. It keeps
1070-hold of them by pointing to the first; each one points to the next in
1071-the list.
1072-
1073- Sections are supported in BFD in `section.c'.
1074-
1075-* Menu:
1076-
1077-* Section Input::
1078-* Section Output::
1079-* typedef asection::
1080-* section prototypes::
1081-
1082-
1083-File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections
1084-
1085-2.6.1 Section input
1086--------------------
1087-
1088-When a BFD is opened for reading, the section structures are created
1089-and attached to the BFD.
1090-
1091- Each section has a name which describes the section in the outside
1092-world--for example, `a.out' would contain at least three sections,
1093-called `.text', `.data' and `.bss'.
1094-
1095- Names need not be unique; for example a COFF file may have several
1096-sections named `.data'.
1097-
1098- Sometimes a BFD will contain more than the "natural" number of
1099-sections. A back end may attach other sections containing constructor
1100-data, or an application may add a section (using `bfd_make_section') to
1101-the sections attached to an already open BFD. For example, the linker
1102-creates an extra section `COMMON' for each input file's BFD to hold
1103-information about common storage.
1104-
1105- The raw data is not necessarily read in when the section descriptor
1106-is created. Some targets may leave the data in place until a
1107-`bfd_get_section_contents' call is made. Other back ends may read in
1108-all the data at once. For example, an S-record file has to be read
1109-once to determine the size of the data. An IEEE-695 file doesn't
1110-contain raw data in sections, but data and relocation expressions
1111-intermixed, so the data area has to be parsed to get out the data and
1112-relocations.
1113-
1114-
1115-File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections
1116-
1117-2.6.2 Section output
1118---------------------
1119-
1120-To write a new object style BFD, the various sections to be written
1121-have to be created. They are attached to the BFD in the same way as
1122-input sections; data is written to the sections using
1123-`bfd_set_section_contents'.
1124-
1125- Any program that creates or combines sections (e.g., the assembler
1126-and linker) must use the `asection' fields `output_section' and
1127-`output_offset' to indicate the file sections to which each section
1128-must be written. (If the section is being created from scratch,
1129-`output_section' should probably point to the section itself and
1130-`output_offset' should probably be zero.)
1131-
1132- The data to be written comes from input sections attached (via
1133-`output_section' pointers) to the output sections. The output section
1134-structure can be considered a filter for the input section: the output
1135-section determines the vma of the output data and the name, but the
1136-input section determines the offset into the output section of the data
1137-to be written.
1138-
1139- E.g., to create a section "O", starting at 0x100, 0x123 long,
1140-containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and
1141-"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would
1142-look like:
1143-
1144- section name "A"
1145- output_offset 0x00
1146- size 0x20
1147- output_section -----------> section name "O"
1148- | vma 0x100
1149- section name "B" | size 0x123
1150- output_offset 0x20 |
1151- size 0x103 |
1152- output_section --------|
1153-
1154-2.6.3 Link orders
1155------------------
1156-
1157-The data within a section is stored in a "link_order". These are much
1158-like the fixups in `gas'. The link_order abstraction allows a section
1159-to grow and shrink within itself.
1160-
1161- A link_order knows how big it is, and which is the next link_order
1162-and where the raw data for it is; it also points to a list of
1163-relocations which apply to it.
1164-
1165- The link_order is used by the linker to perform relaxing on final
1166-code. The compiler creates code which is as big as necessary to make
1167-it work without relaxing, and the user can select whether to relax.
1168-Sometimes relaxing takes a lot of time. The linker runs around the
1169-relocations to see if any are attached to data which can be shrunk, if
1170-so it does it on a link_order by link_order basis.
1171-
1172-
1173-File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections
1174-
1175-2.6.4 typedef asection
1176-----------------------
1177-
1178-Here is the section structure:
1179-
1180-
1181- typedef struct bfd_section
1182- {
1183- /* The name of the section; the name isn't a copy, the pointer is
1184- the same as that passed to bfd_make_section. */
1185- const char *name;
1186-
1187- /* A unique sequence number. */
1188- int id;
1189-
1190- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
1191- int index;
1192-
1193- /* The next section in the list belonging to the BFD, or NULL. */
1194- struct bfd_section *next;
1195-
1196- /* The field flags contains attributes of the section. Some
1197- flags are read in from the object file, and some are
1198- synthesized from other information. */
1199- flagword flags;
1200-
1201- #define SEC_NO_FLAGS 0x000
1202-
1203- /* Tells the OS to allocate space for this section when loading.
1204- This is clear for a section containing debug information only. */
1205- #define SEC_ALLOC 0x001
1206-
1207- /* Tells the OS to load the section from the file when loading.
1208- This is clear for a .bss section. */
1209- #define SEC_LOAD 0x002
1210-
1211- /* The section contains data still to be relocated, so there is
1212- some relocation information too. */
1213- #define SEC_RELOC 0x004
1214-
1215- /* A signal to the OS that the section contains read only data. */
1216- #define SEC_READONLY 0x008
1217-
1218- /* The section contains code only. */
1219- #define SEC_CODE 0x010
1220-
1221- /* The section contains data only. */
1222- #define SEC_DATA 0x020
1223-
1224- /* The section will reside in ROM. */
1225- #define SEC_ROM 0x040
1226-
1227- /* The section contains constructor information. This section
1228- type is used by the linker to create lists of constructors and
1229- destructors used by `g++'. When a back end sees a symbol
1230- which should be used in a constructor list, it creates a new
1231- section for the type of name (e.g., `__CTOR_LIST__'), attaches
1232- the symbol to it, and builds a relocation. To build the lists
1233- of constructors, all the linker has to do is catenate all the
1234- sections called `__CTOR_LIST__' and relocate the data
1235- contained within - exactly the operations it would peform on
1236- standard data. */
1237- #define SEC_CONSTRUCTOR 0x080
1238-
1239- /* The section has contents - a data section could be
1240- `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
1241- `SEC_HAS_CONTENTS' */
1242- #define SEC_HAS_CONTENTS 0x100
1243-
1244- /* An instruction to the linker to not output the section
1245- even if it has information which would normally be written. */
1246- #define SEC_NEVER_LOAD 0x200
1247-
1248- /* The section contains thread local data. */
1249- #define SEC_THREAD_LOCAL 0x400
1250-
1251- /* The section has GOT references. This flag is only for the
1252- linker, and is currently only used by the elf32-hppa back end.
1253- It will be set if global offset table references were detected
1254- in this section, which indicate to the linker that the section
1255- contains PIC code, and must be handled specially when doing a
1256- static link. */
1257- #define SEC_HAS_GOT_REF 0x800
1258-
1259- /* The section contains common symbols (symbols may be defined
1260- multiple times, the value of a symbol is the amount of
1261- space it requires, and the largest symbol value is the one
1262- used). Most targets have exactly one of these (which we
1263- translate to bfd_com_section_ptr), but ECOFF has two. */
1264- #define SEC_IS_COMMON 0x1000
1265-
1266- /* The section contains only debugging information. For
1267- example, this is set for ELF .debug and .stab sections.
1268- strip tests this flag to see if a section can be
1269- discarded. */
1270- #define SEC_DEBUGGING 0x2000
1271-
1272- /* The contents of this section are held in memory pointed to
1273- by the contents field. This is checked by bfd_get_section_contents,
1274- and the data is retrieved from memory if appropriate. */
1275- #define SEC_IN_MEMORY 0x4000
1276-
1277- /* The contents of this section are to be excluded by the
1278- linker for executable and shared objects unless those
1279- objects are to be further relocated. */
1280- #define SEC_EXCLUDE 0x8000
1281-
1282- /* The contents of this section are to be sorted based on the sum of
1283- the symbol and addend values specified by the associated relocation
1284- entries. Entries without associated relocation entries will be
1285- appended to the end of the section in an unspecified order. */
1286- #define SEC_SORT_ENTRIES 0x10000
1287-
1288- /* When linking, duplicate sections of the same name should be
1289- discarded, rather than being combined into a single section as
1290- is usually done. This is similar to how common symbols are
1291- handled. See SEC_LINK_DUPLICATES below. */
1292- #define SEC_LINK_ONCE 0x20000
1293-
1294- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
1295- should handle duplicate sections. */
1296- #define SEC_LINK_DUPLICATES 0x40000
1297-
1298- /* This value for SEC_LINK_DUPLICATES means that duplicate
1299- sections with the same name should simply be discarded. */
1300- #define SEC_LINK_DUPLICATES_DISCARD 0x0
1301-
1302- /* This value for SEC_LINK_DUPLICATES means that the linker
1303- should warn if there are any duplicate sections, although
1304- it should still only link one copy. */
1305- #define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
1306-
1307- /* This value for SEC_LINK_DUPLICATES means that the linker
1308- should warn if any duplicate sections are a different size. */
1309- #define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
1310-
1311- /* This value for SEC_LINK_DUPLICATES means that the linker
1312- should warn if any duplicate sections contain different
1313- contents. */
1314- #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
1315- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
1316-
1317- /* This section was created by the linker as part of dynamic
1318- relocation or other arcane processing. It is skipped when
1319- going through the first-pass output, trusting that someone
1320- else up the line will take care of it later. */
1321- #define SEC_LINKER_CREATED 0x200000
1322-
1323- /* This section should not be subject to garbage collection. */
1324- #define SEC_KEEP 0x400000
1325-
1326- /* This section contains "short" data, and should be placed
1327- "near" the GP. */
1328- #define SEC_SMALL_DATA 0x800000
1329-
1330- /* Attempt to merge identical entities in the section.
1331- Entity size is given in the entsize field. */
1332- #define SEC_MERGE 0x1000000
1333-
1334- /* If given with SEC_MERGE, entities to merge are zero terminated
1335- strings where entsize specifies character size instead of fixed
1336- size entries. */
1337- #define SEC_STRINGS 0x2000000
1338-
1339- /* This section contains data about section groups. */
1340- #define SEC_GROUP 0x4000000
1341-
1342- /* The section is a COFF shared library section. This flag is
1343- only for the linker. If this type of section appears in
1344- the input file, the linker must copy it to the output file
1345- without changing the vma or size. FIXME: Although this
1346- was originally intended to be general, it really is COFF
1347- specific (and the flag was renamed to indicate this). It
1348- might be cleaner to have some more general mechanism to
1349- allow the back end to control what the linker does with
1350- sections. */
1351- #define SEC_COFF_SHARED_LIBRARY 0x10000000
1352-
1353- /* This section contains data which may be shared with other
1354- executables or shared objects. This is for COFF only. */
1355- #define SEC_COFF_SHARED 0x20000000
1356-
1357- /* When a section with this flag is being linked, then if the size of
1358- the input section is less than a page, it should not cross a page
1359- boundary. If the size of the input section is one page or more,
1360- it should be aligned on a page boundary. This is for TI
1361- TMS320C54X only. */
1362- #define SEC_TIC54X_BLOCK 0x40000000
1363-
1364- /* Conditionally link this section; do not link if there are no
1365- references found to any symbol in the section. This is for TI
1366- TMS320C54X only. */
1367- #define SEC_TIC54X_CLINK 0x80000000
1368-
1369- /* End of section flags. */
1370-
1371- /* Some internal packed boolean fields. */
1372-
1373- /* See the vma field. */
1374- unsigned int user_set_vma : 1;
1375-
1376- /* A mark flag used by some of the linker backends. */
1377- unsigned int linker_mark : 1;
1378-
1379- /* Another mark flag used by some of the linker backends. Set for
1380- output sections that have an input section. */
1381- unsigned int linker_has_input : 1;
1382-
1383- /* A mark flag used by some linker backends for garbage collection. */
1384- unsigned int gc_mark : 1;
1385-
1386- /* The following flags are used by the ELF linker. */
1387-
1388- /* Mark sections which have been allocated to segments. */
1389- unsigned int segment_mark : 1;
1390-
1391- /* Type of sec_info information. */
1392- unsigned int sec_info_type:3;
1393- #define ELF_INFO_TYPE_NONE 0
1394- #define ELF_INFO_TYPE_STABS 1
1395- #define ELF_INFO_TYPE_MERGE 2
1396- #define ELF_INFO_TYPE_EH_FRAME 3
1397- #define ELF_INFO_TYPE_JUST_SYMS 4
1398-
1399- /* Nonzero if this section uses RELA relocations, rather than REL. */
1400- unsigned int use_rela_p:1;
1401-
1402- /* Bits used by various backends. The generic code doesn't touch
1403- these fields. */
1404-
1405- /* Nonzero if this section has TLS related relocations. */
1406- unsigned int has_tls_reloc:1;
1407-
1408- /* Nonzero if this section has a gp reloc. */
1409- unsigned int has_gp_reloc:1;
1410-
1411- /* Nonzero if this section needs the relax finalize pass. */
1412- unsigned int need_finalize_relax:1;
1413-
1414- /* Whether relocations have been processed. */
1415- unsigned int reloc_done : 1;
1416-
1417- /* End of internal packed boolean fields. */
1418-
1419- /* The virtual memory address of the section - where it will be
1420- at run time. The symbols are relocated against this. The
1421- user_set_vma flag is maintained by bfd; if it's not set, the
1422- backend can assign addresses (for example, in `a.out', where
1423- the default address for `.data' is dependent on the specific
1424- target and various flags). */
1425- bfd_vma vma;
1426-
1427- /* The load address of the section - where it would be in a
1428- rom image; really only used for writing section header
1429- information. */
1430- bfd_vma lma;
1431-
1432- /* The size of the section in octets, as it will be output.
1433- Contains a value even if the section has no contents (e.g., the
1434- size of `.bss'). */
1435- bfd_size_type size;
1436-
1437- /* For input sections, the original size on disk of the section, in
1438- octets. This field is used by the linker relaxation code. It is
1439- currently only set for sections where the linker relaxation scheme
1440- doesn't cache altered section and reloc contents (stabs, eh_frame,
1441- SEC_MERGE, some coff relaxing targets), and thus the original size
1442- needs to be kept to read the section multiple times.
1443- For output sections, rawsize holds the section size calculated on
1444- a previous linker relaxation pass. */
1445- bfd_size_type rawsize;
1446-
1447- /* If this section is going to be output, then this value is the
1448- offset in *bytes* into the output section of the first byte in the
1449- input section (byte ==> smallest addressable unit on the
1450- target). In most cases, if this was going to start at the
1451- 100th octet (8-bit quantity) in the output section, this value
1452- would be 100. However, if the target byte size is 16 bits
1453- (bfd_octets_per_byte is "2"), this value would be 50. */
1454- bfd_vma output_offset;
1455-
1456- /* The output section through which to map on output. */
1457- struct bfd_section *output_section;
1458-
1459- /* The alignment requirement of the section, as an exponent of 2 -
1460- e.g., 3 aligns to 2^3 (or 8). */
1461- unsigned int alignment_power;
1462-
1463- /* If an input section, a pointer to a vector of relocation
1464- records for the data in this section. */
1465- struct reloc_cache_entry *relocation;
1466-
1467- /* If an output section, a pointer to a vector of pointers to
1468- relocation records for the data in this section. */
1469- struct reloc_cache_entry **orelocation;
1470-
1471- /* The number of relocation records in one of the above. */
1472- unsigned reloc_count;
1473-
1474- /* Information below is back end specific - and not always used
1475- or updated. */
1476-
1477- /* File position of section data. */
1478- file_ptr filepos;
1479-
1480- /* File position of relocation info. */
1481- file_ptr rel_filepos;
1482-
1483- /* File position of line data. */
1484- file_ptr line_filepos;
1485-
1486- /* Pointer to data for applications. */
1487- void *userdata;
1488-
1489- /* If the SEC_IN_MEMORY flag is set, this points to the actual
1490- contents. */
1491- unsigned char *contents;
1492-
1493- /* Attached line number information. */
1494- alent *lineno;
1495-
1496- /* Number of line number records. */
1497- unsigned int lineno_count;
1498-
1499- /* Entity size for merging purposes. */
1500- unsigned int entsize;
1501-
1502- /* Points to the kept section if this section is a link-once section,
1503- and is discarded. */
1504- struct bfd_section *kept_section;
1505-
1506- /* When a section is being output, this value changes as more
1507- linenumbers are written out. */
1508- file_ptr moving_line_filepos;
1509-
1510- /* What the section number is in the target world. */
1511- int target_index;
1512-
1513- void *used_by_bfd;
1514-
1515- /* If this is a constructor section then here is a list of the
1516- relocations created to relocate items within it. */
1517- struct relent_chain *constructor_chain;
1518-
1519- /* The BFD which owns the section. */
1520- bfd *owner;
1521-
1522- /* A symbol which points at this section only. */
1523- struct bfd_symbol *symbol;
1524- struct bfd_symbol **symbol_ptr_ptr;
1525-
1526- struct bfd_link_order *link_order_head;
1527- struct bfd_link_order *link_order_tail;
1528- } asection;
1529-
1530- /* These sections are global, and are managed by BFD. The application
1531- and target back end are not permitted to change the values in
1532- these sections. New code should use the section_ptr macros rather
1533- than referring directly to the const sections. The const sections
1534- may eventually vanish. */
1535- #define BFD_ABS_SECTION_NAME "*ABS*"
1536- #define BFD_UND_SECTION_NAME "*UND*"
1537- #define BFD_COM_SECTION_NAME "*COM*"
1538- #define BFD_IND_SECTION_NAME "*IND*"
1539-
1540- /* The absolute section. */
1541- extern asection bfd_abs_section;
1542- #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
1543- #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
1544- /* Pointer to the undefined section. */
1545- extern asection bfd_und_section;
1546- #define bfd_und_section_ptr ((asection *) &bfd_und_section)
1547- #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
1548- /* Pointer to the common section. */
1549- extern asection bfd_com_section;
1550- #define bfd_com_section_ptr ((asection *) &bfd_com_section)
1551- /* Pointer to the indirect section. */
1552- extern asection bfd_ind_section;
1553- #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
1554- #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
1555-
1556- #define bfd_is_const_section(SEC) \
1557- ( ((SEC) == bfd_abs_section_ptr) \
1558- || ((SEC) == bfd_und_section_ptr) \
1559- || ((SEC) == bfd_com_section_ptr) \
1560- || ((SEC) == bfd_ind_section_ptr))
1561-
1562- extern const struct bfd_symbol * const bfd_abs_symbol;
1563- extern const struct bfd_symbol * const bfd_com_symbol;
1564- extern const struct bfd_symbol * const bfd_und_symbol;
1565- extern const struct bfd_symbol * const bfd_ind_symbol;
1566-
1567- /* Macros to handle insertion and deletion of a bfd's sections. These
1568- only handle the list pointers, ie. do not adjust section_count,
1569- target_index etc. */
1570- #define bfd_section_list_remove(ABFD, PS) \
1571- do \
1572- { \
1573- asection **_ps = PS; \
1574- asection *_s = *_ps; \
1575- *_ps = _s->next; \
1576- if (_s->next == NULL) \
1577- (ABFD)->section_tail = _ps; \
1578- } \
1579- while (0)
1580- #define bfd_section_list_insert(ABFD, PS, S) \
1581- do \
1582- { \
1583- asection **_ps = PS; \
1584- asection *_s = S; \
1585- _s->next = *_ps; \
1586- *_ps = _s; \
1587- if (_s->next == NULL) \
1588- (ABFD)->section_tail = &_s->next; \
1589- } \
1590- while (0)
1591-
1592-
1593-File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections
1594-
1595-2.6.5 Section prototypes
1596-------------------------
1597-
1598-These are the functions exported by the section handling part of BFD.
1599-
1600-2.6.5.1 `bfd_section_list_clear'
1601-................................
1602-
1603-*Synopsis*
1604- void bfd_section_list_clear (bfd *);
1605- *Description*
1606-Clears the section list, and also resets the section count and hash
1607-table entries.
1608-
1609-2.6.5.2 `bfd_get_section_by_name'
1610-.................................
1611-
1612-*Synopsis*
1613- asection *bfd_get_section_by_name (bfd *abfd, const char *name);
1614- *Description*
1615-Run through ABFD and return the one of the `asection's whose name
1616-matches NAME, otherwise `NULL'. *Note Sections::, for more information.
1617-
1618- This should only be used in special cases; the normal way to process
1619-all sections of a given name is to use `bfd_map_over_sections' and
1620-`strcmp' on the name (or better yet, base it on the section flags or
1621-something else) for each section.
1622-
1623-2.6.5.3 `bfd_get_section_by_name_if'
1624-....................................
1625-
1626-*Synopsis*
1627- asection *bfd_get_section_by_name_if
1628- (bfd *abfd,
1629- const char *name,
1630- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
1631- void *obj);
1632- *Description*
1633-Call the provided function FUNC for each section attached to the BFD
1634-ABFD whose name matches NAME, passing OBJ as an argument. The function
1635-will be called as if by
1636-
1637- func (abfd, the_section, obj);
1638-
1639- It returns the first section for which FUNC returns true, otherwise
1640-`NULL'.
1641-
1642-2.6.5.4 `bfd_get_unique_section_name'
1643-.....................................
1644-
1645-*Synopsis*
1646- char *bfd_get_unique_section_name
1647- (bfd *abfd, const char *templat, int *count);
1648- *Description*
1649-Invent a section name that is unique in ABFD by tacking a dot and a
1650-digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then it
1651-specifies the first number tried as a suffix to generate a unique name.
1652-The value pointed to by COUNT will be incremented in this case.
1653-
1654-2.6.5.5 `bfd_make_section_old_way'
1655-..................................
1656-
1657-*Synopsis*
1658- asection *bfd_make_section_old_way (bfd *abfd, const char *name);
1659- *Description*
1660-Create a new empty section called NAME and attach it to the end of the
1661-chain of sections for the BFD ABFD. An attempt to create a section with
1662-a name which is already in use returns its pointer without changing the
1663-section chain.
1664-
1665- It has the funny name since this is the way it used to be before it
1666-was rewritten....
1667-
1668- Possible errors are:
1669- * `bfd_error_invalid_operation' - If output has already started for
1670- this BFD.
1671-
1672- * `bfd_error_no_memory' - If memory allocation fails.
1673-
1674-2.6.5.6 `bfd_make_section_anyway'
1675-.................................
1676-
1677-*Synopsis*
1678- asection *bfd_make_section_anyway (bfd *abfd, const char *name);
1679- *Description*
1680-Create a new empty section called NAME and attach it to the end of the
1681-chain of sections for ABFD. Create a new section even if there is
1682-already a section with that name.
1683-
1684- Return `NULL' and set `bfd_error' on error; possible errors are:
1685- * `bfd_error_invalid_operation' - If output has already started for
1686- ABFD.
1687-
1688- * `bfd_error_no_memory' - If memory allocation fails.
1689-
1690-2.6.5.7 `bfd_make_section'
1691-..........................
1692-
1693-*Synopsis*
1694- asection *bfd_make_section (bfd *, const char *name);
1695- *Description*
1696-Like `bfd_make_section_anyway', but return `NULL' (without calling
1697-bfd_set_error ()) without changing the section chain if there is
1698-already a section named NAME. If there is an error, return `NULL' and
1699-set `bfd_error'.
1700-
1701-2.6.5.8 `bfd_set_section_flags'
1702-...............................
1703-
1704-*Synopsis*
1705- bfd_boolean bfd_set_section_flags
1706- (bfd *abfd, asection *sec, flagword flags);
1707- *Description*
1708-Set the attributes of the section SEC in the BFD ABFD to the value
1709-FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
1710-returns are:
1711-
1712- * `bfd_error_invalid_operation' - The section cannot have one or
1713- more of the attributes requested. For example, a .bss section in
1714- `a.out' may not have the `SEC_HAS_CONTENTS' field set.
1715-
1716-2.6.5.9 `bfd_map_over_sections'
1717-...............................
1718-
1719-*Synopsis*
1720- void bfd_map_over_sections
1721- (bfd *abfd,
1722- void (*func) (bfd *abfd, asection *sect, void *obj),
1723- void *obj);
1724- *Description*
1725-Call the provided function FUNC for each section attached to the BFD
1726-ABFD, passing OBJ as an argument. The function will be called as if by
1727-
1728- func (abfd, the_section, obj);
1729-
1730- This is the preferred method for iterating over sections; an
1731-alternative would be to use a loop:
1732-
1733- section *p;
1734- for (p = abfd->sections; p != NULL; p = p->next)
1735- func (abfd, p, ...)
1736-
1737-2.6.5.10 `bfd_sections_find_if'
1738-...............................
1739-
1740-*Synopsis*
1741- asection *bfd_sections_find_if
1742- (bfd *abfd,
1743- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
1744- void *obj);
1745- *Description*
1746-Call the provided function OPERATION for each section attached to the
1747-BFD ABFD, passing OBJ as an argument. The function will be called as if
1748-by
1749-
1750- operation (abfd, the_section, obj);
1751-
1752- It returns the first section for which OPERATION returns true.
1753-
1754-2.6.5.11 `bfd_set_section_size'
1755-...............................
1756-
1757-*Synopsis*
1758- bfd_boolean bfd_set_section_size
1759- (bfd *abfd, asection *sec, bfd_size_type val);
1760- *Description*
1761-Set SEC to the size VAL. If the operation is ok, then `TRUE' is
1762-returned, else `FALSE'.
1763-
1764- Possible error returns:
1765- * `bfd_error_invalid_operation' - Writing has started to the BFD, so
1766- setting the size is invalid.
1767-
1768-2.6.5.12 `bfd_set_section_contents'
1769-...................................
1770-
1771-*Synopsis*
1772- bfd_boolean bfd_set_section_contents
1773- (bfd *abfd, asection *section, const void *data,
1774- file_ptr offset, bfd_size_type count);
1775- *Description*
1776-Sets the contents of the section SECTION in BFD ABFD to the data
1777-starting in memory at DATA. The data is written to the output section
1778-starting at offset OFFSET for COUNT octets.
1779-
1780- Normally `TRUE' is returned, else `FALSE'. Possible error returns
1781-are:
1782- * `bfd_error_no_contents' - The output section does not have the
1783- `SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
1784-
1785- * and some more too
1786- This routine is front end to the back end function
1787-`_bfd_set_section_contents'.
1788-
1789-2.6.5.13 `bfd_get_section_contents'
1790-...................................
1791-
1792-*Synopsis*
1793- bfd_boolean bfd_get_section_contents
1794- (bfd *abfd, asection *section, void *location, file_ptr offset,
1795- bfd_size_type count);
1796- *Description*
1797-Read data from SECTION in BFD ABFD into memory starting at LOCATION.
1798-The data is read at an offset of OFFSET from the start of the input
1799-section, and is read for COUNT bytes.
1800-
1801- If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set
1802-are requested or if the section does not have the `SEC_HAS_CONTENTS'
1803-flag set, then the LOCATION is filled with zeroes. If no errors occur,
1804-`TRUE' is returned, else `FALSE'.
1805-
1806-2.6.5.14 `bfd_malloc_and_get_section'
1807-.....................................
1808-
1809-*Synopsis*
1810- bfd_boolean bfd_malloc_and_get_section
1811- (bfd *abfd, asection *section, bfd_byte **buf);
1812- *Description*
1813-Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by
1814-this function.
1815-
1816-2.6.5.15 `bfd_copy_private_section_data'
1817-........................................
1818-
1819-*Synopsis*
1820- bfd_boolean bfd_copy_private_section_data
1821- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
1822- *Description*
1823-Copy private section information from ISEC in the BFD IBFD to the
1824-section OSEC in the BFD OBFD. Return `TRUE' on success, `FALSE' on
1825-error. Possible error returns are:
1826-
1827- * `bfd_error_no_memory' - Not enough memory exists to create private
1828- data for OSEC.
1829-
1830- #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
1831- BFD_SEND (obfd, _bfd_copy_private_section_data, \
1832- (ibfd, isection, obfd, osection))
1833-
1834-2.6.5.16 `_bfd_strip_section_from_output'
1835-.........................................
1836-
1837-*Synopsis*
1838- void _bfd_strip_section_from_output
1839- (struct bfd_link_info *info, asection *section);
1840- *Description*
1841-Remove SECTION from the output. If the output section becomes empty,
1842-remove it from the output bfd.
1843-
1844- This function won't actually do anything except twiddle flags if
1845-called too late in the linking process, when it's not safe to remove
1846-sections.
1847-
1848-2.6.5.17 `bfd_generic_is_group_section'
1849-.......................................
1850-
1851-*Synopsis*
1852- bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
1853- *Description*
1854-Returns TRUE if SEC is a member of a group.
1855-
1856-2.6.5.18 `bfd_generic_discard_group'
1857-....................................
1858-
1859-*Synopsis*
1860- bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
1861- *Description*
1862-Remove all members of GROUP from the output.
1863-
1864-
1865-File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end
1866-
1867-2.7 Symbols
1868-===========
1869-
1870-BFD tries to maintain as much symbol information as it can when it
1871-moves information from file to file. BFD passes information to
1872-applications though the `asymbol' structure. When the application
1873-requests the symbol table, BFD reads the table in the native form and
1874-translates parts of it into the internal format. To maintain more than
1875-the information passed to applications, some targets keep some
1876-information "behind the scenes" in a structure only the particular back
1877-end knows about. For example, the coff back end keeps the original
1878-symbol table structure as well as the canonical structure when a BFD is
1879-read in. On output, the coff back end can reconstruct the output symbol
1880-table so that no information is lost, even information unique to coff
1881-which BFD doesn't know or understand. If a coff symbol table were read,
1882-but were written through an a.out back end, all the coff specific
1883-information would be lost. The symbol table of a BFD is not necessarily
1884-read in until a canonicalize request is made. Then the BFD back end
1885-fills in a table provided by the application with pointers to the
1886-canonical information. To output symbols, the application provides BFD
1887-with a table of pointers to pointers to `asymbol's. This allows
1888-applications like the linker to output a symbol as it was read, since
1889-the "behind the scenes" information will be still available.
1890-
1891-* Menu:
1892-
1893-* Reading Symbols::
1894-* Writing Symbols::
1895-* Mini Symbols::
1896-* typedef asymbol::
1897-* symbol handling functions::
1898-
1899-
1900-File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols
1901-
1902-2.7.1 Reading symbols
1903----------------------
1904-
1905-There are two stages to reading a symbol table from a BFD: allocating
1906-storage, and the actual reading process. This is an excerpt from an
1907-application which reads the symbol table:
1908-
1909- long storage_needed;
1910- asymbol **symbol_table;
1911- long number_of_symbols;
1912- long i;
1913-
1914- storage_needed = bfd_get_symtab_upper_bound (abfd);
1915-
1916- if (storage_needed < 0)
1917- FAIL
1918-
1919- if (storage_needed == 0)
1920- return;
1921-
1922- symbol_table = xmalloc (storage_needed);
1923- ...
1924- number_of_symbols =
1925- bfd_canonicalize_symtab (abfd, symbol_table);
1926-
1927- if (number_of_symbols < 0)
1928- FAIL
1929-
1930- for (i = 0; i < number_of_symbols; i++)
1931- process_symbol (symbol_table[i]);
1932-
1933- All storage for the symbols themselves is in an objalloc connected
1934-to the BFD; it is freed when the BFD is closed.
1935-
1936-
1937-File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols
1938-
1939-2.7.2 Writing symbols
1940----------------------
1941-
1942-Writing of a symbol table is automatic when a BFD open for writing is
1943-closed. The application attaches a vector of pointers to pointers to
1944-symbols to the BFD being written, and fills in the symbol count. The
1945-close and cleanup code reads through the table provided and performs
1946-all the necessary operations. The BFD output code must always be
1947-provided with an "owned" symbol: one which has come from another BFD,
1948-or one which has been created using `bfd_make_empty_symbol'. Here is an
1949-example showing the creation of a symbol table with only one element:
1950-
1951- #include "bfd.h"
1952- int main (void)
1953- {
1954- bfd *abfd;
1955- asymbol *ptrs[2];
1956- asymbol *new;
1957-
1958- abfd = bfd_openw ("foo","a.out-sunos-big");
1959- bfd_set_format (abfd, bfd_object);
1960- new = bfd_make_empty_symbol (abfd);
1961- new->name = "dummy_symbol";
1962- new->section = bfd_make_section_old_way (abfd, ".text");
1963- new->flags = BSF_GLOBAL;
1964- new->value = 0x12345;
1965-
1966- ptrs[0] = new;
1967- ptrs[1] = 0;
1968-
1969- bfd_set_symtab (abfd, ptrs, 1);
1970- bfd_close (abfd);
1971- return 0;
1972- }
1973-
1974- ./makesym
1975- nm foo
1976- 00012345 A dummy_symbol
1977-
1978- Many formats cannot represent arbitrary symbol information; for
1979-instance, the `a.out' object format does not allow an arbitrary number
1980-of sections. A symbol pointing to a section which is not one of
1981-`.text', `.data' or `.bss' cannot be described.
1982-
1983-
1984-File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols
1985-
1986-2.7.3 Mini Symbols
1987-------------------
1988-
1989-Mini symbols provide read-only access to the symbol table. They use
1990-less memory space, but require more time to access. They can be useful
1991-for tools like nm or objdump, which may have to handle symbol tables of
1992-extremely large executables.
1993-
1994- The `bfd_read_minisymbols' function will read the symbols into
1995-memory in an internal form. It will return a `void *' pointer to a
1996-block of memory, a symbol count, and the size of each symbol. The
1997-pointer is allocated using `malloc', and should be freed by the caller
1998-when it is no longer needed.
1999-
2000- The function `bfd_minisymbol_to_symbol' will take a pointer to a
2001-minisymbol, and a pointer to a structure returned by
2002-`bfd_make_empty_symbol', and return a `asymbol' structure. The return
2003-value may or may not be the same as the value from
2004-`bfd_make_empty_symbol' which was passed in.
2005-
2006-
2007-File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols
2008-
2009-2.7.4 typedef asymbol
2010----------------------
2011-
2012-An `asymbol' has the form:
2013-
2014-
2015- typedef struct bfd_symbol
2016- {
2017- /* A pointer to the BFD which owns the symbol. This information
2018- is necessary so that a back end can work out what additional
2019- information (invisible to the application writer) is carried
2020- with the symbol.
2021-
2022- This field is *almost* redundant, since you can use section->owner
2023- instead, except that some symbols point to the global sections
2024- bfd_{abs,com,und}_section. This could be fixed by making
2025- these globals be per-bfd (or per-target-flavor). FIXME. */
2026- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
2027-
2028- /* The text of the symbol. The name is left alone, and not copied; the
2029- application may not alter it. */
2030- const char *name;
2031-
2032- /* The value of the symbol. This really should be a union of a
2033- numeric value with a pointer, since some flags indicate that
2034- a pointer to another symbol is stored here. */
2035- symvalue value;
2036-
2037- /* Attributes of a symbol. */
2038- #define BSF_NO_FLAGS 0x00
2039-
2040- /* The symbol has local scope; `static' in `C'. The value
2041- is the offset into the section of the data. */
2042- #define BSF_LOCAL 0x01
2043-
2044- /* The symbol has global scope; initialized data in `C'. The
2045- value is the offset into the section of the data. */
2046- #define BSF_GLOBAL 0x02
2047-
2048- /* The symbol has global scope and is exported. The value is
2049- the offset into the section of the data. */
2050- #define BSF_EXPORT BSF_GLOBAL /* No real difference. */
2051-
2052- /* A normal C symbol would be one of:
2053- `BSF_LOCAL', `BSF_FORT_COMM', `BSF_UNDEFINED' or
2054- `BSF_GLOBAL'. */
2055-
2056- /* The symbol is a debugging record. The value has an arbitrary
2057- meaning, unless BSF_DEBUGGING_RELOC is also set. */
2058- #define BSF_DEBUGGING 0x08
2059-
2060- /* The symbol denotes a function entry point. Used in ELF,
2061- perhaps others someday. */
2062- #define BSF_FUNCTION 0x10
2063-
2064- /* Used by the linker. */
2065- #define BSF_KEEP 0x20
2066- #define BSF_KEEP_G 0x40
2067-
2068- /* A weak global symbol, overridable without warnings by
2069- a regular global symbol of the same name. */
2070- #define BSF_WEAK 0x80
2071-
2072- /* This symbol was created to point to a section, e.g. ELF's
2073- STT_SECTION symbols. */
2074- #define BSF_SECTION_SYM 0x100
2075-
2076- /* The symbol used to be a common symbol, but now it is
2077- allocated. */
2078- #define BSF_OLD_COMMON 0x200
2079-
2080- /* The default value for common data. */
2081- #define BFD_FORT_COMM_DEFAULT_VALUE 0
2082-
2083- /* In some files the type of a symbol sometimes alters its
2084- location in an output file - ie in coff a `ISFCN' symbol
2085- which is also `C_EXT' symbol appears where it was
2086- declared and not at the end of a section. This bit is set
2087- by the target BFD part to convey this information. */
2088- #define BSF_NOT_AT_END 0x400
2089-
2090- /* Signal that the symbol is the label of constructor section. */
2091- #define BSF_CONSTRUCTOR 0x800
2092-
2093- /* Signal that the symbol is a warning symbol. The name is a
2094- warning. The name of the next symbol is the one to warn about;
2095- if a reference is made to a symbol with the same name as the next
2096- symbol, a warning is issued by the linker. */
2097- #define BSF_WARNING 0x1000
2098-
2099- /* Signal that the symbol is indirect. This symbol is an indirect
2100- pointer to the symbol with the same name as the next symbol. */
2101- #define BSF_INDIRECT 0x2000
2102-
2103- /* BSF_FILE marks symbols that contain a file name. This is used
2104- for ELF STT_FILE symbols. */
2105- #define BSF_FILE 0x4000
2106-
2107- /* Symbol is from dynamic linking information. */
2108- #define BSF_DYNAMIC 0x8000
2109-
2110- /* The symbol denotes a data object. Used in ELF, and perhaps
2111- others someday. */
2112- #define BSF_OBJECT 0x10000
2113-
2114- /* This symbol is a debugging symbol. The value is the offset
2115- into the section of the data. BSF_DEBUGGING should be set
2116- as well. */
2117- #define BSF_DEBUGGING_RELOC 0x20000
2118-
2119- /* This symbol is thread local. Used in ELF. */
2120- #define BSF_THREAD_LOCAL 0x40000
2121-
2122- flagword flags;
2123-
2124- /* A pointer to the section to which this symbol is
2125- relative. This will always be non NULL, there are special
2126- sections for undefined and absolute symbols. */
2127- struct bfd_section *section;
2128-
2129- /* Back end special data. */
2130- union
2131- {
2132- void *p;
2133- bfd_vma i;
2134- }
2135- udata;
2136- }
2137- asymbol;
2138-
2139-
2140-File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols
2141-
2142-2.7.5 Symbol handling functions
2143--------------------------------
2144-
2145-2.7.5.1 `bfd_get_symtab_upper_bound'
2146-....................................
2147-
2148-*Description*
2149-Return the number of bytes required to store a vector of pointers to
2150-`asymbols' for all the symbols in the BFD ABFD, including a terminal
2151-NULL pointer. If there are no symbols in the BFD, then return 0. If an
2152-error occurs, return -1.
2153- #define bfd_get_symtab_upper_bound(abfd) \
2154- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
2155-
2156-2.7.5.2 `bfd_is_local_label'
2157-............................
2158-
2159-*Synopsis*
2160- bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
2161- *Description*
2162-Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
2163-generated local label, else return FALSE.
2164-
2165-2.7.5.3 `bfd_is_local_label_name'
2166-.................................
2167-
2168-*Synopsis*
2169- bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
2170- *Description*
2171-Return TRUE if a symbol with the name NAME in the BFD ABFD is a
2172-compiler generated local label, else return FALSE. This just checks
2173-whether the name has the form of a local label.
2174- #define bfd_is_local_label_name(abfd, name) \
2175- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
2176-
2177-2.7.5.4 `bfd_is_target_special_symbol'
2178-......................................
2179-
2180-*Synopsis*
2181- bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
2182- *Description*
2183-Return TRUE iff a symbol SYM in the BFD ABFD is something special to
2184-the particular target represented by the BFD. Such symbols should
2185-normally not be mentioned to the user.
2186- #define bfd_is_target_special_symbol(abfd, sym) \
2187- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
2188-
2189-2.7.5.5 `bfd_canonicalize_symtab'
2190-.................................
2191-
2192-*Description*
2193-Read the symbols from the BFD ABFD, and fills in the vector LOCATION
2194-with pointers to the symbols and a trailing NULL. Return the actual
2195-number of symbol pointers, not including the NULL.
2196- #define bfd_canonicalize_symtab(abfd, location) \
2197- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
2198-
2199-2.7.5.6 `bfd_set_symtab'
2200-........................
2201-
2202-*Synopsis*
2203- bfd_boolean bfd_set_symtab
2204- (bfd *abfd, asymbol **location, unsigned int count);
2205- *Description*
2206-Arrange that when the output BFD ABFD is closed, the table LOCATION of
2207-COUNT pointers to symbols will be written.
2208-
2209-2.7.5.7 `bfd_print_symbol_vandf'
2210-................................
2211-
2212-*Synopsis*
2213- void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
2214- *Description*
2215-Print the value and flags of the SYMBOL supplied to the stream FILE.
2216-
2217-2.7.5.8 `bfd_make_empty_symbol'
2218-...............................
2219-
2220-*Description*
2221-Create a new `asymbol' structure for the BFD ABFD and return a pointer
2222-to it.
2223-
2224- This routine is necessary because each back end has private
2225-information surrounding the `asymbol'. Building your own `asymbol' and
2226-pointing to it will not create the private information, and will cause
2227-problems later on.
2228- #define bfd_make_empty_symbol(abfd) \
2229- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
2230-
2231-2.7.5.9 `_bfd_generic_make_empty_symbol'
2232-........................................
2233-
2234-*Synopsis*
2235- asymbol *_bfd_generic_make_empty_symbol (bfd *);
2236- *Description*
2237-Create a new `asymbol' structure for the BFD ABFD and return a pointer
2238-to it. Used by core file routines, binary back-end and anywhere else
2239-where no private info is needed.
2240-
2241-2.7.5.10 `bfd_make_debug_symbol'
2242-................................
2243-
2244-*Description*
2245-Create a new `asymbol' structure for the BFD ABFD, to be used as a
2246-debugging symbol. Further details of its use have yet to be worked out.
2247- #define bfd_make_debug_symbol(abfd,ptr,size) \
2248- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
2249-
2250-2.7.5.11 `bfd_decode_symclass'
2251-..............................
2252-
2253-*Description*
2254-Return a character corresponding to the symbol class of SYMBOL, or '?'
2255-for an unknown class.
2256-
2257- *Synopsis*
2258- int bfd_decode_symclass (asymbol *symbol);
2259-
2260-2.7.5.12 `bfd_is_undefined_symclass'
2261-....................................
2262-
2263-*Description*
2264-Returns non-zero if the class symbol returned by bfd_decode_symclass
2265-represents an undefined symbol. Returns zero otherwise.
2266-
2267- *Synopsis*
2268- bfd_boolean bfd_is_undefined_symclass (int symclass);
2269-
2270-2.7.5.13 `bfd_symbol_info'
2271-..........................
2272-
2273-*Description*
2274-Fill in the basic info about symbol that nm needs. Additional info may
2275-be added by the back-ends after calling this function.
2276-
2277- *Synopsis*
2278- void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
2279-
2280-2.7.5.14 `bfd_copy_private_symbol_data'
2281-.......................................
2282-
2283-*Synopsis*
2284- bfd_boolean bfd_copy_private_symbol_data
2285- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
2286- *Description*
2287-Copy private symbol information from ISYM in the BFD IBFD to the symbol
2288-OSYM in the BFD OBFD. Return `TRUE' on success, `FALSE' on error.
2289-Possible error returns are:
2290-
2291- * `bfd_error_no_memory' - Not enough memory exists to create private
2292- data for OSEC.
2293-
2294- #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
2295- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
2296- (ibfd, isymbol, obfd, osymbol))
2297-
2298-
2299-File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end
2300-
2301-2.8 Archives
2302-============
2303-
2304-*Description*
2305-An archive (or library) is just another BFD. It has a symbol table,
2306-although there's not much a user program will do with it.
2307-
2308- The big difference between an archive BFD and an ordinary BFD is
2309-that the archive doesn't have sections. Instead it has a chain of BFDs
2310-that are considered its contents. These BFDs can be manipulated like
2311-any other. The BFDs contained in an archive opened for reading will
2312-all be opened for reading. You may put either input or output BFDs
2313-into an archive opened for output; they will be handled correctly when
2314-the archive is closed.
2315-
2316- Use `bfd_openr_next_archived_file' to step through the contents of
2317-an archive opened for input. You don't have to read the entire archive
2318-if you don't want to! Read it until you find what you want.
2319-
2320- Archive contents of output BFDs are chained through the `next'
2321-pointer in a BFD. The first one is findable through the `archive_head'
2322-slot of the archive. Set it with `bfd_set_archive_head' (q.v.). A
2323-given BFD may be in only one open output archive at a time.
2324-
2325- As expected, the BFD archive code is more general than the archive
2326-code of any given environment. BFD archives may contain files of
2327-different formats (e.g., a.out and coff) and even different
2328-architectures. You may even place archives recursively into archives!
2329-
2330- This can cause unexpected confusion, since some archive formats are
2331-more expressive than others. For instance, Intel COFF archives can
2332-preserve long filenames; SunOS a.out archives cannot. If you move a
2333-file from the first to the second format and back again, the filename
2334-may be truncated. Likewise, different a.out environments have different
2335-conventions as to how they truncate filenames, whether they preserve
2336-directory names in filenames, etc. When interoperating with native
2337-tools, be sure your files are homogeneous.
2338-
2339- Beware: most of these formats do not react well to the presence of
2340-spaces in filenames. We do the best we can, but can't always handle
2341-this case due to restrictions in the format of archives. Many Unix
2342-utilities are braindead in regards to spaces and such in filenames
2343-anyway, so this shouldn't be much of a restriction.
2344-
2345- Archives are supported in BFD in `archive.c'.
2346-
2347-2.8.0.1 `bfd_get_next_mapent'
2348-.............................
2349-
2350-*Synopsis*
2351- symindex bfd_get_next_mapent
2352- (bfd *abfd, symindex previous, carsym **sym);
2353- *Description*
2354-Step through archive ABFD's symbol table (if it has one). Successively
2355-update SYM with the next symbol's information, returning that symbol's
2356-(internal) index into the symbol table.
2357-
2358- Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
2359-one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
2360-
2361- A `carsym' is a canonical archive symbol. The only user-visible
2362-element is its name, a null-terminated string.
2363-
2364-2.8.0.2 `bfd_set_archive_head'
2365-..............................
2366-
2367-*Synopsis*
2368- bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
2369- *Description*
2370-Set the head of the chain of BFDs contained in the archive OUTPUT to
2371-NEW_HEAD.
2372-
2373-2.8.0.3 `bfd_openr_next_archived_file'
2374-......................................
2375-
2376-*Synopsis*
2377- bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
2378- *Description*
2379-Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
2380-BFD on the first contained element and returns that. Subsequent calls
2381-should pass the archive and the previous return value to return a
2382-created BFD to the next contained element. NULL is returned when there
2383-are no more.
2384-
2385-
2386-File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end
2387-
2388-2.9 File formats
2389-================
2390-
2391-A format is a BFD concept of high level file contents type. The formats
2392-supported by BFD are:
2393-
2394- * `bfd_object'
2395- The BFD may contain data, symbols, relocations and debug info.
2396-
2397- * `bfd_archive'
2398- The BFD contains other BFDs and an optional index.
2399-
2400- * `bfd_core'
2401- The BFD contains the result of an executable core dump.
2402-
2403-2.9.0.1 `bfd_check_format'
2404-..........................
2405-
2406-*Synopsis*
2407- bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
2408- *Description*
2409-Verify if the file attached to the BFD ABFD is compatible with the
2410-format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
2411-
2412- If the BFD has been set to a specific target before the call, only
2413-the named target and format combination is checked. If the target has
2414-not been set, or has been set to `default', then all the known target
2415-backends is interrogated to determine a match. If the default target
2416-matches, it is used. If not, exactly one target must recognize the
2417-file, or an error results.
2418-
2419- The function returns `TRUE' on success, otherwise `FALSE' with one
2420-of the following error codes:
2421-
2422- * `bfd_error_invalid_operation' - if `format' is not one of
2423- `bfd_object', `bfd_archive' or `bfd_core'.
2424-
2425- * `bfd_error_system_call' - if an error occured during a read - even
2426- some file mismatches can cause bfd_error_system_calls.
2427-
2428- * `file_not_recognised' - none of the backends recognised the file
2429- format.
2430-
2431- * `bfd_error_file_ambiguously_recognized' - more than one backend
2432- recognised the file format.
2433-
2434-2.9.0.2 `bfd_check_format_matches'
2435-..................................
2436-
2437-*Synopsis*
2438- bfd_boolean bfd_check_format_matches
2439- (bfd *abfd, bfd_format format, char ***matching);
2440- *Description*
2441-Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
2442-set to `bfd_error_file_ambiguously_recognized'. In that case, if
2443-MATCHING is not NULL, it will be filled in with a NULL-terminated list
2444-of the names of the formats that matched, allocated with `malloc'.
2445-Then the user may choose a format and try again.
2446-
2447- When done with the list that MATCHING points to, the caller should
2448-free it.
2449-
2450-2.9.0.3 `bfd_set_format'
2451-........................
2452-
2453-*Synopsis*
2454- bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
2455- *Description*
2456-This function sets the file format of the BFD ABFD to the format
2457-FORMAT. If the target set in the BFD does not support the format
2458-requested, the format is invalid, or the BFD is not open for writing,
2459-then an error occurs.
2460-
2461-2.9.0.4 `bfd_format_string'
2462-...........................
2463-
2464-*Synopsis*
2465- const char *bfd_format_string (bfd_format format);
2466- *Description*
2467-Return a pointer to a const string `invalid', `object', `archive',
2468-`core', or `unknown', depending upon the value of FORMAT.
2469-
2470-
2471-File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end
2472-
2473-2.10 Relocations
2474-================
2475-
2476-BFD maintains relocations in much the same way it maintains symbols:
2477-they are left alone until required, then read in en-masse and
2478-translated into an internal form. A common routine
2479-`bfd_perform_relocation' acts upon the canonical form to do the fixup.
2480-
2481- Relocations are maintained on a per section basis, while symbols are
2482-maintained on a per BFD basis.
2483-
2484- All that a back end has to do to fit the BFD interface is to create
2485-a `struct reloc_cache_entry' for each relocation in a particular
2486-section, and fill in the right bits of the structures.
2487-
2488-* Menu:
2489-
2490-* typedef arelent::
2491-* howto manager::
2492-
2493-
2494-File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations
2495-
2496-2.10.1 typedef arelent
2497-----------------------
2498-
2499-This is the structure of a relocation entry:
2500-
2501-
2502- typedef enum bfd_reloc_status
2503- {
2504- /* No errors detected. */
2505- bfd_reloc_ok,
2506-
2507- /* The relocation was performed, but there was an overflow. */
2508- bfd_reloc_overflow,
2509-
2510- /* The address to relocate was not within the section supplied. */
2511- bfd_reloc_outofrange,
2512-
2513- /* Used by special functions. */
2514- bfd_reloc_continue,
2515-
2516- /* Unsupported relocation size requested. */
2517- bfd_reloc_notsupported,
2518-
2519- /* Unused. */
2520- bfd_reloc_other,
2521-
2522- /* The symbol to relocate against was undefined. */
2523- bfd_reloc_undefined,
2524-
2525- /* The relocation was performed, but may not be ok - presently
2526- generated only when linking i960 coff files with i960 b.out
2527- symbols. If this type is returned, the error_message argument
2528- to bfd_perform_relocation will be set. */
2529- bfd_reloc_dangerous
2530- }
2531- bfd_reloc_status_type;
2532-
2533-
2534- typedef struct reloc_cache_entry
2535- {
2536- /* A pointer into the canonical table of pointers. */
2537- struct bfd_symbol **sym_ptr_ptr;
2538-
2539- /* offset in section. */
2540- bfd_size_type address;
2541-
2542- /* addend for relocation value. */
2543- bfd_vma addend;
2544-
2545- /* Pointer to how to perform the required relocation. */
2546- reloc_howto_type *howto;
2547-
2548- }
2549- arelent;
2550- *Description*
2551-Here is a description of each of the fields within an `arelent':
2552-
2553- * `sym_ptr_ptr'
2554- The symbol table pointer points to a pointer to the symbol
2555-associated with the relocation request. It is the pointer into the
2556-table returned by the back end's `canonicalize_symtab' action. *Note
2557-Symbols::. The symbol is referenced through a pointer to a pointer so
2558-that tools like the linker can fix up all the symbols of the same name
2559-by modifying only one pointer. The relocation routine looks in the
2560-symbol and uses the base of the section the symbol is attached to and
2561-the value of the symbol as the initial relocation offset. If the symbol
2562-pointer is zero, then the section provided is looked up.
2563-
2564- * `address'
2565- The `address' field gives the offset in bytes from the base of the
2566-section data which owns the relocation record to the first byte of
2567-relocatable information. The actual data relocated will be relative to
2568-this point; for example, a relocation type which modifies the bottom
2569-two bytes of a four byte word would not touch the first byte pointed to
2570-in a big endian world.
2571-
2572- * `addend'
2573- The `addend' is a value provided by the back end to be added (!) to
2574-the relocation offset. Its interpretation is dependent upon the howto.
2575-For example, on the 68k the code:
2576-
2577- char foo[];
2578- main()
2579- {
2580- return foo[0x12345678];
2581- }
2582-
2583- Could be compiled into:
2584-
2585- linkw fp,#-4
2586- moveb @#12345678,d0
2587- extbl d0
2588- unlk fp
2589- rts
2590-
2591- This could create a reloc pointing to `foo', but leave the offset in
2592-the data, something like:
2593-
2594- RELOCATION RECORDS FOR [.text]:
2595- offset type value
2596- 00000006 32 _foo
2597-
2598- 00000000 4e56 fffc ; linkw fp,#-4
2599- 00000004 1039 1234 5678 ; moveb @#12345678,d0
2600- 0000000a 49c0 ; extbl d0
2601- 0000000c 4e5e ; unlk fp
2602- 0000000e 4e75 ; rts
2603-
2604- Using coff and an 88k, some instructions don't have enough space in
2605-them to represent the full address range, and pointers have to be
2606-loaded in two parts. So you'd get something like:
2607-
2608- or.u r13,r0,hi16(_foo+0x12345678)
2609- ld.b r2,r13,lo16(_foo+0x12345678)
2610- jmp r1
2611-
2612- This should create two relocs, both pointing to `_foo', and with
2613-0x12340000 in their addend field. The data would consist of:
2614-
2615- RELOCATION RECORDS FOR [.text]:
2616- offset type value
2617- 00000002 HVRT16 _foo+0x12340000
2618- 00000006 LVRT16 _foo+0x12340000
2619-
2620- 00000000 5da05678 ; or.u r13,r0,0x5678
2621- 00000004 1c4d5678 ; ld.b r2,r13,0x5678
2622- 00000008 f400c001 ; jmp r1
2623-
2624- The relocation routine digs out the value from the data, adds it to
2625-the addend to get the original offset, and then adds the value of
2626-`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
2627-with carry from bit 15 to bit 16.
2628-
2629- One further example is the sparc and the a.out format. The sparc has
2630-a similar problem to the 88k, in that some instructions don't have room
2631-for an entire offset, but on the sparc the parts are created in odd
2632-sized lumps. The designers of the a.out format chose

Part of diff was cut off due to size limit. Use your local client to view the full diff.