• 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évision72c97dd8d93a2b370fd7fd5d62ffeea8b08d7023 (tree)
l'heure2005-08-31 04:57:35
AuteurMark Mitchell <mark@code...>
CommiterMark Mitchell

Message de Log

* ld/ldmain.c (main): Use expandargv.
* binutils/addr2line.c (main): Likewise.
* binutils/ar.c (main): Likewise.
* binutils/coffdump.c (main): Likewise.
* binutils/cxxfilt.c (main): Likewise.
* binutils/dlltool.c (main): Likewise.
* binutils/dllwrap.c (main): Likewise.
* binutils/nlmconv.c (main): Likewise.
* binutils/nm.c (main): Likewise.
* binutils/objcopy.c (main): Likewise.
* binutils/objdump.c (main): Likewise.
* binutils/readelf.c (main): Likewise.
* binutils/size.c (main): Likeiwse.
* binutils/srcconv.c (main): Likewise.
* binutils/strings.c (main): Likewise.
* binutils/sysdump.c (main): Likewise.
* binutils/sysinfo.c (main): Likewise.
* binutils/windres.c (main): Likewise.

* include/libiberty.h (expandargv): New function.
* libiberty/argv.c (safe-ctype.h): Include it.
(ISBLANK): Remove.
(stdio.h): Include.
(expandargv): New function.
* libiberty/Makefile.in: Regenerated.

Change Summary

Modification

--- /dev/null
+++ b/ChangeLog.csl
@@ -0,0 +1,31 @@
1+2005-08-30 Mark Mitchell <mark@codesourcery.com>
2+
3+ * ld/ldmain.c (main): Use expandargv.
4+ * binutils/addr2line.c (main): Likewise.
5+ * binutils/ar.c (main): Likewise.
6+ * binutils/coffdump.c (main): Likewise.
7+ * binutils/cxxfilt.c (main): Likewise.
8+ * binutils/dlltool.c (main): Likewise.
9+ * binutils/dllwrap.c (main): Likewise.
10+ * binutils/nlmconv.c (main): Likewise.
11+ * binutils/nm.c (main): Likewise.
12+ * binutils/objcopy.c (main): Likewise.
13+ * binutils/objdump.c (main): Likewise.
14+ * binutils/readelf.c (main): Likewise.
15+ * binutils/size.c (main): Likeiwse.
16+ * binutils/srcconv.c (main): Likewise.
17+ * binutils/strings.c (main): Likewise.
18+ * binutils/sysdump.c (main): Likewise.
19+ * binutils/sysinfo.c (main): Likewise.
20+ * binutils/windres.c (main): Likewise.
21+
22+2005-08-30 Mark Mitchell <mark@codesourcery.com>
23+
24+ * include/libiberty.h (expandargv): New function.
25+ * libiberty/argv.c (safe-ctype.h): Include it.
26+ (ISBLANK): Remove.
27+ (stdio.h): Include.
28+ (expandargv): New function.
29+ * libiberty/Makefile.in: Regenerated.
30+
31+
--- a/bfd/doc/bfd.info
+++ b/bfd/doc/bfd.info
@@ -1,5 +1,6 @@
1-This is ../.././bfd/doc/bfd.info, produced by makeinfo version 4.7 from
2-../.././bfd/doc/bfd.texinfo.
1+This is /home/mitchell/src/g++pro/binutils-2.16.1/bfd/doc/bfd.info,
2+produced by makeinfo version 4.8 from
3+/home/mitchell/src/g++pro/binutils-2.16.1/bfd/doc/bfd.texinfo.
34
45 START-INFO-DIR-ENTRY
56 * Bfd: (bfd). The Binary File Descriptor library.
@@ -17,73 +18,9740 @@ END-INFO-DIR-ENTRY
1718 section entitled "GNU Free Documentation License".
1819
1920 
20-Indirect:
21-bfd.info-1: 724
22-bfd.info-2: 298309
21+File: bfd.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
22+
23+ This file documents the binary file descriptor library libbfd.
24+
25+* Menu:
26+
27+* Overview:: Overview of BFD
28+* BFD front end:: BFD front end
29+* BFD back ends:: BFD back ends
30+* GNU Free Documentation License:: GNU Free Documentation License
31+* Index:: Index
32+
33+
34+File: bfd.info, Node: Overview, Next: BFD front end, Prev: Top, Up: Top
35+
36+1 Introduction
37+**************
38+
39+BFD is a package which allows applications to use the same routines to
40+operate on object files whatever the object file format. A new object
41+file format can be supported simply by creating a new BFD back end and
42+adding it to the library.
43+
44+ BFD is split into two parts: the front end, and the back ends (one
45+for each object file format).
46+ * The front end of BFD provides the interface to the user. It manages
47+ memory and various canonical data structures. The front end also
48+ decides which back end to use and when to call back end routines.
49+
50+ * The back ends provide BFD its view of the real world. Each back
51+ end provides a set of calls which the BFD front end can use to
52+ maintain its canonical form. The back ends also may keep around
53+ information for their own use, for greater efficiency.
54+
55+* Menu:
56+
57+* History:: History
58+* How It Works:: How It Works
59+* What BFD Version 2 Can Do:: What BFD Version 2 Can Do
60+
61+
62+File: bfd.info, Node: History, Next: How It Works, Prev: Overview, Up: Overview
63+
64+1.1 History
65+===========
66+
67+One spur behind BFD was the desire, on the part of the GNU 960 team at
68+Intel Oregon, for interoperability of applications on their COFF and
69+b.out file formats. Cygnus was providing GNU support for the team, and
70+was contracted to provide the required functionality.
71+
72+ The name came from a conversation David Wallace was having with
73+Richard Stallman about the library: RMS said that it would be quite
74+hard--David said "BFD". Stallman was right, but the name stuck.
75+
76+ At the same time, Ready Systems wanted much the same thing, but for
77+different object file formats: IEEE-695, Oasys, Srecords, a.out and 68k
78+coff.
79+
80+ BFD was first implemented by members of Cygnus Support; Steve
81+Chamberlain (`sac@cygnus.com'), John Gilmore (`gnu@cygnus.com'), K.
82+Richard Pixley (`rich@cygnus.com') and David Henkel-Wallace
83+(`gumby@cygnus.com').
84+
85+
86+File: bfd.info, Node: How It Works, Next: What BFD Version 2 Can Do, Prev: History, Up: Overview
87+
88+1.2 How To Use BFD
89+==================
90+
91+To use the library, include `bfd.h' and link with `libbfd.a'.
92+
93+ BFD provides a common interface to the parts of an object file for a
94+calling application.
95+
96+ When an application sucessfully opens a target file (object,
97+archive, or whatever), a pointer to an internal structure is returned.
98+This pointer points to a structure called `bfd', described in `bfd.h'.
99+Our convention is to call this pointer a BFD, and instances of it
100+within code `abfd'. All operations on the target object file are
101+applied as methods to the BFD. The mapping is defined within `bfd.h'
102+in a set of macros, all beginning with `bfd_' to reduce namespace
103+pollution.
104+
105+ For example, this sequence does what you would probably expect:
106+return the number of sections in an object file attached to a BFD
107+`abfd'.
108+
109+ #include "bfd.h"
110+
111+ unsigned int number_of_sections (abfd)
112+ bfd *abfd;
113+ {
114+ return bfd_count_sections (abfd);
115+ }
116+
117+ The abstraction used within BFD is that an object file has:
118+
119+ * a header,
120+
121+ * a number of sections containing raw data (*note Sections::),
122+
123+ * a set of relocations (*note Relocations::), and
124+
125+ * some symbol information (*note Symbols::).
126+ Also, BFDs opened for archives have the additional attribute of an
127+index and contain subordinate BFDs. This approach is fine for a.out and
128+coff, but loses efficiency when applied to formats such as S-records and
129+IEEE-695.
130+
131+
132+File: bfd.info, Node: What BFD Version 2 Can Do, Prev: How It Works, Up: Overview
133+
134+1.3 What BFD Version 2 Can Do
135+=============================
136+
137+When an object file is opened, BFD subroutines automatically determine
138+the format of the input object file. They then build a descriptor in
139+memory with pointers to routines that will be used to access elements of
140+the object file's data structures.
141+
142+ As different information from the object files is required, BFD
143+reads from different sections of the file and processes them. For
144+example, a very common operation for the linker is processing symbol
145+tables. Each BFD back end provides a routine for converting between
146+the object file's representation of symbols and an internal canonical
147+format. When the linker asks for the symbol table of an object file, it
148+calls through a memory pointer to the routine from the relevant BFD
149+back end which reads and converts the table into a canonical form. The
150+linker then operates upon the canonical form. When the link is finished
151+and the linker writes the output file's symbol table, another BFD back
152+end routine is called to take the newly created symbol table and
153+convert it into the chosen output format.
154+
155+* Menu:
156+
157+* BFD information loss:: Information Loss
158+* Canonical format:: The BFD canonical object-file format
159+
160+
161+File: bfd.info, Node: BFD information loss, Next: Canonical format, Up: What BFD Version 2 Can Do
162+
163+1.3.1 Information Loss
164+----------------------
165+
166+_Information can be lost during output._ The output formats supported
167+by BFD do not provide identical facilities, and information which can
168+be described in one form has nowhere to go in another format. One
169+example of this is alignment information in `b.out'. There is nowhere
170+in an `a.out' format file to store alignment information on the
171+contained data, so when a file is linked from `b.out' and an `a.out'
172+image is produced, alignment information will not propagate to the
173+output file. (The linker will still use the alignment information
174+internally, so the link is performed correctly).
175+
176+ Another example is COFF section names. COFF files may contain an
177+unlimited number of sections, each one with a textual section name. If
178+the target of the link is a format which does not have many sections
179+(e.g., `a.out') or has sections without names (e.g., the Oasys format),
180+the link cannot be done simply. You can circumvent this problem by
181+describing the desired input-to-output section mapping with the linker
182+command language.
183+
184+ _Information can be lost during canonicalization._ The BFD internal
185+canonical form of the external formats is not exhaustive; there are
186+structures in input formats for which there is no direct representation
187+internally. This means that the BFD back ends cannot maintain all
188+possible data richness through the transformation between external to
189+internal and back to external formats.
190+
191+ This limitation is only a problem when an application reads one
192+format and writes another. Each BFD back end is responsible for
193+maintaining as much data as possible, and the internal BFD canonical
194+form has structures which are opaque to the BFD core, and exported only
195+to the back ends. When a file is read in one format, the canonical form
196+is generated for BFD and the application. At the same time, the back
197+end saves away any information which may otherwise be lost. If the data
198+is then written back in the same format, the back end routine will be
199+able to use the canonical form provided by the BFD core as well as the
200+information it prepared earlier. Since there is a great deal of
201+commonality between back ends, there is no information lost when
202+linking or copying big endian COFF to little endian COFF, or `a.out' to
203+`b.out'. When a mixture of formats is linked, the information is only
204+lost from the files whose format differs from the destination.
205+
206+
207+File: bfd.info, Node: Canonical format, Prev: BFD information loss, Up: What BFD Version 2 Can Do
208+
209+1.3.2 The BFD canonical object-file format
210+------------------------------------------
211+
212+The greatest potential for loss of information occurs when there is the
213+least overlap between the information provided by the source format,
214+that stored by the canonical format, and that needed by the destination
215+format. A brief description of the canonical form may help you
216+understand which kinds of data you can count on preserving across
217+conversions.
218+
219+_files_
220+ Information stored on a per-file basis includes target machine
221+ architecture, particular implementation format type, a demand
222+ pageable bit, and a write protected bit. Information like Unix
223+ magic numbers is not stored here--only the magic numbers' meaning,
224+ so a `ZMAGIC' file would have both the demand pageable bit and the
225+ write protected text bit set. The byte order of the target is
226+ stored on a per-file basis, so that big- and little-endian object
227+ files may be used with one another.
228+
229+_sections_
230+ Each section in the input file contains the name of the section,
231+ the section's original address in the object file, size and
232+ alignment information, various flags, and pointers into other BFD
233+ data structures.
234+
235+_symbols_
236+ Each symbol contains a pointer to the information for the object
237+ file which originally defined it, its name, its value, and various
238+ flag bits. When a BFD back end reads in a symbol table, it
239+ relocates all symbols to make them relative to the base of the
240+ section where they were defined. Doing this ensures that each
241+ symbol points to its containing section. Each symbol also has a
242+ varying amount of hidden private data for the BFD back end. Since
243+ the symbol points to the original file, the private data format
244+ for that symbol is accessible. `ld' can operate on a collection
245+ of symbols of wildly different formats without problems.
246+
247+ Normal global and simple local symbols are maintained on output,
248+ so an output file (no matter its format) will retain symbols
249+ pointing to functions and to global, static, and common variables.
250+ Some symbol information is not worth retaining; in `a.out', type
251+ information is stored in the symbol table as long symbol names.
252+ This information would be useless to most COFF debuggers; the
253+ linker has command line switches to allow users to throw it away.
254+
255+ There is one word of type information within the symbol, so if the
256+ format supports symbol type information within symbols (for
257+ example, COFF, IEEE, Oasys) and the type is simple enough to fit
258+ within one word (nearly everything but aggregates), the
259+ information will be preserved.
260+
261+_relocation level_
262+ Each canonical BFD relocation record contains a pointer to the
263+ symbol to relocate to, the offset of the data to relocate, the
264+ section the data is in, and a pointer to a relocation type
265+ descriptor. Relocation is performed by passing messages through
266+ the relocation type descriptor and the symbol pointer. Therefore,
267+ relocations can be performed on output data using a relocation
268+ method that is only available in one of the input formats. For
269+ instance, Oasys provides a byte relocation format. A relocation
270+ record requesting this relocation type would point indirectly to a
271+ routine to perform this, so the relocation may be performed on a
272+ byte being written to a 68k COFF file, even though 68k COFF has no
273+ such relocation type.
274+
275+_line numbers_
276+ Object formats can contain, for debugging purposes, some form of
277+ mapping between symbols, source line numbers, and addresses in the
278+ output file. These addresses have to be relocated along with the
279+ symbol information. Each symbol with an associated list of line
280+ number records points to the first record of the list. The head
281+ of a line number list consists of a pointer to the symbol, which
282+ allows finding out the address of the function whose line number
283+ is being described. The rest of the list is made up of pairs:
284+ offsets into the section and line numbers. Any format which can
285+ simply derive this information can pass it successfully between
286+ formats (COFF, IEEE and Oasys).
287+
288+
289+File: bfd.info, Node: BFD front end, Next: BFD back ends, Prev: Overview, Up: Top
290+
291+2 BFD Front End
292+***************
293+
294+2.1 `typedef bfd'
295+=================
296+
297+A BFD has type `bfd'; objects of this type are the cornerstone of any
298+application using BFD. Using BFD consists of making references though
299+the BFD and to data in the BFD.
300+
301+ Here is the structure that defines the type `bfd'. It contains the
302+major data about the file and pointers to the rest of the data.
303+
304+
305+ struct bfd
306+ {
307+ /* A unique identifier of the BFD */
308+ unsigned int id;
309+
310+ /* The filename the application opened the BFD with. */
311+ const char *filename;
312+
313+ /* A pointer to the target jump table. */
314+ const struct bfd_target *xvec;
315+
316+ /* The IOSTREAM, and corresponding IO vector that provide access
317+ to the file backing the BFD. */
318+ void *iostream;
319+ const struct bfd_iovec *iovec;
320+
321+ /* Is the file descriptor being cached? That is, can it be closed as
322+ needed, and re-opened when accessed later? */
323+ bfd_boolean cacheable;
324+
325+ /* Marks whether there was a default target specified when the
326+ BFD was opened. This is used to select which matching algorithm
327+ to use to choose the back end. */
328+ bfd_boolean target_defaulted;
329+
330+ /* The caching routines use these to maintain a
331+ least-recently-used list of BFDs. */
332+ struct bfd *lru_prev, *lru_next;
333+
334+ /* When a file is closed by the caching routines, BFD retains
335+ state information on the file here... */
336+ ufile_ptr where;
337+
338+ /* ... and here: (``once'' means at least once). */
339+ bfd_boolean opened_once;
340+
341+ /* Set if we have a locally maintained mtime value, rather than
342+ getting it from the file each time. */
343+ bfd_boolean mtime_set;
344+
345+ /* File modified time, if mtime_set is TRUE. */
346+ long mtime;
347+
348+ /* Reserved for an unimplemented file locking extension. */
349+ int ifd;
350+
351+ /* The format which belongs to the BFD. (object, core, etc.) */
352+ bfd_format format;
353+
354+ /* The direction with which the BFD was opened. */
355+ enum bfd_direction
356+ {
357+ no_direction = 0,
358+ read_direction = 1,
359+ write_direction = 2,
360+ both_direction = 3
361+ }
362+ direction;
363+
364+ /* Format_specific flags. */
365+ flagword flags;
366+
367+ /* Currently my_archive is tested before adding origin to
368+ anything. I believe that this can become always an add of
369+ origin, with origin set to 0 for non archive files. */
370+ ufile_ptr origin;
371+
372+ /* Remember when output has begun, to stop strange things
373+ from happening. */
374+ bfd_boolean output_has_begun;
375+
376+ /* A hash table for section names. */
377+ struct bfd_hash_table section_htab;
378+
379+ /* Pointer to linked list of sections. */
380+ struct bfd_section *sections;
381+
382+ /* The place where we add to the section list. */
383+ struct bfd_section **section_tail;
384+
385+ /* The number of sections. */
386+ unsigned int section_count;
387+
388+ /* Stuff only useful for object files:
389+ The start address. */
390+ bfd_vma start_address;
391+
392+ /* Used for input and output. */
393+ unsigned int symcount;
394+
395+ /* Symbol table for output BFD (with symcount entries). */
396+ struct bfd_symbol **outsymbols;
397+
398+ /* Used for slurped dynamic symbol tables. */
399+ unsigned int dynsymcount;
400+
401+ /* Pointer to structure which contains architecture information. */
402+ const struct bfd_arch_info *arch_info;
403+
404+ /* Flag set if symbols from this BFD should not be exported. */
405+ bfd_boolean no_export;
406+
407+ /* Stuff only useful for archives. */
408+ void *arelt_data;
409+ struct bfd *my_archive; /* The containing archive BFD. */
410+ struct bfd *next; /* The next BFD in the archive. */
411+ struct bfd *archive_head; /* The first BFD in the archive. */
412+ bfd_boolean has_armap;
413+
414+ /* A chain of BFD structures involved in a link. */
415+ struct bfd *link_next;
416+
417+ /* A field used by _bfd_generic_link_add_archive_symbols. This will
418+ be used only for archive elements. */
419+ int archive_pass;
420+
421+ /* Used by the back end to hold private data. */
422+ union
423+ {
424+ struct aout_data_struct *aout_data;
425+ struct artdata *aout_ar_data;
426+ struct _oasys_data *oasys_obj_data;
427+ struct _oasys_ar_data *oasys_ar_data;
428+ struct coff_tdata *coff_obj_data;
429+ struct pe_tdata *pe_obj_data;
430+ struct xcoff_tdata *xcoff_obj_data;
431+ struct ecoff_tdata *ecoff_obj_data;
432+ struct ieee_data_struct *ieee_data;
433+ struct ieee_ar_data_struct *ieee_ar_data;
434+ struct srec_data_struct *srec_data;
435+ struct ihex_data_struct *ihex_data;
436+ struct tekhex_data_struct *tekhex_data;
437+ struct elf_obj_tdata *elf_obj_data;
438+ struct nlm_obj_tdata *nlm_obj_data;
439+ struct bout_data_struct *bout_data;
440+ struct mmo_data_struct *mmo_data;
441+ struct sun_core_struct *sun_core_data;
442+ struct sco5_core_struct *sco5_core_data;
443+ struct trad_core_struct *trad_core_data;
444+ struct som_data_struct *som_data;
445+ struct hpux_core_struct *hpux_core_data;
446+ struct hppabsd_core_struct *hppabsd_core_data;
447+ struct sgi_core_struct *sgi_core_data;
448+ struct lynx_core_struct *lynx_core_data;
449+ struct osf_core_struct *osf_core_data;
450+ struct cisco_core_struct *cisco_core_data;
451+ struct versados_data_struct *versados_data;
452+ struct netbsd_core_struct *netbsd_core_data;
453+ struct mach_o_data_struct *mach_o_data;
454+ struct mach_o_fat_data_struct *mach_o_fat_data;
455+ struct bfd_pef_data_struct *pef_data;
456+ struct bfd_pef_xlib_data_struct *pef_xlib_data;
457+ struct bfd_sym_data_struct *sym_data;
458+ void *any;
459+ }
460+ tdata;
461+
462+ /* Used by the application to hold private data. */
463+ void *usrdata;
464+
465+ /* Where all the allocated stuff under this BFD goes. This is a
466+ struct objalloc *, but we use void * to avoid requiring the inclusion
467+ of objalloc.h. */
468+ void *memory;
469+ };
470+
471+2.2 Error reporting
472+===================
473+
474+Most BFD functions return nonzero on success (check their individual
475+documentation for precise semantics). On an error, they call
476+`bfd_set_error' to set an error condition that callers can check by
477+calling `bfd_get_error'. If that returns `bfd_error_system_call', then
478+check `errno'.
479+
480+ The easiest way to report a BFD error to the user is to use
481+`bfd_perror'.
482+
483+2.2.1 Type `bfd_error_type'
484+---------------------------
485+
486+The values returned by `bfd_get_error' are defined by the enumerated
487+type `bfd_error_type'.
488+
489+
490+ typedef enum bfd_error
491+ {
492+ bfd_error_no_error = 0,
493+ bfd_error_system_call,
494+ bfd_error_invalid_target,
495+ bfd_error_wrong_format,
496+ bfd_error_wrong_object_format,
497+ bfd_error_invalid_operation,
498+ bfd_error_no_memory,
499+ bfd_error_no_symbols,
500+ bfd_error_no_armap,
501+ bfd_error_no_more_archived_files,
502+ bfd_error_malformed_archive,
503+ bfd_error_file_not_recognized,
504+ bfd_error_file_ambiguously_recognized,
505+ bfd_error_no_contents,
506+ bfd_error_nonrepresentable_section,
507+ bfd_error_no_debug_section,
508+ bfd_error_bad_value,
509+ bfd_error_file_truncated,
510+ bfd_error_file_too_big,
511+ bfd_error_invalid_error_code
512+ }
513+ bfd_error_type;
514+
515+2.2.1.1 `bfd_get_error'
516+.......................
517+
518+*Synopsis*
519+ bfd_error_type bfd_get_error (void);
520+ *Description*
521+Return the current BFD error condition.
522+
523+2.2.1.2 `bfd_set_error'
524+.......................
525+
526+*Synopsis*
527+ void bfd_set_error (bfd_error_type error_tag);
528+ *Description*
529+Set the BFD error condition to be ERROR_TAG.
530+
531+2.2.1.3 `bfd_errmsg'
532+....................
533+
534+*Synopsis*
535+ const char *bfd_errmsg (bfd_error_type error_tag);
536+ *Description*
537+Return a string describing the error ERROR_TAG, or the system error if
538+ERROR_TAG is `bfd_error_system_call'.
539+
540+2.2.1.4 `bfd_perror'
541+....................
542+
543+*Synopsis*
544+ void bfd_perror (const char *message);
545+ *Description*
546+Print to the standard error stream a string describing the last BFD
547+error that occurred, or the last system error if the last BFD error was
548+a system call failure. If MESSAGE is non-NULL and non-empty, the error
549+string printed is preceded by MESSAGE, a colon, and a space. It is
550+followed by a newline.
551+
552+2.2.2 BFD error handler
553+-----------------------
554+
555+Some BFD functions want to print messages describing the problem. They
556+call a BFD error handler function. This function may be overridden by
557+the program.
558+
559+ The BFD error handler acts like printf.
560+
561+
562+ typedef void (*bfd_error_handler_type) (const char *, ...);
563+
564+2.2.2.1 `bfd_set_error_handler'
565+...............................
566+
567+*Synopsis*
568+ bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
569+ *Description*
570+Set the BFD error handler function. Returns the previous function.
571+
572+2.2.2.2 `bfd_set_error_program_name'
573+....................................
574+
575+*Synopsis*
576+ void bfd_set_error_program_name (const char *);
577+ *Description*
578+Set the program name to use when printing a BFD error. This is printed
579+before the error message followed by a colon and space. The string
580+must not be changed after it is passed to this function.
581+
582+2.2.2.3 `bfd_get_error_handler'
583+...............................
584+
585+*Synopsis*
586+ bfd_error_handler_type bfd_get_error_handler (void);
587+ *Description*
588+Return the BFD error handler function.
589+
590+2.3 Symbols
591+===========
592+
593+2.3.0.1 `bfd_get_reloc_upper_bound'
594+...................................
595+
596+*Synopsis*
597+ long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
598+ *Description*
599+Return the number of bytes required to store the relocation information
600+associated with section SECT attached to bfd ABFD. If an error occurs,
601+return -1.
602+
603+2.3.0.2 `bfd_canonicalize_reloc'
604+................................
605+
606+*Synopsis*
607+ long bfd_canonicalize_reloc
608+ (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
609+ *Description*
610+Call the back end associated with the open BFD ABFD and translate the
611+external form of the relocation information attached to SEC into the
612+internal canonical form. Place the table into memory at LOC, which has
613+been preallocated, usually by a call to `bfd_get_reloc_upper_bound'.
614+Returns the number of relocs, or -1 on error.
615+
616+ The SYMS table is also needed for horrible internal magic reasons.
617+
618+2.3.0.3 `bfd_set_reloc'
619+.......................
620+
621+*Synopsis*
622+ void bfd_set_reloc
623+ (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
624+ *Description*
625+Set the relocation pointer and count within section SEC to the values
626+REL and COUNT. The argument ABFD is ignored.
627+
628+2.3.0.4 `bfd_set_file_flags'
629+............................
630+
631+*Synopsis*
632+ bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
633+ *Description*
634+Set the flag word in the BFD ABFD to the value FLAGS.
635+
636+ Possible errors are:
637+ * `bfd_error_wrong_format' - The target bfd was not of object format.
638+
639+ * `bfd_error_invalid_operation' - The target bfd was open for
640+ reading.
641+
642+ * `bfd_error_invalid_operation' - The flag word contained a bit
643+ which was not applicable to the type of file. E.g., an attempt
644+ was made to set the `D_PAGED' bit on a BFD format which does not
645+ support demand paging.
646+
647+2.3.0.5 `bfd_get_arch_size'
648+...........................
649+
650+*Synopsis*
651+ int bfd_get_arch_size (bfd *abfd);
652+ *Description*
653+Returns the architecture address size, in bits, as determined by the
654+object file's format. For ELF, this information is included in the
655+header.
656+
657+ *Returns*
658+Returns the arch size in bits if known, `-1' otherwise.
659+
660+2.3.0.6 `bfd_get_sign_extend_vma'
661+.................................
662+
663+*Synopsis*
664+ int bfd_get_sign_extend_vma (bfd *abfd);
665+ *Description*
666+Indicates if the target architecture "naturally" sign extends an
667+address. Some architectures implicitly sign extend address values when
668+they are converted to types larger than the size of an address. For
669+instance, bfd_get_start_address() will return an address sign extended
670+to fill a bfd_vma when this is the case.
671+
672+ *Returns*
673+Returns `1' if the target architecture is known to sign extend
674+addresses, `0' if the target architecture is known to not sign extend
675+addresses, and `-1' otherwise.
676+
677+2.3.0.7 `bfd_set_start_address'
678+...............................
679+
680+*Synopsis*
681+ bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
682+ *Description*
683+Make VMA the entry point of output BFD ABFD.
684+
685+ *Returns*
686+Returns `TRUE' on success, `FALSE' otherwise.
687+
688+2.3.0.8 `bfd_get_gp_size'
689+.........................
690+
691+*Synopsis*
692+ unsigned int bfd_get_gp_size (bfd *abfd);
693+ *Description*
694+Return the maximum size of objects to be optimized using the GP
695+register under MIPS ECOFF. This is typically set by the `-G' argument
696+to the compiler, assembler or linker.
697+
698+2.3.0.9 `bfd_set_gp_size'
699+.........................
700+
701+*Synopsis*
702+ void bfd_set_gp_size (bfd *abfd, unsigned int i);
703+ *Description*
704+Set the maximum size of objects to be optimized using the GP register
705+under ECOFF or MIPS ELF. This is typically set by the `-G' argument to
706+the compiler, assembler or linker.
707+
708+2.3.0.10 `bfd_scan_vma'
709+.......................
710+
711+*Synopsis*
712+ bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
713+ *Description*
714+Convert, like `strtoul', a numerical expression STRING into a `bfd_vma'
715+integer, and return that integer. (Though without as many bells and
716+whistles as `strtoul'.) The expression is assumed to be unsigned
717+(i.e., positive). If given a BASE, it is used as the base for
718+conversion. A base of 0 causes the function to interpret the string in
719+hex if a leading "0x" or "0X" is found, otherwise in octal if a leading
720+zero is found, otherwise in decimal.
721+
722+ If the value would overflow, the maximum `bfd_vma' value is returned.
723+
724+2.3.0.11 `bfd_copy_private_header_data'
725+.......................................
726+
727+*Synopsis*
728+ bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
729+ *Description*
730+Copy private BFD header information from the BFD IBFD to the the BFD
731+OBFD. This copies information that may require sections to exist, but
732+does not require symbol tables. Return `true' on success, `false' on
733+error. Possible error returns are:
734+
735+ * `bfd_error_no_memory' - Not enough memory exists to create private
736+ data for OBFD.
737+
738+ #define bfd_copy_private_header_data(ibfd, obfd) \
739+ BFD_SEND (obfd, _bfd_copy_private_header_data, \
740+ (ibfd, obfd))
741+
742+2.3.0.12 `bfd_copy_private_bfd_data'
743+....................................
744+
745+*Synopsis*
746+ bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
747+ *Description*
748+Copy private BFD information from the BFD IBFD to the the BFD OBFD.
749+Return `TRUE' on success, `FALSE' on error. Possible error returns are:
750+
751+ * `bfd_error_no_memory' - Not enough memory exists to create private
752+ data for OBFD.
753+
754+ #define bfd_copy_private_bfd_data(ibfd, obfd) \
755+ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
756+ (ibfd, obfd))
757+
758+2.3.0.13 `bfd_merge_private_bfd_data'
759+.....................................
760+
761+*Synopsis*
762+ bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
763+ *Description*
764+Merge private BFD information from the BFD IBFD to the the output file
765+BFD OBFD when linking. Return `TRUE' on success, `FALSE' on error.
766+Possible error returns are:
767+
768+ * `bfd_error_no_memory' - Not enough memory exists to create private
769+ data for OBFD.
770+
771+ #define bfd_merge_private_bfd_data(ibfd, obfd) \
772+ BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
773+ (ibfd, obfd))
774+
775+2.3.0.14 `bfd_set_private_flags'
776+................................
777+
778+*Synopsis*
779+ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
780+ *Description*
781+Set private BFD flag information in the BFD ABFD. Return `TRUE' on
782+success, `FALSE' on error. Possible error returns are:
783+
784+ * `bfd_error_no_memory' - Not enough memory exists to create private
785+ data for OBFD.
786+
787+ #define bfd_set_private_flags(abfd, flags) \
788+ BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
789+
790+2.3.0.15 `Other functions'
791+..........................
792+
793+*Description*
794+The following functions exist but have not yet been documented.
795+ #define bfd_sizeof_headers(abfd, reloc) \
796+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
797+
798+ #define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
799+ BFD_SEND (abfd, _bfd_find_nearest_line, \
800+ (abfd, sec, syms, off, file, func, line))
801+
802+ #define bfd_debug_info_start(abfd) \
803+ BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
804+
805+ #define bfd_debug_info_end(abfd) \
806+ BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
807+
808+ #define bfd_debug_info_accumulate(abfd, section) \
809+ BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
810+
811+ #define bfd_stat_arch_elt(abfd, stat) \
812+ BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
813+
814+ #define bfd_update_armap_timestamp(abfd) \
815+ BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
816+
817+ #define bfd_set_arch_mach(abfd, arch, mach)\
818+ BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
819+
820+ #define bfd_relax_section(abfd, section, link_info, again) \
821+ BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
822+
823+ #define bfd_gc_sections(abfd, link_info) \
824+ BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
825+
826+ #define bfd_merge_sections(abfd, link_info) \
827+ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
828+
829+ #define bfd_is_group_section(abfd, sec) \
830+ BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
831+
832+ #define bfd_discard_group(abfd, sec) \
833+ BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
834+
835+ #define bfd_link_hash_table_create(abfd) \
836+ BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
837+
838+ #define bfd_link_hash_table_free(abfd, hash) \
839+ BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
840+
841+ #define bfd_link_add_symbols(abfd, info) \
842+ BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
843+
844+ #define bfd_link_just_syms(abfd, sec, info) \
845+ BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
846+
847+ #define bfd_final_link(abfd, info) \
848+ BFD_SEND (abfd, _bfd_final_link, (abfd, info))
849+
850+ #define bfd_free_cached_info(abfd) \
851+ BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
852+
853+ #define bfd_get_dynamic_symtab_upper_bound(abfd) \
854+ BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
855+
856+ #define bfd_print_private_bfd_data(abfd, file)\
857+ BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
858+
859+ #define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
860+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
861+
862+ #define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
863+ BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
864+ dyncount, dynsyms, ret))
865+
866+ #define bfd_get_dynamic_reloc_upper_bound(abfd) \
867+ BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
868+
869+ #define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
870+ BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
871+
872+ extern bfd_byte *bfd_get_relocated_section_contents
873+ (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
874+ bfd_boolean, asymbol **);
875+
876+2.3.0.16 `bfd_alt_mach_code'
877+............................
878+
879+*Synopsis*
880+ bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
881+ *Description*
882+When more than one machine code number is available for the same
883+machine type, this function can be used to switch between the preferred
884+one (alternative == 0) and any others. Currently, only ELF supports
885+this feature, with up to two alternate machine codes.
886+
887+ struct bfd_preserve
888+ {
889+ void *marker;
890+ void *tdata;
891+ flagword flags;
892+ const struct bfd_arch_info *arch_info;
893+ struct bfd_section *sections;
894+ struct bfd_section **section_tail;
895+ unsigned int section_count;
896+ struct bfd_hash_table section_htab;
897+ };
898+
899+2.3.0.17 `bfd_preserve_save'
900+............................
901+
902+*Synopsis*
903+ bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
904+ *Description*
905+When testing an object for compatibility with a particular target
906+back-end, the back-end object_p function needs to set up certain fields
907+in the bfd on successfully recognizing the object. This typically
908+happens in a piecemeal fashion, with failures possible at many points.
909+On failure, the bfd is supposed to be restored to its initial state,
910+which is virtually impossible. However, restoring a subset of the bfd
911+state works in practice. This function stores the subset and
912+reinitializes the bfd.
913+
914+2.3.0.18 `bfd_preserve_restore'
915+...............................
916+
917+*Synopsis*
918+ void bfd_preserve_restore (bfd *, struct bfd_preserve *);
919+ *Description*
920+This function restores bfd state saved by bfd_preserve_save. If MARKER
921+is non-NULL in struct bfd_preserve then that block and all subsequently
922+bfd_alloc'd memory is freed.
923+
924+2.3.0.19 `bfd_preserve_finish'
925+..............................
926+
927+*Synopsis*
928+ void bfd_preserve_finish (bfd *, struct bfd_preserve *);
929+ *Description*
930+This function should be called when the bfd state saved by
931+bfd_preserve_save is no longer needed. ie. when the back-end object_p
932+function returns with success.
933+
934+2.3.0.20 `struct bfd_iovec'
935+...........................
936+
937+*Description*
938+The `struct bfd_iovec' contains the internal file I/O class. Each
939+`BFD' has an instance of this class and all file I/O is routed through
940+it (it is assumed that the instance implements all methods listed
941+below).
942+ struct bfd_iovec
943+ {
944+ /* To avoid problems with macros, a "b" rather than "f"
945+ prefix is prepended to each method name. */
946+ /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
947+ bytes starting at PTR. Return the number of bytes actually
948+ transfered (a read past end-of-file returns less than NBYTES),
949+ or -1 (setting `bfd_error') if an error occurs. */
950+ file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
951+ file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
952+ file_ptr nbytes);
953+ /* Return the current IOSTREAM file offset, or -1 (setting `bfd_error'
954+ if an error occurs. */
955+ file_ptr (*btell) (struct bfd *abfd);
956+ /* For the following, on successful completion a value of 0 is returned.
957+ Otherwise, a value of -1 is returned (and `bfd_error' is set). */
958+ int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
959+ int (*bclose) (struct bfd *abfd);
960+ int (*bflush) (struct bfd *abfd);
961+ int (*bstat) (struct bfd *abfd, struct stat *sb);
962+ };
963+
964+2.3.0.21 `bfd_get_mtime'
965+........................
966+
967+*Synopsis*
968+ long bfd_get_mtime (bfd *abfd);
969+ *Description*
970+Return the file modification time (as read from the file system, or
971+from the archive header for archive members).
972+
973+2.3.0.22 `bfd_get_size'
974+.......................
975+
976+*Synopsis*
977+ long bfd_get_size (bfd *abfd);
978+ *Description*
979+Return the file size (as read from file system) for the file associated
980+with BFD ABFD.
981+
982+ The initial motivation for, and use of, this routine is not so we
983+can get the exact size of the object the BFD applies to, since that
984+might not be generally possible (archive members for example). It
985+would be ideal if someone could eventually modify it so that such
986+results were guaranteed.
987+
988+ Instead, we want to ask questions like "is this NNN byte sized
989+object I'm about to try read from file offset YYY reasonable?" As as
990+example of where we might do this, some object formats use string
991+tables for which the first `sizeof (long)' bytes of the table contain
992+the size of the table itself, including the size bytes. If an
993+application tries to read what it thinks is one of these string tables,
994+without some way to validate the size, and for some reason the size is
995+wrong (byte swapping error, wrong location for the string table, etc.),
996+the only clue is likely to be a read error when it tries to read the
997+table, or a "virtual memory exhausted" error when it tries to allocate
998+15 bazillon bytes of space for the 15 bazillon byte table it is about
999+to read. This function at least allows us to answer the question, "is
1000+the size reasonable?".
1001+
1002+* Menu:
1003+
1004+* Memory Usage::
1005+* Initialization::
1006+* Sections::
1007+* Symbols::
1008+* Archives::
1009+* Formats::
1010+* Relocations::
1011+* Core Files::
1012+* Targets::
1013+* Architectures::
1014+* Opening and Closing::
1015+* Internal::
1016+* File Caching::
1017+* Linker Functions::
1018+* Hash Tables::
1019+
1020+
1021+File: bfd.info, Node: Memory Usage, Next: Initialization, Prev: BFD front end, Up: BFD front end
1022+
1023+2.4 Memory Usage
1024+================
1025+
1026+BFD keeps all of its internal structures in obstacks. There is one
1027+obstack per open BFD file, into which the current state is stored. When
1028+a BFD is closed, the obstack is deleted, and so everything which has
1029+been allocated by BFD for the closing file is thrown away.
1030+
1031+ BFD does not free anything created by an application, but pointers
1032+into `bfd' structures become invalid on a `bfd_close'; for example,
1033+after a `bfd_close' the vector passed to `bfd_canonicalize_symtab' is
1034+still around, since it has been allocated by the application, but the
1035+data that it pointed to are lost.
1036+
1037+ The general rule is to not close a BFD until all operations dependent
1038+upon data from the BFD have been completed, or all the data from within
1039+the file has been copied. To help with the management of memory, there
1040+is a function (`bfd_alloc_size') which returns the number of bytes in
1041+obstacks associated with the supplied BFD. This could be used to select
1042+the greediest open BFD, close it to reclaim the memory, perform some
1043+operation and reopen the BFD again, to get a fresh copy of the data
1044+structures.
1045+
1046+
1047+File: bfd.info, Node: Initialization, Next: Sections, Prev: Memory Usage, Up: BFD front end
1048+
1049+2.5 Initialization
1050+==================
1051+
1052+These are the functions that handle initializing a BFD.
1053+
1054+2.5.0.1 `bfd_init'
1055+..................
1056+
1057+*Synopsis*
1058+ void bfd_init (void);
1059+ *Description*
1060+This routine must be called before any other BFD function to initialize
1061+magical internal data structures.
1062+
1063+
1064+File: bfd.info, Node: Sections, Next: Symbols, Prev: Initialization, Up: BFD front end
1065+
1066+2.6 Sections
1067+============
1068+
1069+The raw data contained within a BFD is maintained through the section
1070+abstraction. A single BFD may have any number of sections. It keeps
1071+hold of them by pointing to the first; each one points to the next in
1072+the list.
1073+
1074+ Sections are supported in BFD in `section.c'.
1075+
1076+* Menu:
1077+
1078+* Section Input::
1079+* Section Output::
1080+* typedef asection::
1081+* section prototypes::
1082+
1083+
1084+File: bfd.info, Node: Section Input, Next: Section Output, Prev: Sections, Up: Sections
1085+
1086+2.6.1 Section input
1087+-------------------
1088+
1089+When a BFD is opened for reading, the section structures are created
1090+and attached to the BFD.
1091+
1092+ Each section has a name which describes the section in the outside
1093+world--for example, `a.out' would contain at least three sections,
1094+called `.text', `.data' and `.bss'.
1095+
1096+ Names need not be unique; for example a COFF file may have several
1097+sections named `.data'.
1098+
1099+ Sometimes a BFD will contain more than the "natural" number of
1100+sections. A back end may attach other sections containing constructor
1101+data, or an application may add a section (using `bfd_make_section') to
1102+the sections attached to an already open BFD. For example, the linker
1103+creates an extra section `COMMON' for each input file's BFD to hold
1104+information about common storage.
1105+
1106+ The raw data is not necessarily read in when the section descriptor
1107+is created. Some targets may leave the data in place until a
1108+`bfd_get_section_contents' call is made. Other back ends may read in
1109+all the data at once. For example, an S-record file has to be read
1110+once to determine the size of the data. An IEEE-695 file doesn't
1111+contain raw data in sections, but data and relocation expressions
1112+intermixed, so the data area has to be parsed to get out the data and
1113+relocations.
1114+
1115+
1116+File: bfd.info, Node: Section Output, Next: typedef asection, Prev: Section Input, Up: Sections
1117+
1118+2.6.2 Section output
1119+--------------------
1120+
1121+To write a new object style BFD, the various sections to be written
1122+have to be created. They are attached to the BFD in the same way as
1123+input sections; data is written to the sections using
1124+`bfd_set_section_contents'.
1125+
1126+ Any program that creates or combines sections (e.g., the assembler
1127+and linker) must use the `asection' fields `output_section' and
1128+`output_offset' to indicate the file sections to which each section
1129+must be written. (If the section is being created from scratch,
1130+`output_section' should probably point to the section itself and
1131+`output_offset' should probably be zero.)
1132+
1133+ The data to be written comes from input sections attached (via
1134+`output_section' pointers) to the output sections. The output section
1135+structure can be considered a filter for the input section: the output
1136+section determines the vma of the output data and the name, but the
1137+input section determines the offset into the output section of the data
1138+to be written.
1139+
1140+ E.g., to create a section "O", starting at 0x100, 0x123 long,
1141+containing two subsections, "A" at offset 0x0 (i.e., at vma 0x100) and
1142+"B" at offset 0x20 (i.e., at vma 0x120) the `asection' structures would
1143+look like:
1144+
1145+ section name "A"
1146+ output_offset 0x00
1147+ size 0x20
1148+ output_section -----------> section name "O"
1149+ | vma 0x100
1150+ section name "B" | size 0x123
1151+ output_offset 0x20 |
1152+ size 0x103 |
1153+ output_section --------|
1154+
1155+2.6.3 Link orders
1156+-----------------
1157+
1158+The data within a section is stored in a "link_order". These are much
1159+like the fixups in `gas'. The link_order abstraction allows a section
1160+to grow and shrink within itself.
1161+
1162+ A link_order knows how big it is, and which is the next link_order
1163+and where the raw data for it is; it also points to a list of
1164+relocations which apply to it.
1165+
1166+ The link_order is used by the linker to perform relaxing on final
1167+code. The compiler creates code which is as big as necessary to make
1168+it work without relaxing, and the user can select whether to relax.
1169+Sometimes relaxing takes a lot of time. The linker runs around the
1170+relocations to see if any are attached to data which can be shrunk, if
1171+so it does it on a link_order by link_order basis.
1172+
1173+
1174+File: bfd.info, Node: typedef asection, Next: section prototypes, Prev: Section Output, Up: Sections
1175+
1176+2.6.4 typedef asection
1177+----------------------
1178+
1179+Here is the section structure:
1180+
1181+
1182+ typedef struct bfd_section
1183+ {
1184+ /* The name of the section; the name isn't a copy, the pointer is
1185+ the same as that passed to bfd_make_section. */
1186+ const char *name;
1187+
1188+ /* A unique sequence number. */
1189+ int id;
1190+
1191+ /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
1192+ int index;
1193+
1194+ /* The next section in the list belonging to the BFD, or NULL. */
1195+ struct bfd_section *next;
1196+
1197+ /* The field flags contains attributes of the section. Some
1198+ flags are read in from the object file, and some are
1199+ synthesized from other information. */
1200+ flagword flags;
1201+
1202+ #define SEC_NO_FLAGS 0x000
1203+
1204+ /* Tells the OS to allocate space for this section when loading.
1205+ This is clear for a section containing debug information only. */
1206+ #define SEC_ALLOC 0x001
1207+
1208+ /* Tells the OS to load the section from the file when loading.
1209+ This is clear for a .bss section. */
1210+ #define SEC_LOAD 0x002
1211+
1212+ /* The section contains data still to be relocated, so there is
1213+ some relocation information too. */
1214+ #define SEC_RELOC 0x004
1215+
1216+ /* A signal to the OS that the section contains read only data. */
1217+ #define SEC_READONLY 0x008
1218+
1219+ /* The section contains code only. */
1220+ #define SEC_CODE 0x010
1221+
1222+ /* The section contains data only. */
1223+ #define SEC_DATA 0x020
1224+
1225+ /* The section will reside in ROM. */
1226+ #define SEC_ROM 0x040
1227+
1228+ /* The section contains constructor information. This section
1229+ type is used by the linker to create lists of constructors and
1230+ destructors used by `g++'. When a back end sees a symbol
1231+ which should be used in a constructor list, it creates a new
1232+ section for the type of name (e.g., `__CTOR_LIST__'), attaches
1233+ the symbol to it, and builds a relocation. To build the lists
1234+ of constructors, all the linker has to do is catenate all the
1235+ sections called `__CTOR_LIST__' and relocate the data
1236+ contained within - exactly the operations it would peform on
1237+ standard data. */
1238+ #define SEC_CONSTRUCTOR 0x080
1239+
1240+ /* The section has contents - a data section could be
1241+ `SEC_ALLOC' | `SEC_HAS_CONTENTS'; a debug section could be
1242+ `SEC_HAS_CONTENTS' */
1243+ #define SEC_HAS_CONTENTS 0x100
1244+
1245+ /* An instruction to the linker to not output the section
1246+ even if it has information which would normally be written. */
1247+ #define SEC_NEVER_LOAD 0x200
1248+
1249+ /* The section contains thread local data. */
1250+ #define SEC_THREAD_LOCAL 0x400
1251+
1252+ /* The section has GOT references. This flag is only for the
1253+ linker, and is currently only used by the elf32-hppa back end.
1254+ It will be set if global offset table references were detected
1255+ in this section, which indicate to the linker that the section
1256+ contains PIC code, and must be handled specially when doing a
1257+ static link. */
1258+ #define SEC_HAS_GOT_REF 0x800
1259+
1260+ /* The section contains common symbols (symbols may be defined
1261+ multiple times, the value of a symbol is the amount of
1262+ space it requires, and the largest symbol value is the one
1263+ used). Most targets have exactly one of these (which we
1264+ translate to bfd_com_section_ptr), but ECOFF has two. */
1265+ #define SEC_IS_COMMON 0x1000
1266+
1267+ /* The section contains only debugging information. For
1268+ example, this is set for ELF .debug and .stab sections.
1269+ strip tests this flag to see if a section can be
1270+ discarded. */
1271+ #define SEC_DEBUGGING 0x2000
1272+
1273+ /* The contents of this section are held in memory pointed to
1274+ by the contents field. This is checked by bfd_get_section_contents,
1275+ and the data is retrieved from memory if appropriate. */
1276+ #define SEC_IN_MEMORY 0x4000
1277+
1278+ /* The contents of this section are to be excluded by the
1279+ linker for executable and shared objects unless those
1280+ objects are to be further relocated. */
1281+ #define SEC_EXCLUDE 0x8000
1282+
1283+ /* The contents of this section are to be sorted based on the sum of
1284+ the symbol and addend values specified by the associated relocation
1285+ entries. Entries without associated relocation entries will be
1286+ appended to the end of the section in an unspecified order. */
1287+ #define SEC_SORT_ENTRIES 0x10000
1288+
1289+ /* When linking, duplicate sections of the same name should be
1290+ discarded, rather than being combined into a single section as
1291+ is usually done. This is similar to how common symbols are
1292+ handled. See SEC_LINK_DUPLICATES below. */
1293+ #define SEC_LINK_ONCE 0x20000
1294+
1295+ /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
1296+ should handle duplicate sections. */
1297+ #define SEC_LINK_DUPLICATES 0x40000
1298+
1299+ /* This value for SEC_LINK_DUPLICATES means that duplicate
1300+ sections with the same name should simply be discarded. */
1301+ #define SEC_LINK_DUPLICATES_DISCARD 0x0
1302+
1303+ /* This value for SEC_LINK_DUPLICATES means that the linker
1304+ should warn if there are any duplicate sections, although
1305+ it should still only link one copy. */
1306+ #define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
1307+
1308+ /* This value for SEC_LINK_DUPLICATES means that the linker
1309+ should warn if any duplicate sections are a different size. */
1310+ #define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
1311+
1312+ /* This value for SEC_LINK_DUPLICATES means that the linker
1313+ should warn if any duplicate sections contain different
1314+ contents. */
1315+ #define SEC_LINK_DUPLICATES_SAME_CONTENTS \
1316+ (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
1317+
1318+ /* This section was created by the linker as part of dynamic
1319+ relocation or other arcane processing. It is skipped when
1320+ going through the first-pass output, trusting that someone
1321+ else up the line will take care of it later. */
1322+ #define SEC_LINKER_CREATED 0x200000
1323+
1324+ /* This section should not be subject to garbage collection. */
1325+ #define SEC_KEEP 0x400000
1326+
1327+ /* This section contains "short" data, and should be placed
1328+ "near" the GP. */
1329+ #define SEC_SMALL_DATA 0x800000
1330+
1331+ /* Attempt to merge identical entities in the section.
1332+ Entity size is given in the entsize field. */
1333+ #define SEC_MERGE 0x1000000
1334+
1335+ /* If given with SEC_MERGE, entities to merge are zero terminated
1336+ strings where entsize specifies character size instead of fixed
1337+ size entries. */
1338+ #define SEC_STRINGS 0x2000000
1339+
1340+ /* This section contains data about section groups. */
1341+ #define SEC_GROUP 0x4000000
1342+
1343+ /* The section is a COFF shared library section. This flag is
1344+ only for the linker. If this type of section appears in
1345+ the input file, the linker must copy it to the output file
1346+ without changing the vma or size. FIXME: Although this
1347+ was originally intended to be general, it really is COFF
1348+ specific (and the flag was renamed to indicate this). It
1349+ might be cleaner to have some more general mechanism to
1350+ allow the back end to control what the linker does with
1351+ sections. */
1352+ #define SEC_COFF_SHARED_LIBRARY 0x10000000
1353+
1354+ /* This section contains data which may be shared with other
1355+ executables or shared objects. This is for COFF only. */
1356+ #define SEC_COFF_SHARED 0x20000000
1357+
1358+ /* When a section with this flag is being linked, then if the size of
1359+ the input section is less than a page, it should not cross a page
1360+ boundary. If the size of the input section is one page or more,
1361+ it should be aligned on a page boundary. This is for TI
1362+ TMS320C54X only. */
1363+ #define SEC_TIC54X_BLOCK 0x40000000
1364+
1365+ /* Conditionally link this section; do not link if there are no
1366+ references found to any symbol in the section. This is for TI
1367+ TMS320C54X only. */
1368+ #define SEC_TIC54X_CLINK 0x80000000
1369+
1370+ /* End of section flags. */
1371+
1372+ /* Some internal packed boolean fields. */
1373+
1374+ /* See the vma field. */
1375+ unsigned int user_set_vma : 1;
1376+
1377+ /* A mark flag used by some of the linker backends. */
1378+ unsigned int linker_mark : 1;
1379+
1380+ /* Another mark flag used by some of the linker backends. Set for
1381+ output sections that have an input section. */
1382+ unsigned int linker_has_input : 1;
1383+
1384+ /* A mark flag used by some linker backends for garbage collection. */
1385+ unsigned int gc_mark : 1;
1386+
1387+ /* The following flags are used by the ELF linker. */
1388+
1389+ /* Mark sections which have been allocated to segments. */
1390+ unsigned int segment_mark : 1;
1391+
1392+ /* Type of sec_info information. */
1393+ unsigned int sec_info_type:3;
1394+ #define ELF_INFO_TYPE_NONE 0
1395+ #define ELF_INFO_TYPE_STABS 1
1396+ #define ELF_INFO_TYPE_MERGE 2
1397+ #define ELF_INFO_TYPE_EH_FRAME 3
1398+ #define ELF_INFO_TYPE_JUST_SYMS 4
1399+
1400+ /* Nonzero if this section uses RELA relocations, rather than REL. */
1401+ unsigned int use_rela_p:1;
1402+
1403+ /* Bits used by various backends. The generic code doesn't touch
1404+ these fields. */
1405+
1406+ /* Nonzero if this section has TLS related relocations. */
1407+ unsigned int has_tls_reloc:1;
1408+
1409+ /* Nonzero if this section has a gp reloc. */
1410+ unsigned int has_gp_reloc:1;
1411+
1412+ /* Nonzero if this section needs the relax finalize pass. */
1413+ unsigned int need_finalize_relax:1;
1414+
1415+ /* Whether relocations have been processed. */
1416+ unsigned int reloc_done : 1;
1417+
1418+ /* End of internal packed boolean fields. */
1419+
1420+ /* The virtual memory address of the section - where it will be
1421+ at run time. The symbols are relocated against this. The
1422+ user_set_vma flag is maintained by bfd; if it's not set, the
1423+ backend can assign addresses (for example, in `a.out', where
1424+ the default address for `.data' is dependent on the specific
1425+ target and various flags). */
1426+ bfd_vma vma;
1427+
1428+ /* The load address of the section - where it would be in a
1429+ rom image; really only used for writing section header
1430+ information. */
1431+ bfd_vma lma;
1432+
1433+ /* The size of the section in octets, as it will be output.
1434+ Contains a value even if the section has no contents (e.g., the
1435+ size of `.bss'). */
1436+ bfd_size_type size;
1437+
1438+ /* For input sections, the original size on disk of the section, in
1439+ octets. This field is used by the linker relaxation code. It is
1440+ currently only set for sections where the linker relaxation scheme
1441+ doesn't cache altered section and reloc contents (stabs, eh_frame,
1442+ SEC_MERGE, some coff relaxing targets), and thus the original size
1443+ needs to be kept to read the section multiple times.
1444+ For output sections, rawsize holds the section size calculated on
1445+ a previous linker relaxation pass. */
1446+ bfd_size_type rawsize;
1447+
1448+ /* If this section is going to be output, then this value is the
1449+ offset in *bytes* into the output section of the first byte in the
1450+ input section (byte ==> smallest addressable unit on the
1451+ target). In most cases, if this was going to start at the
1452+ 100th octet (8-bit quantity) in the output section, this value
1453+ would be 100. However, if the target byte size is 16 bits
1454+ (bfd_octets_per_byte is "2"), this value would be 50. */
1455+ bfd_vma output_offset;
1456+
1457+ /* The output section through which to map on output. */
1458+ struct bfd_section *output_section;
1459+
1460+ /* The alignment requirement of the section, as an exponent of 2 -
1461+ e.g., 3 aligns to 2^3 (or 8). */
1462+ unsigned int alignment_power;
1463+
1464+ /* If an input section, a pointer to a vector of relocation
1465+ records for the data in this section. */
1466+ struct reloc_cache_entry *relocation;
1467+
1468+ /* If an output section, a pointer to a vector of pointers to
1469+ relocation records for the data in this section. */
1470+ struct reloc_cache_entry **orelocation;
1471+
1472+ /* The number of relocation records in one of the above. */
1473+ unsigned reloc_count;
1474+
1475+ /* Information below is back end specific - and not always used
1476+ or updated. */
1477+
1478+ /* File position of section data. */
1479+ file_ptr filepos;
1480+
1481+ /* File position of relocation info. */
1482+ file_ptr rel_filepos;
1483+
1484+ /* File position of line data. */
1485+ file_ptr line_filepos;
1486+
1487+ /* Pointer to data for applications. */
1488+ void *userdata;
1489+
1490+ /* If the SEC_IN_MEMORY flag is set, this points to the actual
1491+ contents. */
1492+ unsigned char *contents;
1493+
1494+ /* Attached line number information. */
1495+ alent *lineno;
1496+
1497+ /* Number of line number records. */
1498+ unsigned int lineno_count;
1499+
1500+ /* Entity size for merging purposes. */
1501+ unsigned int entsize;
1502+
1503+ /* Points to the kept section if this section is a link-once section,
1504+ and is discarded. */
1505+ struct bfd_section *kept_section;
1506+
1507+ /* When a section is being output, this value changes as more
1508+ linenumbers are written out. */
1509+ file_ptr moving_line_filepos;
1510+
1511+ /* What the section number is in the target world. */
1512+ int target_index;
1513+
1514+ void *used_by_bfd;
1515+
1516+ /* If this is a constructor section then here is a list of the
1517+ relocations created to relocate items within it. */
1518+ struct relent_chain *constructor_chain;
1519+
1520+ /* The BFD which owns the section. */
1521+ bfd *owner;
1522+
1523+ /* A symbol which points at this section only. */
1524+ struct bfd_symbol *symbol;
1525+ struct bfd_symbol **symbol_ptr_ptr;
1526+
1527+ struct bfd_link_order *link_order_head;
1528+ struct bfd_link_order *link_order_tail;
1529+ } asection;
1530+
1531+ /* These sections are global, and are managed by BFD. The application
1532+ and target back end are not permitted to change the values in
1533+ these sections. New code should use the section_ptr macros rather
1534+ than referring directly to the const sections. The const sections
1535+ may eventually vanish. */
1536+ #define BFD_ABS_SECTION_NAME "*ABS*"
1537+ #define BFD_UND_SECTION_NAME "*UND*"
1538+ #define BFD_COM_SECTION_NAME "*COM*"
1539+ #define BFD_IND_SECTION_NAME "*IND*"
1540+
1541+ /* The absolute section. */
1542+ extern asection bfd_abs_section;
1543+ #define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
1544+ #define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
1545+ /* Pointer to the undefined section. */
1546+ extern asection bfd_und_section;
1547+ #define bfd_und_section_ptr ((asection *) &bfd_und_section)
1548+ #define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
1549+ /* Pointer to the common section. */
1550+ extern asection bfd_com_section;
1551+ #define bfd_com_section_ptr ((asection *) &bfd_com_section)
1552+ /* Pointer to the indirect section. */
1553+ extern asection bfd_ind_section;
1554+ #define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
1555+ #define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
1556+
1557+ #define bfd_is_const_section(SEC) \
1558+ ( ((SEC) == bfd_abs_section_ptr) \
1559+ || ((SEC) == bfd_und_section_ptr) \
1560+ || ((SEC) == bfd_com_section_ptr) \
1561+ || ((SEC) == bfd_ind_section_ptr))
1562+
1563+ extern const struct bfd_symbol * const bfd_abs_symbol;
1564+ extern const struct bfd_symbol * const bfd_com_symbol;
1565+ extern const struct bfd_symbol * const bfd_und_symbol;
1566+ extern const struct bfd_symbol * const bfd_ind_symbol;
1567+
1568+ /* Macros to handle insertion and deletion of a bfd's sections. These
1569+ only handle the list pointers, ie. do not adjust section_count,
1570+ target_index etc. */
1571+ #define bfd_section_list_remove(ABFD, PS) \
1572+ do \
1573+ { \
1574+ asection **_ps = PS; \
1575+ asection *_s = *_ps; \
1576+ *_ps = _s->next; \
1577+ if (_s->next == NULL) \
1578+ (ABFD)->section_tail = _ps; \
1579+ } \
1580+ while (0)
1581+ #define bfd_section_list_insert(ABFD, PS, S) \
1582+ do \
1583+ { \
1584+ asection **_ps = PS; \
1585+ asection *_s = S; \
1586+ _s->next = *_ps; \
1587+ *_ps = _s; \
1588+ if (_s->next == NULL) \
1589+ (ABFD)->section_tail = &_s->next; \
1590+ } \
1591+ while (0)
1592+
1593+
1594+File: bfd.info, Node: section prototypes, Prev: typedef asection, Up: Sections
1595+
1596+2.6.5 Section prototypes
1597+------------------------
1598+
1599+These are the functions exported by the section handling part of BFD.
1600+
1601+2.6.5.1 `bfd_section_list_clear'
1602+................................
1603+
1604+*Synopsis*
1605+ void bfd_section_list_clear (bfd *);
1606+ *Description*
1607+Clears the section list, and also resets the section count and hash
1608+table entries.
1609+
1610+2.6.5.2 `bfd_get_section_by_name'
1611+.................................
1612+
1613+*Synopsis*
1614+ asection *bfd_get_section_by_name (bfd *abfd, const char *name);
1615+ *Description*
1616+Run through ABFD and return the one of the `asection's whose name
1617+matches NAME, otherwise `NULL'. *Note Sections::, for more information.
1618+
1619+ This should only be used in special cases; the normal way to process
1620+all sections of a given name is to use `bfd_map_over_sections' and
1621+`strcmp' on the name (or better yet, base it on the section flags or
1622+something else) for each section.
1623+
1624+2.6.5.3 `bfd_get_section_by_name_if'
1625+....................................
1626+
1627+*Synopsis*
1628+ asection *bfd_get_section_by_name_if
1629+ (bfd *abfd,
1630+ const char *name,
1631+ bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
1632+ void *obj);
1633+ *Description*
1634+Call the provided function FUNC for each section attached to the BFD
1635+ABFD whose name matches NAME, passing OBJ as an argument. The function
1636+will be called as if by
1637+
1638+ func (abfd, the_section, obj);
1639+
1640+ It returns the first section for which FUNC returns true, otherwise
1641+`NULL'.
1642+
1643+2.6.5.4 `bfd_get_unique_section_name'
1644+.....................................
1645+
1646+*Synopsis*
1647+ char *bfd_get_unique_section_name
1648+ (bfd *abfd, const char *templat, int *count);
1649+ *Description*
1650+Invent a section name that is unique in ABFD by tacking a dot and a
1651+digit suffix onto the original TEMPLAT. If COUNT is non-NULL, then it
1652+specifies the first number tried as a suffix to generate a unique name.
1653+The value pointed to by COUNT will be incremented in this case.
1654+
1655+2.6.5.5 `bfd_make_section_old_way'
1656+..................................
1657+
1658+*Synopsis*
1659+ asection *bfd_make_section_old_way (bfd *abfd, const char *name);
1660+ *Description*
1661+Create a new empty section called NAME and attach it to the end of the
1662+chain of sections for the BFD ABFD. An attempt to create a section with
1663+a name which is already in use returns its pointer without changing the
1664+section chain.
1665+
1666+ It has the funny name since this is the way it used to be before it
1667+was rewritten....
1668+
1669+ Possible errors are:
1670+ * `bfd_error_invalid_operation' - If output has already started for
1671+ this BFD.
1672+
1673+ * `bfd_error_no_memory' - If memory allocation fails.
1674+
1675+2.6.5.6 `bfd_make_section_anyway'
1676+.................................
1677+
1678+*Synopsis*
1679+ asection *bfd_make_section_anyway (bfd *abfd, const char *name);
1680+ *Description*
1681+Create a new empty section called NAME and attach it to the end of the
1682+chain of sections for ABFD. Create a new section even if there is
1683+already a section with that name.
1684+
1685+ Return `NULL' and set `bfd_error' on error; possible errors are:
1686+ * `bfd_error_invalid_operation' - If output has already started for
1687+ ABFD.
1688+
1689+ * `bfd_error_no_memory' - If memory allocation fails.
1690+
1691+2.6.5.7 `bfd_make_section'
1692+..........................
1693+
1694+*Synopsis*
1695+ asection *bfd_make_section (bfd *, const char *name);
1696+ *Description*
1697+Like `bfd_make_section_anyway', but return `NULL' (without calling
1698+bfd_set_error ()) without changing the section chain if there is
1699+already a section named NAME. If there is an error, return `NULL' and
1700+set `bfd_error'.
1701+
1702+2.6.5.8 `bfd_set_section_flags'
1703+...............................
1704+
1705+*Synopsis*
1706+ bfd_boolean bfd_set_section_flags
1707+ (bfd *abfd, asection *sec, flagword flags);
1708+ *Description*
1709+Set the attributes of the section SEC in the BFD ABFD to the value
1710+FLAGS. Return `TRUE' on success, `FALSE' on error. Possible error
1711+returns are:
1712+
1713+ * `bfd_error_invalid_operation' - The section cannot have one or
1714+ more of the attributes requested. For example, a .bss section in
1715+ `a.out' may not have the `SEC_HAS_CONTENTS' field set.
1716+
1717+2.6.5.9 `bfd_map_over_sections'
1718+...............................
1719+
1720+*Synopsis*
1721+ void bfd_map_over_sections
1722+ (bfd *abfd,
1723+ void (*func) (bfd *abfd, asection *sect, void *obj),
1724+ void *obj);
1725+ *Description*
1726+Call the provided function FUNC for each section attached to the BFD
1727+ABFD, passing OBJ as an argument. The function will be called as if by
1728+
1729+ func (abfd, the_section, obj);
1730+
1731+ This is the preferred method for iterating over sections; an
1732+alternative would be to use a loop:
1733+
1734+ section *p;
1735+ for (p = abfd->sections; p != NULL; p = p->next)
1736+ func (abfd, p, ...)
1737+
1738+2.6.5.10 `bfd_sections_find_if'
1739+...............................
1740+
1741+*Synopsis*
1742+ asection *bfd_sections_find_if
1743+ (bfd *abfd,
1744+ bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
1745+ void *obj);
1746+ *Description*
1747+Call the provided function OPERATION for each section attached to the
1748+BFD ABFD, passing OBJ as an argument. The function will be called as if
1749+by
1750+
1751+ operation (abfd, the_section, obj);
1752+
1753+ It returns the first section for which OPERATION returns true.
1754+
1755+2.6.5.11 `bfd_set_section_size'
1756+...............................
1757+
1758+*Synopsis*
1759+ bfd_boolean bfd_set_section_size
1760+ (bfd *abfd, asection *sec, bfd_size_type val);
1761+ *Description*
1762+Set SEC to the size VAL. If the operation is ok, then `TRUE' is
1763+returned, else `FALSE'.
1764+
1765+ Possible error returns:
1766+ * `bfd_error_invalid_operation' - Writing has started to the BFD, so
1767+ setting the size is invalid.
1768+
1769+2.6.5.12 `bfd_set_section_contents'
1770+...................................
1771+
1772+*Synopsis*
1773+ bfd_boolean bfd_set_section_contents
1774+ (bfd *abfd, asection *section, const void *data,
1775+ file_ptr offset, bfd_size_type count);
1776+ *Description*
1777+Sets the contents of the section SECTION in BFD ABFD to the data
1778+starting in memory at DATA. The data is written to the output section
1779+starting at offset OFFSET for COUNT octets.
1780+
1781+ Normally `TRUE' is returned, else `FALSE'. Possible error returns
1782+are:
1783+ * `bfd_error_no_contents' - The output section does not have the
1784+ `SEC_HAS_CONTENTS' attribute, so nothing can be written to it.
1785+
1786+ * and some more too
1787+ This routine is front end to the back end function
1788+`_bfd_set_section_contents'.
1789+
1790+2.6.5.13 `bfd_get_section_contents'
1791+...................................
1792+
1793+*Synopsis*
1794+ bfd_boolean bfd_get_section_contents
1795+ (bfd *abfd, asection *section, void *location, file_ptr offset,
1796+ bfd_size_type count);
1797+ *Description*
1798+Read data from SECTION in BFD ABFD into memory starting at LOCATION.
1799+The data is read at an offset of OFFSET from the start of the input
1800+section, and is read for COUNT bytes.
1801+
1802+ If the contents of a constructor with the `SEC_CONSTRUCTOR' flag set
1803+are requested or if the section does not have the `SEC_HAS_CONTENTS'
1804+flag set, then the LOCATION is filled with zeroes. If no errors occur,
1805+`TRUE' is returned, else `FALSE'.
1806+
1807+2.6.5.14 `bfd_malloc_and_get_section'
1808+.....................................
1809+
1810+*Synopsis*
1811+ bfd_boolean bfd_malloc_and_get_section
1812+ (bfd *abfd, asection *section, bfd_byte **buf);
1813+ *Description*
1814+Read all data from SECTION in BFD ABFD into a buffer, *BUF, malloc'd by
1815+this function.
1816+
1817+2.6.5.15 `bfd_copy_private_section_data'
1818+........................................
1819+
1820+*Synopsis*
1821+ bfd_boolean bfd_copy_private_section_data
1822+ (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
1823+ *Description*
1824+Copy private section information from ISEC in the BFD IBFD to the
1825+section OSEC in the BFD OBFD. Return `TRUE' on success, `FALSE' on
1826+error. Possible error returns are:
1827+
1828+ * `bfd_error_no_memory' - Not enough memory exists to create private
1829+ data for OSEC.
1830+
1831+ #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
1832+ BFD_SEND (obfd, _bfd_copy_private_section_data, \
1833+ (ibfd, isection, obfd, osection))
1834+
1835+2.6.5.16 `_bfd_strip_section_from_output'
1836+.........................................
1837+
1838+*Synopsis*
1839+ void _bfd_strip_section_from_output
1840+ (struct bfd_link_info *info, asection *section);
1841+ *Description*
1842+Remove SECTION from the output. If the output section becomes empty,
1843+remove it from the output bfd.
1844+
1845+ This function won't actually do anything except twiddle flags if
1846+called too late in the linking process, when it's not safe to remove
1847+sections.
1848+
1849+2.6.5.17 `bfd_generic_is_group_section'
1850+.......................................
1851+
1852+*Synopsis*
1853+ bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
1854+ *Description*
1855+Returns TRUE if SEC is a member of a group.
1856+
1857+2.6.5.18 `bfd_generic_discard_group'
1858+....................................
1859+
1860+*Synopsis*
1861+ bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
1862+ *Description*
1863+Remove all members of GROUP from the output.
1864+
1865+
1866+File: bfd.info, Node: Symbols, Next: Archives, Prev: Sections, Up: BFD front end
1867+
1868+2.7 Symbols
1869+===========
1870+
1871+BFD tries to maintain as much symbol information as it can when it
1872+moves information from file to file. BFD passes information to
1873+applications though the `asymbol' structure. When the application
1874+requests the symbol table, BFD reads the table in the native form and
1875+translates parts of it into the internal format. To maintain more than
1876+the information passed to applications, some targets keep some
1877+information "behind the scenes" in a structure only the particular back
1878+end knows about. For example, the coff back end keeps the original
1879+symbol table structure as well as the canonical structure when a BFD is
1880+read in. On output, the coff back end can reconstruct the output symbol
1881+table so that no information is lost, even information unique to coff
1882+which BFD doesn't know or understand. If a coff symbol table were read,
1883+but were written through an a.out back end, all the coff specific
1884+information would be lost. The symbol table of a BFD is not necessarily
1885+read in until a canonicalize request is made. Then the BFD back end
1886+fills in a table provided by the application with pointers to the
1887+canonical information. To output symbols, the application provides BFD
1888+with a table of pointers to pointers to `asymbol's. This allows
1889+applications like the linker to output a symbol as it was read, since
1890+the "behind the scenes" information will be still available.
1891+
1892+* Menu:
1893+
1894+* Reading Symbols::
1895+* Writing Symbols::
1896+* Mini Symbols::
1897+* typedef asymbol::
1898+* symbol handling functions::
1899+
1900+
1901+File: bfd.info, Node: Reading Symbols, Next: Writing Symbols, Prev: Symbols, Up: Symbols
1902+
1903+2.7.1 Reading symbols
1904+---------------------
1905+
1906+There are two stages to reading a symbol table from a BFD: allocating
1907+storage, and the actual reading process. This is an excerpt from an
1908+application which reads the symbol table:
1909+
1910+ long storage_needed;
1911+ asymbol **symbol_table;
1912+ long number_of_symbols;
1913+ long i;
1914+
1915+ storage_needed = bfd_get_symtab_upper_bound (abfd);
1916+
1917+ if (storage_needed < 0)
1918+ FAIL
1919+
1920+ if (storage_needed == 0)
1921+ return;
1922+
1923+ symbol_table = xmalloc (storage_needed);
1924+ ...
1925+ number_of_symbols =
1926+ bfd_canonicalize_symtab (abfd, symbol_table);
1927+
1928+ if (number_of_symbols < 0)
1929+ FAIL
1930+
1931+ for (i = 0; i < number_of_symbols; i++)
1932+ process_symbol (symbol_table[i]);
1933+
1934+ All storage for the symbols themselves is in an objalloc connected
1935+to the BFD; it is freed when the BFD is closed.
1936+
1937+
1938+File: bfd.info, Node: Writing Symbols, Next: Mini Symbols, Prev: Reading Symbols, Up: Symbols
1939+
1940+2.7.2 Writing symbols
1941+---------------------
1942+
1943+Writing of a symbol table is automatic when a BFD open for writing is
1944+closed. The application attaches a vector of pointers to pointers to
1945+symbols to the BFD being written, and fills in the symbol count. The
1946+close and cleanup code reads through the table provided and performs
1947+all the necessary operations. The BFD output code must always be
1948+provided with an "owned" symbol: one which has come from another BFD,
1949+or one which has been created using `bfd_make_empty_symbol'. Here is an
1950+example showing the creation of a symbol table with only one element:
1951+
1952+ #include "bfd.h"
1953+ int main (void)
1954+ {
1955+ bfd *abfd;
1956+ asymbol *ptrs[2];
1957+ asymbol *new;
1958+
1959+ abfd = bfd_openw ("foo","a.out-sunos-big");
1960+ bfd_set_format (abfd, bfd_object);
1961+ new = bfd_make_empty_symbol (abfd);
1962+ new->name = "dummy_symbol";
1963+ new->section = bfd_make_section_old_way (abfd, ".text");
1964+ new->flags = BSF_GLOBAL;
1965+ new->value = 0x12345;
1966+
1967+ ptrs[0] = new;
1968+ ptrs[1] = 0;
1969+
1970+ bfd_set_symtab (abfd, ptrs, 1);
1971+ bfd_close (abfd);
1972+ return 0;
1973+ }
1974+
1975+ ./makesym
1976+ nm foo
1977+ 00012345 A dummy_symbol
1978+
1979+ Many formats cannot represent arbitrary symbol information; for
1980+instance, the `a.out' object format does not allow an arbitrary number
1981+of sections. A symbol pointing to a section which is not one of
1982+`.text', `.data' or `.bss' cannot be described.
1983+
1984+
1985+File: bfd.info, Node: Mini Symbols, Next: typedef asymbol, Prev: Writing Symbols, Up: Symbols
1986+
1987+2.7.3 Mini Symbols
1988+------------------
1989+
1990+Mini symbols provide read-only access to the symbol table. They use
1991+less memory space, but require more time to access. They can be useful
1992+for tools like nm or objdump, which may have to handle symbol tables of
1993+extremely large executables.
1994+
1995+ The `bfd_read_minisymbols' function will read the symbols into
1996+memory in an internal form. It will return a `void *' pointer to a
1997+block of memory, a symbol count, and the size of each symbol. The
1998+pointer is allocated using `malloc', and should be freed by the caller
1999+when it is no longer needed.
2000+
2001+ The function `bfd_minisymbol_to_symbol' will take a pointer to a
2002+minisymbol, and a pointer to a structure returned by
2003+`bfd_make_empty_symbol', and return a `asymbol' structure. The return
2004+value may or may not be the same as the value from
2005+`bfd_make_empty_symbol' which was passed in.
2006+
2007+
2008+File: bfd.info, Node: typedef asymbol, Next: symbol handling functions, Prev: Mini Symbols, Up: Symbols
2009+
2010+2.7.4 typedef asymbol
2011+---------------------
2012+
2013+An `asymbol' has the form:
2014+
2015+
2016+ typedef struct bfd_symbol
2017+ {
2018+ /* A pointer to the BFD which owns the symbol. This information
2019+ is necessary so that a back end can work out what additional
2020+ information (invisible to the application writer) is carried
2021+ with the symbol.
2022+
2023+ This field is *almost* redundant, since you can use section->owner
2024+ instead, except that some symbols point to the global sections
2025+ bfd_{abs,com,und}_section. This could be fixed by making
2026+ these globals be per-bfd (or per-target-flavor). FIXME. */
2027+ struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
2028+
2029+ /* The text of the symbol. The name is left alone, and not copied; the
2030+ application may not alter it. */
2031+ const char *name;
2032+
2033+ /* The value of the symbol. This really should be a union of a
2034+ numeric value with a pointer, since some flags indicate that
2035+ a pointer to another symbol is stored here. */
2036+ symvalue value;
2037+
2038+ /* Attributes of a symbol. */
2039+ #define BSF_NO_FLAGS 0x00
2040+
2041+ /* The symbol has local scope; `static' in `C'. The value
2042+ is the offset into the section of the data. */
2043+ #define BSF_LOCAL 0x01
2044+
2045+ /* The symbol has global scope; initialized data in `C'. The
2046+ value is the offset into the section of the data. */
2047+ #define BSF_GLOBAL 0x02
2048+
2049+ /* The symbol has global scope and is exported. The value is
2050+ the offset into the section of the data. */
2051+ #define BSF_EXPORT BSF_GLOBAL /* No real difference. */
2052+
2053+ /* A normal C symbol would be one of:
2054+ `BSF_LOCAL', `BSF_FORT_COMM', `BSF_UNDEFINED' or
2055+ `BSF_GLOBAL'. */
2056+
2057+ /* The symbol is a debugging record. The value has an arbitrary
2058+ meaning, unless BSF_DEBUGGING_RELOC is also set. */
2059+ #define BSF_DEBUGGING 0x08
2060+
2061+ /* The symbol denotes a function entry point. Used in ELF,
2062+ perhaps others someday. */
2063+ #define BSF_FUNCTION 0x10
2064+
2065+ /* Used by the linker. */
2066+ #define BSF_KEEP 0x20
2067+ #define BSF_KEEP_G 0x40
2068+
2069+ /* A weak global symbol, overridable without warnings by
2070+ a regular global symbol of the same name. */
2071+ #define BSF_WEAK 0x80
2072+
2073+ /* This symbol was created to point to a section, e.g. ELF's
2074+ STT_SECTION symbols. */
2075+ #define BSF_SECTION_SYM 0x100
2076+
2077+ /* The symbol used to be a common symbol, but now it is
2078+ allocated. */
2079+ #define BSF_OLD_COMMON 0x200
2080+
2081+ /* The default value for common data. */
2082+ #define BFD_FORT_COMM_DEFAULT_VALUE 0
2083+
2084+ /* In some files the type of a symbol sometimes alters its
2085+ location in an output file - ie in coff a `ISFCN' symbol
2086+ which is also `C_EXT' symbol appears where it was
2087+ declared and not at the end of a section. This bit is set
2088+ by the target BFD part to convey this information. */
2089+ #define BSF_NOT_AT_END 0x400
2090+
2091+ /* Signal that the symbol is the label of constructor section. */
2092+ #define BSF_CONSTRUCTOR 0x800
2093+
2094+ /* Signal that the symbol is a warning symbol. The name is a
2095+ warning. The name of the next symbol is the one to warn about;
2096+ if a reference is made to a symbol with the same name as the next
2097+ symbol, a warning is issued by the linker. */
2098+ #define BSF_WARNING 0x1000
2099+
2100+ /* Signal that the symbol is indirect. This symbol is an indirect
2101+ pointer to the symbol with the same name as the next symbol. */
2102+ #define BSF_INDIRECT 0x2000
2103+
2104+ /* BSF_FILE marks symbols that contain a file name. This is used
2105+ for ELF STT_FILE symbols. */
2106+ #define BSF_FILE 0x4000
2107+
2108+ /* Symbol is from dynamic linking information. */
2109+ #define BSF_DYNAMIC 0x8000
2110+
2111+ /* The symbol denotes a data object. Used in ELF, and perhaps
2112+ others someday. */
2113+ #define BSF_OBJECT 0x10000
2114+
2115+ /* This symbol is a debugging symbol. The value is the offset
2116+ into the section of the data. BSF_DEBUGGING should be set
2117+ as well. */
2118+ #define BSF_DEBUGGING_RELOC 0x20000
2119+
2120+ /* This symbol is thread local. Used in ELF. */
2121+ #define BSF_THREAD_LOCAL 0x40000
2122+
2123+ flagword flags;
2124+
2125+ /* A pointer to the section to which this symbol is
2126+ relative. This will always be non NULL, there are special
2127+ sections for undefined and absolute symbols. */
2128+ struct bfd_section *section;
2129+
2130+ /* Back end special data. */
2131+ union
2132+ {
2133+ void *p;
2134+ bfd_vma i;
2135+ }
2136+ udata;
2137+ }
2138+ asymbol;
2139+
2140+
2141+File: bfd.info, Node: symbol handling functions, Prev: typedef asymbol, Up: Symbols
2142+
2143+2.7.5 Symbol handling functions
2144+-------------------------------
2145+
2146+2.7.5.1 `bfd_get_symtab_upper_bound'
2147+....................................
2148+
2149+*Description*
2150+Return the number of bytes required to store a vector of pointers to
2151+`asymbols' for all the symbols in the BFD ABFD, including a terminal
2152+NULL pointer. If there are no symbols in the BFD, then return 0. If an
2153+error occurs, return -1.
2154+ #define bfd_get_symtab_upper_bound(abfd) \
2155+ BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
2156+
2157+2.7.5.2 `bfd_is_local_label'
2158+............................
2159+
2160+*Synopsis*
2161+ bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
2162+ *Description*
2163+Return TRUE if the given symbol SYM in the BFD ABFD is a compiler
2164+generated local label, else return FALSE.
2165+
2166+2.7.5.3 `bfd_is_local_label_name'
2167+.................................
2168+
2169+*Synopsis*
2170+ bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
2171+ *Description*
2172+Return TRUE if a symbol with the name NAME in the BFD ABFD is a
2173+compiler generated local label, else return FALSE. This just checks
2174+whether the name has the form of a local label.
2175+ #define bfd_is_local_label_name(abfd, name) \
2176+ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
2177+
2178+2.7.5.4 `bfd_is_target_special_symbol'
2179+......................................
2180+
2181+*Synopsis*
2182+ bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
2183+ *Description*
2184+Return TRUE iff a symbol SYM in the BFD ABFD is something special to
2185+the particular target represented by the BFD. Such symbols should
2186+normally not be mentioned to the user.
2187+ #define bfd_is_target_special_symbol(abfd, sym) \
2188+ BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
2189+
2190+2.7.5.5 `bfd_canonicalize_symtab'
2191+.................................
2192+
2193+*Description*
2194+Read the symbols from the BFD ABFD, and fills in the vector LOCATION
2195+with pointers to the symbols and a trailing NULL. Return the actual
2196+number of symbol pointers, not including the NULL.
2197+ #define bfd_canonicalize_symtab(abfd, location) \
2198+ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
2199+
2200+2.7.5.6 `bfd_set_symtab'
2201+........................
2202+
2203+*Synopsis*
2204+ bfd_boolean bfd_set_symtab
2205+ (bfd *abfd, asymbol **location, unsigned int count);
2206+ *Description*
2207+Arrange that when the output BFD ABFD is closed, the table LOCATION of
2208+COUNT pointers to symbols will be written.
2209+
2210+2.7.5.7 `bfd_print_symbol_vandf'
2211+................................
2212+
2213+*Synopsis*
2214+ void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
2215+ *Description*
2216+Print the value and flags of the SYMBOL supplied to the stream FILE.
2217+
2218+2.7.5.8 `bfd_make_empty_symbol'
2219+...............................
2220+
2221+*Description*
2222+Create a new `asymbol' structure for the BFD ABFD and return a pointer
2223+to it.
2224+
2225+ This routine is necessary because each back end has private
2226+information surrounding the `asymbol'. Building your own `asymbol' and
2227+pointing to it will not create the private information, and will cause
2228+problems later on.
2229+ #define bfd_make_empty_symbol(abfd) \
2230+ BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
2231+
2232+2.7.5.9 `_bfd_generic_make_empty_symbol'
2233+........................................
2234+
2235+*Synopsis*
2236+ asymbol *_bfd_generic_make_empty_symbol (bfd *);
2237+ *Description*
2238+Create a new `asymbol' structure for the BFD ABFD and return a pointer
2239+to it. Used by core file routines, binary back-end and anywhere else
2240+where no private info is needed.
2241+
2242+2.7.5.10 `bfd_make_debug_symbol'
2243+................................
2244+
2245+*Description*
2246+Create a new `asymbol' structure for the BFD ABFD, to be used as a
2247+debugging symbol. Further details of its use have yet to be worked out.
2248+ #define bfd_make_debug_symbol(abfd,ptr,size) \
2249+ BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
2250+
2251+2.7.5.11 `bfd_decode_symclass'
2252+..............................
2253+
2254+*Description*
2255+Return a character corresponding to the symbol class of SYMBOL, or '?'
2256+for an unknown class.
2257+
2258+ *Synopsis*
2259+ int bfd_decode_symclass (asymbol *symbol);
2260+
2261+2.7.5.12 `bfd_is_undefined_symclass'
2262+....................................
2263+
2264+*Description*
2265+Returns non-zero if the class symbol returned by bfd_decode_symclass
2266+represents an undefined symbol. Returns zero otherwise.
2267+
2268+ *Synopsis*
2269+ bfd_boolean bfd_is_undefined_symclass (int symclass);
2270+
2271+2.7.5.13 `bfd_symbol_info'
2272+..........................
2273+
2274+*Description*
2275+Fill in the basic info about symbol that nm needs. Additional info may
2276+be added by the back-ends after calling this function.
2277+
2278+ *Synopsis*
2279+ void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
2280+
2281+2.7.5.14 `bfd_copy_private_symbol_data'
2282+.......................................
2283+
2284+*Synopsis*
2285+ bfd_boolean bfd_copy_private_symbol_data
2286+ (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
2287+ *Description*
2288+Copy private symbol information from ISYM in the BFD IBFD to the symbol
2289+OSYM in the BFD OBFD. Return `TRUE' on success, `FALSE' on error.
2290+Possible error returns are:
2291+
2292+ * `bfd_error_no_memory' - Not enough memory exists to create private
2293+ data for OSEC.
2294+
2295+ #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
2296+ BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
2297+ (ibfd, isymbol, obfd, osymbol))
2298+
2299+
2300+File: bfd.info, Node: Archives, Next: Formats, Prev: Symbols, Up: BFD front end
2301+
2302+2.8 Archives
2303+============
2304+
2305+*Description*
2306+An archive (or library) is just another BFD. It has a symbol table,
2307+although there's not much a user program will do with it.
2308+
2309+ The big difference between an archive BFD and an ordinary BFD is
2310+that the archive doesn't have sections. Instead it has a chain of BFDs
2311+that are considered its contents. These BFDs can be manipulated like
2312+any other. The BFDs contained in an archive opened for reading will
2313+all be opened for reading. You may put either input or output BFDs
2314+into an archive opened for output; they will be handled correctly when
2315+the archive is closed.
2316+
2317+ Use `bfd_openr_next_archived_file' to step through the contents of
2318+an archive opened for input. You don't have to read the entire archive
2319+if you don't want to! Read it until you find what you want.
2320+
2321+ Archive contents of output BFDs are chained through the `next'
2322+pointer in a BFD. The first one is findable through the `archive_head'
2323+slot of the archive. Set it with `bfd_set_archive_head' (q.v.). A
2324+given BFD may be in only one open output archive at a time.
2325+
2326+ As expected, the BFD archive code is more general than the archive
2327+code of any given environment. BFD archives may contain files of
2328+different formats (e.g., a.out and coff) and even different
2329+architectures. You may even place archives recursively into archives!
2330+
2331+ This can cause unexpected confusion, since some archive formats are
2332+more expressive than others. For instance, Intel COFF archives can
2333+preserve long filenames; SunOS a.out archives cannot. If you move a
2334+file from the first to the second format and back again, the filename
2335+may be truncated. Likewise, different a.out environments have different
2336+conventions as to how they truncate filenames, whether they preserve
2337+directory names in filenames, etc. When interoperating with native
2338+tools, be sure your files are homogeneous.
2339+
2340+ Beware: most of these formats do not react well to the presence of
2341+spaces in filenames. We do the best we can, but can't always handle
2342+this case due to restrictions in the format of archives. Many Unix
2343+utilities are braindead in regards to spaces and such in filenames
2344+anyway, so this shouldn't be much of a restriction.
2345+
2346+ Archives are supported in BFD in `archive.c'.
2347+
2348+2.8.0.1 `bfd_get_next_mapent'
2349+.............................
2350+
2351+*Synopsis*
2352+ symindex bfd_get_next_mapent
2353+ (bfd *abfd, symindex previous, carsym **sym);
2354+ *Description*
2355+Step through archive ABFD's symbol table (if it has one). Successively
2356+update SYM with the next symbol's information, returning that symbol's
2357+(internal) index into the symbol table.
2358+
2359+ Supply `BFD_NO_MORE_SYMBOLS' as the PREVIOUS entry to get the first
2360+one; returns `BFD_NO_MORE_SYMBOLS' when you've already got the last one.
2361+
2362+ A `carsym' is a canonical archive symbol. The only user-visible
2363+element is its name, a null-terminated string.
2364+
2365+2.8.0.2 `bfd_set_archive_head'
2366+..............................
2367+
2368+*Synopsis*
2369+ bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
2370+ *Description*
2371+Set the head of the chain of BFDs contained in the archive OUTPUT to
2372+NEW_HEAD.
2373+
2374+2.8.0.3 `bfd_openr_next_archived_file'
2375+......................................
2376+
2377+*Synopsis*
2378+ bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
2379+ *Description*
2380+Provided a BFD, ARCHIVE, containing an archive and NULL, open an input
2381+BFD on the first contained element and returns that. Subsequent calls
2382+should pass the archive and the previous return value to return a
2383+created BFD to the next contained element. NULL is returned when there
2384+are no more.
2385+
2386+
2387+File: bfd.info, Node: Formats, Next: Relocations, Prev: Archives, Up: BFD front end
2388+
2389+2.9 File formats
2390+================
2391+
2392+A format is a BFD concept of high level file contents type. The formats
2393+supported by BFD are:
2394+
2395+ * `bfd_object'
2396+ The BFD may contain data, symbols, relocations and debug info.
2397+
2398+ * `bfd_archive'
2399+ The BFD contains other BFDs and an optional index.
2400+
2401+ * `bfd_core'
2402+ The BFD contains the result of an executable core dump.
2403+
2404+2.9.0.1 `bfd_check_format'
2405+..........................
2406+
2407+*Synopsis*
2408+ bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
2409+ *Description*
2410+Verify if the file attached to the BFD ABFD is compatible with the
2411+format FORMAT (i.e., one of `bfd_object', `bfd_archive' or `bfd_core').
2412+
2413+ If the BFD has been set to a specific target before the call, only
2414+the named target and format combination is checked. If the target has
2415+not been set, or has been set to `default', then all the known target
2416+backends is interrogated to determine a match. If the default target
2417+matches, it is used. If not, exactly one target must recognize the
2418+file, or an error results.
2419+
2420+ The function returns `TRUE' on success, otherwise `FALSE' with one
2421+of the following error codes:
2422+
2423+ * `bfd_error_invalid_operation' - if `format' is not one of
2424+ `bfd_object', `bfd_archive' or `bfd_core'.
2425+
2426+ * `bfd_error_system_call' - if an error occured during a read - even
2427+ some file mismatches can cause bfd_error_system_calls.
2428+
2429+ * `file_not_recognised' - none of the backends recognised the file
2430+ format.
2431+
2432+ * `bfd_error_file_ambiguously_recognized' - more than one backend
2433+ recognised the file format.
2434+
2435+2.9.0.2 `bfd_check_format_matches'
2436+..................................
2437+
2438+*Synopsis*
2439+ bfd_boolean bfd_check_format_matches
2440+ (bfd *abfd, bfd_format format, char ***matching);
2441+ *Description*
2442+Like `bfd_check_format', except when it returns FALSE with `bfd_errno'
2443+set to `bfd_error_file_ambiguously_recognized'. In that case, if
2444+MATCHING is not NULL, it will be filled in with a NULL-terminated list
2445+of the names of the formats that matched, allocated with `malloc'.
2446+Then the user may choose a format and try again.
2447+
2448+ When done with the list that MATCHING points to, the caller should
2449+free it.
2450+
2451+2.9.0.3 `bfd_set_format'
2452+........................
2453+
2454+*Synopsis*
2455+ bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
2456+ *Description*
2457+This function sets the file format of the BFD ABFD to the format
2458+FORMAT. If the target set in the BFD does not support the format
2459+requested, the format is invalid, or the BFD is not open for writing,
2460+then an error occurs.
2461+
2462+2.9.0.4 `bfd_format_string'
2463+...........................
2464+
2465+*Synopsis*
2466+ const char *bfd_format_string (bfd_format format);
2467+ *Description*
2468+Return a pointer to a const string `invalid', `object', `archive',
2469+`core', or `unknown', depending upon the value of FORMAT.
2470+
2471+
2472+File: bfd.info, Node: Relocations, Next: Core Files, Prev: Formats, Up: BFD front end
2473+
2474+2.10 Relocations
2475+================
2476+
2477+BFD maintains relocations in much the same way it maintains symbols:
2478+they are left alone until required, then read in en-masse and
2479+translated into an internal form. A common routine
2480+`bfd_perform_relocation' acts upon the canonical form to do the fixup.
2481+
2482+ Relocations are maintained on a per section basis, while symbols are
2483+maintained on a per BFD basis.
2484+
2485+ All that a back end has to do to fit the BFD interface is to create
2486+a `struct reloc_cache_entry' for each relocation in a particular
2487+section, and fill in the right bits of the structures.
2488+
2489+* Menu:
2490+
2491+* typedef arelent::
2492+* howto manager::
2493+
2494+
2495+File: bfd.info, Node: typedef arelent, Next: howto manager, Prev: Relocations, Up: Relocations
2496+
2497+2.10.1 typedef arelent
2498+----------------------
2499+
2500+This is the structure of a relocation entry:
2501+
2502+
2503+ typedef enum bfd_reloc_status
2504+ {
2505+ /* No errors detected. */
2506+ bfd_reloc_ok,
2507+
2508+ /* The relocation was performed, but there was an overflow. */
2509+ bfd_reloc_overflow,
2510+
2511+ /* The address to relocate was not within the section supplied. */
2512+ bfd_reloc_outofrange,
2513+
2514+ /* Used by special functions. */
2515+ bfd_reloc_continue,
2516+
2517+ /* Unsupported relocation size requested. */
2518+ bfd_reloc_notsupported,
2519+
2520+ /* Unused. */
2521+ bfd_reloc_other,
2522+
2523+ /* The symbol to relocate against was undefined. */
2524+ bfd_reloc_undefined,
2525+
2526+ /* The relocation was performed, but may not be ok - presently
2527+ generated only when linking i960 coff files with i960 b.out
2528+ symbols. If this type is returned, the error_message argument
2529+ to bfd_perform_relocation will be set. */
2530+ bfd_reloc_dangerous
2531+ }
2532+ bfd_reloc_status_type;
2533+
2534+
2535+ typedef struct reloc_cache_entry
2536+ {
2537+ /* A pointer into the canonical table of pointers. */
2538+ struct bfd_symbol **sym_ptr_ptr;
2539+
2540+ /* offset in section. */
2541+ bfd_size_type address;
2542+
2543+ /* addend for relocation value. */
2544+ bfd_vma addend;
2545+
2546+ /* Pointer to how to perform the required relocation. */
2547+ reloc_howto_type *howto;
2548+
2549+ }
2550+ arelent;
2551+ *Description*
2552+Here is a description of each of the fields within an `arelent':
2553+
2554+ * `sym_ptr_ptr'
2555+ The symbol table pointer points to a pointer to the symbol
2556+associated with the relocation request. It is the pointer into the
2557+table returned by the back end's `canonicalize_symtab' action. *Note
2558+Symbols::. The symbol is referenced through a pointer to a pointer so
2559+that tools like the linker can fix up all the symbols of the same name
2560+by modifying only one pointer. The relocation routine looks in the
2561+symbol and uses the base of the section the symbol is attached to and
2562+the value of the symbol as the initial relocation offset. If the symbol
2563+pointer is zero, then the section provided is looked up.
2564+
2565+ * `address'
2566+ The `address' field gives the offset in bytes from the base of the
2567+section data which owns the relocation record to the first byte of
2568+relocatable information. The actual data relocated will be relative to
2569+this point; for example, a relocation type which modifies the bottom
2570+two bytes of a four byte word would not touch the first byte pointed to
2571+in a big endian world.
2572+
2573+ * `addend'
2574+ The `addend' is a value provided by the back end to be added (!) to
2575+the relocation offset. Its interpretation is dependent upon the howto.
2576+For example, on the 68k the code:
2577+
2578+ char foo[];
2579+ main()
2580+ {
2581+ return foo[0x12345678];
2582+ }
2583+
2584+ Could be compiled into:
2585+
2586+ linkw fp,#-4
2587+ moveb @#12345678,d0
2588+ extbl d0
2589+ unlk fp
2590+ rts
2591+
2592+ This could create a reloc pointing to `foo', but leave the offset in
2593+the data, something like:
2594+
2595+ RELOCATION RECORDS FOR [.text]:
2596+ offset type value
2597+ 00000006 32 _foo
2598+
2599+ 00000000 4e56 fffc ; linkw fp,#-4
2600+ 00000004 1039 1234 5678 ; moveb @#12345678,d0
2601+ 0000000a 49c0 ; extbl d0
2602+ 0000000c 4e5e ; unlk fp
2603+ 0000000e 4e75 ; rts
2604+
2605+ Using coff and an 88k, some instructions don't have enough space in
2606+them to represent the full address range, and pointers have to be
2607+loaded in two parts. So you'd get something like:
2608+
2609+ or.u r13,r0,hi16(_foo+0x12345678)
2610+ ld.b r2,r13,lo16(_foo+0x12345678)
2611+ jmp r1
2612+
2613+ This should create two relocs, both pointing to `_foo', and with
2614+0x12340000 in their addend field. The data would consist of:
2615+
2616+ RELOCATION RECORDS FOR [.text]:
2617+ offset type value
2618+ 00000002 HVRT16 _foo+0x12340000
2619+ 00000006 LVRT16 _foo+0x12340000
2620+
2621+ 00000000 5da05678 ; or.u r13,r0,0x5678
2622+ 00000004 1c4d5678 ; ld.b r2,r13,0x5678
2623+ 00000008 f400c001 ; jmp r1
2624+
2625+ The relocation routine digs out the value from the data, adds it to
2626+the addend to get the original offset, and then adds the value of
2627+`_foo'. Note that all 32 bits have to be kept around somewhere, to cope
2628+with carry from bit 15 to bit 16.
2629+
2630+ One further example is the sparc and the a.out format. The sparc has
2631+a similar problem to the 88k, in that some instructions don't have room
2632+for an entire offset, but on the sparc the parts are created in odd
2633+sized lumps. The designers of the a.out format chose to not use the
2634+data within the section for storing part of the offset; all the offset
2635+is kept within the reloc. Anything in the data should be ignored.
2636+
2637+ save %sp,-112,%sp
2638+ sethi %hi(_foo+0x12345678),%g2
2639+ ldsb [%g2+%lo(_foo+0x12345678)],%i0
2640+ ret
2641+ restore
2642+
2643+ Both relocs contain a pointer to `foo', and the offsets contain junk.
2644+
2645+ RELOCATION RECORDS FOR [.text]:
2646+ offset type value
2647+ 00000004 HI22 _foo+0x12345678
2648+ 00000008 LO10 _foo+0x12345678
2649+
2650+ 00000000 9de3bf90 ; save %sp,-112,%sp
2651+ 00000004 05000000 ; sethi %hi(_foo+0),%g2
2652+ 00000008 f048a000 ; ldsb [%g2+%lo(_foo+0)],%i0
2653+ 0000000c 81c7e008 ; ret
2654+ 00000010 81e80000 ; restore
2655+
2656+ * `howto'
2657+ The `howto' field can be imagined as a relocation instruction. It is
2658+a pointer to a structure which contains information on what to do with
2659+all of the other information in the reloc record and data section. A
2660+back end would normally have a relocation instruction set and turn
2661+relocations into pointers to the correct structure on input - but it
2662+would be possible to create each howto field on demand.
2663+
2664+2.10.1.1 `enum complain_overflow'
2665+.................................
2666+
2667+Indicates what sort of overflow checking should be done when performing
2668+a relocation.
2669+
2670+
2671+ enum complain_overflow
2672+ {
2673+ /* Do not complain on overflow. */
2674+ complain_overflow_dont,
2675+
2676+ /* Complain if the bitfield overflows, whether it is considered
2677+ as signed or unsigned. */
2678+ complain_overflow_bitfield,
2679+
2680+ /* Complain if the value overflows when considered as signed
2681+ number. */
2682+ complain_overflow_signed,
2683+
2684+ /* Complain if the value overflows when considered as an
2685+ unsigned number. */
2686+ complain_overflow_unsigned
2687+ };
2688+
2689+2.10.1.2 `reloc_howto_type'
2690+...........................
2691+
2692+The `reloc_howto_type' is a structure which contains all the
2693+information that libbfd needs to know to tie up a back end's data.
2694+
2695+ struct bfd_symbol; /* Forward declaration. */
2696+
2697+ struct reloc_howto_struct
2698+ {
2699+ /* The type field has mainly a documentary use - the back end can
2700+ do what it wants with it, though normally the back end's
2701+ external idea of what a reloc number is stored
2702+ in this field. For example, a PC relative word relocation
2703+ in a coff environment has the type 023 - because that's
2704+ what the outside world calls a R_PCRWORD reloc. */
2705+ unsigned int type;
2706+
2707+ /* The value the final relocation is shifted right by. This drops
2708+ unwanted data from the relocation. */
2709+ unsigned int rightshift;
2710+
2711+ /* The size of the item to be relocated. This is *not* a
2712+ power-of-two measure. To get the number of bytes operated
2713+ on by a type of relocation, use bfd_get_reloc_size. */
2714+ int size;
2715+
2716+ /* The number of bits in the item to be relocated. This is used
2717+ when doing overflow checking. */
2718+ unsigned int bitsize;
2719+
2720+ /* Notes that the relocation is relative to the location in the
2721+ data section of the addend. The relocation function will
2722+ subtract from the relocation value the address of the location
2723+ being relocated. */
2724+ bfd_boolean pc_relative;
2725+
2726+ /* The bit position of the reloc value in the destination.
2727+ The relocated value is left shifted by this amount. */
2728+ unsigned int bitpos;
2729+
2730+ /* What type of overflow error should be checked for when
2731+ relocating. */
2732+ enum complain_overflow complain_on_overflow;
2733+
2734+ /* If this field is non null, then the supplied function is
2735+ called rather than the normal function. This allows really
2736+ strange relocation methods to be accommodated (e.g., i960 callj
2737+ instructions). */
2738+ bfd_reloc_status_type (*special_function)
2739+ (bfd *, arelent *, struct bfd_symbol *, void *, asection *,
2740+ bfd *, char **);
2741+
2742+ /* The textual name of the relocation type. */
2743+ char *name;
2744+
2745+ /* Some formats record a relocation addend in the section contents
2746+ rather than with the relocation. For ELF formats this is the
2747+ distinction between USE_REL and USE_RELA (though the code checks
2748+ for USE_REL == 1/0). The value of this field is TRUE if the
2749+ addend is recorded with the section contents; when performing a
2750+ partial link (ld -r) the section contents (the data) will be
2751+ modified. The value of this field is FALSE if addends are
2752+ recorded with the relocation (in arelent.addend); when performing
2753+ a partial link the relocation will be modified.
2754+ All relocations for all ELF USE_RELA targets should set this field
2755+ to FALSE (values of TRUE should be looked on with suspicion).
2756+ However, the converse is not true: not all relocations of all ELF
2757+ USE_REL targets set this field to TRUE. Why this is so is peculiar
2758+ to each particular target. For relocs that aren't used in partial
2759+ links (e.g. GOT stuff) it doesn't matter what this is set to. */
2760+ bfd_boolean partial_inplace;
2761+
2762+ /* src_mask selects the part of the instruction (or data) to be used
2763+ in the relocation sum. If the target relocations don't have an
2764+ addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
2765+ dst_mask to extract the addend from the section contents. If
2766+ relocations do have an addend in the reloc, eg. ELF USE_RELA, this
2767+ field should be zero. Non-zero values for ELF USE_RELA targets are
2768+ bogus as in those cases the value in the dst_mask part of the
2769+ section contents should be treated as garbage. */
2770+ bfd_vma src_mask;
2771+
2772+ /* dst_mask selects which parts of the instruction (or data) are
2773+ replaced with a relocated value. */
2774+ bfd_vma dst_mask;
2775+
2776+ /* When some formats create PC relative instructions, they leave
2777+ the value of the pc of the place being relocated in the offset
2778+ slot of the instruction, so that a PC relative relocation can
2779+ be made just by adding in an ordinary offset (e.g., sun3 a.out).
2780+ Some formats leave the displacement part of an instruction
2781+ empty (e.g., m88k bcs); this flag signals the fact. */
2782+ bfd_boolean pcrel_offset;
2783+ };
2784+
2785+2.10.1.3 `The HOWTO Macro'
2786+..........................
2787+
2788+*Description*
2789+The HOWTO define is horrible and will go away.
2790+ #define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
2791+ { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
2792+
2793+ *Description*
2794+And will be replaced with the totally magic way. But for the moment, we
2795+are compatible, so do it this way.
2796+ #define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
2797+ HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
2798+ NAME, FALSE, 0, 0, IN)
2799+
2800+ *Description*
2801+This is used to fill in an empty howto entry in an array.
2802+ #define EMPTY_HOWTO(C) \
2803+ HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
2804+ NULL, FALSE, 0, 0, FALSE)
2805+
2806+ *Description*
2807+Helper routine to turn a symbol into a relocation value.
2808+ #define HOWTO_PREPARE(relocation, symbol) \
2809+ { \
2810+ if (symbol != NULL) \
2811+ { \
2812+ if (bfd_is_com_section (symbol->section)) \
2813+ { \
2814+ relocation = 0; \
2815+ } \
2816+ else \
2817+ { \
2818+ relocation = symbol->value; \
2819+ } \
2820+ } \
2821+ }
2822+
2823+2.10.1.4 `bfd_get_reloc_size'
2824+.............................
2825+
2826+*Synopsis*
2827+ unsigned int bfd_get_reloc_size (reloc_howto_type *);
2828+ *Description*
2829+For a reloc_howto_type that operates on a fixed number of bytes, this
2830+returns the number of bytes operated on.
2831+
2832+2.10.1.5 `arelent_chain'
2833+........................
2834+
2835+*Description*
2836+How relocs are tied together in an `asection':
2837+ typedef struct relent_chain
2838+ {
2839+ arelent relent;
2840+ struct relent_chain *next;
2841+ }
2842+ arelent_chain;
2843+
2844+2.10.1.6 `bfd_check_overflow'
2845+.............................
2846+
2847+*Synopsis*
2848+ bfd_reloc_status_type bfd_check_overflow
2849+ (enum complain_overflow how,
2850+ unsigned int bitsize,
2851+ unsigned int rightshift,
2852+ unsigned int addrsize,
2853+ bfd_vma relocation);
2854+ *Description*
2855+Perform overflow checking on RELOCATION which has BITSIZE significant
2856+bits and will be shifted right by RIGHTSHIFT bits, on a machine with
2857+addresses containing ADDRSIZE significant bits. The result is either of
2858+`bfd_reloc_ok' or `bfd_reloc_overflow'.
2859+
2860+2.10.1.7 `bfd_perform_relocation'
2861+.................................
2862+
2863+*Synopsis*
2864+ bfd_reloc_status_type bfd_perform_relocation
2865+ (bfd *abfd,
2866+ arelent *reloc_entry,
2867+ void *data,
2868+ asection *input_section,
2869+ bfd *output_bfd,
2870+ char **error_message);
2871+ *Description*
2872+If OUTPUT_BFD is supplied to this function, the generated image will be
2873+relocatable; the relocations are copied to the output file after they
2874+have been changed to reflect the new state of the world. There are two
2875+ways of reflecting the results of partial linkage in an output file: by
2876+modifying the output data in place, and by modifying the relocation
2877+record. Some native formats (e.g., basic a.out and basic coff) have no
2878+way of specifying an addend in the relocation type, so the addend has
2879+to go in the output data. This is no big deal since in these formats
2880+the output data slot will always be big enough for the addend. Complex
2881+reloc types with addends were invented to solve just this problem. The
2882+ERROR_MESSAGE argument is set to an error message if this return
2883+`bfd_reloc_dangerous'.
2884+
2885+2.10.1.8 `bfd_install_relocation'
2886+.................................
2887+
2888+*Synopsis*
2889+ bfd_reloc_status_type bfd_install_relocation
2890+ (bfd *abfd,
2891+ arelent *reloc_entry,
2892+ void *data, bfd_vma data_start,
2893+ asection *input_section,
2894+ char **error_message);
2895+ *Description*
2896+This looks remarkably like `bfd_perform_relocation', except it does not
2897+expect that the section contents have been filled in. I.e., it's
2898+suitable for use when creating, rather than applying a relocation.
2899+
2900+ For now, this function should be considered reserved for the
2901+assembler.
2902+
2903+
2904+File: bfd.info, Node: howto manager, Prev: typedef arelent, Up: Relocations
2905+
2906+2.11 The howto manager
2907+======================
2908+
2909+When an application wants to create a relocation, but doesn't know what
2910+the target machine might call it, it can find out by using this bit of
2911+code.
2912+
2913+2.11.0.1 `bfd_reloc_code_type'
2914+..............................
2915+
2916+*Description*
2917+The insides of a reloc code. The idea is that, eventually, there will
2918+be one enumerator for every type of relocation we ever do. Pass one of
2919+these values to `bfd_reloc_type_lookup', and it'll return a howto
2920+pointer.
2921+
2922+ This does mean that the application must determine the correct
2923+enumerator value; you can't get a howto pointer from a random set of
2924+attributes.
2925+
2926+ Here are the possible values for `enum bfd_reloc_code_real':
2927+
2928+ -- : BFD_RELOC_64
2929+ -- : BFD_RELOC_32
2930+ -- : BFD_RELOC_26
2931+ -- : BFD_RELOC_24
2932+ -- : BFD_RELOC_16
2933+ -- : BFD_RELOC_14
2934+ -- : BFD_RELOC_8
2935+ Basic absolute relocations of N bits.
2936+
2937+ -- : BFD_RELOC_64_PCREL
2938+ -- : BFD_RELOC_32_PCREL
2939+ -- : BFD_RELOC_24_PCREL
2940+ -- : BFD_RELOC_16_PCREL
2941+ -- : BFD_RELOC_12_PCREL
2942+ -- : BFD_RELOC_8_PCREL
2943+ PC-relative relocations. Sometimes these are relative to the
2944+ address of the relocation itself; sometimes they are relative to
2945+ the start of the section containing the relocation. It depends on
2946+ the specific target.
2947+
2948+ The 24-bit relocation is used in some Intel 960 configurations.
2949+
2950+ -- : BFD_RELOC_32_SECREL
2951+ Section relative relocations. Some targets need this for DWARF2.
2952+
2953+ -- : BFD_RELOC_32_GOT_PCREL
2954+ -- : BFD_RELOC_16_GOT_PCREL
2955+ -- : BFD_RELOC_8_GOT_PCREL
2956+ -- : BFD_RELOC_32_GOTOFF
2957+ -- : BFD_RELOC_16_GOTOFF
2958+ -- : BFD_RELOC_LO16_GOTOFF
2959+ -- : BFD_RELOC_HI16_GOTOFF
2960+ -- : BFD_RELOC_HI16_S_GOTOFF
2961+ -- : BFD_RELOC_8_GOTOFF
2962+ -- : BFD_RELOC_64_PLT_PCREL
2963+ -- : BFD_RELOC_32_PLT_PCREL
2964+ -- : BFD_RELOC_24_PLT_PCREL
2965+ -- : BFD_RELOC_16_PLT_PCREL
2966+ -- : BFD_RELOC_8_PLT_PCREL
2967+ -- : BFD_RELOC_64_PLTOFF
2968+ -- : BFD_RELOC_32_PLTOFF
2969+ -- : BFD_RELOC_16_PLTOFF
2970+ -- : BFD_RELOC_LO16_PLTOFF
2971+ -- : BFD_RELOC_HI16_PLTOFF
2972+ -- : BFD_RELOC_HI16_S_PLTOFF
2973+ -- : BFD_RELOC_8_PLTOFF
2974+ For ELF.
2975+
2976+ -- : BFD_RELOC_68K_GLOB_DAT
2977+ -- : BFD_RELOC_68K_JMP_SLOT
2978+ -- : BFD_RELOC_68K_RELATIVE
2979+ Relocations used by 68K ELF.
2980+
2981+ -- : BFD_RELOC_32_BASEREL
2982+ -- : BFD_RELOC_16_BASEREL
2983+ -- : BFD_RELOC_LO16_BASEREL
2984+ -- : BFD_RELOC_HI16_BASEREL
2985+ -- : BFD_RELOC_HI16_S_BASEREL
2986+ -- : BFD_RELOC_8_BASEREL
2987+ -- : BFD_RELOC_RVA
2988+ Linkage-table relative.
2989+
2990+ -- : BFD_RELOC_8_FFnn
2991+ Absolute 8-bit relocation, but used to form an address like 0xFFnn.
2992+
2993+ -- : BFD_RELOC_32_PCREL_S2
2994+ -- : BFD_RELOC_16_PCREL_S2
2995+ -- : BFD_RELOC_23_PCREL_S2
2996+ These PC-relative relocations are stored as word displacements -
2997+ i.e., byte displacements shifted right two bits. The 30-bit word
2998+ displacement (<<32_PCREL_S2>> - 32 bits, shifted 2) is used on the
2999+ SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
3000+ signed 16-bit displacement is used on the MIPS, and the 23-bit
3001+ displacement is used on the Alpha.
3002+
3003+ -- : BFD_RELOC_HI22
3004+ -- : BFD_RELOC_LO10
3005+ High 22 bits and low 10 bits of 32-bit value, placed into lower
3006+ bits of the target word. These are used on the SPARC.
3007+
3008+ -- : BFD_RELOC_GPREL16
3009+ -- : BFD_RELOC_GPREL32
3010+ For systems that allocate a Global Pointer register, these are
3011+ displacements off that register. These relocation types are
3012+ handled specially, because the value the register will have is
3013+ decided relatively late.
3014+
3015+ -- : BFD_RELOC_I960_CALLJ
3016+ Reloc types used for i960/b.out.
3017+
3018+ -- : BFD_RELOC_NONE
3019+ -- : BFD_RELOC_SPARC_WDISP22
3020+ -- : BFD_RELOC_SPARC22
3021+ -- : BFD_RELOC_SPARC13
3022+ -- : BFD_RELOC_SPARC_GOT10
3023+ -- : BFD_RELOC_SPARC_GOT13
3024+ -- : BFD_RELOC_SPARC_GOT22
3025+ -- : BFD_RELOC_SPARC_PC10
3026+ -- : BFD_RELOC_SPARC_PC22
3027+ -- : BFD_RELOC_SPARC_WPLT30
3028+ -- : BFD_RELOC_SPARC_COPY
3029+ -- : BFD_RELOC_SPARC_GLOB_DAT
3030+ -- : BFD_RELOC_SPARC_JMP_SLOT
3031+ -- : BFD_RELOC_SPARC_RELATIVE
3032+ -- : BFD_RELOC_SPARC_UA16
3033+ -- : BFD_RELOC_SPARC_UA32
3034+ -- : BFD_RELOC_SPARC_UA64
3035+ SPARC ELF relocations. There is probably some overlap with other
3036+ relocation types already defined.
3037+
3038+ -- : BFD_RELOC_SPARC_BASE13
3039+ -- : BFD_RELOC_SPARC_BASE22
3040+ I think these are specific to SPARC a.out (e.g., Sun 4).
3041+
3042+ -- : BFD_RELOC_SPARC_64
3043+ -- : BFD_RELOC_SPARC_10
3044+ -- : BFD_RELOC_SPARC_11
3045+ -- : BFD_RELOC_SPARC_OLO10
3046+ -- : BFD_RELOC_SPARC_HH22
3047+ -- : BFD_RELOC_SPARC_HM10
3048+ -- : BFD_RELOC_SPARC_LM22
3049+ -- : BFD_RELOC_SPARC_PC_HH22
3050+ -- : BFD_RELOC_SPARC_PC_HM10
3051+ -- : BFD_RELOC_SPARC_PC_LM22
3052+ -- : BFD_RELOC_SPARC_WDISP16
3053+ -- : BFD_RELOC_SPARC_WDISP19
3054+ -- : BFD_RELOC_SPARC_7
3055+ -- : BFD_RELOC_SPARC_6
3056+ -- : BFD_RELOC_SPARC_5
3057+ -- : BFD_RELOC_SPARC_DISP64
3058+ -- : BFD_RELOC_SPARC_PLT32
3059+ -- : BFD_RELOC_SPARC_PLT64
3060+ -- : BFD_RELOC_SPARC_HIX22
3061+ -- : BFD_RELOC_SPARC_LOX10
3062+ -- : BFD_RELOC_SPARC_H44
3063+ -- : BFD_RELOC_SPARC_M44
3064+ -- : BFD_RELOC_SPARC_L44
3065+ -- : BFD_RELOC_SPARC_REGISTER
3066+ SPARC64 relocations
3067+
3068+ -- : BFD_RELOC_SPARC_REV32
3069+ SPARC little endian relocation
3070+
3071+ -- : BFD_RELOC_SPARC_TLS_GD_HI22
3072+ -- : BFD_RELOC_SPARC_TLS_GD_LO10
3073+ -- : BFD_RELOC_SPARC_TLS_GD_ADD
3074+ -- : BFD_RELOC_SPARC_TLS_GD_CALL
3075+ -- : BFD_RELOC_SPARC_TLS_LDM_HI22
3076+ -- : BFD_RELOC_SPARC_TLS_LDM_LO10
3077+ -- : BFD_RELOC_SPARC_TLS_LDM_ADD
3078+ -- : BFD_RELOC_SPARC_TLS_LDM_CALL
3079+ -- : BFD_RELOC_SPARC_TLS_LDO_HIX22
3080+ -- : BFD_RELOC_SPARC_TLS_LDO_LOX10
3081+ -- : BFD_RELOC_SPARC_TLS_LDO_ADD
3082+ -- : BFD_RELOC_SPARC_TLS_IE_HI22
3083+ -- : BFD_RELOC_SPARC_TLS_IE_LO10
3084+ -- : BFD_RELOC_SPARC_TLS_IE_LD
3085+ -- : BFD_RELOC_SPARC_TLS_IE_LDX
3086+ -- : BFD_RELOC_SPARC_TLS_IE_ADD
3087+ -- : BFD_RELOC_SPARC_TLS_LE_HIX22
3088+ -- : BFD_RELOC_SPARC_TLS_LE_LOX10
3089+ -- : BFD_RELOC_SPARC_TLS_DTPMOD32
3090+ -- : BFD_RELOC_SPARC_TLS_DTPMOD64
3091+ -- : BFD_RELOC_SPARC_TLS_DTPOFF32
3092+ -- : BFD_RELOC_SPARC_TLS_DTPOFF64
3093+ -- : BFD_RELOC_SPARC_TLS_TPOFF32
3094+ -- : BFD_RELOC_SPARC_TLS_TPOFF64
3095+ SPARC TLS relocations
3096+
3097+ -- : BFD_RELOC_ALPHA_GPDISP_HI16
3098+ Alpha ECOFF and ELF relocations. Some of these treat the symbol or
3099+ "addend" in some special way. For GPDISP_HI16 ("gpdisp")
3100+ relocations, the symbol is ignored when writing; when reading, it
3101+ will be the absolute section symbol. The addend is the
3102+ displacement in bytes of the "lda" instruction from the "ldah"
3103+ instruction (which is at the address of this reloc).
3104+
3105+ -- : BFD_RELOC_ALPHA_GPDISP_LO16
3106+ For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
3107+ with GPDISP_HI16 relocs. The addend is ignored when writing the
3108+ relocations out, and is filled in with the file's GP value on
3109+ reading, for convenience.
3110+
3111+ -- : BFD_RELOC_ALPHA_GPDISP
3112+ The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
3113+ relocation except that there is no accompanying GPDISP_LO16
3114+ relocation.
3115+
3116+ -- : BFD_RELOC_ALPHA_LITERAL
3117+ -- : BFD_RELOC_ALPHA_ELF_LITERAL
3118+ -- : BFD_RELOC_ALPHA_LITUSE
3119+ The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
3120+ the assembler turns it into a LDQ instruction to load the address
3121+ of the symbol, and then fills in a register in the real
3122+ instruction.
3123+
3124+ The LITERAL reloc, at the LDQ instruction, refers to the .lita
3125+ section symbol. The addend is ignored when writing, but is filled
3126+ in with the file's GP value on reading, for convenience, as with
3127+ the GPDISP_LO16 reloc.
3128+
3129+ The ELF_LITERAL reloc is somewhere between 16_GOTOFF and
3130+ GPDISP_LO16. It should refer to the symbol to be referenced, as
3131+ with 16_GOTOFF, but it generates output not based on the position
3132+ within the .got section, but relative to the GP value chosen for
3133+ the file during the final link stage.
3134+
3135+ The LITUSE reloc, on the instruction using the loaded address,
3136+ gives information to the linker that it might be able to use to
3137+ optimize away some literal section references. The symbol is
3138+ ignored (read as the absolute section symbol), and the "addend"
3139+ indicates the type of instruction using the register: 1 - "memory"
3140+ fmt insn 2 - byte-manipulation (byte offset reg) 3 - jsr (target
3141+ of branch)
3142+
3143+ -- : BFD_RELOC_ALPHA_HINT
3144+ The HINT relocation indicates a value that should be filled into
3145+ the "hint" field of a jmp/jsr/ret instruction, for possible branch-
3146+ prediction logic which may be provided on some processors.
3147+
3148+ -- : BFD_RELOC_ALPHA_LINKAGE
3149+ The LINKAGE relocation outputs a linkage pair in the object file,
3150+ which is filled by the linker.
3151+
3152+ -- : BFD_RELOC_ALPHA_CODEADDR
3153+ The CODEADDR relocation outputs a STO_CA in the object file, which
3154+ is filled by the linker.
3155+
3156+ -- : BFD_RELOC_ALPHA_GPREL_HI16
3157+ -- : BFD_RELOC_ALPHA_GPREL_LO16
3158+ The GPREL_HI/LO relocations together form a 32-bit offset from the
3159+ GP register.
3160+
3161+ -- : BFD_RELOC_ALPHA_BRSGP
3162+ Like BFD_RELOC_23_PCREL_S2, except that the source and target must
3163+ share a common GP, and the target address is adjusted for
3164+ STO_ALPHA_STD_GPLOAD.
3165+
3166+ -- : BFD_RELOC_ALPHA_TLSGD
3167+ -- : BFD_RELOC_ALPHA_TLSLDM
3168+ -- : BFD_RELOC_ALPHA_DTPMOD64
3169+ -- : BFD_RELOC_ALPHA_GOTDTPREL16
3170+ -- : BFD_RELOC_ALPHA_DTPREL64
3171+ -- : BFD_RELOC_ALPHA_DTPREL_HI16
3172+ -- : BFD_RELOC_ALPHA_DTPREL_LO16
3173+ -- : BFD_RELOC_ALPHA_DTPREL16
3174+ -- : BFD_RELOC_ALPHA_GOTTPREL16
3175+ -- : BFD_RELOC_ALPHA_TPREL64
3176+ -- : BFD_RELOC_ALPHA_TPREL_HI16
3177+ -- : BFD_RELOC_ALPHA_TPREL_LO16
3178+ -- : BFD_RELOC_ALPHA_TPREL16
3179+ Alpha thread-local storage relocations.
3180+
3181+ -- : BFD_RELOC_MIPS_JMP
3182+ Bits 27..2 of the relocation address shifted right 2 bits; simple
3183+ reloc otherwise.
3184+
3185+ -- : BFD_RELOC_MIPS16_JMP
3186+ The MIPS16 jump instruction.
3187+
3188+ -- : BFD_RELOC_MIPS16_GPREL
3189+ MIPS16 GP relative reloc.
3190+
3191+ -- : BFD_RELOC_HI16
3192+ High 16 bits of 32-bit value; simple reloc.
3193+
3194+ -- : BFD_RELOC_HI16_S
3195+ High 16 bits of 32-bit value but the low 16 bits will be sign
3196+ extended and added to form the final result. If the low 16 bits
3197+ form a negative number, we need to add one to the high value to
3198+ compensate for the borrow when the low bits are added.
3199+
3200+ -- : BFD_RELOC_LO16
3201+ Low 16 bits.
3202+
3203+ -- : BFD_RELOC_MIPS16_HI16
3204+ MIPS16 high 16 bits of 32-bit value.
3205+
3206+ -- : BFD_RELOC_MIPS16_HI16_S
3207+ MIPS16 high 16 bits of 32-bit value but the low 16 bits will be
3208+ sign extended and added to form the final result. If the low 16
3209+ bits form a negative number, we need to add one to the high value
3210+ to compensate for the borrow when the low bits are added.
3211+
3212+ -- : BFD_RELOC_MIPS16_LO16
3213+ MIPS16 low 16 bits.
3214+
3215+ -- : BFD_RELOC_MIPS_LITERAL
3216+ Relocation against a MIPS literal section.
3217+
3218+ -- : BFD_RELOC_MIPS_GOT16
3219+ -- : BFD_RELOC_MIPS_CALL16
3220+ -- : BFD_RELOC_MIPS_GOT_HI16
3221+ -- : BFD_RELOC_MIPS_GOT_LO16
3222+ -- : BFD_RELOC_MIPS_CALL_HI16
3223+ -- : BFD_RELOC_MIPS_CALL_LO16
3224+ -- : BFD_RELOC_MIPS_SUB
3225+ -- : BFD_RELOC_MIPS_GOT_PAGE
3226+ -- : BFD_RELOC_MIPS_GOT_OFST
3227+ -- : BFD_RELOC_MIPS_GOT_DISP
3228+ -- : BFD_RELOC_MIPS_SHIFT5
3229+ -- : BFD_RELOC_MIPS_SHIFT6
3230+ -- : BFD_RELOC_MIPS_INSERT_A
3231+ -- : BFD_RELOC_MIPS_INSERT_B
3232+ -- : BFD_RELOC_MIPS_DELETE
3233+ -- : BFD_RELOC_MIPS_HIGHEST
3234+ -- : BFD_RELOC_MIPS_HIGHER
3235+ -- : BFD_RELOC_MIPS_SCN_DISP
3236+ -- : BFD_RELOC_MIPS_REL16
3237+ -- : BFD_RELOC_MIPS_RELGOT
3238+ -- : BFD_RELOC_MIPS_JALR
3239+ -- : BFD_RELOC_MIPS_TLS_DTPMOD32
3240+ -- : BFD_RELOC_MIPS_TLS_DTPREL32
3241+ -- : BFD_RELOC_MIPS_TLS_DTPMOD64
3242+ -- : BFD_RELOC_MIPS_TLS_DTPREL64
3243+ -- : BFD_RELOC_MIPS_TLS_GD
3244+ -- : BFD_RELOC_MIPS_TLS_LDM
3245+ -- : BFD_RELOC_MIPS_TLS_DTPREL_HI16
3246+ -- : BFD_RELOC_MIPS_TLS_DTPREL_LO16
3247+ -- : BFD_RELOC_MIPS_TLS_GOTTPREL
3248+ -- : BFD_RELOC_MIPS_TLS_TPREL32
3249+ -- : BFD_RELOC_MIPS_TLS_TPREL64
3250+ -- : BFD_RELOC_MIPS_TLS_TPREL_HI16
3251+ -- : BFD_RELOC_MIPS_TLS_TPREL_LO16
3252+ MIPS ELF relocations.
3253+
3254+ -- : BFD_RELOC_FRV_LABEL16
3255+ -- : BFD_RELOC_FRV_LABEL24
3256+ -- : BFD_RELOC_FRV_LO16
3257+ -- : BFD_RELOC_FRV_HI16
3258+ -- : BFD_RELOC_FRV_GPREL12
3259+ -- : BFD_RELOC_FRV_GPRELU12
3260+ -- : BFD_RELOC_FRV_GPREL32
3261+ -- : BFD_RELOC_FRV_GPRELHI
3262+ -- : BFD_RELOC_FRV_GPRELLO
3263+ -- : BFD_RELOC_FRV_GOT12
3264+ -- : BFD_RELOC_FRV_GOTHI
3265+ -- : BFD_RELOC_FRV_GOTLO
3266+ -- : BFD_RELOC_FRV_FUNCDESC
3267+ -- : BFD_RELOC_FRV_FUNCDESC_GOT12
3268+ -- : BFD_RELOC_FRV_FUNCDESC_GOTHI
3269+ -- : BFD_RELOC_FRV_FUNCDESC_GOTLO
3270+ -- : BFD_RELOC_FRV_FUNCDESC_VALUE
3271+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFF12
3272+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFHI
3273+ -- : BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
3274+ -- : BFD_RELOC_FRV_GOTOFF12
3275+ -- : BFD_RELOC_FRV_GOTOFFHI
3276+ -- : BFD_RELOC_FRV_GOTOFFLO
3277+ -- : BFD_RELOC_FRV_GETTLSOFF
3278+ -- : BFD_RELOC_FRV_TLSDESC_VALUE
3279+ -- : BFD_RELOC_FRV_GOTTLSDESC12
3280+ -- : BFD_RELOC_FRV_GOTTLSDESCHI
3281+ -- : BFD_RELOC_FRV_GOTTLSDESCLO
3282+ -- : BFD_RELOC_FRV_TLSMOFF12
3283+ -- : BFD_RELOC_FRV_TLSMOFFHI
3284+ -- : BFD_RELOC_FRV_TLSMOFFLO
3285+ -- : BFD_RELOC_FRV_GOTTLSOFF12
3286+ -- : BFD_RELOC_FRV_GOTTLSOFFHI
3287+ -- : BFD_RELOC_FRV_GOTTLSOFFLO
3288+ -- : BFD_RELOC_FRV_TLSOFF
3289+ -- : BFD_RELOC_FRV_TLSDESC_RELAX
3290+ -- : BFD_RELOC_FRV_GETTLSOFF_RELAX
3291+ -- : BFD_RELOC_FRV_TLSOFF_RELAX
3292+ -- : BFD_RELOC_FRV_TLSMOFF
3293+ Fujitsu Frv Relocations.
3294+
3295+ -- : BFD_RELOC_MN10300_GOTOFF24
3296+ This is a 24bit GOT-relative reloc for the mn10300.
3297+
3298+ -- : BFD_RELOC_MN10300_GOT32
3299+ This is a 32bit GOT-relative reloc for the mn10300, offset by two
3300+ bytes in the instruction.
3301+
3302+ -- : BFD_RELOC_MN10300_GOT24
3303+ This is a 24bit GOT-relative reloc for the mn10300, offset by two
3304+ bytes in the instruction.
3305+
3306+ -- : BFD_RELOC_MN10300_GOT16
3307+ This is a 16bit GOT-relative reloc for the mn10300, offset by two
3308+ bytes in the instruction.
3309+
3310+ -- : BFD_RELOC_MN10300_COPY
3311+ Copy symbol at runtime.
3312+
3313+ -- : BFD_RELOC_MN10300_GLOB_DAT
3314+ Create GOT entry.
3315+
3316+ -- : BFD_RELOC_MN10300_JMP_SLOT
3317+ Create PLT entry.
3318+
3319+ -- : BFD_RELOC_MN10300_RELATIVE
3320+ Adjust by program base.
3321+
3322+ -- : BFD_RELOC_386_GOT32
3323+ -- : BFD_RELOC_386_PLT32
3324+ -- : BFD_RELOC_386_COPY
3325+ -- : BFD_RELOC_386_GLOB_DAT
3326+ -- : BFD_RELOC_386_JUMP_SLOT
3327+ -- : BFD_RELOC_386_RELATIVE
3328+ -- : BFD_RELOC_386_GOTOFF
3329+ -- : BFD_RELOC_386_GOTPC
3330+ -- : BFD_RELOC_386_TLS_TPOFF
3331+ -- : BFD_RELOC_386_TLS_IE
3332+ -- : BFD_RELOC_386_TLS_GOTIE
3333+ -- : BFD_RELOC_386_TLS_LE
3334+ -- : BFD_RELOC_386_TLS_GD
3335+ -- : BFD_RELOC_386_TLS_LDM
3336+ -- : BFD_RELOC_386_TLS_LDO_32
3337+ -- : BFD_RELOC_386_TLS_IE_32
3338+ -- : BFD_RELOC_386_TLS_LE_32
3339+ -- : BFD_RELOC_386_TLS_DTPMOD32
3340+ -- : BFD_RELOC_386_TLS_DTPOFF32
3341+ -- : BFD_RELOC_386_TLS_TPOFF32
3342+ i386/elf relocations
3343+
3344+ -- : BFD_RELOC_X86_64_GOT32
3345+ -- : BFD_RELOC_X86_64_PLT32
3346+ -- : BFD_RELOC_X86_64_COPY
3347+ -- : BFD_RELOC_X86_64_GLOB_DAT
3348+ -- : BFD_RELOC_X86_64_JUMP_SLOT
3349+ -- : BFD_RELOC_X86_64_RELATIVE
3350+ -- : BFD_RELOC_X86_64_GOTPCREL
3351+ -- : BFD_RELOC_X86_64_32S
3352+ -- : BFD_RELOC_X86_64_DTPMOD64
3353+ -- : BFD_RELOC_X86_64_DTPOFF64
3354+ -- : BFD_RELOC_X86_64_TPOFF64
3355+ -- : BFD_RELOC_X86_64_TLSGD
3356+ -- : BFD_RELOC_X86_64_TLSLD
3357+ -- : BFD_RELOC_X86_64_DTPOFF32
3358+ -- : BFD_RELOC_X86_64_GOTTPOFF
3359+ -- : BFD_RELOC_X86_64_TPOFF32
3360+ x86-64/elf relocations
3361+
3362+ -- : BFD_RELOC_NS32K_IMM_8
3363+ -- : BFD_RELOC_NS32K_IMM_16
3364+ -- : BFD_RELOC_NS32K_IMM_32
3365+ -- : BFD_RELOC_NS32K_IMM_8_PCREL
3366+ -- : BFD_RELOC_NS32K_IMM_16_PCREL
3367+ -- : BFD_RELOC_NS32K_IMM_32_PCREL
3368+ -- : BFD_RELOC_NS32K_DISP_8
3369+ -- : BFD_RELOC_NS32K_DISP_16
3370+ -- : BFD_RELOC_NS32K_DISP_32
3371+ -- : BFD_RELOC_NS32K_DISP_8_PCREL
3372+ -- : BFD_RELOC_NS32K_DISP_16_PCREL
3373+ -- : BFD_RELOC_NS32K_DISP_32_PCREL
3374+ ns32k relocations
3375+
3376+ -- : BFD_RELOC_PDP11_DISP_8_PCREL
3377+ -- : BFD_RELOC_PDP11_DISP_6_PCREL
3378+ PDP11 relocations
3379+
3380+ -- : BFD_RELOC_PJ_CODE_HI16
3381+ -- : BFD_RELOC_PJ_CODE_LO16
3382+ -- : BFD_RELOC_PJ_CODE_DIR16
3383+ -- : BFD_RELOC_PJ_CODE_DIR32
3384+ -- : BFD_RELOC_PJ_CODE_REL16
3385+ -- : BFD_RELOC_PJ_CODE_REL32
3386+ Picojava relocs. Not all of these appear in object files.
3387+
3388+ -- : BFD_RELOC_PPC_B26
3389+ -- : BFD_RELOC_PPC_BA26
3390+ -- : BFD_RELOC_PPC_TOC16
3391+ -- : BFD_RELOC_PPC_B16
3392+ -- : BFD_RELOC_PPC_B16_BRTAKEN
3393+ -- : BFD_RELOC_PPC_B16_BRNTAKEN
3394+ -- : BFD_RELOC_PPC_BA16
3395+ -- : BFD_RELOC_PPC_BA16_BRTAKEN
3396+ -- : BFD_RELOC_PPC_BA16_BRNTAKEN
3397+ -- : BFD_RELOC_PPC_COPY
3398+ -- : BFD_RELOC_PPC_GLOB_DAT
3399+ -- : BFD_RELOC_PPC_JMP_SLOT
3400+ -- : BFD_RELOC_PPC_RELATIVE
3401+ -- : BFD_RELOC_PPC_LOCAL24PC
3402+ -- : BFD_RELOC_PPC_EMB_NADDR32
3403+ -- : BFD_RELOC_PPC_EMB_NADDR16
3404+ -- : BFD_RELOC_PPC_EMB_NADDR16_LO
3405+ -- : BFD_RELOC_PPC_EMB_NADDR16_HI
3406+ -- : BFD_RELOC_PPC_EMB_NADDR16_HA
3407+ -- : BFD_RELOC_PPC_EMB_SDAI16
3408+ -- : BFD_RELOC_PPC_EMB_SDA2I16
3409+ -- : BFD_RELOC_PPC_EMB_SDA2REL
3410+ -- : BFD_RELOC_PPC_EMB_SDA21
3411+ -- : BFD_RELOC_PPC_EMB_MRKREF
3412+ -- : BFD_RELOC_PPC_EMB_RELSEC16
3413+ -- : BFD_RELOC_PPC_EMB_RELST_LO
3414+ -- : BFD_RELOC_PPC_EMB_RELST_HI
3415+ -- : BFD_RELOC_PPC_EMB_RELST_HA
3416+ -- : BFD_RELOC_PPC_EMB_BIT_FLD
3417+ -- : BFD_RELOC_PPC_EMB_RELSDA
3418+ -- : BFD_RELOC_PPC64_HIGHER
3419+ -- : BFD_RELOC_PPC64_HIGHER_S
3420+ -- : BFD_RELOC_PPC64_HIGHEST
3421+ -- : BFD_RELOC_PPC64_HIGHEST_S
3422+ -- : BFD_RELOC_PPC64_TOC16_LO
3423+ -- : BFD_RELOC_PPC64_TOC16_HI
3424+ -- : BFD_RELOC_PPC64_TOC16_HA
3425+ -- : BFD_RELOC_PPC64_TOC
3426+ -- : BFD_RELOC_PPC64_PLTGOT16
3427+ -- : BFD_RELOC_PPC64_PLTGOT16_LO
3428+ -- : BFD_RELOC_PPC64_PLTGOT16_HI
3429+ -- : BFD_RELOC_PPC64_PLTGOT16_HA
3430+ -- : BFD_RELOC_PPC64_ADDR16_DS
3431+ -- : BFD_RELOC_PPC64_ADDR16_LO_DS
3432+ -- : BFD_RELOC_PPC64_GOT16_DS
3433+ -- : BFD_RELOC_PPC64_GOT16_LO_DS
3434+ -- : BFD_RELOC_PPC64_PLT16_LO_DS
3435+ -- : BFD_RELOC_PPC64_SECTOFF_DS
3436+ -- : BFD_RELOC_PPC64_SECTOFF_LO_DS
3437+ -- : BFD_RELOC_PPC64_TOC16_DS
3438+ -- : BFD_RELOC_PPC64_TOC16_LO_DS
3439+ -- : BFD_RELOC_PPC64_PLTGOT16_DS
3440+ -- : BFD_RELOC_PPC64_PLTGOT16_LO_DS
3441+ Power(rs6000) and PowerPC relocations.
3442+
3443+ -- : BFD_RELOC_PPC_TLS
3444+ -- : BFD_RELOC_PPC_DTPMOD
3445+ -- : BFD_RELOC_PPC_TPREL16
3446+ -- : BFD_RELOC_PPC_TPREL16_LO
3447+ -- : BFD_RELOC_PPC_TPREL16_HI
3448+ -- : BFD_RELOC_PPC_TPREL16_HA
3449+ -- : BFD_RELOC_PPC_TPREL
3450+ -- : BFD_RELOC_PPC_DTPREL16
3451+ -- : BFD_RELOC_PPC_DTPREL16_LO
3452+ -- : BFD_RELOC_PPC_DTPREL16_HI
3453+ -- : BFD_RELOC_PPC_DTPREL16_HA
3454+ -- : BFD_RELOC_PPC_DTPREL
3455+ -- : BFD_RELOC_PPC_GOT_TLSGD16
3456+ -- : BFD_RELOC_PPC_GOT_TLSGD16_LO
3457+ -- : BFD_RELOC_PPC_GOT_TLSGD16_HI
3458+ -- : BFD_RELOC_PPC_GOT_TLSGD16_HA
3459+ -- : BFD_RELOC_PPC_GOT_TLSLD16
3460+ -- : BFD_RELOC_PPC_GOT_TLSLD16_LO
3461+ -- : BFD_RELOC_PPC_GOT_TLSLD16_HI
3462+ -- : BFD_RELOC_PPC_GOT_TLSLD16_HA
3463+ -- : BFD_RELOC_PPC_GOT_TPREL16
3464+ -- : BFD_RELOC_PPC_GOT_TPREL16_LO
3465+ -- : BFD_RELOC_PPC_GOT_TPREL16_HI
3466+ -- : BFD_RELOC_PPC_GOT_TPREL16_HA
3467+ -- : BFD_RELOC_PPC_GOT_DTPREL16
3468+ -- : BFD_RELOC_PPC_GOT_DTPREL16_LO
3469+ -- : BFD_RELOC_PPC_GOT_DTPREL16_HI
3470+ -- : BFD_RELOC_PPC_GOT_DTPREL16_HA
3471+ -- : BFD_RELOC_PPC64_TPREL16_DS
3472+ -- : BFD_RELOC_PPC64_TPREL16_LO_DS
3473+ -- : BFD_RELOC_PPC64_TPREL16_HIGHER
3474+ -- : BFD_RELOC_PPC64_TPREL16_HIGHERA
3475+ -- : BFD_RELOC_PPC64_TPREL16_HIGHEST
3476+ -- : BFD_RELOC_PPC64_TPREL16_HIGHESTA
3477+ -- : BFD_RELOC_PPC64_DTPREL16_DS
3478+ -- : BFD_RELOC_PPC64_DTPREL16_LO_DS
3479+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHER
3480+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHERA
3481+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHEST
3482+ -- : BFD_RELOC_PPC64_DTPREL16_HIGHESTA
3483+ PowerPC and PowerPC64 thread-local storage relocations.
3484+
3485+ -- : BFD_RELOC_I370_D12
3486+ IBM 370/390 relocations
3487+
3488+ -- : BFD_RELOC_CTOR
3489+ The type of reloc used to build a constructor table - at the moment
3490+ probably a 32 bit wide absolute relocation, but the target can
3491+ choose. It generally does map to one of the other relocation
3492+ types.
3493+
3494+ -- : BFD_RELOC_ARM_PCREL_BRANCH
3495+ ARM 26 bit pc-relative branch. The lowest two bits must be zero
3496+ and are not stored in the instruction.
3497+
3498+ -- : BFD_RELOC_ARM_PCREL_BLX
3499+ ARM 26 bit pc-relative branch. The lowest bit must be zero and is
3500+ not stored in the instruction. The 2nd lowest bit comes from a 1
3501+ bit field in the instruction.
3502+
3503+ -- : BFD_RELOC_THUMB_PCREL_BLX
3504+ Thumb 22 bit pc-relative branch. The lowest bit must be zero and
3505+ is not stored in the instruction. The 2nd lowest bit comes from a
3506+ 1 bit field in the instruction.
3507+
3508+ -- : BFD_RELOC_ARM_IMMEDIATE
3509+ -- : BFD_RELOC_ARM_ADRL_IMMEDIATE
3510+ -- : BFD_RELOC_ARM_OFFSET_IMM
3511+ -- : BFD_RELOC_ARM_SHIFT_IMM
3512+ -- : BFD_RELOC_ARM_SMI
3513+ -- : BFD_RELOC_ARM_SWI
3514+ -- : BFD_RELOC_ARM_MULTI
3515+ -- : BFD_RELOC_ARM_CP_OFF_IMM
3516+ -- : BFD_RELOC_ARM_CP_OFF_IMM_S2
3517+ -- : BFD_RELOC_ARM_ADR_IMM
3518+ -- : BFD_RELOC_ARM_LDR_IMM
3519+ -- : BFD_RELOC_ARM_LITERAL
3520+ -- : BFD_RELOC_ARM_IN_POOL
3521+ -- : BFD_RELOC_ARM_OFFSET_IMM8
3522+ -- : BFD_RELOC_ARM_HWLITERAL
3523+ -- : BFD_RELOC_ARM_THUMB_ADD
3524+ -- : BFD_RELOC_ARM_THUMB_IMM
3525+ -- : BFD_RELOC_ARM_THUMB_SHIFT
3526+ -- : BFD_RELOC_ARM_THUMB_OFFSET
3527+ -- : BFD_RELOC_ARM_GOT12
3528+ -- : BFD_RELOC_ARM_GOT32
3529+ -- : BFD_RELOC_ARM_JUMP_SLOT
3530+ -- : BFD_RELOC_ARM_COPY
3531+ -- : BFD_RELOC_ARM_GLOB_DAT
3532+ -- : BFD_RELOC_ARM_PLT32
3533+ -- : BFD_RELOC_ARM_RELATIVE
3534+ -- : BFD_RELOC_ARM_GOTOFF
3535+ -- : BFD_RELOC_ARM_GOTPC
3536+ These relocs are only used within the ARM assembler. They are not
3537+ (at present) written to any object files.
3538+
3539+ -- : BFD_RELOC_ARM_TARGET1
3540+ Pc-relative or absolute relocation depending on target. Used for
3541+ entries in .init_array sections.
3542+
3543+ -- : BFD_RELOC_ARM_ROSEGREL32
3544+ Read-only segment base relative address.
3545+
3546+ -- : BFD_RELOC_ARM_SBREL32
3547+ Data segment base relative address.
3548+
3549+ -- : BFD_RELOC_ARM_TARGET2
3550+ This reloc is used for References to RTTI dta from exception
3551+ handling tables. The actual definition depends on the target. It
3552+ may be a pc-relative or some form of GOT-indirect relocation.
3553+
3554+ -- : BFD_RELOC_ARM_PREL31
3555+ 31-bit PC relative address.
3556+
3557+ -- : BFD_RELOC_SH_PCDISP8BY2
3558+ -- : BFD_RELOC_SH_PCDISP12BY2
3559+ -- : BFD_RELOC_SH_IMM3
3560+ -- : BFD_RELOC_SH_IMM3U
3561+ -- : BFD_RELOC_SH_DISP12
3562+ -- : BFD_RELOC_SH_DISP12BY2
3563+ -- : BFD_RELOC_SH_DISP12BY4
3564+ -- : BFD_RELOC_SH_DISP12BY8
3565+ -- : BFD_RELOC_SH_DISP20
3566+ -- : BFD_RELOC_SH_DISP20BY8
3567+ -- : BFD_RELOC_SH_IMM4
3568+ -- : BFD_RELOC_SH_IMM4BY2
3569+ -- : BFD_RELOC_SH_IMM4BY4
3570+ -- : BFD_RELOC_SH_IMM8
3571+ -- : BFD_RELOC_SH_IMM8BY2
3572+ -- : BFD_RELOC_SH_IMM8BY4
3573+ -- : BFD_RELOC_SH_PCRELIMM8BY2
3574+ -- : BFD_RELOC_SH_PCRELIMM8BY4
3575+ -- : BFD_RELOC_SH_SWITCH16
3576+ -- : BFD_RELOC_SH_SWITCH32
3577+ -- : BFD_RELOC_SH_USES
3578+ -- : BFD_RELOC_SH_COUNT
3579+ -- : BFD_RELOC_SH_ALIGN
3580+ -- : BFD_RELOC_SH_CODE
3581+ -- : BFD_RELOC_SH_DATA
3582+ -- : BFD_RELOC_SH_LABEL
3583+ -- : BFD_RELOC_SH_LOOP_START
3584+ -- : BFD_RELOC_SH_LOOP_END
3585+ -- : BFD_RELOC_SH_COPY
3586+ -- : BFD_RELOC_SH_GLOB_DAT
3587+ -- : BFD_RELOC_SH_JMP_SLOT
3588+ -- : BFD_RELOC_SH_RELATIVE
3589+ -- : BFD_RELOC_SH_GOTPC
3590+ -- : BFD_RELOC_SH_GOT_LOW16
3591+ -- : BFD_RELOC_SH_GOT_MEDLOW16
3592+ -- : BFD_RELOC_SH_GOT_MEDHI16
3593+ -- : BFD_RELOC_SH_GOT_HI16
3594+ -- : BFD_RELOC_SH_GOTPLT_LOW16
3595+ -- : BFD_RELOC_SH_GOTPLT_MEDLOW16
3596+ -- : BFD_RELOC_SH_GOTPLT_MEDHI16
3597+ -- : BFD_RELOC_SH_GOTPLT_HI16
3598+ -- : BFD_RELOC_SH_PLT_LOW16
3599+ -- : BFD_RELOC_SH_PLT_MEDLOW16
3600+ -- : BFD_RELOC_SH_PLT_MEDHI16
3601+ -- : BFD_RELOC_SH_PLT_HI16
3602+ -- : BFD_RELOC_SH_GOTOFF_LOW16
3603+ -- : BFD_RELOC_SH_GOTOFF_MEDLOW16
3604+ -- : BFD_RELOC_SH_GOTOFF_MEDHI16
3605+ -- : BFD_RELOC_SH_GOTOFF_HI16
3606+ -- : BFD_RELOC_SH_GOTPC_LOW16
3607+ -- : BFD_RELOC_SH_GOTPC_MEDLOW16
3608+ -- : BFD_RELOC_SH_GOTPC_MEDHI16
3609+ -- : BFD_RELOC_SH_GOTPC_HI16
3610+ -- : BFD_RELOC_SH_COPY64
3611+ -- : BFD_RELOC_SH_GLOB_DAT64
3612+ -- : BFD_RELOC_SH_JMP_SLOT64
3613+ -- : BFD_RELOC_SH_RELATIVE64
3614+ -- : BFD_RELOC_SH_GOT10BY4
3615+ -- : BFD_RELOC_SH_GOT10BY8
3616+ -- : BFD_RELOC_SH_GOTPLT10BY4
3617+ -- : BFD_RELOC_SH_GOTPLT10BY8
3618+ -- : BFD_RELOC_SH_GOTPLT32
3619+ -- : BFD_RELOC_SH_SHMEDIA_CODE
3620+ -- : BFD_RELOC_SH_IMMU5
3621+ -- : BFD_RELOC_SH_IMMS6
3622+ -- : BFD_RELOC_SH_IMMS6BY32
3623+ -- : BFD_RELOC_SH_IMMU6
3624+ -- : BFD_RELOC_SH_IMMS10
3625+ -- : BFD_RELOC_SH_IMMS10BY2
3626+ -- : BFD_RELOC_SH_IMMS10BY4
3627+ -- : BFD_RELOC_SH_IMMS10BY8
3628+ -- : BFD_RELOC_SH_IMMS16
3629+ -- : BFD_RELOC_SH_IMMU16
3630+ -- : BFD_RELOC_SH_IMM_LOW16
3631+ -- : BFD_RELOC_SH_IMM_LOW16_PCREL
3632+ -- : BFD_RELOC_SH_IMM_MEDLOW16
3633+ -- : BFD_RELOC_SH_IMM_MEDLOW16_PCREL
3634+ -- : BFD_RELOC_SH_IMM_MEDHI16
3635+ -- : BFD_RELOC_SH_IMM_MEDHI16_PCREL
3636+ -- : BFD_RELOC_SH_IMM_HI16
3637+ -- : BFD_RELOC_SH_IMM_HI16_PCREL
3638+ -- : BFD_RELOC_SH_PT_16
3639+ -- : BFD_RELOC_SH_TLS_GD_32
3640+ -- : BFD_RELOC_SH_TLS_LD_32
3641+ -- : BFD_RELOC_SH_TLS_LDO_32
3642+ -- : BFD_RELOC_SH_TLS_IE_32
3643+ -- : BFD_RELOC_SH_TLS_LE_32
3644+ -- : BFD_RELOC_SH_TLS_DTPMOD32
3645+ -- : BFD_RELOC_SH_TLS_DTPOFF32
3646+ -- : BFD_RELOC_SH_TLS_TPOFF32
3647+ Renesas / SuperH SH relocs. Not all of these appear in object
3648+ files.
3649+
3650+ -- : BFD_RELOC_THUMB_PCREL_BRANCH9
3651+ -- : BFD_RELOC_THUMB_PCREL_BRANCH12
3652+ -- : BFD_RELOC_THUMB_PCREL_BRANCH23
3653+ Thumb 23-, 12- and 9-bit pc-relative branches. The lowest bit must
3654+ be zero and is not stored in the instruction.
3655+
3656+ -- : BFD_RELOC_ARC_B22_PCREL
3657+ ARC Cores relocs. ARC 22 bit pc-relative branch. The lowest two
3658+ bits must be zero and are not stored in the instruction. The high
3659+ 20 bits are installed in bits 26 through 7 of the instruction.
3660+
3661+ -- : BFD_RELOC_ARC_B26
3662+ ARC 26 bit absolute branch. The lowest two bits must be zero and
3663+ are not stored in the instruction. The high 24 bits are installed
3664+ in bits 23 through 0.
3665+
3666+ -- : BFD_RELOC_D10V_10_PCREL_R
3667+ Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2
3668+ bits assumed to be 0.
3669+
3670+ -- : BFD_RELOC_D10V_10_PCREL_L
3671+ Mitsubishi D10V relocs. This is a 10-bit reloc with the right 2
3672+ bits assumed to be 0. This is the same as the previous reloc
3673+ except it is in the left container, i.e., shifted left 15 bits.
3674+
3675+ -- : BFD_RELOC_D10V_18
3676+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3677+
3678+ -- : BFD_RELOC_D10V_18_PCREL
3679+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3680+
3681+ -- : BFD_RELOC_D30V_6
3682+ Mitsubishi D30V relocs. This is a 6-bit absolute reloc.
3683+
3684+ -- : BFD_RELOC_D30V_9_PCREL
3685+ This is a 6-bit pc-relative reloc with the right 3 bits assumed to
3686+ be 0.
3687+
3688+ -- : BFD_RELOC_D30V_9_PCREL_R
3689+ This is a 6-bit pc-relative reloc with the right 3 bits assumed to
3690+ be 0. Same as the previous reloc but on the right side of the
3691+ container.
3692+
3693+ -- : BFD_RELOC_D30V_15
3694+ This is a 12-bit absolute reloc with the right 3 bitsassumed to be
3695+ 0.
3696+
3697+ -- : BFD_RELOC_D30V_15_PCREL
3698+ This is a 12-bit pc-relative reloc with the right 3 bits assumed
3699+ to be 0.
3700+
3701+ -- : BFD_RELOC_D30V_15_PCREL_R
3702+ This is a 12-bit pc-relative reloc with the right 3 bits assumed
3703+ to be 0. Same as the previous reloc but on the right side of the
3704+ container.
3705+
3706+ -- : BFD_RELOC_D30V_21
3707+ This is an 18-bit absolute reloc with the right 3 bits assumed to
3708+ be 0.
3709+
3710+ -- : BFD_RELOC_D30V_21_PCREL
3711+ This is an 18-bit pc-relative reloc with the right 3 bits assumed
3712+ to be 0.
3713+
3714+ -- : BFD_RELOC_D30V_21_PCREL_R
3715+ This is an 18-bit pc-relative reloc with the right 3 bits assumed
3716+ to be 0. Same as the previous reloc but on the right side of the
3717+ container.
3718+
3719+ -- : BFD_RELOC_D30V_32
3720+ This is a 32-bit absolute reloc.
3721+
3722+ -- : BFD_RELOC_D30V_32_PCREL
3723+ This is a 32-bit pc-relative reloc.
3724+
3725+ -- : BFD_RELOC_DLX_HI16_S
3726+ DLX relocs
3727+
3728+ -- : BFD_RELOC_DLX_LO16
3729+ DLX relocs
3730+
3731+ -- : BFD_RELOC_DLX_JMP26
3732+ DLX relocs
3733+
3734+ -- : BFD_RELOC_M32R_24
3735+ Renesas M32R (formerly Mitsubishi M32R) relocs. This is a 24 bit
3736+ absolute address.
3737+
3738+ -- : BFD_RELOC_M32R_10_PCREL
3739+ This is a 10-bit pc-relative reloc with the right 2 bits assumed
3740+ to be 0.
3741+
3742+ -- : BFD_RELOC_M32R_18_PCREL
3743+ This is an 18-bit reloc with the right 2 bits assumed to be 0.
3744+
3745+ -- : BFD_RELOC_M32R_26_PCREL
3746+ This is a 26-bit reloc with the right 2 bits assumed to be 0.
3747+
3748+ -- : BFD_RELOC_M32R_HI16_ULO
3749+ This is a 16-bit reloc containing the high 16 bits of an address
3750+ used when the lower 16 bits are treated as unsigned.
3751+
3752+ -- : BFD_RELOC_M32R_HI16_SLO
3753+ This is a 16-bit reloc containing the high 16 bits of an address
3754+ used when the lower 16 bits are treated as signed.
3755+
3756+ -- : BFD_RELOC_M32R_LO16
3757+ This is a 16-bit reloc containing the lower 16 bits of an address.
3758+
3759+ -- : BFD_RELOC_M32R_SDA16
3760+ This is a 16-bit reloc containing the small data area offset for
3761+ use in add3, load, and store instructions.
3762+
3763+ -- : BFD_RELOC_M32R_GOT24
3764+ -- : BFD_RELOC_M32R_26_PLTREL
3765+ -- : BFD_RELOC_M32R_COPY
3766+ -- : BFD_RELOC_M32R_GLOB_DAT
3767+ -- : BFD_RELOC_M32R_JMP_SLOT
3768+ -- : BFD_RELOC_M32R_RELATIVE
3769+ -- : BFD_RELOC_M32R_GOTOFF
3770+ -- : BFD_RELOC_M32R_GOTOFF_HI_ULO
3771+ -- : BFD_RELOC_M32R_GOTOFF_HI_SLO
3772+ -- : BFD_RELOC_M32R_GOTOFF_LO
3773+ -- : BFD_RELOC_M32R_GOTPC24
3774+ -- : BFD_RELOC_M32R_GOT16_HI_ULO
3775+ -- : BFD_RELOC_M32R_GOT16_HI_SLO
3776+ -- : BFD_RELOC_M32R_GOT16_LO
3777+ -- : BFD_RELOC_M32R_GOTPC_HI_ULO
3778+ -- : BFD_RELOC_M32R_GOTPC_HI_SLO
3779+ -- : BFD_RELOC_M32R_GOTPC_LO
3780+ For PIC.
3781+
3782+ -- : BFD_RELOC_V850_9_PCREL
3783+ This is a 9-bit reloc
3784+
3785+ -- : BFD_RELOC_V850_22_PCREL
3786+ This is a 22-bit reloc
3787+
3788+ -- : BFD_RELOC_V850_SDA_16_16_OFFSET
3789+ This is a 16 bit offset from the short data area pointer.
3790+
3791+ -- : BFD_RELOC_V850_SDA_15_16_OFFSET
3792+ This is a 16 bit offset (of which only 15 bits are used) from the
3793+ short data area pointer.
3794+
3795+ -- : BFD_RELOC_V850_ZDA_16_16_OFFSET
3796+ This is a 16 bit offset from the zero data area pointer.
3797+
3798+ -- : BFD_RELOC_V850_ZDA_15_16_OFFSET
3799+ This is a 16 bit offset (of which only 15 bits are used) from the
3800+ zero data area pointer.
3801+
3802+ -- : BFD_RELOC_V850_TDA_6_8_OFFSET
3803+ This is an 8 bit offset (of which only 6 bits are used) from the
3804+ tiny data area pointer.
3805+
3806+ -- : BFD_RELOC_V850_TDA_7_8_OFFSET
3807+ This is an 8bit offset (of which only 7 bits are used) from the
3808+ tiny data area pointer.
3809+
3810+ -- : BFD_RELOC_V850_TDA_7_7_OFFSET
3811+ This is a 7 bit offset from the tiny data area pointer.
3812+
3813+ -- : BFD_RELOC_V850_TDA_16_16_OFFSET
3814+ This is a 16 bit offset from the tiny data area pointer.
3815+
3816+ -- : BFD_RELOC_V850_TDA_4_5_OFFSET
3817+ This is a 5 bit offset (of which only 4 bits are used) from the
3818+ tiny data area pointer.
3819+
3820+ -- : BFD_RELOC_V850_TDA_4_4_OFFSET
3821+ This is a 4 bit offset from the tiny data area pointer.
3822+
3823+ -- : BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
3824+ This is a 16 bit offset from the short data area pointer, with the
3825+ bits placed non-contiguously in the instruction.
3826+
3827+ -- : BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
3828+ This is a 16 bit offset from the zero data area pointer, with the
3829+ bits placed non-contiguously in the instruction.
3830+
3831+ -- : BFD_RELOC_V850_CALLT_6_7_OFFSET
3832+ This is a 6 bit offset from the call table base pointer.
3833+
3834+ -- : BFD_RELOC_V850_CALLT_16_16_OFFSET
3835+ This is a 16 bit offset from the call table base pointer.
3836+
3837+ -- : BFD_RELOC_V850_LONGCALL
3838+ Used for relaxing indirect function calls.
3839+
3840+ -- : BFD_RELOC_V850_LONGJUMP
3841+ Used for relaxing indirect jumps.
3842+
3843+ -- : BFD_RELOC_V850_ALIGN
3844+ Used to maintain alignment whilst relaxing.
3845+
3846+ -- : BFD_RELOC_V850_LO16_SPLIT_OFFSET
3847+ This is a variation of BFD_RELOC_LO16 that can be used in v850e
3848+ ld.bu instructions.
3849+
3850+ -- : BFD_RELOC_MN10300_32_PCREL
3851+ This is a 32bit pcrel reloc for the mn10300, offset by two bytes
3852+ in the instruction.
3853+
3854+ -- : BFD_RELOC_MN10300_16_PCREL
3855+ This is a 16bit pcrel reloc for the mn10300, offset by two bytes
3856+ in the instruction.
3857+
3858+ -- : BFD_RELOC_TIC30_LDP
3859+ This is a 8bit DP reloc for the tms320c30, where the most
3860+ significant 8 bits of a 24 bit word are placed into the least
3861+ significant 8 bits of the opcode.
3862+
3863+ -- : BFD_RELOC_TIC54X_PARTLS7
3864+ This is a 7bit reloc for the tms320c54x, where the least
3865+ significant 7 bits of a 16 bit word are placed into the least
3866+ significant 7 bits of the opcode.
3867+
3868+ -- : BFD_RELOC_TIC54X_PARTMS9
3869+ This is a 9bit DP reloc for the tms320c54x, where the most
3870+ significant 9 bits of a 16 bit word are placed into the least
3871+ significant 9 bits of the opcode.
3872+
3873+ -- : BFD_RELOC_TIC54X_23
3874+ This is an extended address 23-bit reloc for the tms320c54x.
3875+
3876+ -- : BFD_RELOC_TIC54X_16_OF_23
3877+ This is a 16-bit reloc for the tms320c54x, where the least
3878+ significant 16 bits of a 23-bit extended address are placed into
3879+ the opcode.
3880+
3881+ -- : BFD_RELOC_TIC54X_MS7_OF_23
3882+ This is a reloc for the tms320c54x, where the most significant 7
3883+ bits of a 23-bit extended address are placed into the opcode.
3884+
3885+ -- : BFD_RELOC_FR30_48
3886+ This is a 48 bit reloc for the FR30 that stores 32 bits.
3887+
3888+ -- : BFD_RELOC_FR30_20
3889+ This is a 32 bit reloc for the FR30 that stores 20 bits split up
3890+ into two sections.
3891+
3892+ -- : BFD_RELOC_FR30_6_IN_4
3893+ This is a 16 bit reloc for the FR30 that stores a 6 bit word
3894+ offset in 4 bits.
3895+
3896+ -- : BFD_RELOC_FR30_8_IN_8
3897+ This is a 16 bit reloc for the FR30 that stores an 8 bit byte
3898+ offset into 8 bits.
3899+
3900+ -- : BFD_RELOC_FR30_9_IN_8
3901+ This is a 16 bit reloc for the FR30 that stores a 9 bit short
3902+ offset into 8 bits.
3903+
3904+ -- : BFD_RELOC_FR30_10_IN_8
3905+ This is a 16 bit reloc for the FR30 that stores a 10 bit word
3906+ offset into 8 bits.
3907+
3908+ -- : BFD_RELOC_FR30_9_PCREL
3909+ This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
3910+ short offset into 8 bits.
3911+
3912+ -- : BFD_RELOC_FR30_12_PCREL
3913+ This is a 16 bit reloc for the FR30 that stores a 12 bit pc
3914+ relative short offset into 11 bits.
3915+
3916+ -- : BFD_RELOC_MCORE_PCREL_IMM8BY4
3917+ -- : BFD_RELOC_MCORE_PCREL_IMM11BY2
3918+ -- : BFD_RELOC_MCORE_PCREL_IMM4BY2
3919+ -- : BFD_RELOC_MCORE_PCREL_32
3920+ -- : BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
3921+ -- : BFD_RELOC_MCORE_RVA
3922+ Motorola Mcore relocations.
3923+
3924+ -- : BFD_RELOC_MMIX_GETA
3925+ -- : BFD_RELOC_MMIX_GETA_1
3926+ -- : BFD_RELOC_MMIX_GETA_2
3927+ -- : BFD_RELOC_MMIX_GETA_3
3928+ These are relocations for the GETA instruction.
3929+
3930+ -- : BFD_RELOC_MMIX_CBRANCH
3931+ -- : BFD_RELOC_MMIX_CBRANCH_J
3932+ -- : BFD_RELOC_MMIX_CBRANCH_1
3933+ -- : BFD_RELOC_MMIX_CBRANCH_2
3934+ -- : BFD_RELOC_MMIX_CBRANCH_3
3935+ These are relocations for a conditional branch instruction.
3936+
3937+ -- : BFD_RELOC_MMIX_PUSHJ
3938+ -- : BFD_RELOC_MMIX_PUSHJ_1
3939+ -- : BFD_RELOC_MMIX_PUSHJ_2
3940+ -- : BFD_RELOC_MMIX_PUSHJ_3
3941+ -- : BFD_RELOC_MMIX_PUSHJ_STUBBABLE
3942+ These are relocations for the PUSHJ instruction.
3943+
3944+ -- : BFD_RELOC_MMIX_JMP
3945+ -- : BFD_RELOC_MMIX_JMP_1
3946+ -- : BFD_RELOC_MMIX_JMP_2
3947+ -- : BFD_RELOC_MMIX_JMP_3
3948+ These are relocations for the JMP instruction.
3949+
3950+ -- : BFD_RELOC_MMIX_ADDR19
3951+ This is a relocation for a relative address as in a GETA
3952+ instruction or a branch.
3953+
3954+ -- : BFD_RELOC_MMIX_ADDR27
3955+ This is a relocation for a relative address as in a JMP
3956+ instruction.
3957+
3958+ -- : BFD_RELOC_MMIX_REG_OR_BYTE
3959+ This is a relocation for an instruction field that may be a general
3960+ register or a value 0..255.
3961+
3962+ -- : BFD_RELOC_MMIX_REG
3963+ This is a relocation for an instruction field that may be a general
3964+ register.
3965+
3966+ -- : BFD_RELOC_MMIX_BASE_PLUS_OFFSET
3967+ This is a relocation for two instruction fields holding a register
3968+ and an offset, the equivalent of the relocation.
3969+
3970+ -- : BFD_RELOC_MMIX_LOCAL
3971+ This relocation is an assertion that the expression is not
3972+ allocated as a global register. It does not modify contents.
3973+
3974+ -- : BFD_RELOC_AVR_7_PCREL
3975+ This is a 16 bit reloc for the AVR that stores 8 bit pc relative
3976+ short offset into 7 bits.
3977+
3978+ -- : BFD_RELOC_AVR_13_PCREL
3979+ This is a 16 bit reloc for the AVR that stores 13 bit pc relative
3980+ short offset into 12 bits.
3981+
3982+ -- : BFD_RELOC_AVR_16_PM
3983+ This is a 16 bit reloc for the AVR that stores 17 bit value
3984+ (usually program memory address) into 16 bits.
3985+
3986+ -- : BFD_RELOC_AVR_LO8_LDI
3987+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
3988+ data memory address) into 8 bit immediate value of LDI insn.
3989+
3990+ -- : BFD_RELOC_AVR_HI8_LDI
3991+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
3992+ bit of data memory address) into 8 bit immediate value of LDI insn.
3993+
3994+ -- : BFD_RELOC_AVR_HH8_LDI
3995+ This is a 16 bit reloc for the AVR that stores 8 bit value (most
3996+ high 8 bit of program memory address) into 8 bit immediate value
3997+ of LDI insn.
3998+
3999+ -- : BFD_RELOC_AVR_LO8_LDI_NEG
4000+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4001+ (usually data memory address) into 8 bit immediate value of SUBI
4002+ insn.
4003+
4004+ -- : BFD_RELOC_AVR_HI8_LDI_NEG
4005+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4006+ (high 8 bit of data memory address) into 8 bit immediate value of
4007+ SUBI insn.
4008+
4009+ -- : BFD_RELOC_AVR_HH8_LDI_NEG
4010+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4011+ (most high 8 bit of program memory address) into 8 bit immediate
4012+ value of LDI or SUBI insn.
4013+
4014+ -- : BFD_RELOC_AVR_LO8_LDI_PM
4015+ This is a 16 bit reloc for the AVR that stores 8 bit value (usually
4016+ command address) into 8 bit immediate value of LDI insn.
4017+
4018+ -- : BFD_RELOC_AVR_HI8_LDI_PM
4019+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8
4020+ bit of command address) into 8 bit immediate value of LDI insn.
4021+
4022+ -- : BFD_RELOC_AVR_HH8_LDI_PM
4023+ This is a 16 bit reloc for the AVR that stores 8 bit value (most
4024+ high 8 bit of command address) into 8 bit immediate value of LDI
4025+ insn.
4026+
4027+ -- : BFD_RELOC_AVR_LO8_LDI_PM_NEG
4028+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4029+ (usually command address) into 8 bit immediate value of SUBI insn.
4030+
4031+ -- : BFD_RELOC_AVR_HI8_LDI_PM_NEG
4032+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4033+ (high 8 bit of 16 bit command address) into 8 bit immediate value
4034+ of SUBI insn.
4035+
4036+ -- : BFD_RELOC_AVR_HH8_LDI_PM_NEG
4037+ This is a 16 bit reloc for the AVR that stores negated 8 bit value
4038+ (high 6 bit of 22 bit command address) into 8 bit immediate value
4039+ of SUBI insn.
4040+
4041+ -- : BFD_RELOC_AVR_CALL
4042+ This is a 32 bit reloc for the AVR that stores 23 bit value into
4043+ 22 bits.
4044+
4045+ -- : BFD_RELOC_AVR_LDI
4046+ This is a 16 bit reloc for the AVR that stores all needed bits for
4047+ absolute addressing with ldi with overflow check to linktime
4048+
4049+ -- : BFD_RELOC_AVR_6
4050+ This is a 6 bit reloc for the AVR that stores offset for ldd/std
4051+ instructions
4052+
4053+ -- : BFD_RELOC_AVR_6_ADIW
4054+ This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
4055+ instructions
4056+
4057+ -- : BFD_RELOC_390_12
4058+ Direct 12 bit.
4059+
4060+ -- : BFD_RELOC_390_GOT12
4061+ 12 bit GOT offset.
4062+
4063+ -- : BFD_RELOC_390_PLT32
4064+ 32 bit PC relative PLT address.
4065+
4066+ -- : BFD_RELOC_390_COPY
4067+ Copy symbol at runtime.
4068+
4069+ -- : BFD_RELOC_390_GLOB_DAT
4070+ Create GOT entry.
4071+
4072+ -- : BFD_RELOC_390_JMP_SLOT
4073+ Create PLT entry.
4074+
4075+ -- : BFD_RELOC_390_RELATIVE
4076+ Adjust by program base.
4077+
4078+ -- : BFD_RELOC_390_GOTPC
4079+ 32 bit PC relative offset to GOT.
4080+
4081+ -- : BFD_RELOC_390_GOT16
4082+ 16 bit GOT offset.
4083+
4084+ -- : BFD_RELOC_390_PC16DBL
4085+ PC relative 16 bit shifted by 1.
4086+
4087+ -- : BFD_RELOC_390_PLT16DBL
4088+ 16 bit PC rel. PLT shifted by 1.
4089+
4090+ -- : BFD_RELOC_390_PC32DBL
4091+ PC relative 32 bit shifted by 1.
4092+
4093+ -- : BFD_RELOC_390_PLT32DBL
4094+ 32 bit PC rel. PLT shifted by 1.
4095+
4096+ -- : BFD_RELOC_390_GOTPCDBL
4097+ 32 bit PC rel. GOT shifted by 1.
4098+
4099+ -- : BFD_RELOC_390_GOT64
4100+ 64 bit GOT offset.
4101+
4102+ -- : BFD_RELOC_390_PLT64
4103+ 64 bit PC relative PLT address.
4104+
4105+ -- : BFD_RELOC_390_GOTENT
4106+ 32 bit rel. offset to GOT entry.
4107+
4108+ -- : BFD_RELOC_390_GOTOFF64
4109+ 64 bit offset to GOT.
4110+
4111+ -- : BFD_RELOC_390_GOTPLT12
4112+ 12-bit offset to symbol-entry within GOT, with PLT handling.
4113+
4114+ -- : BFD_RELOC_390_GOTPLT16
4115+ 16-bit offset to symbol-entry within GOT, with PLT handling.
4116+
4117+ -- : BFD_RELOC_390_GOTPLT32
4118+ 32-bit offset to symbol-entry within GOT, with PLT handling.
4119+
4120+ -- : BFD_RELOC_390_GOTPLT64
4121+ 64-bit offset to symbol-entry within GOT, with PLT handling.
4122+
4123+ -- : BFD_RELOC_390_GOTPLTENT
4124+ 32-bit rel. offset to symbol-entry within GOT, with PLT handling.
4125+
4126+ -- : BFD_RELOC_390_PLTOFF16
4127+ 16-bit rel. offset from the GOT to a PLT entry.
4128+
4129+ -- : BFD_RELOC_390_PLTOFF32
4130+ 32-bit rel. offset from the GOT to a PLT entry.
4131+
4132+ -- : BFD_RELOC_390_PLTOFF64
4133+ 64-bit rel. offset from the GOT to a PLT entry.
4134+
4135+ -- : BFD_RELOC_390_TLS_LOAD
4136+ -- : BFD_RELOC_390_TLS_GDCALL
4137+ -- : BFD_RELOC_390_TLS_LDCALL
4138+ -- : BFD_RELOC_390_TLS_GD32
4139+ -- : BFD_RELOC_390_TLS_GD64
4140+ -- : BFD_RELOC_390_TLS_GOTIE12
4141+ -- : BFD_RELOC_390_TLS_GOTIE32
4142+ -- : BFD_RELOC_390_TLS_GOTIE64
4143+ -- : BFD_RELOC_390_TLS_LDM32
4144+ -- : BFD_RELOC_390_TLS_LDM64
4145+ -- : BFD_RELOC_390_TLS_IE32
4146+ -- : BFD_RELOC_390_TLS_IE64
4147+ -- : BFD_RELOC_390_TLS_IEENT
4148+ -- : BFD_RELOC_390_TLS_LE32
4149+ -- : BFD_RELOC_390_TLS_LE64
4150+ -- : BFD_RELOC_390_TLS_LDO32
4151+ -- : BFD_RELOC_390_TLS_LDO64
4152+ -- : BFD_RELOC_390_TLS_DTPMOD
4153+ -- : BFD_RELOC_390_TLS_DTPOFF
4154+ -- : BFD_RELOC_390_TLS_TPOFF
4155+ s390 tls relocations.
4156+
4157+ -- : BFD_RELOC_390_20
4158+ -- : BFD_RELOC_390_GOT20
4159+ -- : BFD_RELOC_390_GOTPLT20
4160+ -- : BFD_RELOC_390_TLS_GOTIE20
4161+ Long displacement extension.
4162+
4163+ -- : BFD_RELOC_IP2K_FR9
4164+ Scenix IP2K - 9-bit register number / data address
4165+
4166+ -- : BFD_RELOC_IP2K_BANK
4167+ Scenix IP2K - 4-bit register/data bank number
4168+
4169+ -- : BFD_RELOC_IP2K_ADDR16CJP
4170+ Scenix IP2K - low 13 bits of instruction word address
4171+
4172+ -- : BFD_RELOC_IP2K_PAGE3
4173+ Scenix IP2K - high 3 bits of instruction word address
4174+
4175+ -- : BFD_RELOC_IP2K_LO8DATA
4176+ -- : BFD_RELOC_IP2K_HI8DATA
4177+ -- : BFD_RELOC_IP2K_EX8DATA
4178+ Scenix IP2K - ext/low/high 8 bits of data address
4179+
4180+ -- : BFD_RELOC_IP2K_LO8INSN
4181+ -- : BFD_RELOC_IP2K_HI8INSN
4182+ Scenix IP2K - low/high 8 bits of instruction word address
4183+
4184+ -- : BFD_RELOC_IP2K_PC_SKIP
4185+ Scenix IP2K - even/odd PC modifier to modify snb pcl.0
4186+
4187+ -- : BFD_RELOC_IP2K_TEXT
4188+ Scenix IP2K - 16 bit word address in text section.
4189+
4190+ -- : BFD_RELOC_IP2K_FR_OFFSET
4191+ Scenix IP2K - 7-bit sp or dp offset
4192+
4193+ -- : BFD_RELOC_VPE4KMATH_DATA
4194+ -- : BFD_RELOC_VPE4KMATH_INSN
4195+ Scenix VPE4K coprocessor - data/insn-space addressing
4196+
4197+ -- : BFD_RELOC_VTABLE_INHERIT
4198+ -- : BFD_RELOC_VTABLE_ENTRY
4199+ These two relocations are used by the linker to determine which of
4200+ the entries in a C++ virtual function table are actually used.
4201+ When the -gc-sections option is given, the linker will zero out
4202+ the entries that are not used, so that the code for those
4203+ functions need not be included in the output.
4204+
4205+ VTABLE_INHERIT is a zero-space relocation used to describe to the
4206+ linker the inheritance tree of a C++ virtual function table. The
4207+ relocation's symbol should be the parent class' vtable, and the
4208+ relocation should be located at the child vtable.
4209+
4210+ VTABLE_ENTRY is a zero-space relocation that describes the use of a
4211+ virtual function table entry. The reloc's symbol should refer to
4212+ the table of the class mentioned in the code. Off of that base,
4213+ an offset describes the entry that is being used. For Rela hosts,
4214+ this offset is stored in the reloc's addend. For Rel hosts, we
4215+ are forced to put this offset in the reloc's section offset.
4216+
4217+ -- : BFD_RELOC_IA64_IMM14
4218+ -- : BFD_RELOC_IA64_IMM22
4219+ -- : BFD_RELOC_IA64_IMM64
4220+ -- : BFD_RELOC_IA64_DIR32MSB
4221+ -- : BFD_RELOC_IA64_DIR32LSB
4222+ -- : BFD_RELOC_IA64_DIR64MSB
4223+ -- : BFD_RELOC_IA64_DIR64LSB
4224+ -- : BFD_RELOC_IA64_GPREL22
4225+ -- : BFD_RELOC_IA64_GPREL64I
4226+ -- : BFD_RELOC_IA64_GPREL32MSB
4227+ -- : BFD_RELOC_IA64_GPREL32LSB
4228+ -- : BFD_RELOC_IA64_GPREL64MSB
4229+ -- : BFD_RELOC_IA64_GPREL64LSB
4230+ -- : BFD_RELOC_IA64_LTOFF22
4231+ -- : BFD_RELOC_IA64_LTOFF64I
4232+ -- : BFD_RELOC_IA64_PLTOFF22
4233+ -- : BFD_RELOC_IA64_PLTOFF64I
4234+ -- : BFD_RELOC_IA64_PLTOFF64MSB
4235+ -- : BFD_RELOC_IA64_PLTOFF64LSB
4236+ -- : BFD_RELOC_IA64_FPTR64I
4237+ -- : BFD_RELOC_IA64_FPTR32MSB
4238+ -- : BFD_RELOC_IA64_FPTR32LSB
4239+ -- : BFD_RELOC_IA64_FPTR64MSB
4240+ -- : BFD_RELOC_IA64_FPTR64LSB
4241+ -- : BFD_RELOC_IA64_PCREL21B
4242+ -- : BFD_RELOC_IA64_PCREL21BI
4243+ -- : BFD_RELOC_IA64_PCREL21M
4244+ -- : BFD_RELOC_IA64_PCREL21F
4245+ -- : BFD_RELOC_IA64_PCREL22
4246+ -- : BFD_RELOC_IA64_PCREL60B
4247+ -- : BFD_RELOC_IA64_PCREL64I
4248+ -- : BFD_RELOC_IA64_PCREL32MSB
4249+ -- : BFD_RELOC_IA64_PCREL32LSB
4250+ -- : BFD_RELOC_IA64_PCREL64MSB
4251+ -- : BFD_RELOC_IA64_PCREL64LSB
4252+ -- : BFD_RELOC_IA64_LTOFF_FPTR22
4253+ -- : BFD_RELOC_IA64_LTOFF_FPTR64I
4254+ -- : BFD_RELOC_IA64_LTOFF_FPTR32MSB
4255+ -- : BFD_RELOC_IA64_LTOFF_FPTR32LSB
4256+ -- : BFD_RELOC_IA64_LTOFF_FPTR64MSB
4257+ -- : BFD_RELOC_IA64_LTOFF_FPTR64LSB
4258+ -- : BFD_RELOC_IA64_SEGREL32MSB
4259+ -- : BFD_RELOC_IA64_SEGREL32LSB
4260+ -- : BFD_RELOC_IA64_SEGREL64MSB
4261+ -- : BFD_RELOC_IA64_SEGREL64LSB
4262+ -- : BFD_RELOC_IA64_SECREL32MSB
4263+ -- : BFD_RELOC_IA64_SECREL32LSB
4264+ -- : BFD_RELOC_IA64_SECREL64MSB
4265+ -- : BFD_RELOC_IA64_SECREL64LSB
4266+ -- : BFD_RELOC_IA64_REL32MSB
4267+ -- : BFD_RELOC_IA64_REL32LSB
4268+ -- : BFD_RELOC_IA64_REL64MSB
4269+ -- : BFD_RELOC_IA64_REL64LSB
4270+ -- : BFD_RELOC_IA64_LTV32MSB
4271+ -- : BFD_RELOC_IA64_LTV32LSB
4272+ -- : BFD_RELOC_IA64_LTV64MSB
4273+ -- : BFD_RELOC_IA64_LTV64LSB
4274+ -- : BFD_RELOC_IA64_IPLTMSB
4275+ -- : BFD_RELOC_IA64_IPLTLSB
4276+ -- : BFD_RELOC_IA64_COPY
4277+ -- : BFD_RELOC_IA64_LTOFF22X
4278+ -- : BFD_RELOC_IA64_LDXMOV
4279+ -- : BFD_RELOC_IA64_TPREL14
4280+ -- : BFD_RELOC_IA64_TPREL22
4281+ -- : BFD_RELOC_IA64_TPREL64I
4282+ -- : BFD_RELOC_IA64_TPREL64MSB
4283+ -- : BFD_RELOC_IA64_TPREL64LSB
4284+ -- : BFD_RELOC_IA64_LTOFF_TPREL22
4285+ -- : BFD_RELOC_IA64_DTPMOD64MSB
4286+ -- : BFD_RELOC_IA64_DTPMOD64LSB
4287+ -- : BFD_RELOC_IA64_LTOFF_DTPMOD22
4288+ -- : BFD_RELOC_IA64_DTPREL14
4289+ -- : BFD_RELOC_IA64_DTPREL22
4290+ -- : BFD_RELOC_IA64_DTPREL64I
4291+ -- : BFD_RELOC_IA64_DTPREL32MSB
4292+ -- : BFD_RELOC_IA64_DTPREL32LSB
4293+ -- : BFD_RELOC_IA64_DTPREL64MSB
4294+ -- : BFD_RELOC_IA64_DTPREL64LSB
4295+ -- : BFD_RELOC_IA64_LTOFF_DTPREL22
4296+ Intel IA64 Relocations.
4297+
4298+ -- : BFD_RELOC_M68HC11_HI8
4299+ Motorola 68HC11 reloc. This is the 8 bit high part of an absolute
4300+ address.
4301+
4302+ -- : BFD_RELOC_M68HC11_LO8
4303+ Motorola 68HC11 reloc. This is the 8 bit low part of an absolute
4304+ address.
4305+
4306+ -- : BFD_RELOC_M68HC11_3B
4307+ Motorola 68HC11 reloc. This is the 3 bit of a value.
4308+
4309+ -- : BFD_RELOC_M68HC11_RL_JUMP
4310+ Motorola 68HC11 reloc. This reloc marks the beginning of a
4311+ jump/call instruction. It is used for linker relaxation to
4312+ correctly identify beginning of instruction and change some
4313+ branches to use PC-relative addressing mode.
4314+
4315+ -- : BFD_RELOC_M68HC11_RL_GROUP
4316+ Motorola 68HC11 reloc. This reloc marks a group of several
4317+ instructions that gcc generates and for which the linker
4318+ relaxation pass can modify and/or remove some of them.
4319+
4320+ -- : BFD_RELOC_M68HC11_LO16
4321+ Motorola 68HC11 reloc. This is the 16-bit lower part of an
4322+ address. It is used for 'call' instruction to specify the symbol
4323+ address without any special transformation (due to memory bank
4324+ window).
4325+
4326+ -- : BFD_RELOC_M68HC11_PAGE
4327+ Motorola 68HC11 reloc. This is a 8-bit reloc that specifies the
4328+ page number of an address. It is used by 'call' instruction to
4329+ specify the page number of the symbol.
4330+
4331+ -- : BFD_RELOC_M68HC11_24
4332+ Motorola 68HC11 reloc. This is a 24-bit reloc that represents the
4333+ address with a 16-bit value and a 8-bit page number. The symbol
4334+ address is transformed to follow the 16K memory bank of 68HC12
4335+ (seen as mapped in the window).
4336+
4337+ -- : BFD_RELOC_M68HC12_5B
4338+ Motorola 68HC12 reloc. This is the 5 bits of a value.
4339+
4340+ -- : BFD_RELOC_16C_NUM08
4341+ -- : BFD_RELOC_16C_NUM08_C
4342+ -- : BFD_RELOC_16C_NUM16
4343+ -- : BFD_RELOC_16C_NUM16_C
4344+ -- : BFD_RELOC_16C_NUM32
4345+ -- : BFD_RELOC_16C_NUM32_C
4346+ -- : BFD_RELOC_16C_DISP04
4347+ -- : BFD_RELOC_16C_DISP04_C
4348+ -- : BFD_RELOC_16C_DISP08
4349+ -- : BFD_RELOC_16C_DISP08_C
4350+ -- : BFD_RELOC_16C_DISP16
4351+ -- : BFD_RELOC_16C_DISP16_C
4352+ -- : BFD_RELOC_16C_DISP24
4353+ -- : BFD_RELOC_16C_DISP24_C
4354+ -- : BFD_RELOC_16C_DISP24a
4355+ -- : BFD_RELOC_16C_DISP24a_C
4356+ -- : BFD_RELOC_16C_REG04
4357+ -- : BFD_RELOC_16C_REG04_C
4358+ -- : BFD_RELOC_16C_REG04a
4359+ -- : BFD_RELOC_16C_REG04a_C
4360+ -- : BFD_RELOC_16C_REG14
4361+ -- : BFD_RELOC_16C_REG14_C
4362+ -- : BFD_RELOC_16C_REG16
4363+ -- : BFD_RELOC_16C_REG16_C
4364+ -- : BFD_RELOC_16C_REG20
4365+ -- : BFD_RELOC_16C_REG20_C
4366+ -- : BFD_RELOC_16C_ABS20
4367+ -- : BFD_RELOC_16C_ABS20_C
4368+ -- : BFD_RELOC_16C_ABS24
4369+ -- : BFD_RELOC_16C_ABS24_C
4370+ -- : BFD_RELOC_16C_IMM04
4371+ -- : BFD_RELOC_16C_IMM04_C
4372+ -- : BFD_RELOC_16C_IMM16
4373+ -- : BFD_RELOC_16C_IMM16_C
4374+ -- : BFD_RELOC_16C_IMM20
4375+ -- : BFD_RELOC_16C_IMM20_C
4376+ -- : BFD_RELOC_16C_IMM24
4377+ -- : BFD_RELOC_16C_IMM24_C
4378+ -- : BFD_RELOC_16C_IMM32
4379+ -- : BFD_RELOC_16C_IMM32_C
4380+ NS CR16C Relocations.
4381+
4382+ -- : BFD_RELOC_CRX_REL4
4383+ -- : BFD_RELOC_CRX_REL8
4384+ -- : BFD_RELOC_CRX_REL8_CMP
4385+ -- : BFD_RELOC_CRX_REL16
4386+ -- : BFD_RELOC_CRX_REL24
4387+ -- : BFD_RELOC_CRX_REL32
4388+ -- : BFD_RELOC_CRX_REGREL12
4389+ -- : BFD_RELOC_CRX_REGREL22
4390+ -- : BFD_RELOC_CRX_REGREL28
4391+ -- : BFD_RELOC_CRX_REGREL32
4392+ -- : BFD_RELOC_CRX_ABS16
4393+ -- : BFD_RELOC_CRX_ABS32
4394+ -- : BFD_RELOC_CRX_NUM8
4395+ -- : BFD_RELOC_CRX_NUM16
4396+ -- : BFD_RELOC_CRX_NUM32
4397+ -- : BFD_RELOC_CRX_IMM16
4398+ -- : BFD_RELOC_CRX_IMM32
4399+ -- : BFD_RELOC_CRX_SWITCH8
4400+ -- : BFD_RELOC_CRX_SWITCH16
4401+ -- : BFD_RELOC_CRX_SWITCH32
4402+ NS CRX Relocations.
4403+
4404+ -- : BFD_RELOC_CRIS_BDISP8
4405+ -- : BFD_RELOC_CRIS_UNSIGNED_5
4406+ -- : BFD_RELOC_CRIS_SIGNED_6
4407+ -- : BFD_RELOC_CRIS_UNSIGNED_6
4408+ -- : BFD_RELOC_CRIS_SIGNED_8
4409+ -- : BFD_RELOC_CRIS_UNSIGNED_8
4410+ -- : BFD_RELOC_CRIS_SIGNED_16
4411+ -- : BFD_RELOC_CRIS_UNSIGNED_16
4412+ -- : BFD_RELOC_CRIS_LAPCQ_OFFSET
4413+ -- : BFD_RELOC_CRIS_UNSIGNED_4
4414+ These relocs are only used within the CRIS assembler. They are not
4415+ (at present) written to any object files.
4416+
4417+ -- : BFD_RELOC_CRIS_COPY
4418+ -- : BFD_RELOC_CRIS_GLOB_DAT
4419+ -- : BFD_RELOC_CRIS_JUMP_SLOT
4420+ -- : BFD_RELOC_CRIS_RELATIVE
4421+ Relocs used in ELF shared libraries for CRIS.
4422+
4423+ -- : BFD_RELOC_CRIS_32_GOT
4424+ 32-bit offset to symbol-entry within GOT.
4425+
4426+ -- : BFD_RELOC_CRIS_16_GOT
4427+ 16-bit offset to symbol-entry within GOT.
4428+
4429+ -- : BFD_RELOC_CRIS_32_GOTPLT
4430+ 32-bit offset to symbol-entry within GOT, with PLT handling.
4431+
4432+ -- : BFD_RELOC_CRIS_16_GOTPLT
4433+ 16-bit offset to symbol-entry within GOT, with PLT handling.
4434+
4435+ -- : BFD_RELOC_CRIS_32_GOTREL
4436+ 32-bit offset to symbol, relative to GOT.
4437+
4438+ -- : BFD_RELOC_CRIS_32_PLT_GOTREL
4439+ 32-bit offset to symbol with PLT entry, relative to GOT.
4440+
4441+ -- : BFD_RELOC_CRIS_32_PLT_PCREL
4442+ 32-bit offset to symbol with PLT entry, relative to this
4443+ relocation.
4444+
4445+ -- : BFD_RELOC_860_COPY
4446+ -- : BFD_RELOC_860_GLOB_DAT
4447+ -- : BFD_RELOC_860_JUMP_SLOT
4448+ -- : BFD_RELOC_860_RELATIVE
4449+ -- : BFD_RELOC_860_PC26
4450+ -- : BFD_RELOC_860_PLT26
4451+ -- : BFD_RELOC_860_PC16
4452+ -- : BFD_RELOC_860_LOW0
4453+ -- : BFD_RELOC_860_SPLIT0
4454+ -- : BFD_RELOC_860_LOW1
4455+ -- : BFD_RELOC_860_SPLIT1
4456+ -- : BFD_RELOC_860_LOW2
4457+ -- : BFD_RELOC_860_SPLIT2
4458+ -- : BFD_RELOC_860_LOW3
4459+ -- : BFD_RELOC_860_LOGOT0
4460+ -- : BFD_RELOC_860_SPGOT0
4461+ -- : BFD_RELOC_860_LOGOT1
4462+ -- : BFD_RELOC_860_SPGOT1
4463+ -- : BFD_RELOC_860_LOGOTOFF0
4464+ -- : BFD_RELOC_860_SPGOTOFF0
4465+ -- : BFD_RELOC_860_LOGOTOFF1
4466+ -- : BFD_RELOC_860_SPGOTOFF1
4467+ -- : BFD_RELOC_860_LOGOTOFF2
4468+ -- : BFD_RELOC_860_LOGOTOFF3
4469+ -- : BFD_RELOC_860_LOPC
4470+ -- : BFD_RELOC_860_HIGHADJ
4471+ -- : BFD_RELOC_860_HAGOT
4472+ -- : BFD_RELOC_860_HAGOTOFF
4473+ -- : BFD_RELOC_860_HAPC
4474+ -- : BFD_RELOC_860_HIGH
4475+ -- : BFD_RELOC_860_HIGOT
4476+ -- : BFD_RELOC_860_HIGOTOFF
4477+ Intel i860 Relocations.
4478+
4479+ -- : BFD_RELOC_OPENRISC_ABS_26
4480+ -- : BFD_RELOC_OPENRISC_REL_26
4481+ OpenRISC Relocations.
4482+
4483+ -- : BFD_RELOC_H8_DIR16A8
4484+ -- : BFD_RELOC_H8_DIR16R8
4485+ -- : BFD_RELOC_H8_DIR24A8
4486+ -- : BFD_RELOC_H8_DIR24R8
4487+ -- : BFD_RELOC_H8_DIR32A16
4488+ H8 elf Relocations.
4489+
4490+ -- : BFD_RELOC_XSTORMY16_REL_12
4491+ -- : BFD_RELOC_XSTORMY16_12
4492+ -- : BFD_RELOC_XSTORMY16_24
4493+ -- : BFD_RELOC_XSTORMY16_FPTR16
4494+ Sony Xstormy16 Relocations.
4495+
4496+ -- : BFD_RELOC_VAX_GLOB_DAT
4497+ -- : BFD_RELOC_VAX_JMP_SLOT
4498+ -- : BFD_RELOC_VAX_RELATIVE
4499+ Relocations used by VAX ELF.
4500+
4501+ -- : BFD_RELOC_MSP430_10_PCREL
4502+ -- : BFD_RELOC_MSP430_16_PCREL
4503+ -- : BFD_RELOC_MSP430_16
4504+ -- : BFD_RELOC_MSP430_16_PCREL_BYTE
4505+ -- : BFD_RELOC_MSP430_16_BYTE
4506+ -- : BFD_RELOC_MSP430_2X_PCREL
4507+ -- : BFD_RELOC_MSP430_RL_PCREL
4508+ msp430 specific relocation codes
4509+
4510+ -- : BFD_RELOC_IQ2000_OFFSET_16
4511+ -- : BFD_RELOC_IQ2000_OFFSET_21
4512+ -- : BFD_RELOC_IQ2000_UHI16
4513+ IQ2000 Relocations.
4514+
4515+ -- : BFD_RELOC_XTENSA_RTLD
4516+ Special Xtensa relocation used only by PLT entries in ELF shared
4517+ objects to indicate that the runtime linker should set the value
4518+ to one of its own internal functions or data structures.
4519+
4520+ -- : BFD_RELOC_XTENSA_GLOB_DAT
4521+ -- : BFD_RELOC_XTENSA_JMP_SLOT
4522+ -- : BFD_RELOC_XTENSA_RELATIVE
4523+ Xtensa relocations for ELF shared objects.
4524+
4525+ -- : BFD_RELOC_XTENSA_PLT
4526+ Xtensa relocation used in ELF object files for symbols that may
4527+ require PLT entries. Otherwise, this is just a generic 32-bit
4528+ relocation.
4529+
4530+ -- : BFD_RELOC_XTENSA_DIFF8
4531+ -- : BFD_RELOC_XTENSA_DIFF16
4532+ -- : BFD_RELOC_XTENSA_DIFF32
4533+ Xtensa relocations to mark the difference of two local symbols.
4534+ These are only needed to support linker relaxation and can be
4535+ ignored when not relaxing. The field is set to the value of the
4536+ difference assuming no relaxation. The relocation encodes the
4537+ position of the first symbol so the linker can determine whether
4538+ to adjust the field value.
4539+
4540+ -- : BFD_RELOC_XTENSA_SLOT0_OP
4541+ -- : BFD_RELOC_XTENSA_SLOT1_OP
4542+ -- : BFD_RELOC_XTENSA_SLOT2_OP
4543+ -- : BFD_RELOC_XTENSA_SLOT3_OP
4544+ -- : BFD_RELOC_XTENSA_SLOT4_OP
4545+ -- : BFD_RELOC_XTENSA_SLOT5_OP
4546+ -- : BFD_RELOC_XTENSA_SLOT6_OP
4547+ -- : BFD_RELOC_XTENSA_SLOT7_OP
4548+ -- : BFD_RELOC_XTENSA_SLOT8_OP
4549+ -- : BFD_RELOC_XTENSA_SLOT9_OP
4550+ -- : BFD_RELOC_XTENSA_SLOT10_OP
4551+ -- : BFD_RELOC_XTENSA_SLOT11_OP
4552+ -- : BFD_RELOC_XTENSA_SLOT12_OP
4553+ -- : BFD_RELOC_XTENSA_SLOT13_OP
4554+ -- : BFD_RELOC_XTENSA_SLOT14_OP
4555+ Generic Xtensa relocations for instruction operands. Only the slot
4556+ number is encoded in the relocation. The relocation applies to the
4557+ last PC-relative immediate operand, or if there are no PC-relative
4558+ immediates, to the last immediate operand.
4559+
4560+ -- : BFD_RELOC_XTENSA_SLOT0_ALT
4561+ -- : BFD_RELOC_XTENSA_SLOT1_ALT
4562+ -- : BFD_RELOC_XTENSA_SLOT2_ALT
4563+ -- : BFD_RELOC_XTENSA_SLOT3_ALT
4564+ -- : BFD_RELOC_XTENSA_SLOT4_ALT
4565+ -- : BFD_RELOC_XTENSA_SLOT5_ALT
4566+ -- : BFD_RELOC_XTENSA_SLOT6_ALT
4567+ -- : BFD_RELOC_XTENSA_SLOT7_ALT
4568+ -- : BFD_RELOC_XTENSA_SLOT8_ALT
4569+ -- : BFD_RELOC_XTENSA_SLOT9_ALT
4570+ -- : BFD_RELOC_XTENSA_SLOT10_ALT
4571+ -- : BFD_RELOC_XTENSA_SLOT11_ALT
4572+ -- : BFD_RELOC_XTENSA_SLOT12_ALT
4573+ -- : BFD_RELOC_XTENSA_SLOT13_ALT
4574+ -- : BFD_RELOC_XTENSA_SLOT14_ALT
4575+ Alternate Xtensa relocations. Only the slot is encoded in the
4576+ relocation. The meaning of these relocations is opcode-specific.
4577+
4578+ -- : BFD_RELOC_XTENSA_OP0
4579+ -- : BFD_RELOC_XTENSA_OP1
4580+ -- : BFD_RELOC_XTENSA_OP2
4581+ Xtensa relocations for backward compatibility. These have all been
4582+ replaced by BFD_RELOC_XTENSA_SLOT0_OP.
4583+
4584+ -- : BFD_RELOC_XTENSA_ASM_EXPAND
4585+ Xtensa relocation to mark that the assembler expanded the
4586+ instructions from an original target. The expansion size is
4587+ encoded in the reloc size.
4588+
4589+ -- : BFD_RELOC_XTENSA_ASM_SIMPLIFY
4590+ Xtensa relocation to mark that the linker should simplify
4591+ assembler-expanded instructions. This is commonly used internally
4592+ by the linker after analysis of a BFD_RELOC_XTENSA_ASM_EXPAND.
4593+
4594+
4595+ typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
4596+
4597+2.11.0.2 `bfd_reloc_type_lookup'
4598+................................
4599+
4600+*Synopsis*
4601+ reloc_howto_type *bfd_reloc_type_lookup
4602+ (bfd *abfd, bfd_reloc_code_real_type code);
4603+ *Description*
4604+Return a pointer to a howto structure which, when invoked, will perform
4605+the relocation CODE on data from the architecture noted.
4606+
4607+2.11.0.3 `bfd_default_reloc_type_lookup'
4608+........................................
4609+
4610+*Synopsis*
4611+ reloc_howto_type *bfd_default_reloc_type_lookup
4612+ (bfd *abfd, bfd_reloc_code_real_type code);
4613+ *Description*
4614+Provides a default relocation lookup routine for any architecture.
4615+
4616+2.11.0.4 `bfd_get_reloc_code_name'
4617+..................................
4618+
4619+*Synopsis*
4620+ const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
4621+ *Description*
4622+Provides a printable name for the supplied relocation code. Useful
4623+mainly for printing error messages.
4624+
4625+2.11.0.5 `bfd_generic_relax_section'
4626+....................................
4627+
4628+*Synopsis*
4629+ bfd_boolean bfd_generic_relax_section
4630+ (bfd *abfd,
4631+ asection *section,
4632+ struct bfd_link_info *,
4633+ bfd_boolean *);
4634+ *Description*
4635+Provides default handling for relaxing for back ends which don't do
4636+relaxing.
4637+
4638+2.11.0.6 `bfd_generic_gc_sections'
4639+..................................
4640+
4641+*Synopsis*
4642+ bfd_boolean bfd_generic_gc_sections
4643+ (bfd *, struct bfd_link_info *);
4644+ *Description*
4645+Provides default handling for relaxing for back ends which don't do
4646+section gc - i.e., does nothing.
4647+
4648+2.11.0.7 `bfd_generic_merge_sections'
4649+.....................................
4650+
4651+*Synopsis*
4652+ bfd_boolean bfd_generic_merge_sections
4653+ (bfd *, struct bfd_link_info *);
4654+ *Description*
4655+Provides default handling for SEC_MERGE section merging for back ends
4656+which don't have SEC_MERGE support - i.e., does nothing.
4657+
4658+2.11.0.8 `bfd_generic_get_relocated_section_contents'
4659+.....................................................
4660+
4661+*Synopsis*
4662+ bfd_byte *bfd_generic_get_relocated_section_contents
4663+ (bfd *abfd,
4664+ struct bfd_link_info *link_info,
4665+ struct bfd_link_order *link_order,
4666+ bfd_byte *data,
4667+ bfd_boolean relocatable,
4668+ asymbol **symbols);
4669+ *Description*
4670+Provides default handling of relocation effort for back ends which
4671+can't be bothered to do it efficiently.
4672+
4673+
4674+File: bfd.info, Node: Core Files, Next: Targets, Prev: Relocations, Up: BFD front end
4675+
4676+2.12 Core files
4677+===============
4678+
4679+*Description*
4680+These are functions pertaining to core files.
4681+
4682+2.12.0.1 `bfd_core_file_failing_command'
4683+........................................
4684+
4685+*Synopsis*
4686+ const char *bfd_core_file_failing_command (bfd *abfd);
4687+ *Description*
4688+Return a read-only string explaining which program was running when it
4689+failed and produced the core file ABFD.
4690+
4691+2.12.0.2 `bfd_core_file_failing_signal'
4692+.......................................
4693+
4694+*Synopsis*
4695+ int bfd_core_file_failing_signal (bfd *abfd);
4696+ *Description*
4697+Returns the signal number which caused the core dump which generated
4698+the file the BFD ABFD is attached to.
4699+
4700+2.12.0.3 `core_file_matches_executable_p'
4701+.........................................
4702+
4703+*Synopsis*
4704+ bfd_boolean core_file_matches_executable_p
4705+ (bfd *core_bfd, bfd *exec_bfd);
4706+ *Description*
4707+Return `TRUE' if the core file attached to CORE_BFD was generated by a
4708+run of the executable file attached to EXEC_BFD, `FALSE' otherwise.
4709+
4710+
4711+File: bfd.info, Node: Targets, Next: Architectures, Prev: Core Files, Up: BFD front end
4712+
4713+2.13 Targets
4714+============
4715+
4716+*Description*
4717+Each port of BFD to a different machine requires the creation of a
4718+target back end. All the back end provides to the root part of BFD is a
4719+structure containing pointers to functions which perform certain low
4720+level operations on files. BFD translates the applications's requests
4721+through a pointer into calls to the back end routines.
4722+
4723+ When a file is opened with `bfd_openr', its format and target are
4724+unknown. BFD uses various mechanisms to determine how to interpret the
4725+file. The operations performed are:
4726+
4727+ * Create a BFD by calling the internal routine `_bfd_new_bfd', then
4728+ call `bfd_find_target' with the target string supplied to
4729+ `bfd_openr' and the new BFD pointer.
4730+
4731+ * If a null target string was provided to `bfd_find_target', look up
4732+ the environment variable `GNUTARGET' and use that as the target
4733+ string.
4734+
4735+ * If the target string is still `NULL', or the target string is
4736+ `default', then use the first item in the target vector as the
4737+ target type, and set `target_defaulted' in the BFD to cause
4738+ `bfd_check_format' to loop through all the targets. *Note
4739+ bfd_target::. *Note Formats::.
4740+
4741+ * Otherwise, inspect the elements in the target vector one by one,
4742+ until a match on target name is found. When found, use it.
4743+
4744+ * Otherwise return the error `bfd_error_invalid_target' to
4745+ `bfd_openr'.
4746+
4747+ * `bfd_openr' attempts to open the file using `bfd_open_file', and
4748+ returns the BFD.
4749+ Once the BFD has been opened and the target selected, the file
4750+format may be determined. This is done by calling `bfd_check_format' on
4751+the BFD with a suggested format. If `target_defaulted' has been set,
4752+each possible target type is tried to see if it recognizes the
4753+specified format. `bfd_check_format' returns `TRUE' when the caller
4754+guesses right.
4755+
4756+* Menu:
4757+
4758+* bfd_target::
4759+
4760+
4761+File: bfd.info, Node: bfd_target, Prev: Targets, Up: Targets
4762+
4763+2.13.1 bfd_target
4764+-----------------
4765+
4766+*Description*
4767+This structure contains everything that BFD knows about a target. It
4768+includes things like its byte order, name, and which routines to call
4769+to do various operations.
4770+
4771+ Every BFD points to a target structure with its `xvec' member.
4772+
4773+ The macros below are used to dispatch to functions through the
4774+`bfd_target' vector. They are used in a number of macros further down
4775+in `bfd.h', and are also used when calling various routines by hand
4776+inside the BFD implementation. The ARGLIST argument must be
4777+parenthesized; it contains all the arguments to the called function.
4778+
4779+ They make the documentation (more) unpleasant to read, so if someone
4780+wants to fix this and not break the above, please do.
4781+ #define BFD_SEND(bfd, message, arglist) \
4782+ ((*((bfd)->xvec->message)) arglist)
4783+
4784+ #ifdef DEBUG_BFD_SEND
4785+ #undef BFD_SEND
4786+ #define BFD_SEND(bfd, message, arglist) \
4787+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4788+ ((*((bfd)->xvec->message)) arglist) : \
4789+ (bfd_assert (__FILE__,__LINE__), NULL))
4790+ #endif
4791+ For operations which index on the BFD format:
4792+ #define BFD_SEND_FMT(bfd, message, arglist) \
4793+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
4794+
4795+ #ifdef DEBUG_BFD_SEND
4796+ #undef BFD_SEND_FMT
4797+ #define BFD_SEND_FMT(bfd, message, arglist) \
4798+ (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
4799+ (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
4800+ (bfd_assert (__FILE__,__LINE__), NULL))
4801+ #endif
4802+ This is the structure which defines the type of BFD this is. The
4803+`xvec' member of the struct `bfd' itself points here. Each module that
4804+implements access to a different target under BFD, defines one of these.
4805+
4806+ FIXME, these names should be rationalised with the names of the
4807+entry points which call them. Too bad we can't have one macro to define
4808+them both!
4809+ enum bfd_flavour
4810+ {
4811+ bfd_target_unknown_flavour,
4812+ bfd_target_aout_flavour,
4813+ bfd_target_coff_flavour,
4814+ bfd_target_ecoff_flavour,
4815+ bfd_target_xcoff_flavour,
4816+ bfd_target_elf_flavour,
4817+ bfd_target_ieee_flavour,
4818+ bfd_target_nlm_flavour,
4819+ bfd_target_oasys_flavour,
4820+ bfd_target_tekhex_flavour,
4821+ bfd_target_srec_flavour,
4822+ bfd_target_ihex_flavour,
4823+ bfd_target_som_flavour,
4824+ bfd_target_os9k_flavour,
4825+ bfd_target_versados_flavour,
4826+ bfd_target_msdos_flavour,
4827+ bfd_target_ovax_flavour,
4828+ bfd_target_evax_flavour,
4829+ bfd_target_mmo_flavour,
4830+ bfd_target_mach_o_flavour,
4831+ bfd_target_pef_flavour,
4832+ bfd_target_pef_xlib_flavour,
4833+ bfd_target_sym_flavour
4834+ };
4835+
4836+ enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
4837+
4838+ /* Forward declaration. */
4839+ typedef struct bfd_link_info _bfd_link_info;
4840+
4841+ typedef struct bfd_target
4842+ {
4843+ /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
4844+ char *name;
4845+
4846+ /* The "flavour" of a back end is a general indication about
4847+ the contents of a file. */
4848+ enum bfd_flavour flavour;
4849+
4850+ /* The order of bytes within the data area of a file. */
4851+ enum bfd_endian byteorder;
4852+
4853+ /* The order of bytes within the header parts of a file. */
4854+ enum bfd_endian header_byteorder;
4855+
4856+ /* A mask of all the flags which an executable may have set -
4857+ from the set `BFD_NO_FLAGS', `HAS_RELOC', ...`D_PAGED'. */
4858+ flagword object_flags;
4859+
4860+ /* A mask of all the flags which a section may have set - from
4861+ the set `SEC_NO_FLAGS', `SEC_ALLOC', ...`SET_NEVER_LOAD'. */
4862+ flagword section_flags;
4863+
4864+ /* The character normally found at the front of a symbol.
4865+ (if any), perhaps `_'. */
4866+ char symbol_leading_char;
4867+
4868+ /* The pad character for file names within an archive header. */
4869+ char ar_pad_char;
4870+
4871+ /* The maximum number of characters in an archive header. */
4872+ unsigned short ar_max_namelen;
4873+
4874+ /* Entries for byte swapping for data. These are different from the
4875+ other entry points, since they don't take a BFD as the first argument.
4876+ Certain other handlers could do the same. */
4877+ bfd_uint64_t (*bfd_getx64) (const void *);
4878+ bfd_int64_t (*bfd_getx_signed_64) (const void *);
4879+ void (*bfd_putx64) (bfd_uint64_t, void *);
4880+ bfd_vma (*bfd_getx32) (const void *);
4881+ bfd_signed_vma (*bfd_getx_signed_32) (const void *);
4882+ void (*bfd_putx32) (bfd_vma, void *);
4883+ bfd_vma (*bfd_getx16) (const void *);
4884+ bfd_signed_vma (*bfd_getx_signed_16) (const void *);
4885+ void (*bfd_putx16) (bfd_vma, void *);
4886+
4887+ /* Byte swapping for the headers. */
4888+ bfd_uint64_t (*bfd_h_getx64) (const void *);
4889+ bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
4890+ void (*bfd_h_putx64) (bfd_uint64_t, void *);
4891+ bfd_vma (*bfd_h_getx32) (const void *);
4892+ bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
4893+ void (*bfd_h_putx32) (bfd_vma, void *);
4894+ bfd_vma (*bfd_h_getx16) (const void *);
4895+ bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
4896+ void (*bfd_h_putx16) (bfd_vma, void *);
4897+
4898+ /* Format dependent routines: these are vectors of entry points
4899+ within the target vector structure, one for each format to check. */
4900+
4901+ /* Check the format of a file being read. Return a `bfd_target *' or zero. */
4902+ const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
4903+
4904+ /* Set the format of a file being written. */
4905+ bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
4906+
4907+ /* Write cached information into a file being written, at `bfd_close'. */
4908+ bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
4909+ The general target vector. These vectors are initialized using the
4910+BFD_JUMP_TABLE macros.
4911+
4912+ /* Generic entry points. */
4913+ #define BFD_JUMP_TABLE_GENERIC(NAME) \
4914+ NAME##_close_and_cleanup, \
4915+ NAME##_bfd_free_cached_info, \
4916+ NAME##_new_section_hook, \
4917+ NAME##_get_section_contents, \
4918+ NAME##_get_section_contents_in_window
4919+
4920+ /* Called when the BFD is being closed to do any necessary cleanup. */
4921+ bfd_boolean (*_close_and_cleanup) (bfd *);
4922+ /* Ask the BFD to free all cached information. */
4923+ bfd_boolean (*_bfd_free_cached_info) (bfd *);
4924+ /* Called when a new section is created. */
4925+ bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
4926+ /* Read the contents of a section. */
4927+ bfd_boolean (*_bfd_get_section_contents)
4928+ (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
4929+ bfd_boolean (*_bfd_get_section_contents_in_window)
4930+ (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
4931+
4932+ /* Entry points to copy private data. */
4933+ #define BFD_JUMP_TABLE_COPY(NAME) \
4934+ NAME##_bfd_copy_private_bfd_data, \
4935+ NAME##_bfd_merge_private_bfd_data, \
4936+ NAME##_bfd_copy_private_section_data, \
4937+ NAME##_bfd_copy_private_symbol_data, \
4938+ NAME##_bfd_copy_private_header_data, \
4939+ NAME##_bfd_set_private_flags, \
4940+ NAME##_bfd_print_private_bfd_data
4941+
4942+ /* Called to copy BFD general private data from one object file
4943+ to another. */
4944+ bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
4945+ /* Called to merge BFD general private data from one object file
4946+ to a common output file when linking. */
4947+ bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
4948+ /* Called to copy BFD private section data from one object file
4949+ to another. */
4950+ bfd_boolean (*_bfd_copy_private_section_data)
4951+ (bfd *, sec_ptr, bfd *, sec_ptr);
4952+ /* Called to copy BFD private symbol data from one symbol
4953+ to another. */
4954+ bfd_boolean (*_bfd_copy_private_symbol_data)
4955+ (bfd *, asymbol *, bfd *, asymbol *);
4956+ /* Called to copy BFD private header data from one object file
4957+ to another. */
4958+ bfd_boolean (*_bfd_copy_private_header_data)
4959+ (bfd *, bfd *);
4960+ /* Called to set private backend flags. */
4961+ bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
4962+
4963+ /* Called to print private BFD data. */
4964+ bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
4965+
4966+ /* Core file entry points. */
4967+ #define BFD_JUMP_TABLE_CORE(NAME) \
4968+ NAME##_core_file_failing_command, \
4969+ NAME##_core_file_failing_signal, \
4970+ NAME##_core_file_matches_executable_p
4971+
4972+ char * (*_core_file_failing_command) (bfd *);
4973+ int (*_core_file_failing_signal) (bfd *);
4974+ bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
4975+
4976+ /* Archive entry points. */
4977+ #define BFD_JUMP_TABLE_ARCHIVE(NAME) \
4978+ NAME##_slurp_armap, \
4979+ NAME##_slurp_extended_name_table, \
4980+ NAME##_construct_extended_name_table, \
4981+ NAME##_truncate_arname, \
4982+ NAME##_write_armap, \
4983+ NAME##_read_ar_hdr, \
4984+ NAME##_openr_next_archived_file, \
4985+ NAME##_get_elt_at_index, \
4986+ NAME##_generic_stat_arch_elt, \
4987+ NAME##_update_armap_timestamp
4988+
4989+ bfd_boolean (*_bfd_slurp_armap) (bfd *);
4990+ bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
4991+ bfd_boolean (*_bfd_construct_extended_name_table)
4992+ (bfd *, char **, bfd_size_type *, const char **);
4993+ void (*_bfd_truncate_arname) (bfd *, const char *, char *);
4994+ bfd_boolean (*write_armap)
4995+ (bfd *, unsigned int, struct orl *, unsigned int, int);
4996+ void * (*_bfd_read_ar_hdr_fn) (bfd *);
4997+ bfd * (*openr_next_archived_file) (bfd *, bfd *);
4998+ #define bfd_get_elt_at_index(b,i) BFD_SEND (b, _bfd_get_elt_at_index, (b,i))
4999+ bfd * (*_bfd_get_elt_at_index) (bfd *, symindex);
5000+ int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
5001+ bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
5002+
5003+ /* Entry points used for symbols. */
5004+ #define BFD_JUMP_TABLE_SYMBOLS(NAME) \
5005+ NAME##_get_symtab_upper_bound, \
5006+ NAME##_canonicalize_symtab, \
5007+ NAME##_make_empty_symbol, \
5008+ NAME##_print_symbol, \
5009+ NAME##_get_symbol_info, \
5010+ NAME##_bfd_is_local_label_name, \
5011+ NAME##_bfd_is_target_special_symbol, \
5012+ NAME##_get_lineno, \
5013+ NAME##_find_nearest_line, \
5014+ NAME##_bfd_make_debug_symbol, \
5015+ NAME##_read_minisymbols, \
5016+ NAME##_minisymbol_to_symbol
5017+
5018+ long (*_bfd_get_symtab_upper_bound) (bfd *);
5019+ long (*_bfd_canonicalize_symtab)
5020+ (bfd *, struct bfd_symbol **);
5021+ struct bfd_symbol *
5022+ (*_bfd_make_empty_symbol) (bfd *);
5023+ void (*_bfd_print_symbol)
5024+ (bfd *, void *, struct bfd_symbol *, bfd_print_symbol_type);
5025+ #define bfd_print_symbol(b,p,s,e) BFD_SEND (b, _bfd_print_symbol, (b,p,s,e))
5026+ void (*_bfd_get_symbol_info)
5027+ (bfd *, struct bfd_symbol *, symbol_info *);
5028+ #define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
5029+ bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
5030+ bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
5031+ alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
5032+ bfd_boolean (*_bfd_find_nearest_line)
5033+ (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
5034+ const char **, const char **, unsigned int *);
5035+ /* Back-door to allow format-aware applications to create debug symbols
5036+ while using BFD for everything else. Currently used by the assembler
5037+ when creating COFF files. */
5038+ asymbol * (*_bfd_make_debug_symbol)
5039+ (bfd *, void *, unsigned long size);
5040+ #define bfd_read_minisymbols(b, d, m, s) \
5041+ BFD_SEND (b, _read_minisymbols, (b, d, m, s))
5042+ long (*_read_minisymbols)
5043+ (bfd *, bfd_boolean, void **, unsigned int *);
5044+ #define bfd_minisymbol_to_symbol(b, d, m, f) \
5045+ BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
5046+ asymbol * (*_minisymbol_to_symbol)
5047+ (bfd *, bfd_boolean, const void *, asymbol *);
5048+
5049+ /* Routines for relocs. */
5050+ #define BFD_JUMP_TABLE_RELOCS(NAME) \
5051+ NAME##_get_reloc_upper_bound, \
5052+ NAME##_canonicalize_reloc, \
5053+ NAME##_bfd_reloc_type_lookup
5054+
5055+ long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
5056+ long (*_bfd_canonicalize_reloc)
5057+ (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
5058+ /* See documentation on reloc types. */
5059+ reloc_howto_type *
5060+ (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
5061+
5062+ /* Routines used when writing an object file. */
5063+ #define BFD_JUMP_TABLE_WRITE(NAME) \
5064+ NAME##_set_arch_mach, \
5065+ NAME##_set_section_contents
5066+
5067+ bfd_boolean (*_bfd_set_arch_mach)
5068+ (bfd *, enum bfd_architecture, unsigned long);
5069+ bfd_boolean (*_bfd_set_section_contents)
5070+ (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
5071+
5072+ /* Routines used by the linker. */
5073+ #define BFD_JUMP_TABLE_LINK(NAME) \
5074+ NAME##_sizeof_headers, \
5075+ NAME##_bfd_get_relocated_section_contents, \
5076+ NAME##_bfd_relax_section, \
5077+ NAME##_bfd_link_hash_table_create, \
5078+ NAME##_bfd_link_hash_table_free, \
5079+ NAME##_bfd_link_add_symbols, \
5080+ NAME##_bfd_link_just_syms, \
5081+ NAME##_bfd_final_link, \
5082+ NAME##_bfd_link_split_section, \
5083+ NAME##_bfd_gc_sections, \
5084+ NAME##_bfd_merge_sections, \
5085+ NAME##_bfd_is_group_section, \
5086+ NAME##_bfd_discard_group, \
5087+ NAME##_section_already_linked \
5088+
5089+ int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
5090+ bfd_byte * (*_bfd_get_relocated_section_contents)
5091+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
5092+ bfd_byte *, bfd_boolean, struct bfd_symbol **);
5093+
5094+ bfd_boolean (*_bfd_relax_section)
5095+ (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *);
5096+
5097+ /* Create a hash table for the linker. Different backends store
5098+ different information in this table. */
5099+ struct bfd_link_hash_table *
5100+ (*_bfd_link_hash_table_create) (bfd *);
5101+
5102+ /* Release the memory associated with the linker hash table. */
5103+ void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
5104+
5105+ /* Add symbols from this object file into the hash table. */
5106+ bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
5107+
5108+ /* Indicate that we are only retrieving symbol values from this section. */
5109+ void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
5110+
5111+ /* Do a link based on the link_order structures attached to each
5112+ section of the BFD. */
5113+ bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
5114+
5115+ /* Should this section be split up into smaller pieces during linking. */
5116+ bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
5117+
5118+ /* Remove sections that are not referenced from the output. */
5119+ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
5120+
5121+ /* Attempt to merge SEC_MERGE sections. */
5122+ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
5123+
5124+ /* Is this section a member of a group? */
5125+ bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
5126+
5127+ /* Discard members of a group. */
5128+ bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
5129+
5130+ /* Check if SEC has been already linked during a reloceatable or
5131+ final link. */
5132+ void (*_section_already_linked) (bfd *, struct bfd_section *);
5133+
5134+ /* Routines to handle dynamic symbols and relocs. */
5135+ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
5136+ NAME##_get_dynamic_symtab_upper_bound, \
5137+ NAME##_canonicalize_dynamic_symtab, \
5138+ NAME##_get_synthetic_symtab, \
5139+ NAME##_get_dynamic_reloc_upper_bound, \
5140+ NAME##_canonicalize_dynamic_reloc
5141+
5142+ /* Get the amount of memory required to hold the dynamic symbols. */
5143+ long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
5144+ /* Read in the dynamic symbols. */
5145+ long (*_bfd_canonicalize_dynamic_symtab)
5146+ (bfd *, struct bfd_symbol **);
5147+ /* Create synthetized symbols. */
5148+ long (*_bfd_get_synthetic_symtab)
5149+ (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
5150+ struct bfd_symbol **);
5151+ /* Get the amount of memory required to hold the dynamic relocs. */
5152+ long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
5153+ /* Read in the dynamic relocs. */
5154+ long (*_bfd_canonicalize_dynamic_reloc)
5155+ (bfd *, arelent **, struct bfd_symbol **);
5156+ A pointer to an alternative bfd_target in case the current one is not
5157+satisfactory. This can happen when the target cpu supports both big
5158+and little endian code, and target chosen by the linker has the wrong
5159+endianness. The function open_output() in ld/ldlang.c uses this field
5160+to find an alternative output format that is suitable.
5161+ /* Opposite endian version of this target. */
5162+ const struct bfd_target * alternative_target;
5163+
5164+ /* Data for use by back-end routines, which isn't
5165+ generic enough to belong in this structure. */
5166+ const void *backend_data;
5167+
5168+ } bfd_target;
5169+
5170+2.13.1.1 `bfd_set_default_target'
5171+.................................
5172+
5173+*Synopsis*
5174+ bfd_boolean bfd_set_default_target (const char *name);
5175+ *Description*
5176+Set the default target vector to use when recognizing a BFD. This
5177+takes the name of the target, which may be a BFD target name or a
5178+configuration triplet.
5179+
5180+2.13.1.2 `bfd_find_target'
5181+..........................
5182+
5183+*Synopsis*
5184+ const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
5185+ *Description*
5186+Return a pointer to the transfer vector for the object target named
5187+TARGET_NAME. If TARGET_NAME is `NULL', choose the one in the
5188+environment variable `GNUTARGET'; if that is null or not defined, then
5189+choose the first entry in the target list. Passing in the string
5190+"default" or setting the environment variable to "default" will cause
5191+the first entry in the target list to be returned, and
5192+"target_defaulted" will be set in the BFD. This causes
5193+`bfd_check_format' to loop over all the targets to find the one that
5194+matches the file being read.
5195+
5196+2.13.1.3 `bfd_target_list'
5197+..........................
5198+
5199+*Synopsis*
5200+ const char ** bfd_target_list (void);
5201+ *Description*
5202+Return a freshly malloced NULL-terminated vector of the names of all
5203+the valid BFD targets. Do not modify the names.
5204+
5205+2.13.1.4 `bfd_seach_for_target'
5206+...............................
5207+
5208+*Synopsis*
5209+ const bfd_target *bfd_search_for_target
5210+ (int (*search_func) (const bfd_target *, void *),
5211+ void *);
5212+ *Description*
5213+Return a pointer to the first transfer vector in the list of transfer
5214+vectors maintained by BFD that produces a non-zero result when passed
5215+to the function SEARCH_FUNC. The parameter DATA is passed, unexamined,
5216+to the search function.
5217+
5218+
5219+File: bfd.info, Node: Architectures, Next: Opening and Closing, Prev: Targets, Up: BFD front end
5220+
5221+2.14 Architectures
5222+==================
5223+
5224+BFD keeps one atom in a BFD describing the architecture of the data
5225+attached to the BFD: a pointer to a `bfd_arch_info_type'.
5226+
5227+ Pointers to structures can be requested independently of a BFD so
5228+that an architecture's information can be interrogated without access
5229+to an open BFD.
5230+
5231+ The architecture information is provided by each architecture
5232+package. The set of default architectures is selected by the macro
5233+`SELECT_ARCHITECTURES'. This is normally set up in the
5234+`config/TARGET.mt' file of your choice. If the name is not defined,
5235+then all the architectures supported are included.
5236+
5237+ When BFD starts up, all the architectures are called with an
5238+initialize method. It is up to the architecture back end to insert as
5239+many items into the list of architectures as it wants to; generally
5240+this would be one for each machine and one for the default case (an
5241+item with a machine field of 0).
5242+
5243+ BFD's idea of an architecture is implemented in `archures.c'.
5244+
5245+2.14.1 bfd_architecture
5246+-----------------------
5247+
5248+*Description*
5249+This enum gives the object file's CPU architecture, in a global
5250+sense--i.e., what processor family does it belong to? Another field
5251+indicates which processor within the family is in use. The machine
5252+gives a number which distinguishes different versions of the
5253+architecture, containing, for example, 2 and 3 for Intel i960 KA and
5254+i960 KB, and 68020 and 68030 for Motorola 68020 and 68030.
5255+ enum bfd_architecture
5256+ {
5257+ bfd_arch_unknown, /* File arch not known. */
5258+ bfd_arch_obscure, /* Arch known, not one of these. */
5259+ bfd_arch_m68k, /* Motorola 68xxx */
5260+ #define bfd_mach_m68000 1
5261+ #define bfd_mach_m68008 2
5262+ #define bfd_mach_m68010 3
5263+ #define bfd_mach_m68020 4
5264+ #define bfd_mach_m68030 5
5265+ #define bfd_mach_m68040 6
5266+ #define bfd_mach_m68060 7
5267+ #define bfd_mach_cpu32 8
5268+ #define bfd_mach_mcf5200 9
5269+ #define bfd_mach_mcf5206e 10
5270+ #define bfd_mach_mcf5307 11
5271+ #define bfd_mach_mcf5407 12
5272+ #define bfd_mach_mcf528x 13
5273+ #define bfd_mach_mcfv4e 14
5274+ #define bfd_mach_mcf521x 15
5275+ #define bfd_mach_mcf5249 16
5276+ #define bfd_mach_mcf547x 17
5277+ #define bfd_mach_mcf548x 18
5278+ bfd_arch_vax, /* DEC Vax */
5279+ bfd_arch_i960, /* Intel 960 */
5280+ /* The order of the following is important.
5281+ lower number indicates a machine type that
5282+ only accepts a subset of the instructions
5283+ available to machines with higher numbers.
5284+ The exception is the "ca", which is
5285+ incompatible with all other machines except
5286+ "core". */
5287+
5288+ #define bfd_mach_i960_core 1
5289+ #define bfd_mach_i960_ka_sa 2
5290+ #define bfd_mach_i960_kb_sb 3
5291+ #define bfd_mach_i960_mc 4
5292+ #define bfd_mach_i960_xa 5
5293+ #define bfd_mach_i960_ca 6
5294+ #define bfd_mach_i960_jx 7
5295+ #define bfd_mach_i960_hx 8
5296+
5297+ bfd_arch_or32, /* OpenRISC 32 */
5298+
5299+ bfd_arch_a29k, /* AMD 29000 */
5300+ bfd_arch_sparc, /* SPARC */
5301+ #define bfd_mach_sparc 1
5302+ /* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
5303+ #define bfd_mach_sparc_sparclet 2
5304+ #define bfd_mach_sparc_sparclite 3
5305+ #define bfd_mach_sparc_v8plus 4
5306+ #define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
5307+ #define bfd_mach_sparc_sparclite_le 6
5308+ #define bfd_mach_sparc_v9 7
5309+ #define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
5310+ #define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
5311+ #define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
5312+ /* Nonzero if MACH has the v9 instruction set. */
5313+ #define bfd_mach_sparc_v9_p(mach) \
5314+ ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
5315+ && (mach) != bfd_mach_sparc_sparclite_le)
5316+ /* Nonzero if MACH is a 64 bit sparc architecture. */
5317+ #define bfd_mach_sparc_64bit_p(mach) \
5318+ ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
5319+ bfd_arch_mips, /* MIPS Rxxxx */
5320+ #define bfd_mach_mips3000 3000
5321+ #define bfd_mach_mips3900 3900
5322+ #define bfd_mach_mips4000 4000
5323+ #define bfd_mach_mips4010 4010
5324+ #define bfd_mach_mips4100 4100
5325+ #define bfd_mach_mips4111 4111
5326+ #define bfd_mach_mips4120 4120
5327+ #define bfd_mach_mips4300 4300
5328+ #define bfd_mach_mips4400 4400
5329+ #define bfd_mach_mips4600 4600
5330+ #define bfd_mach_mips4650 4650
5331+ #define bfd_mach_mips5000 5000
5332+ #define bfd_mach_mips5400 5400
5333+ #define bfd_mach_mips5500 5500
5334+ #define bfd_mach_mips6000 6000
5335+ #define bfd_mach_mips7000 7000
5336+ #define bfd_mach_mips8000 8000
5337+ #define bfd_mach_mips9000 9000
5338+ #define bfd_mach_mips10000 10000
5339+ #define bfd_mach_mips12000 12000
5340+ #define bfd_mach_mips16 16
5341+ #define bfd_mach_mips5 5
5342+ #define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
5343+ #define bfd_mach_mipsisa32 32
5344+ #define bfd_mach_mipsisa32r2 33
5345+ #define bfd_mach_mipsisa64 64
5346+ #define bfd_mach_mipsisa64r2 65
5347+ bfd_arch_i386, /* Intel 386 */
5348+ #define bfd_mach_i386_i386 1
5349+ #define bfd_mach_i386_i8086 2
5350+ #define bfd_mach_i386_i386_intel_syntax 3
5351+ #define bfd_mach_x86_64 64
5352+ #define bfd_mach_x86_64_intel_syntax 65
5353+ bfd_arch_we32k, /* AT&T WE32xxx */
5354+ bfd_arch_tahoe, /* CCI/Harris Tahoe */
5355+ bfd_arch_i860, /* Intel 860 */
5356+ bfd_arch_i370, /* IBM 360/370 Mainframes */
5357+ bfd_arch_romp, /* IBM ROMP PC/RT */
5358+ bfd_arch_alliant, /* Alliant */
5359+ bfd_arch_convex, /* Convex */
5360+ bfd_arch_m88k, /* Motorola 88xxx */
5361+ bfd_arch_m98k, /* Motorola 98xxx */
5362+ bfd_arch_pyramid, /* Pyramid Technology */
5363+ bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300) */
5364+ #define bfd_mach_h8300 1
5365+ #define bfd_mach_h8300h 2
5366+ #define bfd_mach_h8300s 3
5367+ #define bfd_mach_h8300hn 4
5368+ #define bfd_mach_h8300sn 5
5369+ #define bfd_mach_h8300sx 6
5370+ #define bfd_mach_h8300sxn 7
5371+ bfd_arch_pdp11, /* DEC PDP-11 */
5372+ bfd_arch_powerpc, /* PowerPC */
5373+ #define bfd_mach_ppc 32
5374+ #define bfd_mach_ppc64 64
5375+ #define bfd_mach_ppc_403 403
5376+ #define bfd_mach_ppc_403gc 4030
5377+ #define bfd_mach_ppc_505 505
5378+ #define bfd_mach_ppc_601 601
5379+ #define bfd_mach_ppc_602 602
5380+ #define bfd_mach_ppc_603 603
5381+ #define bfd_mach_ppc_ec603e 6031
5382+ #define bfd_mach_ppc_604 604
5383+ #define bfd_mach_ppc_620 620
5384+ #define bfd_mach_ppc_630 630
5385+ #define bfd_mach_ppc_750 750
5386+ #define bfd_mach_ppc_860 860
5387+ #define bfd_mach_ppc_a35 35
5388+ #define bfd_mach_ppc_rs64ii 642
5389+ #define bfd_mach_ppc_rs64iii 643
5390+ #define bfd_mach_ppc_7400 7400
5391+ #define bfd_mach_ppc_e500 500
5392+ bfd_arch_rs6000, /* IBM RS/6000 */
5393+ #define bfd_mach_rs6k 6000
5394+ #define bfd_mach_rs6k_rs1 6001
5395+ #define bfd_mach_rs6k_rsc 6003
5396+ #define bfd_mach_rs6k_rs2 6002
5397+ bfd_arch_hppa, /* HP PA RISC */
5398+ #define bfd_mach_hppa10 10
5399+ #define bfd_mach_hppa11 11
5400+ #define bfd_mach_hppa20 20
5401+ #define bfd_mach_hppa20w 25
5402+ bfd_arch_d10v, /* Mitsubishi D10V */
5403+ #define bfd_mach_d10v 1
5404+ #define bfd_mach_d10v_ts2 2
5405+ #define bfd_mach_d10v_ts3 3
5406+ bfd_arch_d30v, /* Mitsubishi D30V */
5407+ bfd_arch_dlx, /* DLX */
5408+ bfd_arch_m68hc11, /* Motorola 68HC11 */
5409+ bfd_arch_m68hc12, /* Motorola 68HC12 */
5410+ #define bfd_mach_m6812_default 0
5411+ #define bfd_mach_m6812 1
5412+ #define bfd_mach_m6812s 2
5413+ bfd_arch_z8k, /* Zilog Z8000 */
5414+ #define bfd_mach_z8001 1
5415+ #define bfd_mach_z8002 2
5416+ bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */
5417+ bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */
5418+ #define bfd_mach_sh 1
5419+ #define bfd_mach_sh2 0x20
5420+ #define bfd_mach_sh_dsp 0x2d
5421+ #define bfd_mach_sh2a 0x2a
5422+ #define bfd_mach_sh2a_nofpu 0x2b
5423+ #define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
5424+ #define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
5425+ #define bfd_mach_sh2a_or_sh4 0x2a3
5426+ #define bfd_mach_sh2a_or_sh3e 0x2a4
5427+ #define bfd_mach_sh2e 0x2e
5428+ #define bfd_mach_sh3 0x30
5429+ #define bfd_mach_sh3_nommu 0x31
5430+ #define bfd_mach_sh3_dsp 0x3d
5431+ #define bfd_mach_sh3e 0x3e
5432+ #define bfd_mach_sh4 0x40
5433+ #define bfd_mach_sh4_nofpu 0x41
5434+ #define bfd_mach_sh4_nommu_nofpu 0x42
5435+ #define bfd_mach_sh4a 0x4a
5436+ #define bfd_mach_sh4a_nofpu 0x4b
5437+ #define bfd_mach_sh4al_dsp 0x4d
5438+ #define bfd_mach_sh5 0x50
5439+ bfd_arch_alpha, /* Dec Alpha */
5440+ #define bfd_mach_alpha_ev4 0x10
5441+ #define bfd_mach_alpha_ev5 0x20
5442+ #define bfd_mach_alpha_ev6 0x30
5443+ bfd_arch_arm, /* Advanced Risc Machines ARM. */
5444+ #define bfd_mach_arm_unknown 0
5445+ #define bfd_mach_arm_2 1
5446+ #define bfd_mach_arm_2a 2
5447+ #define bfd_mach_arm_3 3
5448+ #define bfd_mach_arm_3M 4
5449+ #define bfd_mach_arm_4 5
5450+ #define bfd_mach_arm_4T 6
5451+ #define bfd_mach_arm_5 7
5452+ #define bfd_mach_arm_5T 8
5453+ #define bfd_mach_arm_5TE 9
5454+ #define bfd_mach_arm_XScale 10
5455+ #define bfd_mach_arm_ep9312 11
5456+ #define bfd_mach_arm_iWMMXt 12
5457+ bfd_arch_ns32k, /* National Semiconductors ns32000 */
5458+ bfd_arch_w65, /* WDC 65816 */
5459+ bfd_arch_tic30, /* Texas Instruments TMS320C30 */
5460+ bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */
5461+ #define bfd_mach_tic3x 30
5462+ #define bfd_mach_tic4x 40
5463+ bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
5464+ bfd_arch_tic80, /* TI TMS320c80 (MVP) */
5465+ bfd_arch_v850, /* NEC V850 */
5466+ #define bfd_mach_v850 1
5467+ #define bfd_mach_v850e 'E'
5468+ #define bfd_mach_v850e1 '1'
5469+ bfd_arch_arc, /* ARC Cores */
5470+ #define bfd_mach_arc_5 5
5471+ #define bfd_mach_arc_6 6
5472+ #define bfd_mach_arc_7 7
5473+ #define bfd_mach_arc_8 8
5474+ bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */
5475+ #define bfd_mach_m32r 1 /* For backwards compatibility. */
5476+ #define bfd_mach_m32rx 'x'
5477+ #define bfd_mach_m32r2 '2'
5478+ bfd_arch_mn10200, /* Matsushita MN10200 */
5479+ bfd_arch_mn10300, /* Matsushita MN10300 */
5480+ #define bfd_mach_mn10300 300
5481+ #define bfd_mach_am33 330
5482+ #define bfd_mach_am33_2 332
5483+ bfd_arch_fr30,
5484+ #define bfd_mach_fr30 0x46523330
5485+ bfd_arch_frv,
5486+ #define bfd_mach_frv 1
5487+ #define bfd_mach_frvsimple 2
5488+ #define bfd_mach_fr300 300
5489+ #define bfd_mach_fr400 400
5490+ #define bfd_mach_fr450 450
5491+ #define bfd_mach_frvtomcat 499 /* fr500 prototype */
5492+ #define bfd_mach_fr500 500
5493+ #define bfd_mach_fr550 550
5494+ bfd_arch_mcore,
5495+ bfd_arch_ia64, /* HP/Intel ia64 */
5496+ #define bfd_mach_ia64_elf64 64
5497+ #define bfd_mach_ia64_elf32 32
5498+ bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
5499+ #define bfd_mach_ip2022 1
5500+ #define bfd_mach_ip2022ext 2
5501+ bfd_arch_iq2000, /* Vitesse IQ2000. */
5502+ #define bfd_mach_iq2000 1
5503+ #define bfd_mach_iq10 2
5504+ bfd_arch_pj,
5505+ bfd_arch_avr, /* Atmel AVR microcontrollers. */
5506+ #define bfd_mach_avr1 1
5507+ #define bfd_mach_avr2 2
5508+ #define bfd_mach_avr3 3
5509+ #define bfd_mach_avr4 4
5510+ #define bfd_mach_avr5 5
5511+ bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
5512+ #define bfd_mach_cr16c 1
5513+ bfd_arch_crx, /* National Semiconductor CRX. */
5514+ #define bfd_mach_crx 1
5515+ bfd_arch_cris, /* Axis CRIS */
5516+ #define bfd_mach_cris_v0_v10 255
5517+ #define bfd_mach_cris_v32 32
5518+ #define bfd_mach_cris_v10_v32 1032
5519+ bfd_arch_s390, /* IBM s390 */
5520+ #define bfd_mach_s390_31 31
5521+ #define bfd_mach_s390_64 64
5522+ bfd_arch_openrisc, /* OpenRISC */
5523+ bfd_arch_mmix, /* Donald Knuth's educational processor. */
5524+ bfd_arch_xstormy16,
5525+ #define bfd_mach_xstormy16 1
5526+ bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
5527+ #define bfd_mach_msp11 11
5528+ #define bfd_mach_msp110 110
5529+ #define bfd_mach_msp12 12
5530+ #define bfd_mach_msp13 13
5531+ #define bfd_mach_msp14 14
5532+ #define bfd_mach_msp15 15
5533+ #define bfd_mach_msp16 16
5534+ #define bfd_mach_msp31 31
5535+ #define bfd_mach_msp32 32
5536+ #define bfd_mach_msp33 33
5537+ #define bfd_mach_msp41 41
5538+ #define bfd_mach_msp42 42
5539+ #define bfd_mach_msp43 43
5540+ #define bfd_mach_msp44 44
5541+ bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
5542+ #define bfd_mach_xtensa 1
5543+ bfd_arch_maxq, /* Dallas MAXQ 10/20 */
5544+ #define bfd_mach_maxq10 10
5545+ #define bfd_mach_maxq20 20
5546+ bfd_arch_last
5547+ };
5548+
5549+2.14.2 bfd_arch_info
5550+--------------------
5551+
5552+*Description*
5553+This structure contains information on architectures for use within BFD.
5554+
5555+ typedef struct bfd_arch_info
5556+ {
5557+ int bits_per_word;
5558+ int bits_per_address;
5559+ int bits_per_byte;
5560+ enum bfd_architecture arch;
5561+ unsigned long mach;
5562+ const char *arch_name;
5563+ const char *printable_name;
5564+ unsigned int section_align_power;
5565+ /* TRUE if this is the default machine for the architecture.
5566+ The default arch should be the first entry for an arch so that
5567+ all the entries for that arch can be accessed via `next'. */
5568+ bfd_boolean the_default;
5569+ const struct bfd_arch_info * (*compatible)
5570+ (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
5571+
5572+ bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
5573+
5574+ const struct bfd_arch_info *next;
5575+ }
5576+ bfd_arch_info_type;
5577+
5578+2.14.2.1 `bfd_printable_name'
5579+.............................
5580+
5581+*Synopsis*
5582+ const char *bfd_printable_name (bfd *abfd);
5583+ *Description*
5584+Return a printable string representing the architecture and machine
5585+from the pointer to the architecture info structure.
5586+
5587+2.14.2.2 `bfd_scan_arch'
5588+........................
5589+
5590+*Synopsis*
5591+ const bfd_arch_info_type *bfd_scan_arch (const char *string);
5592+ *Description*
5593+Figure out if BFD supports any cpu which could be described with the
5594+name STRING. Return a pointer to an `arch_info' structure if a machine
5595+is found, otherwise NULL.
5596+
5597+2.14.2.3 `bfd_arch_list'
5598+........................
5599+
5600+*Synopsis*
5601+ const char **bfd_arch_list (void);
5602+ *Description*
5603+Return a freshly malloced NULL-terminated vector of the names of all
5604+the valid BFD architectures. Do not modify the names.
5605+
5606+2.14.2.4 `bfd_arch_get_compatible'
5607+..................................
5608+
5609+*Synopsis*
5610+ const bfd_arch_info_type *bfd_arch_get_compatible
5611+ (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
5612+ *Description*
5613+Determine whether two BFDs' architectures and machine types are
5614+compatible. Calculates the lowest common denominator between the two
5615+architectures and machine types implied by the BFDs and returns a
5616+pointer to an `arch_info' structure describing the compatible machine.
5617+
5618+2.14.2.5 `bfd_default_arch_struct'
5619+..................................
5620+
5621+*Description*
5622+The `bfd_default_arch_struct' is an item of `bfd_arch_info_type' which
5623+has been initialized to a fairly generic state. A BFD starts life by
5624+pointing to this structure, until the correct back end has determined
5625+the real architecture of the file.
5626+ extern const bfd_arch_info_type bfd_default_arch_struct;
5627+
5628+2.14.2.6 `bfd_set_arch_info'
5629+............................
5630+
5631+*Synopsis*
5632+ void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
5633+ *Description*
5634+Set the architecture info of ABFD to ARG.
5635+
5636+2.14.2.7 `bfd_default_set_arch_mach'
5637+....................................
5638+
5639+*Synopsis*
5640+ bfd_boolean bfd_default_set_arch_mach
5641+ (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
5642+ *Description*
5643+Set the architecture and machine type in BFD ABFD to ARCH and MACH.
5644+Find the correct pointer to a structure and insert it into the
5645+`arch_info' pointer.
5646+
5647+2.14.2.8 `bfd_get_arch'
5648+.......................
5649+
5650+*Synopsis*
5651+ enum bfd_architecture bfd_get_arch (bfd *abfd);
5652+ *Description*
5653+Return the enumerated type which describes the BFD ABFD's architecture.
5654+
5655+2.14.2.9 `bfd_get_mach'
5656+.......................
5657+
5658+*Synopsis*
5659+ unsigned long bfd_get_mach (bfd *abfd);
5660+ *Description*
5661+Return the long type which describes the BFD ABFD's machine.
5662+
5663+2.14.2.10 `bfd_arch_bits_per_byte'
5664+..................................
5665+
5666+*Synopsis*
5667+ unsigned int bfd_arch_bits_per_byte (bfd *abfd);
5668+ *Description*
5669+Return the number of bits in one of the BFD ABFD's architecture's bytes.
5670+
5671+2.14.2.11 `bfd_arch_bits_per_address'
5672+.....................................
5673+
5674+*Synopsis*
5675+ unsigned int bfd_arch_bits_per_address (bfd *abfd);
5676+ *Description*
5677+Return the number of bits in one of the BFD ABFD's architecture's
5678+addresses.
5679+
5680+2.14.2.12 `bfd_default_compatible'
5681+..................................
5682+
5683+*Synopsis*
5684+ const bfd_arch_info_type *bfd_default_compatible
5685+ (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
5686+ *Description*
5687+The default function for testing for compatibility.
5688+
5689+2.14.2.13 `bfd_default_scan'
5690+............................
5691+
5692+*Synopsis*
5693+ bfd_boolean bfd_default_scan
5694+ (const struct bfd_arch_info *info, const char *string);
5695+ *Description*
5696+The default function for working out whether this is an architecture
5697+hit and a machine hit.
5698+
5699+2.14.2.14 `bfd_get_arch_info'
5700+.............................
5701+
5702+*Synopsis*
5703+ const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
5704+ *Description*
5705+Return the architecture info struct in ABFD.
5706+
5707+2.14.2.15 `bfd_lookup_arch'
5708+...........................
5709+
5710+*Synopsis*
5711+ const bfd_arch_info_type *bfd_lookup_arch
5712+ (enum bfd_architecture arch, unsigned long machine);
5713+ *Description*
5714+Look for the architecture info structure which matches the arguments
5715+ARCH and MACHINE. A machine of 0 matches the machine/architecture
5716+structure which marks itself as the default.
5717+
5718+2.14.2.16 `bfd_printable_arch_mach'
5719+...................................
5720+
5721+*Synopsis*
5722+ const char *bfd_printable_arch_mach
5723+ (enum bfd_architecture arch, unsigned long machine);
5724+ *Description*
5725+Return a printable string representing the architecture and machine
5726+type.
5727+
5728+ This routine is depreciated.
5729+
5730+2.14.2.17 `bfd_octets_per_byte'
5731+...............................
5732+
5733+*Synopsis*
5734+ unsigned int bfd_octets_per_byte (bfd *abfd);
5735+ *Description*
5736+Return the number of octets (8-bit quantities) per target byte (minimum
5737+addressable unit). In most cases, this will be one, but some DSP
5738+targets have 16, 32, or even 48 bits per byte.
5739+
5740+2.14.2.18 `bfd_arch_mach_octets_per_byte'
5741+.........................................
5742+
5743+*Synopsis*
5744+ unsigned int bfd_arch_mach_octets_per_byte
5745+ (enum bfd_architecture arch, unsigned long machine);
5746+ *Description*
5747+See bfd_octets_per_byte.
5748+
5749+ This routine is provided for those cases where a bfd * is not
5750+available
5751+
5752+
5753+File: bfd.info, Node: Opening and Closing, Next: Internal, Prev: Architectures, Up: BFD front end
5754+
5755+2.15 Opening and closing BFDs
5756+=============================
5757+
5758+2.15.0.1 `bfd_openr'
5759+....................
5760+
5761+*Synopsis*
5762+ bfd *bfd_openr (const char *filename, const char *target);
5763+ *Description*
5764+Open the file FILENAME (using `fopen') with the target TARGET. Return
5765+a pointer to the created BFD.
5766+
5767+ Calls `bfd_find_target', so TARGET is interpreted as by that
5768+function.
5769+
5770+ If `NULL' is returned then an error has occured. Possible errors
5771+are `bfd_error_no_memory', `bfd_error_invalid_target' or `system_call'
5772+error.
5773+
5774+2.15.0.2 `bfd_fdopenr'
5775+......................
5776+
5777+*Synopsis*
5778+ bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
5779+ *Description*
5780+`bfd_fdopenr' is to `bfd_fopenr' much like `fdopen' is to `fopen'. It
5781+opens a BFD on a file already described by the FD supplied.
5782+
5783+ When the file is later `bfd_close'd, the file descriptor will be
5784+closed. If the caller desires that this file descriptor be cached by
5785+BFD (opened as needed, closed as needed to free descriptors for other
5786+opens), with the supplied FD used as an initial file descriptor (but
5787+subject to closure at any time), call bfd_set_cacheable(bfd, 1) on the
5788+returned BFD. The default is to assume no caching; the file descriptor
5789+will remain open until `bfd_close', and will not be affected by BFD
5790+operations on other files.
5791+
5792+ Possible errors are `bfd_error_no_memory',
5793+`bfd_error_invalid_target' and `bfd_error_system_call'.
5794+
5795+2.15.0.3 `bfd_openstreamr'
5796+..........................
5797+
5798+*Synopsis*
5799+ bfd *bfd_openstreamr (const char *, const char *, void *);
5800+ *Description*
5801+Open a BFD for read access on an existing stdio stream. When the BFD
5802+is passed to `bfd_close', the stream will be closed.
5803+
5804+2.15.0.4 `bfd_openr_iovec'
5805+..........................
5806+
5807+*Synopsis*
5808+ bfd *bfd_openr_iovec (const char *filename, const char *target,
5809+ void *(*open) (struct bfd *nbfd,
5810+ void *open_closure),
5811+ void *open_closure,
5812+ file_ptr (*pread) (struct bfd *nbfd,
5813+ void *stream,
5814+ void *buf,
5815+ file_ptr nbytes,
5816+ file_ptr offset),
5817+ int (*close) (struct bfd *nbfd,
5818+ void *stream));
5819+ *Description*
5820+Create and return a BFD backed by a read-only STREAM. The STREAM is
5821+created using OPEN, accessed using PREAD and destroyed using CLOSE.
5822+
5823+ Calls `bfd_find_target', so TARGET is interpreted as by that
5824+function.
5825+
5826+ Calls OPEN (which can call `bfd_zalloc' and `bfd_get_filename') to
5827+obtain the read-only stream backing the BFD. OPEN either succeeds
5828+returning the non-`NULL' STREAM, or fails returning `NULL' (setting
5829+`bfd_error').
5830+
5831+ Calls PREAD to request NBYTES of data from STREAM starting at OFFSET
5832+(e.g., via a call to `bfd_read'). PREAD either succeeds returning the
5833+number of bytes read (which can be less than NBYTES when end-of-file),
5834+or fails returning -1 (setting `bfd_error').
5835+
5836+ Calls CLOSE when the BFD is later closed using `bfd_close'. CLOSE
5837+either succeeds returning 0, or fails returning -1 (setting
5838+`bfd_error').
5839+
5840+ If `bfd_openr_iovec' returns `NULL' then an error has occurred.
5841+Possible errors are `bfd_error_no_memory', `bfd_error_invalid_target'
5842+and `bfd_error_system_call'.
5843+
5844+2.15.0.5 `bfd_openw'
5845+....................
5846+
5847+*Synopsis*
5848+ bfd *bfd_openw (const char *filename, const char *target);
5849+ *Description*
5850+Create a BFD, associated with file FILENAME, using the file format
5851+TARGET, and return a pointer to it.
5852+
5853+ Possible errors are `bfd_error_system_call', `bfd_error_no_memory',
5854+`bfd_error_invalid_target'.
5855+
5856+2.15.0.6 `bfd_close'
5857+....................
5858+
5859+*Synopsis*
5860+ bfd_boolean bfd_close (bfd *abfd);
5861+ *Description*
5862+Close a BFD. If the BFD was open for writing, then pending operations
5863+are completed and the file written out and closed. If the created file
5864+is executable, then `chmod' is called to mark it as such.
5865+
5866+ All memory attached to the BFD is released.
5867+
5868+ The file descriptor associated with the BFD is closed (even if it
5869+was passed in to BFD by `bfd_fdopenr').
5870+
5871+ *Returns*
5872+`TRUE' is returned if all is ok, otherwise `FALSE'.
5873+
5874+2.15.0.7 `bfd_close_all_done'
5875+.............................
5876+
5877+*Synopsis*
5878+ bfd_boolean bfd_close_all_done (bfd *);
5879+ *Description*
5880+Close a BFD. Differs from `bfd_close' since it does not complete any
5881+pending operations. This routine would be used if the application had
5882+just used BFD for swapping and didn't want to use any of the writing
5883+code.
5884+
5885+ If the created file is executable, then `chmod' is called to mark it
5886+as such.
5887+
5888+ All memory attached to the BFD is released.
5889+
5890+ *Returns*
5891+`TRUE' is returned if all is ok, otherwise `FALSE'.
5892+
5893+2.15.0.8 `bfd_create'
5894+.....................
5895+
5896+*Synopsis*
5897+ bfd *bfd_create (const char *filename, bfd *templ);
5898+ *Description*
5899+Create a new BFD in the manner of `bfd_openw', but without opening a
5900+file. The new BFD takes the target from the target used by TEMPLATE.
5901+The format is always set to `bfd_object'.
5902+
5903+2.15.0.9 `bfd_make_writable'
5904+............................
5905+
5906+*Synopsis*
5907+ bfd_boolean bfd_make_writable (bfd *abfd);
5908+ *Description*
5909+Takes a BFD as created by `bfd_create' and converts it into one like as
5910+returned by `bfd_openw'. It does this by converting the BFD to
5911+BFD_IN_MEMORY. It's assumed that you will call `bfd_make_readable' on
5912+this bfd later.
5913+
5914+ *Returns*
5915+`TRUE' is returned if all is ok, otherwise `FALSE'.
5916+
5917+2.15.0.10 `bfd_make_readable'
5918+.............................
5919+
5920+*Synopsis*
5921+ bfd_boolean bfd_make_readable (bfd *abfd);
5922+ *Description*
5923+Takes a BFD as created by `bfd_create' and `bfd_make_writable' and
5924+converts it into one like as returned by `bfd_openr'. It does this by
5925+writing the contents out to the memory buffer, then reversing the
5926+direction.
5927+
5928+ *Returns*
5929+`TRUE' is returned if all is ok, otherwise `FALSE'.
5930+
5931+2.15.0.11 `bfd_alloc'
5932+.....................
5933+
5934+*Synopsis*
5935+ void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
5936+ *Description*
5937+Allocate a block of WANTED bytes of memory attached to `abfd' and
5938+return a pointer to it.
5939+
5940+2.15.0.12 `bfd_zalloc'
5941+......................
5942+
5943+*Synopsis*
5944+ void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
5945+ *Description*
5946+Allocate a block of WANTED bytes of zeroed memory attached to `abfd'
5947+and return a pointer to it.
5948+
5949+2.15.0.13 `bfd_calc_gnu_debuglink_crc32'
5950+........................................
5951+
5952+*Synopsis*
5953+ unsigned long bfd_calc_gnu_debuglink_crc32
5954+ (unsigned long crc, const unsigned char *buf, bfd_size_type len);
5955+ *Description*
5956+Computes a CRC value as used in the .gnu_debuglink section. Advances
5957+the previously computed CRC value by computing and adding in the crc32
5958+for LEN bytes of BUF.
5959+
5960+ *Returns*
5961+Return the updated CRC32 value.
5962+
5963+2.15.0.14 `get_debug_link_info'
5964+...............................
5965+
5966+*Synopsis*
5967+ char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
5968+ *Description*
5969+fetch the filename and CRC32 value for any separate debuginfo
5970+associated with ABFD. Return NULL if no such info found, otherwise
5971+return filename and update CRC32_OUT.
5972+
5973+2.15.0.15 `separate_debug_file_exists'
5974+......................................
5975+
5976+*Synopsis*
5977+ bfd_boolean separate_debug_file_exists
5978+ (char *name, unsigned long crc32);
5979+ *Description*
5980+Checks to see if NAME is a file and if its contents match CRC32.
5981+
5982+2.15.0.16 `find_separate_debug_file'
5983+....................................
5984+
5985+*Synopsis*
5986+ char *find_separate_debug_file (bfd *abfd);
5987+ *Description*
5988+Searches ABFD for a reference to separate debugging information, scans
5989+various locations in the filesystem, including the file tree rooted at
5990+DEBUG_FILE_DIRECTORY, and returns a filename of such debugging
5991+information if the file is found and has matching CRC32. Returns NULL
5992+if no reference to debugging file exists, or file cannot be found.
5993+
5994+2.15.0.17 `bfd_follow_gnu_debuglink'
5995+....................................
5996+
5997+*Synopsis*
5998+ char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
5999+ *Description*
6000+Takes a BFD and searches it for a .gnu_debuglink section. If this
6001+section is found, it examines the section for the name and checksum of
6002+a '.debug' file containing auxiliary debugging information. It then
6003+searches the filesystem for this .debug file in some standard
6004+locations, including the directory tree rooted at DIR, and if found
6005+returns the full filename.
6006+
6007+ If DIR is NULL, it will search a default path configured into libbfd
6008+at build time. [XXX this feature is not currently implemented].
6009+
6010+ *Returns*
6011+`NULL' on any errors or failure to locate the .debug file, otherwise a
6012+pointer to a heap-allocated string containing the filename. The caller
6013+is responsible for freeing this string.
6014+
6015+2.15.0.18 `bfd_create_gnu_debuglink_section'
6016+............................................
6017+
6018+*Synopsis*
6019+ struct bfd_section *bfd_create_gnu_debuglink_section
6020+ (bfd *abfd, const char *filename);
6021+ *Description*
6022+Takes a BFD and adds a .gnu_debuglink section to it. The section is
6023+sized to be big enough to contain a link to the specified FILENAME.
6024+
6025+ *Returns*
6026+A pointer to the new section is returned if all is ok. Otherwise
6027+`NULL' is returned and bfd_error is set.
6028+
6029+2.15.0.19 `bfd_fill_in_gnu_debuglink_section'
6030+.............................................
6031+
6032+*Synopsis*
6033+ bfd_boolean bfd_fill_in_gnu_debuglink_section
6034+ (bfd *abfd, struct bfd_section *sect, const char *filename);
6035+ *Description*
6036+Takes a BFD and containing a .gnu_debuglink section SECT and fills in
6037+the contents of the section to contain a link to the specified
6038+FILENAME. The filename should be relative to the current directory.
6039+
6040+ *Returns*
6041+`TRUE' is returned if all is ok. Otherwise `FALSE' is returned and
6042+bfd_error is set.
6043+
6044+
6045+File: bfd.info, Node: Internal, Next: File Caching, Prev: Opening and Closing, Up: BFD front end
6046+
6047+2.16 Internal functions
6048+=======================
6049+
6050+*Description*
6051+These routines are used within BFD. They are not intended for export,
6052+but are documented here for completeness.
6053+
6054+2.16.0.1 `bfd_write_bigendian_4byte_int'
6055+........................................
6056+
6057+*Synopsis*
6058+ bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
6059+ *Description*
6060+Write a 4 byte integer I to the output BFD ABFD, in big endian order
6061+regardless of what else is going on. This is useful in archives.
6062+
6063+2.16.0.2 `bfd_put_size'
6064+.......................
6065+
6066+2.16.0.3 `bfd_get_size'
6067+.......................
6068+
6069+*Description*
6070+These macros as used for reading and writing raw data in sections; each
6071+access (except for bytes) is vectored through the target format of the
6072+BFD and mangled accordingly. The mangling performs any necessary endian
6073+translations and removes alignment restrictions. Note that types
6074+accepted and returned by these macros are identical so they can be
6075+swapped around in macros--for example, `libaout.h' defines `GET_WORD'
6076+to either `bfd_get_32' or `bfd_get_64'.
6077+
6078+ In the put routines, VAL must be a `bfd_vma'. If we are on a system
6079+without prototypes, the caller is responsible for making sure that is
6080+true, with a cast if necessary. We don't cast them in the macro
6081+definitions because that would prevent `lint' or `gcc -Wall' from
6082+detecting sins such as passing a pointer. To detect calling these with
6083+less than a `bfd_vma', use `gcc -Wconversion' on a host with 64 bit
6084+`bfd_vma''s.
6085+
6086+ /* Byte swapping macros for user section data. */
6087+
6088+ #define bfd_put_8(abfd, val, ptr) \
6089+ ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
6090+ #define bfd_put_signed_8 \
6091+ bfd_put_8
6092+ #define bfd_get_8(abfd, ptr) \
6093+ (*(unsigned char *) (ptr) & 0xff)
6094+ #define bfd_get_signed_8(abfd, ptr) \
6095+ (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
6096+
6097+ #define bfd_put_16(abfd, val, ptr) \
6098+ BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
6099+ #define bfd_put_signed_16 \
6100+ bfd_put_16
6101+ #define bfd_get_16(abfd, ptr) \
6102+ BFD_SEND (abfd, bfd_getx16, (ptr))
6103+ #define bfd_get_signed_16(abfd, ptr) \
6104+ BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
6105+
6106+ #define bfd_put_32(abfd, val, ptr) \
6107+ BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
6108+ #define bfd_put_signed_32 \
6109+ bfd_put_32
6110+ #define bfd_get_32(abfd, ptr) \
6111+ BFD_SEND (abfd, bfd_getx32, (ptr))
6112+ #define bfd_get_signed_32(abfd, ptr) \
6113+ BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
6114+
6115+ #define bfd_put_64(abfd, val, ptr) \
6116+ BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
6117+ #define bfd_put_signed_64 \
6118+ bfd_put_64
6119+ #define bfd_get_64(abfd, ptr) \
6120+ BFD_SEND (abfd, bfd_getx64, (ptr))
6121+ #define bfd_get_signed_64(abfd, ptr) \
6122+ BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
6123+
6124+ #define bfd_get(bits, abfd, ptr) \
6125+ ((bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
6126+ : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
6127+ : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
6128+ : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
6129+ : (abort (), (bfd_vma) - 1))
6130+
6131+ #define bfd_put(bits, abfd, val, ptr) \
6132+ ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
6133+ : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
6134+ : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
6135+ : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
6136+ : (abort (), (void) 0))
6137+
6138+2.16.0.4 `bfd_h_put_size'
6139+.........................
6140+
6141+*Description*
6142+These macros have the same function as their `bfd_get_x' brethren,
6143+except that they are used for removing information for the header
6144+records of object files. Believe it or not, some object files keep
6145+their header records in big endian order and their data in little
6146+endian order.
6147+
6148+ /* Byte swapping macros for file header data. */
6149+
6150+ #define bfd_h_put_8(abfd, val, ptr) \
6151+ bfd_put_8 (abfd, val, ptr)
6152+ #define bfd_h_put_signed_8(abfd, val, ptr) \
6153+ bfd_put_8 (abfd, val, ptr)
6154+ #define bfd_h_get_8(abfd, ptr) \
6155+ bfd_get_8 (abfd, ptr)
6156+ #define bfd_h_get_signed_8(abfd, ptr) \
6157+ bfd_get_signed_8 (abfd, ptr)
6158+
6159+ #define bfd_h_put_16(abfd, val, ptr) \
6160+ BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
6161+ #define bfd_h_put_signed_16 \
6162+ bfd_h_put_16
6163+ #define bfd_h_get_16(abfd, ptr) \
6164+ BFD_SEND (abfd, bfd_h_getx16, (ptr))
6165+ #define bfd_h_get_signed_16(abfd, ptr) \
6166+ BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
6167+
6168+ #define bfd_h_put_32(abfd, val, ptr) \
6169+ BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
6170+ #define bfd_h_put_signed_32 \
6171+ bfd_h_put_32
6172+ #define bfd_h_get_32(abfd, ptr) \
6173+ BFD_SEND (abfd, bfd_h_getx32, (ptr))
6174+ #define bfd_h_get_signed_32(abfd, ptr) \
6175+ BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
6176+
6177+ #define bfd_h_put_64(abfd, val, ptr) \
6178+ BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
6179+ #define bfd_h_put_signed_64 \
6180+ bfd_h_put_64
6181+ #define bfd_h_get_64(abfd, ptr) \
6182+ BFD_SEND (abfd, bfd_h_getx64, (ptr))
6183+ #define bfd_h_get_signed_64(abfd, ptr) \
6184+ BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
6185+
6186+ /* Aliases for the above, which should eventually go away. */
6187+
6188+ #define H_PUT_64 bfd_h_put_64
6189+ #define H_PUT_32 bfd_h_put_32
6190+ #define H_PUT_16 bfd_h_put_16
6191+ #define H_PUT_8 bfd_h_put_8
6192+ #define H_PUT_S64 bfd_h_put_signed_64
6193+ #define H_PUT_S32 bfd_h_put_signed_32
6194+ #define H_PUT_S16 bfd_h_put_signed_16
6195+ #define H_PUT_S8 bfd_h_put_signed_8
6196+ #define H_GET_64 bfd_h_get_64
6197+ #define H_GET_32 bfd_h_get_32
6198+ #define H_GET_16 bfd_h_get_16
6199+ #define H_GET_8 bfd_h_get_8
6200+ #define H_GET_S64 bfd_h_get_signed_64
6201+ #define H_GET_S32 bfd_h_get_signed_32
6202+ #define H_GET_S16 bfd_h_get_signed_16
6203+ #define H_GET_S8 bfd_h_get_signed_8
6204+
6205+2.16.0.5 `bfd_log2'
6206+...................
6207+
6208+*Synopsis*
6209+ unsigned int bfd_log2 (bfd_vma x);
6210+ *Description*
6211+Return the log base 2 of the value supplied, rounded up. E.g., an X of
6212+1025 returns 11. A X of 0 returns 0.
6213+
6214+
6215+File: bfd.info, Node: File Caching, Next: Linker Functions, Prev: Internal, Up: BFD front end
6216+
6217+2.17 File caching
6218+=================
6219+
6220+The file caching mechanism is embedded within BFD and allows the
6221+application to open as many BFDs as it wants without regard to the
6222+underlying operating system's file descriptor limit (often as low as 20
6223+open files). The module in `cache.c' maintains a least recently used
6224+list of `BFD_CACHE_MAX_OPEN' files, and exports the name
6225+`bfd_cache_lookup', which runs around and makes sure that the required
6226+BFD is open. If not, then it chooses a file to close, closes it and
6227+opens the one wanted, returning its file handle.
6228+
6229+2.17.0.1 `BFD_CACHE_MAX_OPEN macro'
6230+...................................
6231+
6232+*Description*
6233+The maximum number of files which the cache will keep open at one time.
6234+ #define BFD_CACHE_MAX_OPEN 10
6235+
6236+2.17.0.2 `bfd_last_cache'
6237+.........................
6238+
6239+*Synopsis*
6240+ extern bfd *bfd_last_cache;
6241+ *Description*
6242+Zero, or a pointer to the topmost BFD on the chain. This is used by
6243+the `bfd_cache_lookup' macro in `libbfd.h' to determine when it can
6244+avoid a function call.
6245+
6246+2.17.0.3 `bfd_cache_lookup'
6247+...........................
6248+
6249+*Description*
6250+Check to see if the required BFD is the same as the last one looked up.
6251+If so, then it can use the stream in the BFD with impunity, since it
6252+can't have changed since the last lookup; otherwise, it has to perform
6253+the complicated lookup function.
6254+ #define bfd_cache_lookup(x) \
6255+ ((x) == bfd_last_cache ? \
6256+ (FILE *) (bfd_last_cache->iostream): \
6257+ bfd_cache_lookup_worker (x))
6258+
6259+2.17.0.4 `bfd_cache_init'
6260+.........................
6261+
6262+*Synopsis*
6263+ bfd_boolean bfd_cache_init (bfd *abfd);
6264+ *Description*
6265+Add a newly opened BFD to the cache.
6266+
6267+2.17.0.5 `bfd_cache_close'
6268+..........................
6269+
6270+*Synopsis*
6271+ bfd_boolean bfd_cache_close (bfd *abfd);
6272+ *Description*
6273+Remove the BFD ABFD from the cache. If the attached file is open, then
6274+close it too.
6275+
6276+ *Returns*
6277+`FALSE' is returned if closing the file fails, `TRUE' is returned if
6278+all is well.
6279+
6280+2.17.0.6 `bfd_cache_close_all'
6281+..............................
6282+
6283+*Synopsis*
6284+ bfd_boolean bfd_cache_close_all (void);
6285+ *Description*
6286+Remove all BFDs from the cache. If the attached file is open, then
6287+close it too.
6288+
6289+ *Returns*
6290+`FALSE' is returned if closing one of the file fails, `TRUE' is
6291+returned if all is well.
6292+
6293+2.17.0.7 `bfd_open_file'
6294+........................
6295+
6296+*Synopsis*
6297+ FILE* bfd_open_file (bfd *abfd);
6298+ *Description*
6299+Call the OS to open a file for ABFD. Return the `FILE *' (possibly
6300+`NULL') that results from this operation. Set up the BFD so that
6301+future accesses know the file is open. If the `FILE *' returned is
6302+`NULL', then it won't have been put in the cache, so it won't have to
6303+be removed from it.
6304+
6305+2.17.0.8 `bfd_cache_lookup_worker'
6306+..................................
6307+
6308+*Synopsis*
6309+ FILE *bfd_cache_lookup_worker (bfd *abfd);
6310+ *Description*
6311+Called when the macro `bfd_cache_lookup' fails to find a quick answer.
6312+Find a file descriptor for ABFD. If necessary, it open it. If there
6313+are already more than `BFD_CACHE_MAX_OPEN' files open, it tries to
6314+close one first, to avoid running out of file descriptors. It will
6315+abort rather than returning NULL if it is unable to (re)open the ABFD.
6316+
6317+
6318+File: bfd.info, Node: Linker Functions, Next: Hash Tables, Prev: File Caching, Up: BFD front end
6319+
6320+2.18 Linker Functions
6321+=====================
6322+
6323+The linker uses three special entry points in the BFD target vector.
6324+It is not necessary to write special routines for these entry points
6325+when creating a new BFD back end, since generic versions are provided.
6326+However, writing them can speed up linking and make it use
6327+significantly less runtime memory.
6328+
6329+ The first routine creates a hash table used by the other routines.
6330+The second routine adds the symbols from an object file to the hash
6331+table. The third routine takes all the object files and links them
6332+together to create the output file. These routines are designed so
6333+that the linker proper does not need to know anything about the symbols
6334+in the object files that it is linking. The linker merely arranges the
6335+sections as directed by the linker script and lets BFD handle the
6336+details of symbols and relocs.
6337+
6338+ The second routine and third routines are passed a pointer to a
6339+`struct bfd_link_info' structure (defined in `bfdlink.h') which holds
6340+information relevant to the link, including the linker hash table
6341+(which was created by the first routine) and a set of callback
6342+functions to the linker proper.
6343+
6344+ The generic linker routines are in `linker.c', and use the header
6345+file `genlink.h'. As of this writing, the only back ends which have
6346+implemented versions of these routines are a.out (in `aoutx.h') and
6347+ECOFF (in `ecoff.c'). The a.out routines are used as examples
6348+throughout this section.
6349+
6350+* Menu:
6351+
6352+* Creating a Linker Hash Table::
6353+* Adding Symbols to the Hash Table::
6354+* Performing the Final Link::
6355+
6356+
6357+File: bfd.info, Node: Creating a Linker Hash Table, Next: Adding Symbols to the Hash Table, Prev: Linker Functions, Up: Linker Functions
6358+
6359+2.18.1 Creating a linker hash table
6360+-----------------------------------
6361+
6362+The linker routines must create a hash table, which must be derived
6363+from `struct bfd_link_hash_table' described in `bfdlink.c'. *Note Hash
6364+Tables::, for information on how to create a derived hash table. This
6365+entry point is called using the target vector of the linker output file.
6366+
6367+ The `_bfd_link_hash_table_create' entry point must allocate and
6368+initialize an instance of the desired hash table. If the back end does
6369+not require any additional information to be stored with the entries in
6370+the hash table, the entry point may simply create a `struct
6371+bfd_link_hash_table'. Most likely, however, some additional
6372+information will be needed.
6373+
6374+ For example, with each entry in the hash table the a.out linker
6375+keeps the index the symbol has in the final output file (this index
6376+number is used so that when doing a relocatable link the symbol index
6377+used in the output file can be quickly filled in when copying over a
6378+reloc). The a.out linker code defines the required structures and
6379+functions for a hash table derived from `struct bfd_link_hash_table'.
6380+The a.out linker hash table is created by the function
6381+`NAME(aout,link_hash_table_create)'; it simply allocates space for the
6382+hash table, initializes it, and returns a pointer to it.
6383+
6384+ When writing the linker routines for a new back end, you will
6385+generally not know exactly which fields will be required until you have
6386+finished. You should simply create a new hash table which defines no
6387+additional fields, and then simply add fields as they become necessary.
6388+
6389+
6390+File: bfd.info, Node: Adding Symbols to the Hash Table, Next: Performing the Final Link, Prev: Creating a Linker Hash Table, Up: Linker Functions
6391+
6392+2.18.2 Adding symbols to the hash table
6393+---------------------------------------
6394+
6395+The linker proper will call the `_bfd_link_add_symbols' entry point for
6396+each object file or archive which is to be linked (typically these are
6397+the files named on the command line, but some may also come from the
6398+linker script). The entry point is responsible for examining the file.
6399+For an object file, BFD must add any relevant symbol information to
6400+the hash table. For an archive, BFD must determine which elements of
6401+the archive should be used and adding them to the link.
6402+
6403+ The a.out version of this entry point is
6404+`NAME(aout,link_add_symbols)'.
6405+
6406+* Menu:
6407+
6408+* Differing file formats::
6409+* Adding symbols from an object file::
6410+* Adding symbols from an archive::
6411+
6412+
6413+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
6414+
6415+2.18.2.1 Differing file formats
6416+...............................
6417+
6418+Normally all the files involved in a link will be of the same format,
6419+but it is also possible to link together different format object files,
6420+and the back end must support that. The `_bfd_link_add_symbols' entry
6421+point is called via the target vector of the file to be added. This
6422+has an important consequence: the function may not assume that the hash
6423+table is the type created by the corresponding
6424+`_bfd_link_hash_table_create' vector. All the `_bfd_link_add_symbols'
6425+function can assume about the hash table is that it is derived from
6426+`struct bfd_link_hash_table'.
6427+
6428+ Sometimes the `_bfd_link_add_symbols' function must store some
6429+information in the hash table entry to be used by the `_bfd_final_link'
6430+function. In such a case the `creator' field of the hash table must be
6431+checked to make sure that the hash table was created by an object file
6432+of the same format.
6433+
6434+ The `_bfd_final_link' routine must be prepared to handle a hash
6435+entry without any extra information added by the
6436+`_bfd_link_add_symbols' function. A hash entry without extra
6437+information will also occur when the linker script directs the linker
6438+to create a symbol. Note that, regardless of how a hash table entry is
6439+added, all the fields will be initialized to some sort of null value by
6440+the hash table entry initialization function.
6441+
6442+ See `ecoff_link_add_externals' for an example of how to check the
6443+`creator' field before saving information (in this case, the ECOFF
6444+external symbol debugging information) in a hash table entry.
6445+
6446+
6447+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
6448+
6449+2.18.2.2 Adding symbols from an object file
6450+...........................................
6451+
6452+When the `_bfd_link_add_symbols' routine is passed an object file, it
6453+must add all externally visible symbols in that object file to the hash
6454+table. The actual work of adding the symbol to the hash table is
6455+normally handled by the function `_bfd_generic_link_add_one_symbol'.
6456+The `_bfd_link_add_symbols' routine is responsible for reading all the
6457+symbols from the object file and passing the correct information to
6458+`_bfd_generic_link_add_one_symbol'.
6459+
6460+ The `_bfd_link_add_symbols' routine should not use
6461+`bfd_canonicalize_symtab' to read the symbols. The point of providing
6462+this routine is to avoid the overhead of converting the symbols into
6463+generic `asymbol' structures.
6464+
6465+ `_bfd_generic_link_add_one_symbol' handles the details of combining
6466+common symbols, warning about multiple definitions, and so forth. It
6467+takes arguments which describe the symbol to add, notably symbol flags,
6468+a section, and an offset. The symbol flags include such things as
6469+`BSF_WEAK' or `BSF_INDIRECT'. The section is a section in the object
6470+file, or something like `bfd_und_section_ptr' for an undefined symbol
6471+or `bfd_com_section_ptr' for a common symbol.
6472+
6473+ If the `_bfd_final_link' routine is also going to need to read the
6474+symbol information, the `_bfd_link_add_symbols' routine should save it
6475+somewhere attached to the object file BFD. However, the information
6476+should only be saved if the `keep_memory' field of the `info' argument
6477+is TRUE, so that the `-no-keep-memory' linker switch is effective.
6478+
6479+ The a.out function which adds symbols from an object file is
6480+`aout_link_add_object_symbols', and most of the interesting work is in
6481+`aout_link_add_symbols'. The latter saves pointers to the hash tables
6482+entries created by `_bfd_generic_link_add_one_symbol' indexed by symbol
6483+number, so that the `_bfd_final_link' routine does not have to call the
6484+hash table lookup routine to locate the entry.
6485+
6486+
6487+File: bfd.info, Node: Adding symbols from an archive, Prev: Adding symbols from an object file, Up: Adding Symbols to the Hash Table
6488+
6489+2.18.2.3 Adding symbols from an archive
6490+.......................................
6491+
6492+When the `_bfd_link_add_symbols' routine is passed an archive, it must
6493+look through the symbols defined by the archive and decide which
6494+elements of the archive should be included in the link. For each such
6495+element it must call the `add_archive_element' linker callback, and it
6496+must add the symbols from the object file to the linker hash table.
6497+
6498+ In most cases the work of looking through the symbols in the archive
6499+should be done by the `_bfd_generic_link_add_archive_symbols' function.
6500+This function builds a hash table from the archive symbol table and
6501+looks through the list of undefined symbols to see which elements
6502+should be included. `_bfd_generic_link_add_archive_symbols' is passed
6503+a function to call to make the final decision about adding an archive
6504+element to the link and to do the actual work of adding the symbols to
6505+the linker hash table.
6506+
6507+ The function passed to `_bfd_generic_link_add_archive_symbols' must
6508+read the symbols of the archive element and decide whether the archive
6509+element should be included in the link. If the element is to be
6510+included, the `add_archive_element' linker callback routine must be
6511+called with the element as an argument, and the elements symbols must
6512+be added to the linker hash table just as though the element had itself
6513+been passed to the `_bfd_link_add_symbols' function.
6514+
6515+ When the a.out `_bfd_link_add_symbols' function receives an archive,
6516+it calls `_bfd_generic_link_add_archive_symbols' passing
6517+`aout_link_check_archive_element' as the function argument.
6518+`aout_link_check_archive_element' calls `aout_link_check_ar_symbols'.
6519+If the latter decides to add the element (an element is only added if
6520+it provides a real, non-common, definition for a previously undefined
6521+or common symbol) it calls the `add_archive_element' callback and then
6522+`aout_link_check_archive_element' calls `aout_link_add_symbols' to
6523+actually add the symbols to the linker hash table.
6524+
6525+ The ECOFF back end is unusual in that it does not normally call
6526+`_bfd_generic_link_add_archive_symbols', because ECOFF archives already
6527+contain a hash table of symbols. The ECOFF back end searches the
6528+archive itself to avoid the overhead of creating a new hash table.
6529+
6530+
6531+File: bfd.info, Node: Performing the Final Link, Prev: Adding Symbols to the Hash Table, Up: Linker Functions
6532+
6533+2.18.3 Performing the final link
6534+--------------------------------
6535+
6536+When all the input files have been processed, the linker calls the
6537+`_bfd_final_link' entry point of the output BFD. This routine is
6538+responsible for producing the final output file, which has several
6539+aspects. It must relocate the contents of the input sections and copy
6540+the data into the output sections. It must build an output symbol
6541+table including any local symbols from the input files and the global
6542+symbols from the hash table. When producing relocatable output, it must
6543+modify the input relocs and write them into the output file. There may
6544+also be object format dependent work to be done.
6545+
6546+ The linker will also call the `write_object_contents' entry point
6547+when the BFD is closed. The two entry points must work together in
6548+order to produce the correct output file.
6549+
6550+ The details of how this works are inevitably dependent upon the
6551+specific object file format. The a.out `_bfd_final_link' routine is
6552+`NAME(aout,final_link)'.
6553+
6554+* Menu:
6555+
6556+* Information provided by the linker::
6557+* Relocating the section contents::
6558+* Writing the symbol table::
6559+
6560+
6561+File: bfd.info, Node: Information provided by the linker, Next: Relocating the section contents, Prev: Performing the Final Link, Up: Performing the Final Link
6562+
6563+2.18.3.1 Information provided by the linker
6564+...........................................
6565+
6566+Before the linker calls the `_bfd_final_link' entry point, it sets up
6567+some data structures for the function to use.
6568+
6569+ The `input_bfds' field of the `bfd_link_info' structure will point
6570+to a list of all the input files included in the link. These files are
6571+linked through the `link_next' field of the `bfd' structure.
6572+
6573+ Each section in the output file will have a list of `link_order'
6574+structures attached to the `link_order_head' field (the `link_order'
6575+structure is defined in `bfdlink.h'). These structures describe how to
6576+create the contents of the output section in terms of the contents of
6577+various input sections, fill constants, and, eventually, other types of
6578+information. They also describe relocs that must be created by the BFD
6579+backend, but do not correspond to any input file; this is used to
6580+support -Ur, which builds constructors while generating a relocatable
6581+object file.
6582+
6583+
6584+File: bfd.info, Node: Relocating the section contents, Next: Writing the symbol table, Prev: Information provided by the linker, Up: Performing the Final Link
6585+
6586+2.18.3.2 Relocating the section contents
6587+........................................
6588+
6589+The `_bfd_final_link' function should look through the `link_order'
6590+structures attached to each section of the output file. Each
6591+`link_order' structure should either be handled specially, or it should
6592+be passed to the function `_bfd_default_link_order' which will do the
6593+right thing (`_bfd_default_link_order' is defined in `linker.c').
6594+
6595+ For efficiency, a `link_order' of type `bfd_indirect_link_order'
6596+whose associated section belongs to a BFD of the same format as the
6597+output BFD must be handled specially. This type of `link_order'
6598+describes part of an output section in terms of a section belonging to
6599+one of the input files. The `_bfd_final_link' function should read the
6600+contents of the section and any associated relocs, apply the relocs to
6601+the section contents, and write out the modified section contents. If
6602+performing a relocatable link, the relocs themselves must also be
6603+modified and written out.
6604+
6605+ The functions `_bfd_relocate_contents' and
6606+`_bfd_final_link_relocate' provide some general support for performing
6607+the actual relocations, notably overflow checking. Their arguments
6608+include information about the symbol the relocation is against and a
6609+`reloc_howto_type' argument which describes the relocation to perform.
6610+These functions are defined in `reloc.c'.
6611+
6612+ The a.out function which handles reading, relocating, and writing
6613+section contents is `aout_link_input_section'. The actual relocation
6614+is done in `aout_link_input_section_std' and
6615+`aout_link_input_section_ext'.
6616+
6617+
6618+File: bfd.info, Node: Writing the symbol table, Prev: Relocating the section contents, Up: Performing the Final Link
6619+
6620+2.18.3.3 Writing the symbol table
6621+.................................
6622+
6623+The `_bfd_final_link' function must gather all the symbols in the input
6624+files and write them out. It must also write out all the symbols in
6625+the global hash table. This must be controlled by the `strip' and
6626+`discard' fields of the `bfd_link_info' structure.
6627+
6628+ The local symbols of the input files will not have been entered into
6629+the linker hash table. The `_bfd_final_link' routine must consider
6630+each input file and include the symbols in the output file. It may be
6631+convenient to do this when looking through the `link_order' structures,
6632+or it may be done by stepping through the `input_bfds' list.
6633+
6634+ The `_bfd_final_link' routine must also traverse the global hash
6635+table to gather all the externally visible symbols. It is possible
6636+that most of the externally visible symbols may be written out when
6637+considering the symbols of each input file, but it is still necessary
6638+to traverse the hash table since the linker script may have defined
6639+some symbols that are not in any of the input files.
6640+
6641+ The `strip' field of the `bfd_link_info' structure controls which
6642+symbols are written out. The possible values are listed in
6643+`bfdlink.h'. If the value is `strip_some', then the `keep_hash' field
6644+of the `bfd_link_info' structure is a hash table of symbols to keep;
6645+each symbol should be looked up in this hash table, and only symbols
6646+which are present should be included in the output file.
6647+
6648+ If the `strip' field of the `bfd_link_info' structure permits local
6649+symbols to be written out, the `discard' field is used to further
6650+controls which local symbols are included in the output file. If the
6651+value is `discard_l', then all local symbols which begin with a certain
6652+prefix are discarded; this is controlled by the
6653+`bfd_is_local_label_name' entry point.
6654+
6655+ The a.out backend handles symbols by calling
6656+`aout_link_write_symbols' on each input BFD and then traversing the
6657+global hash table with the function `aout_link_write_other_symbol'. It
6658+builds a string table while writing out the symbols, which is written
6659+to the output file at the end of `NAME(aout,final_link)'.
6660+
6661+2.18.3.4 `bfd_link_split_section'
6662+.................................
6663+
6664+*Synopsis*
6665+ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
6666+ *Description*
6667+Return nonzero if SEC should be split during a reloceatable or final
6668+link.
6669+ #define bfd_link_split_section(abfd, sec) \
6670+ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
6671+
6672+2.18.3.5 `bfd_section_already_linked'
6673+.....................................
6674+
6675+*Synopsis*
6676+ void bfd_section_already_linked (bfd *abfd, asection *sec);
6677+ *Description*
6678+Check if SEC has been already linked during a reloceatable or final
6679+link.
6680+ #define bfd_section_already_linked(abfd, sec) \
6681+ BFD_SEND (abfd, _section_already_linked, (abfd, sec))
6682+
6683+
6684+File: bfd.info, Node: Hash Tables, Prev: Linker Functions, Up: BFD front end
6685+
6686+2.19 Hash Tables
6687+================
6688+
6689+BFD provides a simple set of hash table functions. Routines are
6690+provided to initialize a hash table, to free a hash table, to look up a
6691+string in a hash table and optionally create an entry for it, and to
6692+traverse a hash table. There is currently no routine to delete an
6693+string from a hash table.
6694+
6695+ The basic hash table does not permit any data to be stored with a
6696+string. However, a hash table is designed to present a base class from
6697+which other types of hash tables may be derived. These derived types
6698+may store additional information with the string. Hash tables were
6699+implemented in this way, rather than simply providing a data pointer in
6700+a hash table entry, because they were designed for use by the linker
6701+back ends. The linker may create thousands of hash table entries, and
6702+the overhead of allocating private data and storing and following
6703+pointers becomes noticeable.
6704+
6705+ The basic hash table code is in `hash.c'.
6706+
6707+* Menu:
6708+
6709+* Creating and Freeing a Hash Table::
6710+* Looking Up or Entering a String::
6711+* Traversing a Hash Table::
6712+* Deriving a New Hash Table Type::
6713+
6714+
6715+File: bfd.info, Node: Creating and Freeing a Hash Table, Next: Looking Up or Entering a String, Prev: Hash Tables, Up: Hash Tables
6716+
6717+2.19.1 Creating and freeing a hash table
6718+----------------------------------------
6719+
6720+To create a hash table, create an instance of a `struct bfd_hash_table'
6721+(defined in `bfd.h') and call `bfd_hash_table_init' (if you know
6722+approximately how many entries you will need, the function
6723+`bfd_hash_table_init_n', which takes a SIZE argument, may be used).
6724+`bfd_hash_table_init' returns `FALSE' if some sort of error occurs.
6725+
6726+ The function `bfd_hash_table_init' take as an argument a function to
6727+use to create new entries. For a basic hash table, use the function
6728+`bfd_hash_newfunc'. *Note Deriving a New Hash Table Type::, for why
6729+you would want to use a different value for this argument.
6730+
6731+ `bfd_hash_table_init' will create an objalloc which will be used to
6732+allocate new entries. You may allocate memory on this objalloc using
6733+`bfd_hash_allocate'.
6734+
6735+ Use `bfd_hash_table_free' to free up all the memory that has been
6736+allocated for a hash table. This will not free up the `struct
6737+bfd_hash_table' itself, which you must provide.
6738+
6739+ Use `bfd_hash_set_default_size' to set the default size of hash
6740+table to use.
6741+
6742+
6743+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
6744+
6745+2.19.2 Looking up or entering a string
6746+--------------------------------------
6747+
6748+The function `bfd_hash_lookup' is used both to look up a string in the
6749+hash table and to create a new entry.
6750+
6751+ If the CREATE argument is `FALSE', `bfd_hash_lookup' will look up a
6752+string. If the string is found, it will returns a pointer to a `struct
6753+bfd_hash_entry'. If the string is not found in the table
6754+`bfd_hash_lookup' will return `NULL'. You should not modify any of the
6755+fields in the returns `struct bfd_hash_entry'.
6756+
6757+ If the CREATE argument is `TRUE', the string will be entered into
6758+the hash table if it is not already there. Either way a pointer to a
6759+`struct bfd_hash_entry' will be returned, either to the existing
6760+structure or to a newly created one. In this case, a `NULL' return
6761+means that an error occurred.
6762+
6763+ If the CREATE argument is `TRUE', and a new entry is created, the
6764+COPY argument is used to decide whether to copy the string onto the
6765+hash table objalloc or not. If COPY is passed as `FALSE', you must be
6766+careful not to deallocate or modify the string as long as the hash table
6767+exists.
6768+
6769+
6770+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
6771+
6772+2.19.3 Traversing a hash table
6773+------------------------------
6774+
6775+The function `bfd_hash_traverse' may be used to traverse a hash table,
6776+calling a function on each element. The traversal is done in a random
6777+order.
6778+
6779+ `bfd_hash_traverse' takes as arguments a function and a generic
6780+`void *' pointer. The function is called with a hash table entry (a
6781+`struct bfd_hash_entry *') and the generic pointer passed to
6782+`bfd_hash_traverse'. The function must return a `boolean' value, which
6783+indicates whether to continue traversing the hash table. If the
6784+function returns `FALSE', `bfd_hash_traverse' will stop the traversal
6785+and return immediately.
6786+
6787+
6788+File: bfd.info, Node: Deriving a New Hash Table Type, Prev: Traversing a Hash Table, Up: Hash Tables
6789+
6790+2.19.4 Deriving a new hash table type
6791+-------------------------------------
6792+
6793+Many uses of hash tables want to store additional information which
6794+each entry in the hash table. Some also find it convenient to store
6795+additional information with the hash table itself. This may be done
6796+using a derived hash table.
6797+
6798+ Since C is not an object oriented language, creating a derived hash
6799+table requires sticking together some boilerplate routines with a few
6800+differences specific to the type of hash table you want to create.
6801+
6802+ An example of a derived hash table is the linker hash table. The
6803+structures for this are defined in `bfdlink.h'. The functions are in
6804+`linker.c'.
6805+
6806+ You may also derive a hash table from an already derived hash table.
6807+For example, the a.out linker backend code uses a hash table derived
6808+from the linker hash table.
6809+
6810+* Menu:
6811+
6812+* Define the Derived Structures::
6813+* Write the Derived Creation Routine::
6814+* Write Other Derived Routines::
6815+
6816+
6817+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
6818+
6819+2.19.4.1 Define the derived structures
6820+......................................
6821+
6822+You must define a structure for an entry in the hash table, and a
6823+structure for the hash table itself.
6824+
6825+ The first field in the structure for an entry in the hash table must
6826+be of the type used for an entry in the hash table you are deriving
6827+from. If you are deriving from a basic hash table this is `struct
6828+bfd_hash_entry', which is defined in `bfd.h'. The first field in the
6829+structure for the hash table itself must be of the type of the hash
6830+table you are deriving from itself. If you are deriving from a basic
6831+hash table, this is `struct bfd_hash_table'.
6832+
6833+ For example, the linker hash table defines `struct
6834+bfd_link_hash_entry' (in `bfdlink.h'). The first field, `root', is of
6835+type `struct bfd_hash_entry'. Similarly, the first field in `struct
6836+bfd_link_hash_table', `table', is of type `struct bfd_hash_table'.
6837+
6838+
6839+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
6840+
6841+2.19.4.2 Write the derived creation routine
6842+...........................................
6843+
6844+You must write a routine which will create and initialize an entry in
6845+the hash table. This routine is passed as the function argument to
6846+`bfd_hash_table_init'.
6847+
6848+ In order to permit other hash tables to be derived from the hash
6849+table you are creating, this routine must be written in a standard way.
6850+
6851+ The first argument to the creation routine is a pointer to a hash
6852+table entry. This may be `NULL', in which case the routine should
6853+allocate the right amount of space. Otherwise the space has already
6854+been allocated by a hash table type derived from this one.
6855+
6856+ After allocating space, the creation routine must call the creation
6857+routine of the hash table type it is derived from, passing in a pointer
6858+to the space it just allocated. This will initialize any fields used
6859+by the base hash table.
6860+
6861+ Finally the creation routine must initialize any local fields for
6862+the new hash table type.
6863+
6864+ Here is a boilerplate example of a creation routine. FUNCTION_NAME
6865+is the name of the routine. ENTRY_TYPE is the type of an entry in the
6866+hash table you are creating. BASE_NEWFUNC is the name of the creation
6867+routine of the hash table type your hash table is derived from.
6868+
6869+ struct bfd_hash_entry *
6870+ FUNCTION_NAME (entry, table, string)
6871+ struct bfd_hash_entry *entry;
6872+ struct bfd_hash_table *table;
6873+ const char *string;
6874+ {
6875+ struct ENTRY_TYPE *ret = (ENTRY_TYPE *) entry;
6876+
6877+ /* Allocate the structure if it has not already been allocated by a
6878+ derived class. */
6879+ if (ret == (ENTRY_TYPE *) NULL)
6880+ {
6881+ ret = ((ENTRY_TYPE *)
6882+ bfd_hash_allocate (table, sizeof (ENTRY_TYPE)));
6883+ if (ret == (ENTRY_TYPE *) NULL)
6884+ return NULL;
6885+ }
6886+
6887+ /* Call the allocation method of the base class. */
6888+ ret = ((ENTRY_TYPE *)
6889+ BASE_NEWFUNC ((struct bfd_hash_entry *) ret, table, string));
6890+
6891+ /* Initialize the local fields here. */
6892+
6893+ return (struct bfd_hash_entry *) ret;
6894+ }
6895+ *Description*
6896+The creation routine for the linker hash table, which is in `linker.c',
6897+looks just like this example. FUNCTION_NAME is
6898+`_bfd_link_hash_newfunc'. ENTRY_TYPE is `struct bfd_link_hash_entry'.
6899+BASE_NEWFUNC is `bfd_hash_newfunc', the creation routine for a basic
6900+hash table.
6901+
6902+ `_bfd_link_hash_newfunc' also initializes the local fields in a
6903+linker hash table entry: `type', `written' and `next'.
6904+
6905+
6906+File: bfd.info, Node: Write Other Derived Routines, Prev: Write the Derived Creation Routine, Up: Deriving a New Hash Table Type
6907+
6908+2.19.4.3 Write other derived routines
6909+.....................................
6910+
6911+You will want to write other routines for your new hash table, as well.
6912+
6913+ You will want an initialization routine which calls the
6914+initialization routine of the hash table you are deriving from and
6915+initializes any other local fields. For the linker hash table, this is
6916+`_bfd_link_hash_table_init' in `linker.c'.
6917+
6918+ You will want a lookup routine which calls the lookup routine of the
6919+hash table you are deriving from and casts the result. The linker hash
6920+table uses `bfd_link_hash_lookup' in `linker.c' (this actually takes an
6921+additional argument which it uses to decide how to return the looked up
6922+value).
6923+
6924+ You may want a traversal routine. This should just call the
6925+traversal routine of the hash table you are deriving from with
6926+appropriate casts. The linker hash table uses `bfd_link_hash_traverse'
6927+in `linker.c'.
6928+
6929+ These routines may simply be defined as macros. For example, the
6930+a.out backend linker hash table, which is derived from the linker hash
6931+table, uses macros for the lookup and traversal routines. These are
6932+`aout_link_hash_lookup' and `aout_link_hash_traverse' in aoutx.h.
6933+
6934+
6935+File: bfd.info, Node: BFD back ends, Next: GNU Free Documentation License, Prev: BFD front end, Up: Top
6936+
6937+3 BFD back ends
6938+***************
6939+
6940+* Menu:
6941+
6942+* What to Put Where::
6943+* aout :: a.out backends
6944+* coff :: coff backends
6945+* elf :: elf backends
6946+* mmo :: mmo backend
6947+
6948+
6949+File: bfd.info, Node: What to Put Where, Next: aout, Prev: BFD back ends, Up: BFD back ends
6950+
6951+ All of BFD lives in one directory.
6952+
6953+
6954+File: bfd.info, Node: aout, Next: coff, Prev: What to Put Where, Up: BFD back ends
6955+
6956+3.1 a.out backends
6957+==================
6958+
6959+*Description*
6960+BFD supports a number of different flavours of a.out format, though the
6961+major differences are only the sizes of the structures on disk, and the
6962+shape of the relocation information.
6963+
6964+ The support is split into a basic support file `aoutx.h' and other
6965+files which derive functions from the base. One derivation file is
6966+`aoutf1.h' (for a.out flavour 1), and adds to the basic a.out functions
6967+support for sun3, sun4, 386 and 29k a.out files, to create a target
6968+jump vector for a specific target.
6969+
6970+ This information is further split out into more specific files for
6971+each machine, including `sunos.c' for sun3 and sun4, `newsos3.c' for
6972+the Sony NEWS, and `demo64.c' for a demonstration of a 64 bit a.out
6973+format.
6974+
6975+ The base file `aoutx.h' defines general mechanisms for reading and
6976+writing records to and from disk and various other methods which BFD
6977+requires. It is included by `aout32.c' and `aout64.c' to form the names
6978+`aout_32_swap_exec_header_in', `aout_64_swap_exec_header_in', etc.
6979+
6980+ As an example, this is what goes on to make the back end for a sun4,
6981+from `aout32.c':
6982+
6983+ #define ARCH_SIZE 32
6984+ #include "aoutx.h"
6985+
6986+ Which exports names:
6987+
6988+ ...
6989+ aout_32_canonicalize_reloc
6990+ aout_32_find_nearest_line
6991+ aout_32_get_lineno
6992+ aout_32_get_reloc_upper_bound
6993+ ...
6994+
6995+ from `sunos.c':
6996+
6997+ #define TARGET_NAME "a.out-sunos-big"
6998+ #define VECNAME sunos_big_vec
6999+ #include "aoutf1.h"
7000+
7001+ requires all the names from `aout32.c', and produces the jump vector
7002+
7003+ sunos_big_vec
7004+
7005+ The file `host-aout.c' is a special case. It is for a large set of
7006+hosts that use "more or less standard" a.out files, and for which
7007+cross-debugging is not interesting. It uses the standard 32-bit a.out
7008+support routines, but determines the file offsets and addresses of the
7009+text, data, and BSS sections, the machine architecture and machine
7010+type, and the entry point address, in a host-dependent manner. Once
7011+these values have been determined, generic code is used to handle the
7012+object file.
7013+
7014+ When porting it to run on a new system, you must supply:
7015+
7016+ HOST_PAGE_SIZE
7017+ HOST_SEGMENT_SIZE
7018+ HOST_MACHINE_ARCH (optional)
7019+ HOST_MACHINE_MACHINE (optional)
7020+ HOST_TEXT_START_ADDR
7021+ HOST_STACK_END_ADDR
7022+
7023+ in the file `../include/sys/h-XXX.h' (for your host). These values,
7024+plus the structures and macros defined in `a.out.h' on your host
7025+system, will produce a BFD target that will access ordinary a.out files
7026+on your host. To configure a new machine to use `host-aout.c', specify:
7027+
7028+ TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
7029+ TDEPFILES= host-aout.o trad-core.o
7030+
7031+ in the `config/XXX.mt' file, and modify `configure.in' to use the
7032+`XXX.mt' file (by setting "`bfd_target=XXX'") when your configuration
7033+is selected.
7034+
7035+3.1.1 Relocations
7036+-----------------
7037+
7038+*Description*
7039+The file `aoutx.h' provides for both the _standard_ and _extended_
7040+forms of a.out relocation records.
7041+
7042+ The standard records contain only an address, a symbol index, and a
7043+type field. The extended records (used on 29ks and sparcs) also have a
7044+full integer for an addend.
7045+
7046+3.1.2 Internal entry points
7047+---------------------------
7048+
7049+*Description*
7050+`aoutx.h' exports several routines for accessing the contents of an
7051+a.out file, which are gathered and exported in turn by various format
7052+specific files (eg sunos.c).
7053+
7054+3.1.2.1 `aout_SIZE_swap_exec_header_in'
7055+.......................................
7056+
7057+*Synopsis*
7058+ void aout_SIZE_swap_exec_header_in,
7059+ (bfd *abfd,
7060+ struct external_exec *raw_bytes,
7061+ struct internal_exec *execp);
7062+ *Description*
7063+Swap the information in an executable header RAW_BYTES taken from a raw
7064+byte stream memory image into the internal exec header structure EXECP.
7065+
7066+3.1.2.2 `aout_SIZE_swap_exec_header_out'
7067+........................................
7068+
7069+*Synopsis*
7070+ void aout_SIZE_swap_exec_header_out
7071+ (bfd *abfd,
7072+ struct internal_exec *execp,
7073+ struct external_exec *raw_bytes);
7074+ *Description*
7075+Swap the information in an internal exec header structure EXECP into
7076+the buffer RAW_BYTES ready for writing to disk.
7077+
7078+3.1.2.3 `aout_SIZE_some_aout_object_p'
7079+......................................
7080+
7081+*Synopsis*
7082+ const bfd_target *aout_SIZE_some_aout_object_p
7083+ (bfd *abfd,
7084+ const bfd_target *(*callback_to_real_object_p) ());
7085+ *Description*
7086+Some a.out variant thinks that the file open in ABFD checking is an
7087+a.out file. Do some more checking, and set up for access if it really
7088+is. Call back to the calling environment's "finish up" function just
7089+before returning, to handle any last-minute setup.
7090+
7091+3.1.2.4 `aout_SIZE_mkobject'
7092+............................
7093+
7094+*Synopsis*
7095+ bfd_boolean aout_SIZE_mkobject, (bfd *abfd);
7096+ *Description*
7097+Initialize BFD ABFD for use with a.out files.
7098+
7099+3.1.2.5 `aout_SIZE_machine_type'
7100+................................
7101+
7102+*Synopsis*
7103+ enum machine_type aout_SIZE_machine_type
7104+ (enum bfd_architecture arch,
7105+ unsigned long machine));
7106+ *Description*
7107+Keep track of machine architecture and machine type for a.out's. Return
7108+the `machine_type' for a particular architecture and machine, or
7109+`M_UNKNOWN' if that exact architecture and machine can't be represented
7110+in a.out format.
7111+
7112+ If the architecture is understood, machine type 0 (default) is
7113+always understood.
7114+
7115+3.1.2.6 `aout_SIZE_set_arch_mach'
7116+.................................
7117+
7118+*Synopsis*
7119+ bfd_boolean aout_SIZE_set_arch_mach,
7120+ (bfd *,
7121+ enum bfd_architecture arch,
7122+ unsigned long machine));
7123+ *Description*
7124+Set the architecture and the machine of the BFD ABFD to the values ARCH
7125+and MACHINE. Verify that ABFD's format can support the architecture
7126+required.
7127+
7128+3.1.2.7 `aout_SIZE_new_section_hook'
7129+....................................
7130+
7131+*Synopsis*
7132+ bfd_boolean aout_SIZE_new_section_hook,
7133+ (bfd *abfd,
7134+ asection *newsect));
7135+ *Description*
7136+Called by the BFD in response to a `bfd_make_section' request.
7137+
7138+
7139+File: bfd.info, Node: coff, Next: elf, Prev: aout, Up: BFD back ends
7140+
7141+3.2 coff backends
7142+=================
7143+
7144+BFD supports a number of different flavours of coff format. The major
7145+differences between formats are the sizes and alignments of fields in
7146+structures on disk, and the occasional extra field.
7147+
7148+ Coff in all its varieties is implemented with a few common files and
7149+a number of implementation specific files. For example, The 88k bcs
7150+coff format is implemented in the file `coff-m88k.c'. This file
7151+`#include's `coff/m88k.h' which defines the external structure of the
7152+coff format for the 88k, and `coff/internal.h' which defines the
7153+internal structure. `coff-m88k.c' also defines the relocations used by
7154+the 88k format *Note Relocations::.
7155+
7156+ The Intel i960 processor version of coff is implemented in
7157+`coff-i960.c'. This file has the same structure as `coff-m88k.c',
7158+except that it includes `coff/i960.h' rather than `coff-m88k.h'.
7159+
7160+3.2.1 Porting to a new version of coff
7161+--------------------------------------
7162+
7163+The recommended method is to select from the existing implementations
7164+the version of coff which is most like the one you want to use. For
7165+example, we'll say that i386 coff is the one you select, and that your
7166+coff flavour is called foo. Copy `i386coff.c' to `foocoff.c', copy
7167+`../include/coff/i386.h' to `../include/coff/foo.h', and add the lines
7168+to `targets.c' and `Makefile.in' so that your new back end is used.
7169+Alter the shapes of the structures in `../include/coff/foo.h' so that
7170+they match what you need. You will probably also have to add `#ifdef's
7171+to the code in `coff/internal.h' and `coffcode.h' if your version of
7172+coff is too wild.
7173+
7174+ You can verify that your new BFD backend works quite simply by
7175+building `objdump' from the `binutils' directory, and making sure that
7176+its version of what's going on and your host system's idea (assuming it
7177+has the pretty standard coff dump utility, usually called `att-dump' or
7178+just `dump') are the same. Then clean up your code, and send what
7179+you've done to Cygnus. Then your stuff will be in the next release, and
7180+you won't have to keep integrating it.
7181+
7182+3.2.2 How the coff backend works
7183+--------------------------------
7184+
7185+3.2.2.1 File layout
7186+...................
7187+
7188+The Coff backend is split into generic routines that are applicable to
7189+any Coff target and routines that are specific to a particular target.
7190+The target-specific routines are further split into ones which are
7191+basically the same for all Coff targets except that they use the
7192+external symbol format or use different values for certain constants.
7193+
7194+ The generic routines are in `coffgen.c'. These routines work for
7195+any Coff target. They use some hooks into the target specific code;
7196+the hooks are in a `bfd_coff_backend_data' structure, one of which
7197+exists for each target.
7198+
7199+ The essentially similar target-specific routines are in
7200+`coffcode.h'. This header file includes executable C code. The
7201+various Coff targets first include the appropriate Coff header file,
7202+make any special defines that are needed, and then include `coffcode.h'.
7203+
7204+ Some of the Coff targets then also have additional routines in the
7205+target source file itself.
7206+
7207+ For example, `coff-i960.c' includes `coff/internal.h' and
7208+`coff/i960.h'. It then defines a few constants, such as `I960', and
7209+includes `coffcode.h'. Since the i960 has complex relocation types,
7210+`coff-i960.c' also includes some code to manipulate the i960 relocs.
7211+This code is not in `coffcode.h' because it would not be used by any
7212+other target.
7213+
7214+3.2.2.2 Bit twiddling
7215+.....................
7216+
7217+Each flavour of coff supported in BFD has its own header file
7218+describing the external layout of the structures. There is also an
7219+internal description of the coff layout, in `coff/internal.h'. A major
7220+function of the coff backend is swapping the bytes and twiddling the
7221+bits to translate the external form of the structures into the normal
7222+internal form. This is all performed in the `bfd_swap'_thing_direction
7223+routines. Some elements are different sizes between different versions
7224+of coff; it is the duty of the coff version specific include file to
7225+override the definitions of various packing routines in `coffcode.h'.
7226+E.g., the size of line number entry in coff is sometimes 16 bits, and
7227+sometimes 32 bits. `#define'ing `PUT_LNSZ_LNNO' and `GET_LNSZ_LNNO'
7228+will select the correct one. No doubt, some day someone will find a
7229+version of coff which has a varying field size not catered to at the
7230+moment. To port BFD, that person will have to add more `#defines'.
7231+Three of the bit twiddling routines are exported to `gdb';
7232+`coff_swap_aux_in', `coff_swap_sym_in' and `coff_swap_lineno_in'. `GDB'
7233+reads the symbol table on its own, but uses BFD to fix things up. More
7234+of the bit twiddlers are exported for `gas'; `coff_swap_aux_out',
7235+`coff_swap_sym_out', `coff_swap_lineno_out', `coff_swap_reloc_out',
7236+`coff_swap_filehdr_out', `coff_swap_aouthdr_out',
7237+`coff_swap_scnhdr_out'. `Gas' currently keeps track of all the symbol
7238+table and reloc drudgery itself, thereby saving the internal BFD
7239+overhead, but uses BFD to swap things on the way out, making cross
7240+ports much safer. Doing so also allows BFD (and thus the linker) to
7241+use the same header files as `gas', which makes one avenue to disaster
7242+disappear.
7243+
7244+3.2.2.3 Symbol reading
7245+......................
7246+
7247+The simple canonical form for symbols used by BFD is not rich enough to
7248+keep all the information available in a coff symbol table. The back end
7249+gets around this problem by keeping the original symbol table around,
7250+"behind the scenes".
7251+
7252+ When a symbol table is requested (through a call to
7253+`bfd_canonicalize_symtab'), a request gets through to
7254+`coff_get_normalized_symtab'. This reads the symbol table from the coff
7255+file and swaps all the structures inside into the internal form. It
7256+also fixes up all the pointers in the table (represented in the file by
7257+offsets from the first symbol in the table) into physical pointers to
7258+elements in the new internal table. This involves some work since the
7259+meanings of fields change depending upon context: a field that is a
7260+pointer to another structure in the symbol table at one moment may be
7261+the size in bytes of a structure at the next. Another pass is made
7262+over the table. All symbols which mark file names (`C_FILE' symbols)
7263+are modified so that the internal string points to the value in the
7264+auxent (the real filename) rather than the normal text associated with
7265+the symbol (`".file"').
7266+
7267+ At this time the symbol names are moved around. Coff stores all
7268+symbols less than nine characters long physically within the symbol
7269+table; longer strings are kept at the end of the file in the string
7270+table. This pass moves all strings into memory and replaces them with
7271+pointers to the strings.
7272+
7273+ The symbol table is massaged once again, this time to create the
7274+canonical table used by the BFD application. Each symbol is inspected
7275+in turn, and a decision made (using the `sclass' field) about the
7276+various flags to set in the `asymbol'. *Note Symbols::. The generated
7277+canonical table shares strings with the hidden internal symbol table.
7278+
7279+ Any linenumbers are read from the coff file too, and attached to the
7280+symbols which own the functions the linenumbers belong to.
7281+
7282+3.2.2.4 Symbol writing
7283+......................
7284+
7285+Writing a symbol to a coff file which didn't come from a coff file will
7286+lose any debugging information. The `asymbol' structure remembers the
7287+BFD from which the symbol was taken, and on output the back end makes
7288+sure that the same destination target as source target is present.
7289+
7290+ When the symbols have come from a coff file then all the debugging
7291+information is preserved.
7292+
7293+ Symbol tables are provided for writing to the back end in a vector
7294+of pointers to pointers. This allows applications like the linker to
7295+accumulate and output large symbol tables without having to do too much
7296+byte copying.
7297+
7298+ This function runs through the provided symbol table and patches
7299+each symbol marked as a file place holder (`C_FILE') to point to the
7300+next file place holder in the list. It also marks each `offset' field
7301+in the list with the offset from the first symbol of the current symbol.
7302+
7303+ Another function of this procedure is to turn the canonical value
7304+form of BFD into the form used by coff. Internally, BFD expects symbol
7305+values to be offsets from a section base; so a symbol physically at
7306+0x120, but in a section starting at 0x100, would have the value 0x20.
7307+Coff expects symbols to contain their final value, so symbols have
7308+their values changed at this point to reflect their sum with their
7309+owning section. This transformation uses the `output_section' field of
7310+the `asymbol''s `asection' *Note Sections::.
7311+
7312+ * `coff_mangle_symbols'
7313+ This routine runs though the provided symbol table and uses the
7314+offsets generated by the previous pass and the pointers generated when
7315+the symbol table was read in to create the structured hierarchy
7316+required by coff. It changes each pointer to a symbol into the index
7317+into the symbol table of the asymbol.
7318+
7319+ * `coff_write_symbols'
7320+ This routine runs through the symbol table and patches up the
7321+symbols from their internal form into the coff way, calls the bit
7322+twiddlers, and writes out the table to the file.
7323+
7324+3.2.2.5 `coff_symbol_type'
7325+..........................
7326+
7327+*Description*
7328+The hidden information for an `asymbol' is described in a
7329+`combined_entry_type':
7330+
7331+
7332+ typedef struct coff_ptr_struct
7333+ {
7334+ /* Remembers the offset from the first symbol in the file for
7335+ this symbol. Generated by coff_renumber_symbols. */
7336+ unsigned int offset;
7337+
7338+ /* Should the value of this symbol be renumbered. Used for
7339+ XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
7340+ unsigned int fix_value : 1;
7341+
7342+ /* Should the tag field of this symbol be renumbered.
7343+ Created by coff_pointerize_aux. */
7344+ unsigned int fix_tag : 1;
7345+
7346+ /* Should the endidx field of this symbol be renumbered.
7347+ Created by coff_pointerize_aux. */
7348+ unsigned int fix_end : 1;
7349+
7350+ /* Should the x_csect.x_scnlen field be renumbered.
7351+ Created by coff_pointerize_aux. */
7352+ unsigned int fix_scnlen : 1;
7353+
7354+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
7355+ index into the line number entries. Set by coff_slurp_symbol_table. */
7356+ unsigned int fix_line : 1;
7357+
7358+ /* The container for the symbol structure as read and translated
7359+ from the file. */
7360+ union
7361+ {
7362+ union internal_auxent auxent;
7363+ struct internal_syment syment;
7364+ } u;
7365+ } combined_entry_type;
7366+
7367+
7368+ /* Each canonical asymbol really looks like this: */
7369+
7370+ typedef struct coff_symbol_struct
7371+ {
7372+ /* The actual symbol which the rest of BFD works with */
7373+ asymbol symbol;
7374+
7375+ /* A pointer to the hidden information for this symbol */
7376+ combined_entry_type *native;
7377+
7378+ /* A pointer to the linenumber information for this symbol */
7379+ struct lineno_cache_entry *lineno;
7380+
7381+ /* Have the line numbers been relocated yet ? */
7382+ bfd_boolean done_lineno;
7383+ } coff_symbol_type;
7384+
7385+3.2.2.6 `bfd_coff_backend_data'
7386+...............................
7387+
7388+ /* COFF symbol classifications. */
7389+
7390+ enum coff_symbol_classification
7391+ {
7392+ /* Global symbol. */
7393+ COFF_SYMBOL_GLOBAL,
7394+ /* Common symbol. */
7395+ COFF_SYMBOL_COMMON,
7396+ /* Undefined symbol. */
7397+ COFF_SYMBOL_UNDEFINED,
7398+ /* Local symbol. */
7399+ COFF_SYMBOL_LOCAL,
7400+ /* PE section symbol. */
7401+ COFF_SYMBOL_PE_SECTION
7402+ };
7403+Special entry points for gdb to swap in coff symbol table parts:
7404+ typedef struct
7405+ {
7406+ void (*_bfd_coff_swap_aux_in)
7407+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
7408+
7409+ void (*_bfd_coff_swap_sym_in)
7410+ PARAMS ((bfd *, PTR, PTR));
7411+
7412+ void (*_bfd_coff_swap_lineno_in)
7413+ PARAMS ((bfd *, PTR, PTR));
7414+
7415+ unsigned int (*_bfd_coff_swap_aux_out)
7416+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
7417+
7418+ unsigned int (*_bfd_coff_swap_sym_out)
7419+ PARAMS ((bfd *, PTR, PTR));
7420+
7421+ unsigned int (*_bfd_coff_swap_lineno_out)
7422+ PARAMS ((bfd *, PTR, PTR));
7423+
7424+ unsigned int (*_bfd_coff_swap_reloc_out)
7425+ PARAMS ((bfd *, PTR, PTR));
7426+
7427+ unsigned int (*_bfd_coff_swap_filehdr_out)
7428+ PARAMS ((bfd *, PTR, PTR));
7429+
7430+ unsigned int (*_bfd_coff_swap_aouthdr_out)
7431+ PARAMS ((bfd *, PTR, PTR));
7432+
7433+ unsigned int (*_bfd_coff_swap_scnhdr_out)
7434+ PARAMS ((bfd *, PTR, PTR));
7435+
7436+ unsigned int _bfd_filhsz;
7437+ unsigned int _bfd_aoutsz;
7438+ unsigned int _bfd_scnhsz;
7439+ unsigned int _bfd_symesz;
7440+ unsigned int _bfd_auxesz;
7441+ unsigned int _bfd_relsz;
7442+ unsigned int _bfd_linesz;
7443+ unsigned int _bfd_filnmlen;
7444+ bfd_boolean _bfd_coff_long_filenames;
7445+ bfd_boolean _bfd_coff_long_section_names;
7446+ unsigned int _bfd_coff_default_section_alignment_power;
7447+ bfd_boolean _bfd_coff_force_symnames_in_strings;
7448+ unsigned int _bfd_coff_debug_string_prefix_length;
7449+
7450+ void (*_bfd_coff_swap_filehdr_in)
7451+ PARAMS ((bfd *, PTR, PTR));
7452+
7453+ void (*_bfd_coff_swap_aouthdr_in)
7454+ PARAMS ((bfd *, PTR, PTR));
7455+
7456+ void (*_bfd_coff_swap_scnhdr_in)
7457+ PARAMS ((bfd *, PTR, PTR));
7458+
7459+ void (*_bfd_coff_swap_reloc_in)
7460+ PARAMS ((bfd *abfd, PTR, PTR));
7461+
7462+ bfd_boolean (*_bfd_coff_bad_format_hook)
7463+ PARAMS ((bfd *, PTR));
7464+
7465+ bfd_boolean (*_bfd_coff_set_arch_mach_hook)
7466+ PARAMS ((bfd *, PTR));
7467+
7468+ PTR (*_bfd_coff_mkobject_hook)
7469+ PARAMS ((bfd *, PTR, PTR));
7470+
7471+ bfd_boolean (*_bfd_styp_to_sec_flags_hook)
7472+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
7473+
7474+ void (*_bfd_set_alignment_hook)
7475+ PARAMS ((bfd *, asection *, PTR));
7476+
7477+ bfd_boolean (*_bfd_coff_slurp_symbol_table)
7478+ PARAMS ((bfd *));
7479+
7480+ bfd_boolean (*_bfd_coff_symname_in_debug)
7481+ PARAMS ((bfd *, struct internal_syment *));
7482+
7483+ bfd_boolean (*_bfd_coff_pointerize_aux_hook)
7484+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
7485+ unsigned int, combined_entry_type *));
7486+
7487+ bfd_boolean (*_bfd_coff_print_aux)
7488+ PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
7489+ combined_entry_type *, unsigned int));
7490+
7491+ void (*_bfd_coff_reloc16_extra_cases)
7492+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
7493+ bfd_byte *, unsigned int *, unsigned int *));
7494+
7495+ int (*_bfd_coff_reloc16_estimate)
7496+ PARAMS ((bfd *, asection *, arelent *, unsigned int,
7497+ struct bfd_link_info *));
7498+
7499+ enum coff_symbol_classification (*_bfd_coff_classify_symbol)
7500+ PARAMS ((bfd *, struct internal_syment *));
7501+
7502+ bfd_boolean (*_bfd_coff_compute_section_file_positions)
7503+ PARAMS ((bfd *));
7504+
7505+ bfd_boolean (*_bfd_coff_start_final_link)
7506+ PARAMS ((bfd *, struct bfd_link_info *));
7507+
7508+ bfd_boolean (*_bfd_coff_relocate_section)
7509+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
7510+ struct internal_reloc *, struct internal_syment *, asection **));
7511+
7512+ reloc_howto_type *(*_bfd_coff_rtype_to_howto)
7513+ PARAMS ((bfd *, asection *, struct internal_reloc *,
7514+ struct coff_link_hash_entry *, struct internal_syment *,
7515+ bfd_vma *));
7516+
7517+ bfd_boolean (*_bfd_coff_adjust_symndx)
7518+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
7519+ struct internal_reloc *, bfd_boolean *));
7520+
7521+ bfd_boolean (*_bfd_coff_link_add_one_symbol)
7522+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
7523+ asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
7524+ struct bfd_link_hash_entry **));
7525+
7526+ bfd_boolean (*_bfd_coff_link_output_has_begun)
7527+ PARAMS ((bfd *, struct coff_final_link_info *));
7528+
7529+ bfd_boolean (*_bfd_coff_final_link_postscript)
7530+ PARAMS ((bfd *, struct coff_final_link_info *));
7531+
7532+ } bfd_coff_backend_data;
7533+
7534+ #define coff_backend_info(abfd) \
7535+ ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
7536+
7537+ #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
7538+ ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
7539+
7540+ #define bfd_coff_swap_sym_in(a,e,i) \
7541+ ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
7542+
7543+ #define bfd_coff_swap_lineno_in(a,e,i) \
7544+ ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
7545+
7546+ #define bfd_coff_swap_reloc_out(abfd, i, o) \
7547+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
7548+
7549+ #define bfd_coff_swap_lineno_out(abfd, i, o) \
7550+ ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
7551+
7552+ #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
7553+ ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
7554+
7555+ #define bfd_coff_swap_sym_out(abfd, i,o) \
7556+ ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
7557+
7558+ #define bfd_coff_swap_scnhdr_out(abfd, i,o) \
7559+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
7560+
7561+ #define bfd_coff_swap_filehdr_out(abfd, i,o) \
7562+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
7563+
7564+ #define bfd_coff_swap_aouthdr_out(abfd, i,o) \
7565+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
7566+
7567+ #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
7568+ #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
7569+ #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
7570+ #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
7571+ #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
7572+ #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
7573+ #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
7574+ #define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
7575+ #define bfd_coff_long_filenames(abfd) \
7576+ (coff_backend_info (abfd)->_bfd_coff_long_filenames)
7577+ #define bfd_coff_long_section_names(abfd) \
7578+ (coff_backend_info (abfd)->_bfd_coff_long_section_names)
7579+ #define bfd_coff_default_section_alignment_power(abfd) \
7580+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
7581+ #define bfd_coff_swap_filehdr_in(abfd, i,o) \
7582+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
7583+
7584+ #define bfd_coff_swap_aouthdr_in(abfd, i,o) \
7585+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
7586+
7587+ #define bfd_coff_swap_scnhdr_in(abfd, i,o) \
7588+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
7589+
7590+ #define bfd_coff_swap_reloc_in(abfd, i, o) \
7591+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
7592+
7593+ #define bfd_coff_bad_format_hook(abfd, filehdr) \
7594+ ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
7595+
7596+ #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
7597+ ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
7598+ #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
7599+ ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
7600+ (abfd, filehdr, aouthdr))
7601+
7602+ #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
7603+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
7604+ (abfd, scnhdr, name, section, flags_ptr))
7605+
7606+ #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
7607+ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
7608+
7609+ #define bfd_coff_slurp_symbol_table(abfd)\
7610+ ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
7611+
7612+ #define bfd_coff_symname_in_debug(abfd, sym)\
7613+ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
7614+
7615+ #define bfd_coff_force_symnames_in_strings(abfd)\
7616+ (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
7617+
7618+ #define bfd_coff_debug_string_prefix_length(abfd)\
7619+ (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
7620+
7621+ #define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
7622+ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
7623+ (abfd, file, base, symbol, aux, indaux))
7624+
7625+ #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order,\
7626+ reloc, data, src_ptr, dst_ptr)\
7627+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
7628+ (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
7629+
7630+ #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
7631+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
7632+ (abfd, section, reloc, shrink, link_info))
7633+
7634+ #define bfd_coff_classify_symbol(abfd, sym)\
7635+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
7636+ (abfd, sym))
7637+
7638+ #define bfd_coff_compute_section_file_positions(abfd)\
7639+ ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
7640+ (abfd))
7641+
7642+ #define bfd_coff_start_final_link(obfd, info)\
7643+ ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
7644+ (obfd, info))
7645+ #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
7646+ ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
7647+ (obfd, info, ibfd, o, con, rel, isyms, secs))
7648+ #define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
7649+ ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
7650+ (abfd, sec, rel, h, sym, addendp))
7651+ #define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
7652+ ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
7653+ (obfd, info, ibfd, sec, rel, adjustedp))
7654+ #define bfd_coff_link_add_one_symbol(info, abfd, name, flags, section,\
7655+ value, string, cp, coll, hashp)\
7656+ ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
7657+ (info, abfd, name, flags, section, value, string, cp, coll, hashp))
7658+
7659+ #define bfd_coff_link_output_has_begun(a,p) \
7660+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
7661+ #define bfd_coff_final_link_postscript(a,p) \
7662+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
7663+
7664+3.2.2.7 Writing relocations
7665+...........................
7666+
7667+To write relocations, the back end steps though the canonical
7668+relocation table and create an `internal_reloc'. The symbol index to
7669+use is removed from the `offset' field in the symbol table supplied.
7670+The address comes directly from the sum of the section base address and
7671+the relocation offset; the type is dug directly from the howto field.
7672+Then the `internal_reloc' is swapped into the shape of an
7673+`external_reloc' and written out to disk.
7674+
7675+3.2.2.8 Reading linenumbers
7676+...........................
7677+
7678+Creating the linenumber table is done by reading in the entire coff
7679+linenumber table, and creating another table for internal use.
7680+
7681+ A coff linenumber table is structured so that each function is
7682+marked as having a line number of 0. Each line within the function is
7683+an offset from the first line in the function. The base of the line
7684+number information for the table is stored in the symbol associated
7685+with the function.
7686+
7687+ Note: The PE format uses line number 0 for a flag indicating a new
7688+source file.
7689+
7690+ The information is copied from the external to the internal table,
7691+and each symbol which marks a function is marked by pointing its...
7692+
7693+ How does this work ?
7694+
7695+3.2.2.9 Reading relocations
7696+...........................
7697+
7698+Coff relocations are easily transformed into the internal BFD form
7699+(`arelent').
7700+
7701+ Reading a coff relocation table is done in the following stages:
7702+
7703+ * Read the entire coff relocation table into memory.
7704+
7705+ * Process each relocation in turn; first swap it from the external
7706+ to the internal form.
7707+
7708+ * Turn the symbol referenced in the relocation's symbol index into a
7709+ pointer into the canonical symbol table. This table is the same
7710+ as the one returned by a call to `bfd_canonicalize_symtab'. The
7711+ back end will call that routine and save the result if a
7712+ canonicalization hasn't been done.
7713+
7714+ * The reloc index is turned into a pointer to a howto structure, in
7715+ a back end specific way. For instance, the 386 and 960 use the
7716+ `r_type' to directly produce an index into a howto table vector;
7717+ the 88k subtracts a number from the `r_type' field and creates an
7718+ addend field.
7719+
7720+
7721+File: bfd.info, Node: elf, Next: mmo, Prev: coff, Up: BFD back ends
7722+
7723+3.3
7724+===
7725+
7726+ELF backends
7727+
7728+ BFD support for ELF formats is being worked on. Currently, the best
7729+supported back ends are for sparc and i386 (running svr4 or Solaris 2).
7730+
7731+ Documentation of the internals of the support code still needs to be
7732+written. The code is changing quickly enough that we haven't bothered
7733+yet.
7734+
7735+3.3.0.1 `bfd_elf_find_section'
7736+..............................
7737+
7738+*Synopsis*
7739+ struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
7740+ *Description*
7741+Helper functions for GDB to locate the string tables. Since BFD hides
7742+string tables from callers, GDB needs to use an internal hook to find
7743+them. Sun's .stabstr, in particular, isn't even pointed to by the
7744+.stab section, so ordinary mechanisms wouldn't work to find it, even if
7745+we had some.
7746+
7747+
7748+File: bfd.info, Node: mmo, Prev: elf, Up: BFD back ends
7749+
7750+3.4 mmo backend
7751+===============
7752+
7753+The mmo object format is used exclusively together with Professor
7754+Donald E. Knuth's educational 64-bit processor MMIX. The simulator
7755+`mmix' which is available at
7756+`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'
7757+understands this format. That package also includes a combined
7758+assembler and linker called `mmixal'. The mmo format has no advantages
7759+feature-wise compared to e.g. ELF. It is a simple non-relocatable
7760+object format with no support for archives or debugging information,
7761+except for symbol value information and line numbers (which is not yet
7762+implemented in BFD). See
7763+`http://www-cs-faculty.stanford.edu/~knuth/mmix.html' for more
7764+information about MMIX. The ELF format is used for intermediate object
7765+files in the BFD implementation.
7766+
7767+* Menu:
7768+
7769+* File layout::
7770+* Symbol-table::
7771+* mmo section mapping::
7772+
7773+
7774+File: bfd.info, Node: File layout, Next: Symbol-table, Prev: mmo, Up: mmo
7775+
7776+3.4.1 File layout
7777+-----------------
7778+
7779+The mmo file contents is not partitioned into named sections as with
7780+e.g. ELF. Memory areas is formed by specifying the location of the
7781+data that follows. Only the memory area `0x0000...00' to `0x01ff...ff'
7782+is executable, so it is used for code (and constants) and the area
7783+`0x2000...00' to `0x20ff...ff' is used for writable data. *Note mmo
7784+section mapping::.
7785+
7786+ There is provision for specifying "special data" of 65536 different
7787+types. We use type 80 (decimal), arbitrarily chosen the same as the
7788+ELF `e_machine' number for MMIX, filling it with section information
7789+normally found in ELF objects. *Note mmo section mapping::.
7790+
7791+ Contents is entered as 32-bit words, xor:ed over previous contents,
7792+always zero-initialized. A word that starts with the byte `0x98' forms
7793+a command called a `lopcode', where the next byte distinguished between
7794+the thirteen lopcodes. The two remaining bytes, called the `Y' and `Z'
7795+fields, or the `YZ' field (a 16-bit big-endian number), are used for
7796+various purposes different for each lopcode. As documented in
7797+`http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz', the
7798+lopcodes are:
7799+
7800+`lop_quote'
7801+ 0x98000001. The next word is contents, regardless of whether it
7802+ starts with 0x98 or not.
7803+
7804+`lop_loc'
7805+ 0x9801YYZZ, where `Z' is 1 or 2. This is a location directive,
7806+ setting the location for the next data to the next 32-bit word
7807+ (for Z = 1) or 64-bit word (for Z = 2), plus Y * 2^56. Normally
7808+ `Y' is 0 for the text segment and 2 for the data segment.
7809+
7810+`lop_skip'
7811+ 0x9802YYZZ. Increase the current location by `YZ' bytes.
7812+
7813+`lop_fixo'
7814+ 0x9803YYZZ, where `Z' is 1 or 2. Store the current location as 64
7815+ bits into the location pointed to by the next 32-bit (Z = 1) or
7816+ 64-bit (Z = 2) word, plus Y * 2^56.
7817+
7818+`lop_fixr'
7819+ 0x9804YYZZ. `YZ' is stored into the current location plus 2 - 4 *
7820+ YZ.
7821+
7822+`lop_fixrx'
7823+ 0x980500ZZ. `Z' is 16 or 24. A value `L' derived from the
7824+ following 32-bit word are used in a manner similar to `YZ' in
7825+ lop_fixr: it is xor:ed into the current location minus 4 * L. The
7826+ first byte of the word is 0 or 1. If it is 1, then L = (LOWEST 24
7827+ BITS OF WORD) - 2^Z, if 0, then L = (LOWEST 24 BITS OF WORD).
7828+
7829+`lop_file'
7830+ 0x9806YYZZ. `Y' is the file number, `Z' is count of 32-bit words.
7831+ Set the file number to `Y' and the line counter to 0. The next Z
7832+ * 4 bytes contain the file name, padded with zeros if the count is
7833+ not a multiple of four. The same `Y' may occur multiple times,
7834+ but `Z' must be 0 for all but the first occurrence.
7835+
7836+`lop_line'
7837+ 0x9807YYZZ. `YZ' is the line number. Together with lop_file, it
7838+ forms the source location for the next 32-bit word. Note that for
7839+ each non-lopcode 32-bit word, line numbers are assumed incremented
7840+ by one.
7841+
7842+`lop_spec'
7843+ 0x9808YYZZ. `YZ' is the type number. Data until the next lopcode
7844+ other than lop_quote forms special data of type `YZ'. *Note mmo
7845+ section mapping::.
7846+
7847+ Other types than 80, (or type 80 with a content that does not
7848+ parse) is stored in sections named `.MMIX.spec_data.N' where N is
7849+ the `YZ'-type. The flags for such a sections say not to allocate
7850+ or load the data. The vma is 0. Contents of multiple occurrences
7851+ of special data N is concatenated to the data of the previous
7852+ lop_spec Ns. The location in data or code at which the lop_spec
7853+ occurred is lost.
7854+
7855+`lop_pre'
7856+ 0x980901ZZ. The first lopcode in a file. The `Z' field forms the
7857+ length of header information in 32-bit words, where the first word
7858+ tells the time in seconds since `00:00:00 GMT Jan 1 1970'.
7859+
7860+`lop_post'
7861+ 0x980a00ZZ. Z > 32. This lopcode follows after all
7862+ content-generating lopcodes in a program. The `Z' field denotes
7863+ the value of `rG' at the beginning of the program. The following
7864+ 256 - Z big-endian 64-bit words are loaded into global registers
7865+ `$G' ... `$255'.
7866+
7867+`lop_stab'
7868+ 0x980b0000. The next-to-last lopcode in a program. Must follow
7869+ immediately after the lop_post lopcode and its data. After this
7870+ lopcode follows all symbols in a compressed format (*note
7871+ Symbol-table::).
7872+
7873+`lop_end'
7874+ 0x980cYYZZ. The last lopcode in a program. It must follow the
7875+ lop_stab lopcode and its data. The `YZ' field contains the number
7876+ of 32-bit words of symbol table information after the preceding
7877+ lop_stab lopcode.
7878+
7879+ Note that the lopcode "fixups"; `lop_fixr', `lop_fixrx' and
7880+`lop_fixo' are not generated by BFD, but are handled. They are
7881+generated by `mmixal'.
7882+
7883+ This trivial one-label, one-instruction file:
7884+
7885+ :Main TRAP 1,2,3
7886+
7887+ can be represented this way in mmo:
7888+
7889+ 0x98090101 - lop_pre, one 32-bit word with timestamp.
7890+ <timestamp>
7891+ 0x98010002 - lop_loc, text segment, using a 64-bit address.
7892+ Note that mmixal does not emit this for the file above.
7893+ 0x00000000 - Address, high 32 bits.
7894+ 0x00000000 - Address, low 32 bits.
7895+ 0x98060002 - lop_file, 2 32-bit words for file-name.
7896+ 0x74657374 - "test"
7897+ 0x2e730000 - ".s\0\0"
7898+ 0x98070001 - lop_line, line 1.
7899+ 0x00010203 - TRAP 1,2,3
7900+ 0x980a00ff - lop_post, setting $255 to 0.
7901+ 0x00000000
7902+ 0x00000000
7903+ 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
7904+ 0x203a4040 *Note Symbol-table::.
7905+ 0x10404020
7906+ 0x4d206120
7907+ 0x69016e00
7908+ 0x81000000
7909+ 0x980c0005 - lop_end; symbol table contained five 32-bit words.
7910+
7911+
7912+File: bfd.info, Node: Symbol-table, Next: mmo section mapping, Prev: File layout, Up: mmo
7913+
7914+3.4.2 Symbol table format
7915+-------------------------
7916+
7917+From mmixal.w (or really, the generated mmixal.tex) in
7918+`http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz'):
7919+"Symbols are stored and retrieved by means of a `ternary search trie',
7920+following ideas of Bentley and Sedgewick. (See ACM-SIAM Symp. on
7921+Discrete Algorithms `8' (1997), 360-369; R.Sedgewick, `Algorithms in C'
7922+(Reading, Mass. Addison-Wesley, 1998), `15.4'.) Each trie node stores
7923+a character, and there are branches to subtries for the cases where a
7924+given character is less than, equal to, or greater than the character
7925+in the trie. There also is a pointer to a symbol table entry if a
7926+symbol ends at the current node."
7927+
7928+ So it's a tree encoded as a stream of bytes. The stream of bytes
7929+acts on a single virtual global symbol, adding and removing characters
7930+and signalling complete symbol points. Here, we read the stream and
7931+create symbols at the completion points.
7932+
7933+ First, there's a control byte `m'. If any of the listed bits in `m'
7934+is nonzero, we execute what stands at the right, in the listed order:
7935+
7936+ (MMO3_LEFT)
7937+ 0x40 - Traverse left trie.
7938+ (Read a new command byte and recurse.)
7939+
7940+ (MMO3_SYMBITS)
7941+ 0x2f - Read the next byte as a character and store it in the
7942+ current character position; increment character position.
7943+ Test the bits of `m':
7944+
7945+ (MMO3_WCHAR)
7946+ 0x80 - The character is 16-bit (so read another byte,
7947+ merge into current character.
7948+
7949+ (MMO3_TYPEBITS)
7950+ 0xf - We have a complete symbol; parse the type, value
7951+ and serial number and do what should be done
7952+ with a symbol. The type and length information
7953+ is in j = (m & 0xf).
7954+
7955+ (MMO3_REGQUAL_BITS)
7956+ j == 0xf: A register variable. The following
7957+ byte tells which register.
7958+ j <= 8: An absolute symbol. Read j bytes as the
7959+ big-endian number the symbol equals.
7960+ A j = 2 with two zero bytes denotes an
7961+ unknown symbol.
7962+ j > 8: As with j <= 8, but add (0x20 << 56)
7963+ to the value in the following j - 8
7964+ bytes.
7965+
7966+ Then comes the serial number, as a variant of
7967+ uleb128, but better named ubeb128:
7968+ Read bytes and shift the previous value left 7
7969+ (multiply by 128). Add in the new byte, repeat
7970+ until a byte has bit 7 set. The serial number
7971+ is the computed value minus 128.
7972+
7973+ (MMO3_MIDDLE)
7974+ 0x20 - Traverse middle trie. (Read a new command byte
7975+ and recurse.) Decrement character position.
7976+
7977+ (MMO3_RIGHT)
7978+ 0x10 - Traverse right trie. (Read a new command byte and
7979+ recurse.)
7980+
7981+ Let's look again at the `lop_stab' for the trivial file (*note File
7982+layout::).
7983+
7984+ 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
7985+ 0x203a4040
7986+ 0x10404020
7987+ 0x4d206120
7988+ 0x69016e00
7989+ 0x81000000
7990+
7991+ This forms the trivial trie (note that the path between ":" and "M"
7992+is redundant):
7993+
7994+ 203a ":"
7995+ 40 /
7996+ 40 /
7997+ 10 \
7998+ 40 /
7999+ 40 /
8000+ 204d "M"
8001+ 2061 "a"
8002+ 2069 "i"
8003+ 016e "n" is the last character in a full symbol, and
8004+ with a value represented in one byte.
8005+ 00 The value is 0.
8006+ 81 The serial number is 1.
8007+
8008+
8009+File: bfd.info, Node: mmo section mapping, Prev: Symbol-table, Up: mmo
8010+
8011+3.4.3 mmo section mapping
8012+-------------------------
8013+
8014+The implementation in BFD uses special data type 80 (decimal) to
8015+encapsulate and describe named sections, containing e.g. debug
8016+information. If needed, any datum in the encapsulation will be quoted
8017+using lop_quote. First comes a 32-bit word holding the number of
8018+32-bit words containing the zero-terminated zero-padded segment name.
8019+After the name there's a 32-bit word holding flags describing the
8020+section type. Then comes a 64-bit big-endian word with the section
8021+length (in bytes), then another with the section start address.
8022+Depending on the type of section, the contents might follow,
8023+zero-padded to 32-bit boundary. For a loadable section (such as data
8024+or code), the contents might follow at some later point, not
8025+necessarily immediately, as a lop_loc with the same start address as in
8026+the section description, followed by the contents. This in effect
8027+forms a descriptor that must be emitted before the actual contents.
8028+Sections described this way must not overlap.
8029+
8030+ For areas that don't have such descriptors, synthetic sections are
8031+formed by BFD. Consecutive contents in the two memory areas
8032+`0x0000...00' to `0x01ff...ff' and `0x2000...00' to `0x20ff...ff' are
8033+entered in sections named `.text' and `.data' respectively. If an area
8034+is not otherwise described, but would together with a neighboring lower
8035+area be less than `0x40000000' bytes long, it is joined with the lower
8036+area and the gap is zero-filled. For other cases, a new section is
8037+formed, named `.MMIX.sec.N'. Here, N is a number, a running count
8038+through the mmo file, starting at 0.
8039+
8040+ A loadable section specified as:
8041+
8042+ .section secname,"ax"
8043+ TETRA 1,2,3,4,-1,-2009
8044+ BYTE 80
8045+
8046+ and linked to address `0x4', is represented by the sequence:
8047+
8048+ 0x98080050 - lop_spec 80
8049+ 0x00000002 - two 32-bit words for the section name
8050+ 0x7365636e - "secn"
8051+ 0x616d6500 - "ame\0"
8052+ 0x00000033 - flags CODE, READONLY, LOAD, ALLOC
8053+ 0x00000000 - high 32 bits of section length
8054+ 0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
8055+ 0x00000000 - high 32 bits of section address
8056+ 0x00000004 - section address is 4
8057+ 0x98010002 - 64 bits with address of following data
8058+ 0x00000000 - high 32 bits of address
8059+ 0x00000004 - low 32 bits: data starts at address 4
8060+ 0x00000001 - 1
8061+ 0x00000002 - 2
8062+ 0x00000003 - 3
8063+ 0x00000004 - 4
8064+ 0xffffffff - -1
8065+ 0xfffff827 - -2009
8066+ 0x50000000 - 80 as a byte, padded with zeros.
8067+
8068+ Note that the lop_spec wrapping does not include the section
8069+contents. Compare this to a non-loaded section specified as:
8070+
8071+ .section thirdsec
8072+ TETRA 200001,100002
8073+ BYTE 38,40
8074+
8075+ This, when linked to address `0x200000000000001c', is represented by:
8076+
8077+ 0x98080050 - lop_spec 80
8078+ 0x00000002 - two 32-bit words for the section name
8079+ 0x7365636e - "thir"
8080+ 0x616d6500 - "dsec"
8081+ 0x00000010 - flag READONLY
8082+ 0x00000000 - high 32 bits of section length
8083+ 0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
8084+ 0x20000000 - high 32 bits of address
8085+ 0x0000001c - low 32 bits of address 0x200000000000001c
8086+ 0x00030d41 - 200001
8087+ 0x000186a2 - 100002
8088+ 0x26280000 - 38, 40 as bytes, padded with zeros
8089+
8090+ For the latter example, the section contents must not be loaded in
8091+memory, and is therefore specified as part of the special data. The
8092+address is usually unimportant but might provide information for e.g.
8093+the DWARF 2 debugging format.
8094+
8095+
8096+File: bfd.info, Node: GNU Free Documentation License, Next: Index, Prev: BFD back ends, Up: Top
8097+
8098+Appendix A GNU Free Documentation License
8099+*****************************************
8100+
8101+ Version 1.1, March 2000
8102+
8103+ Copyright (C) 2000, 2003 Free Software Foundation, Inc.
8104+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
8105+
8106+ Everyone is permitted to copy and distribute verbatim copies
8107+ of this license document, but changing it is not allowed.
8108+
8109+
8110+ 0. PREAMBLE
8111+
8112+ The purpose of this License is to make a manual, textbook, or other
8113+ written document "free" in the sense of freedom: to assure everyone
8114+ the effective freedom to copy and redistribute it, with or without
8115+ modifying it, either commercially or noncommercially. Secondarily,
8116+ this License preserves for the author and publisher a way to get
8117+ credit for their work, while not being considered responsible for
8118+ modifications made by others.
8119+
8120+ This License is a kind of "copyleft", which means that derivative
8121+ works of the document must themselves be free in the same sense.
8122+ It complements the GNU General Public License, which is a copyleft
8123+ license designed for free software.
8124+
8125+ We have designed this License in order to use it for manuals for
8126+ free software, because free software needs free documentation: a
8127+ free program should come with manuals providing the same freedoms
8128+ that the software does. But this License is not limited to
8129+ software manuals; it can be used for any textual work, regardless
8130+ of subject matter or whether it is published as a printed book.
8131+ We recommend this License principally for works whose purpose is
8132+ instruction or reference.
8133+
8134+
8135+ 1. APPLICABILITY AND DEFINITIONS
8136+
8137+ This License applies to any manual or other work that contains a
8138+ notice placed by the copyright holder saying it can be distributed
8139+ under the terms of this License. The "Document", below, refers to
8140+ any such manual or work. Any member of the public is a licensee,
8141+ and is addressed as "you."
8142+
8143+ A "Modified Version" of the Document means any work containing the
8144+ Document or a portion of it, either copied verbatim, or with
8145+ modifications and/or translated into another language.
8146+
8147+ A "Secondary Section" is a named appendix or a front-matter
8148+ section of the Document that deals exclusively with the
8149+ relationship of the publishers or authors of the Document to the
8150+ Document's overall subject (or to related matters) and contains
8151+ nothing that could fall directly within that overall subject.
8152+ (For example, if the Document is in part a textbook of
8153+ mathematics, a Secondary Section may not explain any mathematics.)
8154+ The relationship could be a matter of historical connection with
8155+ the subject or with related matters, or of legal, commercial,
8156+ philosophical, ethical or political position regarding them.
8157+
8158+ The "Invariant Sections" are certain Secondary Sections whose
8159+ titles are designated, as being those of Invariant Sections, in
8160+ the notice that says that the Document is released under this
8161+ License.
8162+
8163+ The "Cover Texts" are certain short passages of text that are
8164+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
8165+ that says that the Document is released under this License.
8166+
8167+ A "Transparent" copy of the Document means a machine-readable copy,
8168+ represented in a format whose specification is available to the
8169+ general public, whose contents can be viewed and edited directly
8170+ and straightforwardly with generic text editors or (for images
8171+ composed of pixels) generic paint programs or (for drawings) some
8172+ widely available drawing editor, and that is suitable for input to
8173+ text formatters or for automatic translation to a variety of
8174+ formats suitable for input to text formatters. A copy made in an
8175+ otherwise Transparent file format whose markup has been designed
8176+ to thwart or discourage subsequent modification by readers is not
8177+ Transparent. A copy that is not "Transparent" is called "Opaque."
8178+
8179+ Examples of suitable formats for Transparent copies include plain
8180+ ASCII without markup, Texinfo input format, LaTeX input format,
8181+ SGML or XML using a publicly available DTD, and
8182+ standard-conforming simple HTML designed for human modification.
8183+ Opaque formats include PostScript, PDF, proprietary formats that
8184+ can be read and edited only by proprietary word processors, SGML
8185+ or XML for which the DTD and/or processing tools are not generally
8186+ available, and the machine-generated HTML produced by some word
8187+ processors for output purposes only.
8188+
8189+ The "Title Page" means, for a printed book, the title page itself,
8190+ plus such following pages as are needed to hold, legibly, the
8191+ material this License requires to appear in the title page. For
8192+ works in formats which do not have any title page as such, "Title
8193+ Page" means the text near the most prominent appearance of the
8194+ work's title, preceding the beginning of the body of the text.
8195+
8196+ 2. VERBATIM COPYING
8197+
8198+ You may copy and distribute the Document in any medium, either
8199+ commercially or noncommercially, provided that this License, the
8200+ copyright notices, and the license notice saying this License
8201+ applies to the Document are reproduced in all copies, and that you
8202+ add no other conditions whatsoever to those of this License. You
8203+ may not use technical measures to obstruct or control the reading
8204+ or further copying of the copies you make or distribute. However,
8205+ you may accept compensation in exchange for copies. If you
8206+ distribute a large enough number of copies you must also follow
8207+ the conditions in section 3.
8208+
8209+ You may also lend copies, under the same conditions stated above,
8210+ and you may publicly display copies.
8211+
8212+ 3. COPYING IN QUANTITY
8213+
8214+ If you publish printed copies of the Document numbering more than
8215+ 100, and the Document's license notice requires Cover Texts, you
8216+ must enclose the copies in covers that carry, clearly and legibly,
8217+ all these Cover Texts: Front-Cover Texts on the front cover, and
8218+ Back-Cover Texts on the back cover. Both covers must also clearly
8219+ and legibly identify you as the publisher of these copies. The
8220+ front cover must present the full title with all words of the
8221+ title equally prominent and visible. You may add other material
8222+ on the covers in addition. Copying with changes limited to the
8223+ covers, as long as they preserve the title of the Document and
8224+ satisfy these conditions, can be treated as verbatim copying in
8225+ other respects.
8226+
8227+ If the required texts for either cover are too voluminous to fit
8228+ legibly, you should put the first ones listed (as many as fit
8229+ reasonably) on the actual cover, and continue the rest onto
8230+ adjacent pages.
8231+
8232+ If you publish or distribute Opaque copies of the Document
8233+ numbering more than 100, you must either include a
8234+ machine-readable Transparent copy along with each Opaque copy, or
8235+ state in or with each Opaque copy a publicly-accessible
8236+ computer-network location containing a complete Transparent copy
8237+ of the Document, free of added material, which the general
8238+ network-using public has access to download anonymously at no
8239+ charge using public-standard network protocols. If you use the
8240+ latter option, you must take reasonably prudent steps, when you
8241+ begin distribution of Opaque copies in quantity, to ensure that
8242+ this Transparent copy will remain thus accessible at the stated
8243+ location until at least one year after the last time you
8244+ distribute an Opaque copy (directly or through your agents or
8245+ retailers) of that edition to the public.
8246+
8247+ It is requested, but not required, that you contact the authors of
8248+ the Document well before redistributing any large number of
8249+ copies, to give them a chance to provide you with an updated
8250+ version of the Document.
8251+
8252+ 4. MODIFICATIONS
8253+
8254+ You may copy and distribute a Modified Version of the Document
8255+ under the conditions of sections 2 and 3 above, provided that you
8256+ release the Modified Version under precisely this License, with
8257+ the Modified Version filling the role of the Document, thus
8258+ licensing distribution and modification of the Modified Version to
8259+ whoever possesses a copy of it. In addition, you must do these
8260+ things in the Modified Version:
8261+
8262+ A. Use in the Title Page (and on the covers, if any) a title
8263+ distinct from that of the Document, and from those of previous
8264+ versions (which should, if there were any, be listed in the
8265+ History section of the Document). You may use the same title
8266+ as a previous version if the original publisher of that version
8267+ gives permission.
8268+ B. List on the Title Page, as authors, one or more persons or
8269+ entities responsible for authorship of the modifications in the
8270+ Modified Version, together with at least five of the principal
8271+ authors of the Document (all of its principal authors, if it
8272+ has less than five).
8273+ C. State on the Title page the name of the publisher of the
8274+ Modified Version, as the publisher.
8275+ D. Preserve all the copyright notices of the Document.
8276+ E. Add an appropriate copyright notice for your modifications
8277+ adjacent to the other copyright notices.
8278+ F. Include, immediately after the copyright notices, a license
8279+ notice giving the public permission to use the Modified Version
8280+ under the terms of this License, in the form shown in the
8281+ Addendum below.
8282+ G. Preserve in that license notice the full lists of Invariant
8283+ Sections and required Cover Texts given in the Document's
8284+ license notice.
8285+ H. Include an unaltered copy of this License.
8286+ I. Preserve the section entitled "History", and its title, and add
8287+ to it an item stating at least the title, year, new authors, and
8288+ publisher of the Modified Version as given on the Title Page.
8289+ If there is no section entitled "History" in the Document,
8290+ create one stating the title, year, authors, and publisher of
8291+ the Document as given on its Title Page, then add an item
8292+ describing the Modified Version as stated in the previous
8293+ sentence.
8294+ J. Preserve the network location, if any, given in the Document for
8295+ public access to a Transparent copy of the Document, and
8296+ likewise the network locations given in the Document for
8297+ previous versions it was based on. These may be placed in the
8298+ "History" section. You may omit a network location for a work
8299+ that was published at least four years before the Document
8300+ itself, or if the original publisher of the version it refers
8301+ to gives permission.
8302+ K. In any section entitled "Acknowledgements" or "Dedications",
8303+ preserve the section's title, and preserve in the section all the
8304+ substance and tone of each of the contributor acknowledgements
8305+ and/or dedications given therein.
8306+ L. Preserve all the Invariant Sections of the Document,
8307+ unaltered in their text and in their titles. Section numbers
8308+ or the equivalent are not considered part of the section titles.
8309+ M. Delete any section entitled "Endorsements." Such a section
8310+ may not be included in the Modified Version.
8311+ N. Do not retitle any existing section as "Endorsements" or to
8312+ conflict in title with any Invariant Section.
8313+
8314+ If the Modified Version includes new front-matter sections or
8315+ appendices that qualify as Secondary Sections and contain no
8316+ material copied from the Document, you may at your option
8317+ designate some or all of these sections as invariant. To do this,
8318+ add their titles to the list of Invariant Sections in the Modified
8319+ Version's license notice. These titles must be distinct from any
8320+ other section titles.
8321+
8322+ You may add a section entitled "Endorsements", provided it contains
8323+ nothing but endorsements of your Modified Version by various
8324+ parties-for example, statements of peer review or that the text has
8325+ been approved by an organization as the authoritative definition
8326+ of a standard.
8327+
8328+ You may add a passage of up to five words as a Front-Cover Text,
8329+ and a passage of up to 25 words as a Back-Cover Text, to the end
8330+ of the list of Cover Texts in the Modified Version. Only one
8331+ passage of Front-Cover Text and one of Back-Cover Text may be
8332+ added by (or through arrangements made by) any one entity. If the
8333+ Document already includes a cover text for the same cover,
8334+ previously added by you or by arrangement made by the same entity
8335+ you are acting on behalf of, you may not add another; but you may
8336+ replace the old one, on explicit permission from the previous
8337+ publisher that added the old one.
8338+
8339+ The author(s) and publisher(s) of the Document do not by this
8340+ License give permission to use their names for publicity for or to
8341+ assert or imply endorsement of any Modified Version.
8342+
8343+ 5. COMBINING DOCUMENTS
8344+
8345+ You may combine the Document with other documents released under
8346+ this License, under the terms defined in section 4 above for
8347+ modified versions, provided that you include in the combination
8348+ all of the Invariant Sections of all of the original documents,
8349+ unmodified, and list them all as Invariant Sections of your
8350+ combined work in its license notice.
8351+
8352+ The combined work need only contain one copy of this License, and
8353+ multiple identical Invariant Sections may be replaced with a single
8354+ copy. If there are multiple Invariant Sections with the same name
8355+ but different contents, make the title of each such section unique
8356+ by adding at the end of it, in parentheses, the name of the
8357+ original author or publisher of that section if known, or else a
8358+ unique number. Make the same adjustment to the section titles in
8359+ the list of Invariant Sections in the license notice of the
8360+ combined work.
8361+
8362+ In the combination, you must combine any sections entitled
8363+ "History" in the various original documents, forming one section
8364+ entitled "History"; likewise combine any sections entitled
8365+ "Acknowledgements", and any sections entitled "Dedications." You
8366+ must delete all sections entitled "Endorsements."
8367+
8368+ 6. COLLECTIONS OF DOCUMENTS
8369+
8370+ You may make a collection consisting of the Document and other
8371+ documents released under this License, and replace the individual
8372+ copies of this License in the various documents with a single copy
8373+ that is included in the collection, provided that you follow the
8374+ rules of this License for verbatim copying of each of the
8375+ documents in all other respects.
8376+
8377+ You may extract a single document from such a collection, and
8378+ distribute it individually under this License, provided you insert
8379+ a copy of this License into the extracted document, and follow
8380+ this License in all other respects regarding verbatim copying of
8381+ that document.
8382+
8383+ 7. AGGREGATION WITH INDEPENDENT WORKS
8384+
8385+ A compilation of the Document or its derivatives with other
8386+ separate and independent documents or works, in or on a volume of
8387+ a storage or distribution medium, does not as a whole count as a
8388+ Modified Version of the Document, provided no compilation
8389+ copyright is claimed for the compilation. Such a compilation is
8390+ called an "aggregate", and this License does not apply to the
8391+ other self-contained works thus compiled with the Document, on
8392+ account of their being thus compiled, if they are not themselves
8393+ derivative works of the Document.
8394+
8395+ If the Cover Text requirement of section 3 is applicable to these
8396+ copies of the Document, then if the Document is less than one
8397+ quarter of the entire aggregate, the Document's Cover Texts may be
8398+ placed on covers that surround only the Document within the
8399+ aggregate. Otherwise they must appear on covers around the whole
8400+ aggregate.
8401+
8402+ 8. TRANSLATION
8403+
8404+ Translation is considered a kind of modification, so you may
8405+ distribute translations of the Document under the terms of section
8406+ 4. Replacing Invariant Sections with translations requires special
8407+ permission from their copyright holders, but you may include
8408+ translations of some or all Invariant Sections in addition to the
8409+ original versions of these Invariant Sections. You may include a
8410+ translation of this License provided that you also include the
8411+ original English version of this License. In case of a
8412+ disagreement between the translation and the original English
8413+ version of this License, the original English version will prevail.
8414+
8415+ 9. TERMINATION
8416+
8417+ You may not copy, modify, sublicense, or distribute the Document
8418+ except as expressly provided for under this License. Any other
8419+ attempt to copy, modify, sublicense or distribute the Document is
8420+ void, and will automatically terminate your rights under this
8421+ License. However, parties who have received copies, or rights,
8422+ from you under this License will not have their licenses
8423+ terminated so long as such parties remain in full compliance.
8424+
8425+ 10. FUTURE REVISIONS OF THIS LICENSE
8426+
8427+ The Free Software Foundation may publish new, revised versions of
8428+ the GNU Free Documentation License from time to time. Such new
8429+ versions will be similar in spirit to the present version, but may
8430+ differ in detail to address new problems or concerns. See
8431+ http://www.gnu.org/copyleft/.
8432+
8433+ Each version of the License is given a distinguishing version
8434+ number. If the Document specifies that a particular numbered
8435+ version of this License "or any later version" applies to it, you
8436+ have the option of following the terms and conditions either of
8437+ that specified version or of any later version that has been
8438+ published (not as a draft) by the Free Software Foundation. If
8439+ the Document does not specify a version number of this License,
8440+ you may choose any version ever published (not as a draft) by the
8441+ Free Software Foundation.
8442+
8443+
8444+ADDENDUM: How to use this License for your documents
8445+====================================================
8446+
8447+To use this License in a document you have written, include a copy of
8448+the License in the document and put the following copyright and license
8449+notices just after the title page:
8450+
8451+ Copyright (C) YEAR YOUR NAME.
8452+ Permission is granted to copy, distribute and/or modify this document
8453+ under the terms of the GNU Free Documentation License, Version 1.1
8454+ or any later version published by the Free Software Foundation;
8455+ with the Invariant Sections being LIST THEIR TITLES, with the
8456+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
8457+ A copy of the license is included in the section entitled "GNU
8458+ Free Documentation License."
8459+
8460+ If you have no Invariant Sections, write "with no Invariant Sections"
8461+instead of saying which ones are invariant. If you have no Front-Cover
8462+Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being
8463+LIST"; likewise for Back-Cover Texts.
8464+
8465+ If your document contains nontrivial examples of program code, we
8466+recommend releasing these examples in parallel under your choice of
8467+free software license, such as the GNU General Public License, to
8468+permit their use in free software.
8469+
8470+
8471+File: bfd.info, Node: Index, Prev: GNU Free Documentation License, Up: Top
8472+
8473+Index
8474+*****
8475+
8476+[index]
8477+* Menu:
8478+
8479+* _bfd_final_link_relocate: Relocating the section contents.
8480+ (line 22)
8481+* _bfd_generic_link_add_archive_symbols: Adding symbols from an archive.
8482+ (line 12)
8483+* _bfd_generic_link_add_one_symbol: Adding symbols from an object file.
8484+ (line 19)
8485+* _bfd_generic_make_empty_symbol: symbol handling functions.
8486+ (line 92)
8487+* _bfd_link_add_symbols in target vector: Adding Symbols to the Hash Table.
8488+ (line 6)
8489+* _bfd_link_final_link in target vector: Performing the Final Link.
8490+ (line 6)
8491+* _bfd_link_hash_table_create in target vector: Creating a Linker Hash Table.
8492+ (line 6)
8493+* _bfd_relocate_contents: Relocating the section contents.
8494+ (line 22)
8495+* _bfd_strip_section_from_output: section prototypes. (line 242)
8496+* aout_SIZE_machine_type: aout. (line 146)
8497+* aout_SIZE_mkobject: aout. (line 138)
8498+* aout_SIZE_new_section_hook: aout. (line 175)
8499+* aout_SIZE_set_arch_mach: aout. (line 162)
8500+* aout_SIZE_some_aout_object_p: aout. (line 125)
8501+* aout_SIZE_swap_exec_header_in: aout. (line 101)
8502+* aout_SIZE_swap_exec_header_out: aout. (line 113)
8503+* arelent_chain: typedef arelent. (line 338)
8504+* BFD: Overview. (line 6)
8505+* BFD canonical format: Canonical format. (line 11)
8506+* bfd_alloc: Opening and Closing.
8507+ (line 179)
8508+* bfd_alt_mach_code: BFD front end. (line 588)
8509+* bfd_arch_bits_per_address: Architectures. (line 453)
8510+* bfd_arch_bits_per_byte: Architectures. (line 445)
8511+* bfd_arch_get_compatible: Architectures. (line 388)
8512+* bfd_arch_list: Architectures. (line 379)
8513+* bfd_arch_mach_octets_per_byte: Architectures. (line 522)
8514+* bfd_cache_close: File Caching. (line 53)
8515+* bfd_cache_close_all: File Caching. (line 66)
8516+* bfd_cache_init: File Caching. (line 45)
8517+* bfd_cache_lookup: File Caching. (line 32)
8518+* bfd_cache_lookup_worker: File Caching. (line 91)
8519+* BFD_CACHE_MAX_OPEN macro: File Caching. (line 15)
8520+* bfd_calc_gnu_debuglink_crc32: Opening and Closing.
8521+ (line 197)
8522+* bfd_canonicalize_reloc: BFD front end. (line 315)
8523+* bfd_canonicalize_symtab: symbol handling functions.
8524+ (line 50)
8525+* bfd_check_format: Formats. (line 18)
8526+* bfd_check_format_matches: Formats. (line 49)
8527+* bfd_check_overflow: typedef arelent. (line 350)
8528+* bfd_close: Opening and Closing.
8529+ (line 104)
8530+* bfd_close_all_done: Opening and Closing.
8531+ (line 122)
8532+* bfd_coff_backend_data: coff. (line 246)
8533+* bfd_copy_private_bfd_data: BFD front end. (line 454)
8534+* bfd_copy_private_header_data: BFD front end. (line 436)
8535+* bfd_copy_private_section_data: section prototypes. (line 224)
8536+* bfd_copy_private_symbol_data: symbol handling functions.
8537+ (line 140)
8538+* bfd_core_file_failing_command: Core Files. (line 9)
8539+* bfd_core_file_failing_signal: Core Files. (line 18)
8540+* bfd_create: Opening and Closing.
8541+ (line 141)
8542+* bfd_create_gnu_debuglink_section: Opening and Closing.
8543+ (line 263)
8544+* bfd_decode_symclass: symbol handling functions.
8545+ (line 111)
8546+* bfd_default_arch_struct: Architectures. (line 400)
8547+* bfd_default_compatible: Architectures. (line 462)
8548+* bfd_default_reloc_type_lookup: howto manager. (line 1704)
8549+* bfd_default_scan: Architectures. (line 471)
8550+* bfd_default_set_arch_mach: Architectures. (line 418)
8551+* bfd_elf_find_section: elf. (line 15)
8552+* bfd_errmsg: BFD front end. (line 243)
8553+* bfd_fdopenr: Opening and Closing.
8554+ (line 22)
8555+* bfd_fill_in_gnu_debuglink_section: Opening and Closing.
8556+ (line 277)
8557+* bfd_find_target: bfd_target. (line 420)
8558+* bfd_follow_gnu_debuglink: Opening and Closing.
8559+ (line 242)
8560+* bfd_format_string: Formats. (line 76)
8561+* bfd_generic_discard_group: section prototypes. (line 264)
8562+* bfd_generic_gc_sections: howto manager. (line 1735)
8563+* bfd_generic_get_relocated_section_contents: howto manager. (line 1755)
8564+* bfd_generic_is_group_section: section prototypes. (line 256)
8565+* bfd_generic_merge_sections: howto manager. (line 1745)
8566+* bfd_generic_relax_section: howto manager. (line 1722)
8567+* bfd_get_arch: Architectures. (line 429)
8568+* bfd_get_arch_info: Architectures. (line 481)
8569+* bfd_get_arch_size: BFD front end. (line 359)
8570+* bfd_get_error: BFD front end. (line 226)
8571+* bfd_get_error_handler: BFD front end. (line 294)
8572+* bfd_get_gp_size: BFD front end. (line 400)
8573+* bfd_get_mach: Architectures. (line 437)
8574+* bfd_get_mtime: BFD front end. (line 676)
8575+* bfd_get_next_mapent: Archives. (line 49)
8576+* bfd_get_reloc_code_name: howto manager. (line 1713)
8577+* bfd_get_reloc_size: typedef arelent. (line 329)
8578+* bfd_get_reloc_upper_bound: BFD front end. (line 305)
8579+* bfd_get_section_by_name: section prototypes. (line 17)
8580+* bfd_get_section_by_name_if: section prototypes. (line 31)
8581+* bfd_get_section_contents: section prototypes. (line 197)
8582+* bfd_get_sign_extend_vma: BFD front end. (line 372)
8583+* bfd_get_size <1>: Internal. (line 22)
8584+* bfd_get_size: BFD front end. (line 685)
8585+* bfd_get_symtab_upper_bound: symbol handling functions.
8586+ (line 6)
8587+* bfd_get_unique_section_name: section prototypes. (line 50)
8588+* bfd_h_put_size: Internal. (line 94)
8589+* bfd_hash_allocate: Creating and Freeing a Hash Table.
8590+ (line 17)
8591+* bfd_hash_lookup: Looking Up or Entering a String.
8592+ (line 6)
8593+* bfd_hash_newfunc: Creating and Freeing a Hash Table.
8594+ (line 12)
8595+* bfd_hash_set_default_size: Creating and Freeing a Hash Table.
8596+ (line 25)
8597+* bfd_hash_table_free: Creating and Freeing a Hash Table.
8598+ (line 21)
8599+* bfd_hash_table_init: Creating and Freeing a Hash Table.
8600+ (line 6)
8601+* bfd_hash_table_init_n: Creating and Freeing a Hash Table.
8602+ (line 6)
8603+* bfd_hash_traverse: Traversing a Hash Table.
8604+ (line 6)
8605+* bfd_init: Initialization. (line 8)
8606+* bfd_install_relocation: typedef arelent. (line 391)
8607+* bfd_is_local_label: symbol handling functions.
8608+ (line 17)
8609+* bfd_is_local_label_name: symbol handling functions.
8610+ (line 26)
8611+* bfd_is_target_special_symbol: symbol handling functions.
8612+ (line 38)
8613+* bfd_is_undefined_symclass: symbol handling functions.
8614+ (line 120)
8615+* bfd_last_cache: File Caching. (line 22)
8616+* bfd_link_split_section: Writing the symbol table.
8617+ (line 44)
8618+* bfd_log2: Internal. (line 161)
8619+* bfd_lookup_arch: Architectures. (line 489)
8620+* bfd_make_debug_symbol: symbol handling functions.
8621+ (line 102)
8622+* bfd_make_empty_symbol: symbol handling functions.
8623+ (line 78)
8624+* bfd_make_readable: Opening and Closing.
8625+ (line 165)
8626+* bfd_make_section: section prototypes. (line 98)
8627+* bfd_make_section_anyway: section prototypes. (line 82)
8628+* bfd_make_section_old_way: section prototypes. (line 62)
8629+* bfd_make_writable: Opening and Closing.
8630+ (line 151)
8631+* bfd_malloc_and_get_section: section prototypes. (line 214)
8632+* bfd_map_over_sections: section prototypes. (line 124)
8633+* bfd_merge_private_bfd_data: BFD front end. (line 470)
8634+* bfd_octets_per_byte: Architectures. (line 512)
8635+* bfd_open_file: File Caching. (line 79)
8636+* bfd_openr: Opening and Closing.
8637+ (line 6)
8638+* bfd_openr_iovec: Opening and Closing.
8639+ (line 52)
8640+* bfd_openr_next_archived_file: Archives. (line 75)
8641+* bfd_openstreamr: Opening and Closing.
8642+ (line 43)
8643+* bfd_openw: Opening and Closing.
8644+ (line 92)
8645+* bfd_perform_relocation: typedef arelent. (line 366)
8646+* bfd_perror: BFD front end. (line 252)
8647+* bfd_preserve_finish: BFD front end. (line 636)
8648+* bfd_preserve_restore: BFD front end. (line 626)
8649+* bfd_preserve_save: BFD front end. (line 610)
8650+* bfd_print_symbol_vandf: symbol handling functions.
8651+ (line 70)
8652+* bfd_printable_arch_mach: Architectures. (line 500)
8653+* bfd_printable_name: Architectures. (line 360)
8654+* bfd_put_size: Internal. (line 19)
8655+* BFD_RELOC_12_PCREL: howto manager. (line 39)
8656+* BFD_RELOC_14: howto manager. (line 31)
8657+* BFD_RELOC_16: howto manager. (line 30)
8658+* BFD_RELOC_16_BASEREL: howto manager. (line 80)
8659+* BFD_RELOC_16_GOT_PCREL: howto manager. (line 52)
8660+* BFD_RELOC_16_GOTOFF: howto manager. (line 55)
8661+* BFD_RELOC_16_PCREL: howto manager. (line 38)
8662+* BFD_RELOC_16_PCREL_S2: howto manager. (line 92)
8663+* BFD_RELOC_16_PLT_PCREL: howto manager. (line 63)
8664+* BFD_RELOC_16_PLTOFF: howto manager. (line 67)
8665+* BFD_RELOC_16C_ABS20: howto manager. (line 1464)
8666+* BFD_RELOC_16C_ABS20_C: howto manager. (line 1465)
8667+* BFD_RELOC_16C_ABS24: howto manager. (line 1466)
8668+* BFD_RELOC_16C_ABS24_C: howto manager. (line 1467)
8669+* BFD_RELOC_16C_DISP04: howto manager. (line 1444)
8670+* BFD_RELOC_16C_DISP04_C: howto manager. (line 1445)
8671+* BFD_RELOC_16C_DISP08: howto manager. (line 1446)
8672+* BFD_RELOC_16C_DISP08_C: howto manager. (line 1447)
8673+* BFD_RELOC_16C_DISP16: howto manager. (line 1448)
8674+* BFD_RELOC_16C_DISP16_C: howto manager. (line 1449)
8675+* BFD_RELOC_16C_DISP24: howto manager. (line 1450)
8676+* BFD_RELOC_16C_DISP24_C: howto manager. (line 1451)
8677+* BFD_RELOC_16C_DISP24a: howto manager. (line 1452)
8678+* BFD_RELOC_16C_DISP24a_C: howto manager. (line 1453)
8679+* BFD_RELOC_16C_IMM04: howto manager. (line 1468)
8680+* BFD_RELOC_16C_IMM04_C: howto manager. (line 1469)
8681+* BFD_RELOC_16C_IMM16: howto manager. (line 1470)
8682+* BFD_RELOC_16C_IMM16_C: howto manager. (line 1471)
8683+* BFD_RELOC_16C_IMM20: howto manager. (line 1472)
8684+* BFD_RELOC_16C_IMM20_C: howto manager. (line 1473)
8685+* BFD_RELOC_16C_IMM24: howto manager. (line 1474)
8686+* BFD_RELOC_16C_IMM24_C: howto manager. (line 1475)
8687+* BFD_RELOC_16C_IMM32: howto manager. (line 1476)
8688+* BFD_RELOC_16C_IMM32_C: howto manager. (line 1477)
8689+* BFD_RELOC_16C_NUM08: howto manager. (line 1438)
8690+* BFD_RELOC_16C_NUM08_C: howto manager. (line 1439)
8691+* BFD_RELOC_16C_NUM16: howto manager. (line 1440)
8692+* BFD_RELOC_16C_NUM16_C: howto manager. (line 1441)
8693+* BFD_RELOC_16C_NUM32: howto manager. (line 1442)
8694+* BFD_RELOC_16C_NUM32_C: howto manager. (line 1443)
8695+* BFD_RELOC_16C_REG04: howto manager. (line 1454)
8696+* BFD_RELOC_16C_REG04_C: howto manager. (line 1455)
8697+* BFD_RELOC_16C_REG04a: howto manager. (line 1456)
8698+* BFD_RELOC_16C_REG04a_C: howto manager. (line 1457)
8699+* BFD_RELOC_16C_REG14: howto manager. (line 1458)
8700+* BFD_RELOC_16C_REG14_C: howto manager. (line 1459)
8701+* BFD_RELOC_16C_REG16: howto manager. (line 1460)
8702+* BFD_RELOC_16C_REG16_C: howto manager. (line 1461)
8703+* BFD_RELOC_16C_REG20: howto manager. (line 1462)
8704+* BFD_RELOC_16C_REG20_C: howto manager. (line 1463)
8705+* BFD_RELOC_23_PCREL_S2: howto manager. (line 93)
8706+* BFD_RELOC_24: howto manager. (line 29)
8707+* BFD_RELOC_24_PCREL: howto manager. (line 37)
8708+* BFD_RELOC_24_PLT_PCREL: howto manager. (line 62)
8709+* BFD_RELOC_26: howto manager. (line 28)
8710+* BFD_RELOC_32: howto manager. (line 27)
8711+* BFD_RELOC_32_BASEREL: howto manager. (line 79)
8712+* BFD_RELOC_32_GOT_PCREL: howto manager. (line 51)
8713+* BFD_RELOC_32_GOTOFF: howto manager. (line 54)
8714+* BFD_RELOC_32_PCREL: howto manager. (line 36)
8715+* BFD_RELOC_32_PCREL_S2: howto manager. (line 91)
8716+* BFD_RELOC_32_PLT_PCREL: howto manager. (line 61)
8717+* BFD_RELOC_32_PLTOFF: howto manager. (line 66)
8718+* BFD_RELOC_32_SECREL: howto manager. (line 48)
8719+* BFD_RELOC_386_COPY: howto manager. (line 422)
8720+* BFD_RELOC_386_GLOB_DAT: howto manager. (line 423)
8721+* BFD_RELOC_386_GOT32: howto manager. (line 420)
8722+* BFD_RELOC_386_GOTOFF: howto manager. (line 426)
8723+* BFD_RELOC_386_GOTPC: howto manager. (line 427)
8724+* BFD_RELOC_386_JUMP_SLOT: howto manager. (line 424)
8725+* BFD_RELOC_386_PLT32: howto manager. (line 421)
8726+* BFD_RELOC_386_RELATIVE: howto manager. (line 425)
8727+* BFD_RELOC_386_TLS_DTPMOD32: howto manager. (line 437)
8728+* BFD_RELOC_386_TLS_DTPOFF32: howto manager. (line 438)
8729+* BFD_RELOC_386_TLS_GD: howto manager. (line 432)
8730+* BFD_RELOC_386_TLS_GOTIE: howto manager. (line 430)
8731+* BFD_RELOC_386_TLS_IE: howto manager. (line 429)
8732+* BFD_RELOC_386_TLS_IE_32: howto manager. (line 435)
8733+* BFD_RELOC_386_TLS_LDM: howto manager. (line 433)
8734+* BFD_RELOC_386_TLS_LDO_32: howto manager. (line 434)
8735+* BFD_RELOC_386_TLS_LE: howto manager. (line 431)
8736+* BFD_RELOC_386_TLS_LE_32: howto manager. (line 436)
8737+* BFD_RELOC_386_TLS_TPOFF: howto manager. (line 428)
8738+* BFD_RELOC_386_TLS_TPOFF32: howto manager. (line 439)
8739+* BFD_RELOC_390_12: howto manager. (line 1155)
8740+* BFD_RELOC_390_20: howto manager. (line 1255)
8741+* BFD_RELOC_390_COPY: howto manager. (line 1164)
8742+* BFD_RELOC_390_GLOB_DAT: howto manager. (line 1167)
8743+* BFD_RELOC_390_GOT12: howto manager. (line 1158)
8744+* BFD_RELOC_390_GOT16: howto manager. (line 1179)
8745+* BFD_RELOC_390_GOT20: howto manager. (line 1256)
8746+* BFD_RELOC_390_GOT64: howto manager. (line 1197)
8747+* BFD_RELOC_390_GOTENT: howto manager. (line 1203)
8748+* BFD_RELOC_390_GOTOFF64: howto manager. (line 1206)
8749+* BFD_RELOC_390_GOTPC: howto manager. (line 1176)
8750+* BFD_RELOC_390_GOTPCDBL: howto manager. (line 1194)
8751+* BFD_RELOC_390_GOTPLT12: howto manager. (line 1209)
8752+* BFD_RELOC_390_GOTPLT16: howto manager. (line 1212)
8753+* BFD_RELOC_390_GOTPLT20: howto manager. (line 1257)
8754+* BFD_RELOC_390_GOTPLT32: howto manager. (line 1215)
8755+* BFD_RELOC_390_GOTPLT64: howto manager. (line 1218)
8756+* BFD_RELOC_390_GOTPLTENT: howto manager. (line 1221)
8757+* BFD_RELOC_390_JMP_SLOT: howto manager. (line 1170)
8758+* BFD_RELOC_390_PC16DBL: howto manager. (line 1182)
8759+* BFD_RELOC_390_PC32DBL: howto manager. (line 1188)
8760+* BFD_RELOC_390_PLT16DBL: howto manager. (line 1185)
8761+* BFD_RELOC_390_PLT32: howto manager. (line 1161)
8762+* BFD_RELOC_390_PLT32DBL: howto manager. (line 1191)
8763+* BFD_RELOC_390_PLT64: howto manager. (line 1200)
8764+* BFD_RELOC_390_PLTOFF16: howto manager. (line 1224)
8765+* BFD_RELOC_390_PLTOFF32: howto manager. (line 1227)
8766+* BFD_RELOC_390_PLTOFF64: howto manager. (line 1230)
8767+* BFD_RELOC_390_RELATIVE: howto manager. (line 1173)
8768+* BFD_RELOC_390_TLS_DTPMOD: howto manager. (line 1250)
8769+* BFD_RELOC_390_TLS_DTPOFF: howto manager. (line 1251)
8770+* BFD_RELOC_390_TLS_GD32: howto manager. (line 1236)
8771+* BFD_RELOC_390_TLS_GD64: howto manager. (line 1237)
8772+* BFD_RELOC_390_TLS_GDCALL: howto manager. (line 1234)
8773+* BFD_RELOC_390_TLS_GOTIE12: howto manager. (line 1238)
8774+* BFD_RELOC_390_TLS_GOTIE20: howto manager. (line 1258)
8775+* BFD_RELOC_390_TLS_GOTIE32: howto manager. (line 1239)
8776+* BFD_RELOC_390_TLS_GOTIE64: howto manager. (line 1240)
8777+* BFD_RELOC_390_TLS_IE32: howto manager. (line 1243)
8778+* BFD_RELOC_390_TLS_IE64: howto manager. (line 1244)
8779+* BFD_RELOC_390_TLS_IEENT: howto manager. (line 1245)
8780+* BFD_RELOC_390_TLS_LDCALL: howto manager. (line 1235)
8781+* BFD_RELOC_390_TLS_LDM32: howto manager. (line 1241)
8782+* BFD_RELOC_390_TLS_LDM64: howto manager. (line 1242)
8783+* BFD_RELOC_390_TLS_LDO32: howto manager. (line 1248)
8784+* BFD_RELOC_390_TLS_LDO64: howto manager. (line 1249)
8785+* BFD_RELOC_390_TLS_LE32: howto manager. (line 1246)
8786+* BFD_RELOC_390_TLS_LE64: howto manager. (line 1247)
8787+* BFD_RELOC_390_TLS_LOAD: howto manager. (line 1233)
8788+* BFD_RELOC_390_TLS_TPOFF: howto manager. (line 1252)
8789+* BFD_RELOC_64: howto manager. (line 26)
8790+* BFD_RELOC_64_PCREL: howto manager. (line 35)
8791+* BFD_RELOC_64_PLT_PCREL: howto manager. (line 60)
8792+* BFD_RELOC_64_PLTOFF: howto manager. (line 65)
8793+* BFD_RELOC_68K_GLOB_DAT: howto manager. (line 74)
8794+* BFD_RELOC_68K_JMP_SLOT: howto manager. (line 75)
8795+* BFD_RELOC_68K_RELATIVE: howto manager. (line 76)
8796+* BFD_RELOC_8: howto manager. (line 32)
8797+* BFD_RELOC_860_COPY: howto manager. (line 1543)
8798+* BFD_RELOC_860_GLOB_DAT: howto manager. (line 1544)
8799+* BFD_RELOC_860_HAGOT: howto manager. (line 1569)
8800+* BFD_RELOC_860_HAGOTOFF: howto manager. (line 1570)
8801+* BFD_RELOC_860_HAPC: howto manager. (line 1571)
8802+* BFD_RELOC_860_HIGH: howto manager. (line 1572)
8803+* BFD_RELOC_860_HIGHADJ: howto manager. (line 1568)
8804+* BFD_RELOC_860_HIGOT: howto manager. (line 1573)
8805+* BFD_RELOC_860_HIGOTOFF: howto manager. (line 1574)
8806+* BFD_RELOC_860_JUMP_SLOT: howto manager. (line 1545)
8807+* BFD_RELOC_860_LOGOT0: howto manager. (line 1557)
8808+* BFD_RELOC_860_LOGOT1: howto manager. (line 1559)
8809+* BFD_RELOC_860_LOGOTOFF0: howto manager. (line 1561)
8810+* BFD_RELOC_860_LOGOTOFF1: howto manager. (line 1563)
8811+* BFD_RELOC_860_LOGOTOFF2: howto manager. (line 1565)
8812+* BFD_RELOC_860_LOGOTOFF3: howto manager. (line 1566)
8813+* BFD_RELOC_860_LOPC: howto manager. (line 1567)
8814+* BFD_RELOC_860_LOW0: howto manager. (line 1550)
8815+* BFD_RELOC_860_LOW1: howto manager. (line 1552)
8816+* BFD_RELOC_860_LOW2: howto manager. (line 1554)
8817+* BFD_RELOC_860_LOW3: howto manager. (line 1556)
8818+* BFD_RELOC_860_PC16: howto manager. (line 1549)
8819+* BFD_RELOC_860_PC26: howto manager. (line 1547)
8820+* BFD_RELOC_860_PLT26: howto manager. (line 1548)
8821+* BFD_RELOC_860_RELATIVE: howto manager. (line 1546)
8822+* BFD_RELOC_860_SPGOT0: howto manager. (line 1558)
8823+* BFD_RELOC_860_SPGOT1: howto manager. (line 1560)
8824+* BFD_RELOC_860_SPGOTOFF0: howto manager. (line 1562)
8825+* BFD_RELOC_860_SPGOTOFF1: howto manager. (line 1564)
8826+* BFD_RELOC_860_SPLIT0: howto manager. (line 1551)
8827+* BFD_RELOC_860_SPLIT1: howto manager. (line 1553)
8828+* BFD_RELOC_860_SPLIT2: howto manager. (line 1555)
8829+* BFD_RELOC_8_BASEREL: howto manager. (line 84)
8830+* BFD_RELOC_8_FFnn: howto manager. (line 88)
8831+* BFD_RELOC_8_GOT_PCREL: howto manager. (line 53)
8832+* BFD_RELOC_8_GOTOFF: howto manager. (line 59)
8833+* BFD_RELOC_8_PCREL: howto manager. (line 40)
8834+* BFD_RELOC_8_PLT_PCREL: howto manager. (line 64)
8835+* BFD_RELOC_8_PLTOFF: howto manager. (line 71)
8836+* BFD_RELOC_ALPHA_BRSGP: howto manager. (line 259)
8837+* BFD_RELOC_ALPHA_CODEADDR: howto manager. (line 250)
8838+* BFD_RELOC_ALPHA_DTPMOD64: howto manager. (line 266)
8839+* BFD_RELOC_ALPHA_DTPREL16: howto manager. (line 271)
8840+* BFD_RELOC_ALPHA_DTPREL64: howto manager. (line 268)
8841+* BFD_RELOC_ALPHA_DTPREL_HI16: howto manager. (line 269)
8842+* BFD_RELOC_ALPHA_DTPREL_LO16: howto manager. (line 270)
8843+* BFD_RELOC_ALPHA_ELF_LITERAL: howto manager. (line 215)
8844+* BFD_RELOC_ALPHA_GOTDTPREL16: howto manager. (line 267)
8845+* BFD_RELOC_ALPHA_GOTTPREL16: howto manager. (line 272)
8846+* BFD_RELOC_ALPHA_GPDISP: howto manager. (line 209)
8847+* BFD_RELOC_ALPHA_GPDISP_HI16: howto manager. (line 195)
8848+* BFD_RELOC_ALPHA_GPDISP_LO16: howto manager. (line 203)
8849+* BFD_RELOC_ALPHA_GPREL_HI16: howto manager. (line 254)
8850+* BFD_RELOC_ALPHA_GPREL_LO16: howto manager. (line 255)
8851+* BFD_RELOC_ALPHA_HINT: howto manager. (line 241)
8852+* BFD_RELOC_ALPHA_LINKAGE: howto manager. (line 246)
8853+* BFD_RELOC_ALPHA_LITERAL: howto manager. (line 214)
8854+* BFD_RELOC_ALPHA_LITUSE: howto manager. (line 216)
8855+* BFD_RELOC_ALPHA_TLSGD: howto manager. (line 264)
8856+* BFD_RELOC_ALPHA_TLSLDM: howto manager. (line 265)
8857+* BFD_RELOC_ALPHA_TPREL16: howto manager. (line 276)
8858+* BFD_RELOC_ALPHA_TPREL64: howto manager. (line 273)
8859+* BFD_RELOC_ALPHA_TPREL_HI16: howto manager. (line 274)
8860+* BFD_RELOC_ALPHA_TPREL_LO16: howto manager. (line 275)
8861+* BFD_RELOC_ARC_B22_PCREL: howto manager. (line 754)
8862+* BFD_RELOC_ARC_B26: howto manager. (line 759)
8863+* BFD_RELOC_ARM_ADR_IMM: howto manager. (line 615)
8864+* BFD_RELOC_ARM_ADRL_IMMEDIATE: howto manager. (line 607)
8865+* BFD_RELOC_ARM_COPY: howto manager. (line 628)
8866+* BFD_RELOC_ARM_CP_OFF_IMM: howto manager. (line 613)
8867+* BFD_RELOC_ARM_CP_OFF_IMM_S2: howto manager. (line 614)
8868+* BFD_RELOC_ARM_GLOB_DAT: howto manager. (line 629)
8869+* BFD_RELOC_ARM_GOT12: howto manager. (line 625)
8870+* BFD_RELOC_ARM_GOT32: howto manager. (line 626)
8871+* BFD_RELOC_ARM_GOTOFF: howto manager. (line 632)
8872+* BFD_RELOC_ARM_GOTPC: howto manager. (line 633)
8873+* BFD_RELOC_ARM_HWLITERAL: howto manager. (line 620)
8874+* BFD_RELOC_ARM_IMMEDIATE: howto manager. (line 606)
8875+* BFD_RELOC_ARM_IN_POOL: howto manager. (line 618)
8876+* BFD_RELOC_ARM_JUMP_SLOT: howto manager. (line 627)
8877+* BFD_RELOC_ARM_LDR_IMM: howto manager. (line 616)
8878+* BFD_RELOC_ARM_LITERAL: howto manager. (line 617)
8879+* BFD_RELOC_ARM_MULTI: howto manager. (line 612)
8880+* BFD_RELOC_ARM_OFFSET_IMM: howto manager. (line 608)
8881+* BFD_RELOC_ARM_OFFSET_IMM8: howto manager. (line 619)
8882+* BFD_RELOC_ARM_PCREL_BLX: howto manager. (line 596)
8883+* BFD_RELOC_ARM_PCREL_BRANCH: howto manager. (line 592)
8884+* BFD_RELOC_ARM_PLT32: howto manager. (line 630)
8885+* BFD_RELOC_ARM_PREL31: howto manager. (line 652)
8886+* BFD_RELOC_ARM_RELATIVE: howto manager. (line 631)
8887+* BFD_RELOC_ARM_ROSEGREL32: howto manager. (line 641)
8888+* BFD_RELOC_ARM_SBREL32: howto manager. (line 644)
8889+* BFD_RELOC_ARM_SHIFT_IMM: howto manager. (line 609)
8890+* BFD_RELOC_ARM_SMI: howto manager. (line 610)
8891+* BFD_RELOC_ARM_SWI: howto manager. (line 611)
8892+* BFD_RELOC_ARM_TARGET1: howto manager. (line 637)
8893+* BFD_RELOC_ARM_TARGET2: howto manager. (line 647)
8894+* BFD_RELOC_ARM_THUMB_ADD: howto manager. (line 621)
8895+* BFD_RELOC_ARM_THUMB_IMM: howto manager. (line 622)
8896+* BFD_RELOC_ARM_THUMB_OFFSET: howto manager. (line 624)
8897+* BFD_RELOC_ARM_THUMB_SHIFT: howto manager. (line 623)
8898+* BFD_RELOC_AVR_13_PCREL: howto manager. (line 1076)
8899+* BFD_RELOC_AVR_16_PM: howto manager. (line 1080)
8900+* BFD_RELOC_AVR_6: howto manager. (line 1147)
8901+* BFD_RELOC_AVR_6_ADIW: howto manager. (line 1151)
8902+* BFD_RELOC_AVR_7_PCREL: howto manager. (line 1072)
8903+* BFD_RELOC_AVR_CALL: howto manager. (line 1139)
8904+* BFD_RELOC_AVR_HH8_LDI: howto manager. (line 1092)
8905+* BFD_RELOC_AVR_HH8_LDI_NEG: howto manager. (line 1107)
8906+* BFD_RELOC_AVR_HH8_LDI_PM: howto manager. (line 1120)
8907+* BFD_RELOC_AVR_HH8_LDI_PM_NEG: howto manager. (line 1134)
8908+* BFD_RELOC_AVR_HI8_LDI: howto manager. (line 1088)
8909+* BFD_RELOC_AVR_HI8_LDI_NEG: howto manager. (line 1102)
8910+* BFD_RELOC_AVR_HI8_LDI_PM: howto manager. (line 1116)
8911+* BFD_RELOC_AVR_HI8_LDI_PM_NEG: howto manager. (line 1129)
8912+* BFD_RELOC_AVR_LDI: howto manager. (line 1143)
8913+* BFD_RELOC_AVR_LO8_LDI: howto manager. (line 1084)
8914+* BFD_RELOC_AVR_LO8_LDI_NEG: howto manager. (line 1097)
8915+* BFD_RELOC_AVR_LO8_LDI_PM: howto manager. (line 1112)
8916+* BFD_RELOC_AVR_LO8_LDI_PM_NEG: howto manager. (line 1125)
8917+* bfd_reloc_code_type: howto manager. (line 10)
8918+* BFD_RELOC_CRIS_16_GOT: howto manager. (line 1524)
8919+* BFD_RELOC_CRIS_16_GOTPLT: howto manager. (line 1530)
8920+* BFD_RELOC_CRIS_32_GOT: howto manager. (line 1521)
8921+* BFD_RELOC_CRIS_32_GOTPLT: howto manager. (line 1527)
8922+* BFD_RELOC_CRIS_32_GOTREL: howto manager. (line 1533)
8923+* BFD_RELOC_CRIS_32_PLT_GOTREL: howto manager. (line 1536)
8924+* BFD_RELOC_CRIS_32_PLT_PCREL: howto manager. (line 1539)
8925+* BFD_RELOC_CRIS_BDISP8: howto manager. (line 1502)
8926+* BFD_RELOC_CRIS_COPY: howto manager. (line 1515)
8927+* BFD_RELOC_CRIS_GLOB_DAT: howto manager. (line 1516)
8928+* BFD_RELOC_CRIS_JUMP_SLOT: howto manager. (line 1517)
8929+* BFD_RELOC_CRIS_LAPCQ_OFFSET: howto manager. (line 1510)
8930+* BFD_RELOC_CRIS_RELATIVE: howto manager. (line 1518)
8931+* BFD_RELOC_CRIS_SIGNED_16: howto manager. (line 1508)
8932+* BFD_RELOC_CRIS_SIGNED_6: howto manager. (line 1504)
8933+* BFD_RELOC_CRIS_SIGNED_8: howto manager. (line 1506)
8934+* BFD_RELOC_CRIS_UNSIGNED_16: howto manager. (line 1509)
8935+* BFD_RELOC_CRIS_UNSIGNED_4: howto manager. (line 1511)
8936+* BFD_RELOC_CRIS_UNSIGNED_5: howto manager. (line 1503)
8937+* BFD_RELOC_CRIS_UNSIGNED_6: howto manager. (line 1505)
8938+* BFD_RELOC_CRIS_UNSIGNED_8: howto manager. (line 1507)
8939+* BFD_RELOC_CRX_ABS16: howto manager. (line 1490)
8940+* BFD_RELOC_CRX_ABS32: howto manager. (line 1491)
8941+* BFD_RELOC_CRX_IMM16: howto manager. (line 1495)
8942+* BFD_RELOC_CRX_IMM32: howto manager. (line 1496)
8943+* BFD_RELOC_CRX_NUM16: howto manager. (line 1493)
8944+* BFD_RELOC_CRX_NUM32: howto manager. (line 1494)
8945+* BFD_RELOC_CRX_NUM8: howto manager. (line 1492)
8946+* BFD_RELOC_CRX_REGREL12: howto manager. (line 1486)
8947+* BFD_RELOC_CRX_REGREL22: howto manager. (line 1487)
8948+* BFD_RELOC_CRX_REGREL28: howto manager. (line 1488)
8949+* BFD_RELOC_CRX_REGREL32: howto manager. (line 1489)
8950+* BFD_RELOC_CRX_REL16: howto manager. (line 1483)
8951+* BFD_RELOC_CRX_REL24: howto manager. (line 1484)
8952+* BFD_RELOC_CRX_REL32: howto manager. (line 1485)
8953+* BFD_RELOC_CRX_REL4: howto manager. (line 1480)
8954+* BFD_RELOC_CRX_REL8: howto manager. (line 1481)
8955+* BFD_RELOC_CRX_REL8_CMP: howto manager. (line 1482)
8956+* BFD_RELOC_CRX_SWITCH16: howto manager. (line 1498)
8957+* BFD_RELOC_CRX_SWITCH32: howto manager. (line 1499)
8958+* BFD_RELOC_CRX_SWITCH8: howto manager. (line 1497)
8959+* BFD_RELOC_CTOR: howto manager. (line 586)
8960+* BFD_RELOC_D10V_10_PCREL_L: howto manager. (line 768)
8961+* BFD_RELOC_D10V_10_PCREL_R: howto manager. (line 764)
8962+* BFD_RELOC_D10V_18: howto manager. (line 773)
8963+* BFD_RELOC_D10V_18_PCREL: howto manager. (line 776)
8964+* BFD_RELOC_D30V_15: howto manager. (line 791)
8965+* BFD_RELOC_D30V_15_PCREL: howto manager. (line 795)
8966+* BFD_RELOC_D30V_15_PCREL_R: howto manager. (line 799)
8967+* BFD_RELOC_D30V_21: howto manager. (line 804)
8968+* BFD_RELOC_D30V_21_PCREL: howto manager. (line 808)
8969+* BFD_RELOC_D30V_21_PCREL_R: howto manager. (line 812)
8970+* BFD_RELOC_D30V_32: howto manager. (line 817)
8971+* BFD_RELOC_D30V_32_PCREL: howto manager. (line 820)
8972+* BFD_RELOC_D30V_6: howto manager. (line 779)
8973+* BFD_RELOC_D30V_9_PCREL: howto manager. (line 782)
8974+* BFD_RELOC_D30V_9_PCREL_R: howto manager. (line 786)
8975+* BFD_RELOC_DLX_HI16_S: howto manager. (line 823)
8976+* BFD_RELOC_DLX_JMP26: howto manager. (line 829)
8977+* BFD_RELOC_DLX_LO16: howto manager. (line 826)
8978+* BFD_RELOC_FR30_10_IN_8: howto manager. (line 1002)
8979+* BFD_RELOC_FR30_12_PCREL: howto manager. (line 1010)
8980+* BFD_RELOC_FR30_20: howto manager. (line 986)
8981+* BFD_RELOC_FR30_48: howto manager. (line 983)
8982+* BFD_RELOC_FR30_6_IN_4: howto manager. (line 990)
8983+* BFD_RELOC_FR30_8_IN_8: howto manager. (line 994)
8984+* BFD_RELOC_FR30_9_IN_8: howto manager. (line 998)
8985+* BFD_RELOC_FR30_9_PCREL: howto manager. (line 1006)
8986+* BFD_RELOC_FRV_FUNCDESC: howto manager. (line 364)
8987+* BFD_RELOC_FRV_FUNCDESC_GOT12: howto manager. (line 365)
8988+* BFD_RELOC_FRV_FUNCDESC_GOTHI: howto manager. (line 366)
8989+* BFD_RELOC_FRV_FUNCDESC_GOTLO: howto manager. (line 367)
8990+* BFD_RELOC_FRV_FUNCDESC_GOTOFF12: howto manager. (line 369)
8991+* BFD_RELOC_FRV_FUNCDESC_GOTOFFHI: howto manager. (line 370)
8992+* BFD_RELOC_FRV_FUNCDESC_GOTOFFLO: howto manager. (line 371)
8993+* BFD_RELOC_FRV_FUNCDESC_VALUE: howto manager. (line 368)
8994+* BFD_RELOC_FRV_GETTLSOFF: howto manager. (line 375)
8995+* BFD_RELOC_FRV_GETTLSOFF_RELAX: howto manager. (line 388)
8996+* BFD_RELOC_FRV_GOT12: howto manager. (line 361)
8997+* BFD_RELOC_FRV_GOTHI: howto manager. (line 362)
8998+* BFD_RELOC_FRV_GOTLO: howto manager. (line 363)
8999+* BFD_RELOC_FRV_GOTOFF12: howto manager. (line 372)
9000+* BFD_RELOC_FRV_GOTOFFHI: howto manager. (line 373)
9001+* BFD_RELOC_FRV_GOTOFFLO: howto manager. (line 374)
9002+* BFD_RELOC_FRV_GOTTLSDESC12: howto manager. (line 377)
9003+* BFD_RELOC_FRV_GOTTLSDESCHI: howto manager. (line 378)
9004+* BFD_RELOC_FRV_GOTTLSDESCLO: howto manager. (line 379)
9005+* BFD_RELOC_FRV_GOTTLSOFF12: howto manager. (line 383)
9006+* BFD_RELOC_FRV_GOTTLSOFFHI: howto manager. (line 384)
9007+* BFD_RELOC_FRV_GOTTLSOFFLO: howto manager. (line 385)
9008+* BFD_RELOC_FRV_GPREL12: howto manager. (line 356)
9009+* BFD_RELOC_FRV_GPREL32: howto manager. (line 358)
9010+* BFD_RELOC_FRV_GPRELHI: howto manager. (line 359)
9011+* BFD_RELOC_FRV_GPRELLO: howto manager. (line 360)
9012+* BFD_RELOC_FRV_GPRELU12: howto manager. (line 357)
9013+* BFD_RELOC_FRV_HI16: howto manager. (line 355)
9014+* BFD_RELOC_FRV_LABEL16: howto manager. (line 352)
9015+* BFD_RELOC_FRV_LABEL24: howto manager. (line 353)
9016+* BFD_RELOC_FRV_LO16: howto manager. (line 354)
9017+* BFD_RELOC_FRV_TLSDESC_RELAX: howto manager. (line 387)
9018+* BFD_RELOC_FRV_TLSDESC_VALUE: howto manager. (line 376)
9019+* BFD_RELOC_FRV_TLSMOFF: howto manager. (line 390)
9020+* BFD_RELOC_FRV_TLSMOFF12: howto manager. (line 380)
9021+* BFD_RELOC_FRV_TLSMOFFHI: howto manager. (line 381)
9022+* BFD_RELOC_FRV_TLSMOFFLO: howto manager. (line 382)
9023+* BFD_RELOC_FRV_TLSOFF: howto manager. (line 386)
9024+* BFD_RELOC_FRV_TLSOFF_RELAX: howto manager. (line 389)
9025+* BFD_RELOC_GPREL16: howto manager. (line 106)
9026+* BFD_RELOC_GPREL32: howto manager. (line 107)
9027+* BFD_RELOC_H8_DIR16A8: howto manager. (line 1581)
9028+* BFD_RELOC_H8_DIR16R8: howto manager. (line 1582)
9029+* BFD_RELOC_H8_DIR24A8: howto manager. (line 1583)
9030+* BFD_RELOC_H8_DIR24R8: howto manager. (line 1584)
9031+* BFD_RELOC_H8_DIR32A16: howto manager. (line 1585)
9032+* BFD_RELOC_HI16: howto manager. (line 289)
9033+* BFD_RELOC_HI16_BASEREL: howto manager. (line 82)
9034+* BFD_RELOC_HI16_GOTOFF: howto manager. (line 57)
9035+* BFD_RELOC_HI16_PLTOFF: howto manager. (line 69)
9036+* BFD_RELOC_HI16_S: howto manager. (line 292)
9037+* BFD_RELOC_HI16_S_BASEREL: howto manager. (line 83)
9038+* BFD_RELOC_HI16_S_GOTOFF: howto manager. (line 58)
9039+* BFD_RELOC_HI16_S_PLTOFF: howto manager. (line 70)
9040+* BFD_RELOC_HI22: howto manager. (line 101)
9041+* BFD_RELOC_I370_D12: howto manager. (line 583)
9042+* BFD_RELOC_I960_CALLJ: howto manager. (line 113)
9043+* BFD_RELOC_IA64_COPY: howto manager. (line 1374)
9044+* BFD_RELOC_IA64_DIR32LSB: howto manager. (line 1319)
9045+* BFD_RELOC_IA64_DIR32MSB: howto manager. (line 1318)
9046+* BFD_RELOC_IA64_DIR64LSB: howto manager. (line 1321)
9047+* BFD_RELOC_IA64_DIR64MSB: howto manager. (line 1320)
9048+* BFD_RELOC_IA64_DTPMOD64LSB: howto manager. (line 1384)
9049+* BFD_RELOC_IA64_DTPMOD64MSB: howto manager. (line 1383)
9050+* BFD_RELOC_IA64_DTPREL14: howto manager. (line 1386)
9051+* BFD_RELOC_IA64_DTPREL22: howto manager. (line 1387)
9052+* BFD_RELOC_IA64_DTPREL32LSB: howto manager. (line 1390)
9053+* BFD_RELOC_IA64_DTPREL32MSB: howto manager. (line 1389)
9054+* BFD_RELOC_IA64_DTPREL64I: howto manager. (line 1388)
9055+* BFD_RELOC_IA64_DTPREL64LSB: howto manager. (line 1392)
9056+* BFD_RELOC_IA64_DTPREL64MSB: howto manager. (line 1391)
9057+* BFD_RELOC_IA64_FPTR32LSB: howto manager. (line 1336)
9058+* BFD_RELOC_IA64_FPTR32MSB: howto manager. (line 1335)
9059+* BFD_RELOC_IA64_FPTR64I: howto manager. (line 1334)
9060+* BFD_RELOC_IA64_FPTR64LSB: howto manager. (line 1338)
9061+* BFD_RELOC_IA64_FPTR64MSB: howto manager. (line 1337)
9062+* BFD_RELOC_IA64_GPREL22: howto manager. (line 1322)
9063+* BFD_RELOC_IA64_GPREL32LSB: howto manager. (line 1325)
9064+* BFD_RELOC_IA64_GPREL32MSB: howto manager. (line 1324)
9065+* BFD_RELOC_IA64_GPREL64I: howto manager. (line 1323)
9066+* BFD_RELOC_IA64_GPREL64LSB: howto manager. (line 1327)
9067+* BFD_RELOC_IA64_GPREL64MSB: howto manager. (line 1326)
9068+* BFD_RELOC_IA64_IMM14: howto manager. (line 1315)
9069+* BFD_RELOC_IA64_IMM22: howto manager. (line 1316)
9070+* BFD_RELOC_IA64_IMM64: howto manager. (line 1317)
9071+* BFD_RELOC_IA64_IPLTLSB: howto manager. (line 1373)
9072+* BFD_RELOC_IA64_IPLTMSB: howto manager. (line 1372)
9073+* BFD_RELOC_IA64_LDXMOV: howto manager. (line 1376)
9074+* BFD_RELOC_IA64_LTOFF22: howto manager. (line 1328)
9075+* BFD_RELOC_IA64_LTOFF22X: howto manager. (line 1375)
9076+* BFD_RELOC_IA64_LTOFF64I: howto manager. (line 1329)
9077+* BFD_RELOC_IA64_LTOFF_DTPMOD22: howto manager. (line 1385)
9078+* BFD_RELOC_IA64_LTOFF_DTPREL22: howto manager. (line 1393)
9079+* BFD_RELOC_IA64_LTOFF_FPTR22: howto manager. (line 1350)
9080+* BFD_RELOC_IA64_LTOFF_FPTR32LSB: howto manager. (line 1353)
9081+* BFD_RELOC_IA64_LTOFF_FPTR32MSB: howto manager. (line 1352)
9082+* BFD_RELOC_IA64_LTOFF_FPTR64I: howto manager. (line 1351)
9083+* BFD_RELOC_IA64_LTOFF_FPTR64LSB: howto manager. (line 1355)
9084+* BFD_RELOC_IA64_LTOFF_FPTR64MSB: howto manager. (line 1354)
9085+* BFD_RELOC_IA64_LTOFF_TPREL22: howto manager. (line 1382)
9086+* BFD_RELOC_IA64_LTV32LSB: howto manager. (line 1369)
9087+* BFD_RELOC_IA64_LTV32MSB: howto manager. (line 1368)
9088+* BFD_RELOC_IA64_LTV64LSB: howto manager. (line 1371)
9089+* BFD_RELOC_IA64_LTV64MSB: howto manager. (line 1370)
9090+* BFD_RELOC_IA64_PCREL21B: howto manager. (line 1339)
9091+* BFD_RELOC_IA64_PCREL21BI: howto manager. (line 1340)
9092+* BFD_RELOC_IA64_PCREL21F: howto manager. (line 1342)
9093+* BFD_RELOC_IA64_PCREL21M: howto manager. (line 1341)
9094+* BFD_RELOC_IA64_PCREL22: howto manager. (line 1343)
9095+* BFD_RELOC_IA64_PCREL32LSB: howto manager. (line 1347)
9096+* BFD_RELOC_IA64_PCREL32MSB: howto manager. (line 1346)
9097+* BFD_RELOC_IA64_PCREL60B: howto manager. (line 1344)
9098+* BFD_RELOC_IA64_PCREL64I: howto manager. (line 1345)
9099+* BFD_RELOC_IA64_PCREL64LSB: howto manager. (line 1349)
9100+* BFD_RELOC_IA64_PCREL64MSB: howto manager. (line 1348)
9101+* BFD_RELOC_IA64_PLTOFF22: howto manager. (line 1330)
9102+* BFD_RELOC_IA64_PLTOFF64I: howto manager. (line 1331)
9103+* BFD_RELOC_IA64_PLTOFF64LSB: howto manager. (line 1333)
9104+* BFD_RELOC_IA64_PLTOFF64MSB: howto manager. (line 1332)
9105+* BFD_RELOC_IA64_REL32LSB: howto manager. (line 1365)
9106+* BFD_RELOC_IA64_REL32MSB: howto manager. (line 1364)
9107+* BFD_RELOC_IA64_REL64LSB: howto manager. (line 1367)
9108+* BFD_RELOC_IA64_REL64MSB: howto manager. (line 1366)
9109+* BFD_RELOC_IA64_SECREL32LSB: howto manager. (line 1361)
9110+* BFD_RELOC_IA64_SECREL32MSB: howto manager. (line 1360)
9111+* BFD_RELOC_IA64_SECREL64LSB: howto manager. (line 1363)
9112+* BFD_RELOC_IA64_SECREL64MSB: howto manager. (line 1362)
9113+* BFD_RELOC_IA64_SEGREL32LSB: howto manager. (line 1357)
9114+* BFD_RELOC_IA64_SEGREL32MSB: howto manager. (line 1356)
9115+* BFD_RELOC_IA64_SEGREL64LSB: howto manager. (line 1359)
9116+* BFD_RELOC_IA64_SEGREL64MSB: howto manager. (line 1358)
9117+* BFD_RELOC_IA64_TPREL14: howto manager. (line 1377)
9118+* BFD_RELOC_IA64_TPREL22: howto manager. (line 1378)
9119+* BFD_RELOC_IA64_TPREL64I: howto manager. (line 1379)
9120+* BFD_RELOC_IA64_TPREL64LSB: howto manager. (line 1381)
9121+* BFD_RELOC_IA64_TPREL64MSB: howto manager. (line 1380)
9122+* BFD_RELOC_IP2K_ADDR16CJP: howto manager. (line 1267)
9123+* BFD_RELOC_IP2K_BANK: howto manager. (line 1264)
9124+* BFD_RELOC_IP2K_EX8DATA: howto manager. (line 1275)
9125+* BFD_RELOC_IP2K_FR9: howto manager. (line 1261)
9126+* BFD_RELOC_IP2K_FR_OFFSET: howto manager. (line 1288)
9127+* BFD_RELOC_IP2K_HI8DATA: howto manager. (line 1274)
9128+* BFD_RELOC_IP2K_HI8INSN: howto manager. (line 1279)
9129+* BFD_RELOC_IP2K_LO8DATA: howto manager. (line 1273)
9130+* BFD_RELOC_IP2K_LO8INSN: howto manager. (line 1278)
9131+* BFD_RELOC_IP2K_PAGE3: howto manager. (line 1270)
9132+* BFD_RELOC_IP2K_PC_SKIP: howto manager. (line 1282)
9133+* BFD_RELOC_IP2K_TEXT: howto manager. (line 1285)
9134+* BFD_RELOC_IQ2000_OFFSET_16: howto manager. (line 1608)
9135+* BFD_RELOC_IQ2000_OFFSET_21: howto manager. (line 1609)
9136+* BFD_RELOC_IQ2000_UHI16: howto manager. (line 1610)
9137+* BFD_RELOC_LO10: howto manager. (line 102)
9138+* BFD_RELOC_LO16: howto manager. (line 298)
9139+* BFD_RELOC_LO16_BASEREL: howto manager. (line 81)
9140+* BFD_RELOC_LO16_GOTOFF: howto manager. (line 56)
9141+* BFD_RELOC_LO16_PLTOFF: howto manager. (line 68)
9142+* BFD_RELOC_M32R_10_PCREL: howto manager. (line 836)
9143+* BFD_RELOC_M32R_18_PCREL: howto manager. (line 840)
9144+* BFD_RELOC_M32R_24: howto manager. (line 832)
9145+* BFD_RELOC_M32R_26_PCREL: howto manager. (line 843)
9146+* BFD_RELOC_M32R_26_PLTREL: howto manager. (line 862)
9147+* BFD_RELOC_M32R_COPY: howto manager. (line 863)
9148+* BFD_RELOC_M32R_GLOB_DAT: howto manager. (line 864)
9149+* BFD_RELOC_M32R_GOT16_HI_SLO: howto manager. (line 873)
9150+* BFD_RELOC_M32R_GOT16_HI_ULO: howto manager. (line 872)
9151+* BFD_RELOC_M32R_GOT16_LO: howto manager. (line 874)
9152+* BFD_RELOC_M32R_GOT24: howto manager. (line 861)
9153+* BFD_RELOC_M32R_GOTOFF: howto manager. (line 867)
9154+* BFD_RELOC_M32R_GOTOFF_HI_SLO: howto manager. (line 869)
9155+* BFD_RELOC_M32R_GOTOFF_HI_ULO: howto manager. (line 868)
9156+* BFD_RELOC_M32R_GOTOFF_LO: howto manager. (line 870)
9157+* BFD_RELOC_M32R_GOTPC24: howto manager. (line 871)
9158+* BFD_RELOC_M32R_GOTPC_HI_SLO: howto manager. (line 876)
9159+* BFD_RELOC_M32R_GOTPC_HI_ULO: howto manager. (line 875)
9160+* BFD_RELOC_M32R_GOTPC_LO: howto manager. (line 877)
9161+* BFD_RELOC_M32R_HI16_SLO: howto manager. (line 850)
9162+* BFD_RELOC_M32R_HI16_ULO: howto manager. (line 846)
9163+* BFD_RELOC_M32R_JMP_SLOT: howto manager. (line 865)
9164+* BFD_RELOC_M32R_LO16: howto manager. (line 854)
9165+* BFD_RELOC_M32R_RELATIVE: howto manager. (line 866)
9166+* BFD_RELOC_M32R_SDA16: howto manager. (line 857)
9167+* BFD_RELOC_M68HC11_24: howto manager. (line 1429)
9168+* BFD_RELOC_M68HC11_3B: howto manager. (line 1404)
9169+* BFD_RELOC_M68HC11_HI8: howto manager. (line 1396)
9170+* BFD_RELOC_M68HC11_LO16: howto manager. (line 1418)
9171+* BFD_RELOC_M68HC11_LO8: howto manager. (line 1400)
9172+* BFD_RELOC_M68HC11_PAGE: howto manager. (line 1424)
9173+* BFD_RELOC_M68HC11_RL_GROUP: howto manager. (line 1413)
9174+* BFD_RELOC_M68HC11_RL_JUMP: howto manager. (line 1407)
9175+* BFD_RELOC_M68HC12_5B: howto manager. (line 1435)
9176+* BFD_RELOC_MCORE_PCREL_32: howto manager. (line 1017)
9177+* BFD_RELOC_MCORE_PCREL_IMM11BY2: howto manager. (line 1015)
9178+* BFD_RELOC_MCORE_PCREL_IMM4BY2: howto manager. (line 1016)
9179+* BFD_RELOC_MCORE_PCREL_IMM8BY4: howto manager. (line 1014)
9180+* BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2: howto manager. (line 1018)
9181+* BFD_RELOC_MCORE_RVA: howto manager. (line 1019)
9182+* BFD_RELOC_MIPS16_GPREL: howto manager. (line 286)
9183+* BFD_RELOC_MIPS16_HI16: howto manager. (line 301)
9184+* BFD_RELOC_MIPS16_HI16_S: howto manager. (line 304)
9185+* BFD_RELOC_MIPS16_JMP: howto manager. (line 283)
9186+* BFD_RELOC_MIPS16_LO16: howto manager. (line 310)
9187+* BFD_RELOC_MIPS_CALL16: howto manager. (line 317)
9188+* BFD_RELOC_MIPS_CALL_HI16: howto manager. (line 320)
9189+* BFD_RELOC_MIPS_CALL_LO16: howto manager. (line 321)
9190+* BFD_RELOC_MIPS_DELETE: howto manager. (line 330)
9191+* BFD_RELOC_MIPS_GOT16: howto manager. (line 316)
9192+* BFD_RELOC_MIPS_GOT_DISP: howto manager. (line 325)
9193+* BFD_RELOC_MIPS_GOT_HI16: howto manager. (line 318)
9194+* BFD_RELOC_MIPS_GOT_LO16: howto manager. (line 319)
9195+* BFD_RELOC_MIPS_GOT_OFST: howto manager. (line 324)
9196+* BFD_RELOC_MIPS_GOT_PAGE: howto manager. (line 323)
9197+* BFD_RELOC_MIPS_HIGHER: howto manager. (line 332)
9198+* BFD_RELOC_MIPS_HIGHEST: howto manager. (line 331)
9199+* BFD_RELOC_MIPS_INSERT_A: howto manager. (line 328)
9200+* BFD_RELOC_MIPS_INSERT_B: howto manager. (line 329)
9201+* BFD_RELOC_MIPS_JALR: howto manager. (line 336)
9202+* BFD_RELOC_MIPS_JMP: howto manager. (line 279)
9203+* BFD_RELOC_MIPS_LITERAL: howto manager. (line 313)
9204+* BFD_RELOC_MIPS_REL16: howto manager. (line 334)
9205+* BFD_RELOC_MIPS_RELGOT: howto manager. (line 335)
9206+* BFD_RELOC_MIPS_SCN_DISP: howto manager. (line 333)
9207+* BFD_RELOC_MIPS_SHIFT5: howto manager. (line 326)
9208+* BFD_RELOC_MIPS_SHIFT6: howto manager. (line 327)
9209+* BFD_RELOC_MIPS_SUB: howto manager. (line 322)
9210+* BFD_RELOC_MIPS_TLS_DTPMOD32: howto manager. (line 337)
9211+* BFD_RELOC_MIPS_TLS_DTPMOD64: howto manager. (line 339)
9212+* BFD_RELOC_MIPS_TLS_DTPREL32: howto manager. (line 338)
9213+* BFD_RELOC_MIPS_TLS_DTPREL64: howto manager. (line 340)
9214+* BFD_RELOC_MIPS_TLS_DTPREL_HI16: howto manager. (line 343)
9215+* BFD_RELOC_MIPS_TLS_DTPREL_LO16: howto manager. (line 344)
9216+* BFD_RELOC_MIPS_TLS_GD: howto manager. (line 341)
9217+* BFD_RELOC_MIPS_TLS_GOTTPREL: howto manager. (line 345)
9218+* BFD_RELOC_MIPS_TLS_LDM: howto manager. (line 342)
9219+* BFD_RELOC_MIPS_TLS_TPREL32: howto manager. (line 346)
9220+* BFD_RELOC_MIPS_TLS_TPREL64: howto manager. (line 347)
9221+* BFD_RELOC_MIPS_TLS_TPREL_HI16: howto manager. (line 348)
9222+* BFD_RELOC_MIPS_TLS_TPREL_LO16: howto manager. (line 349)
9223+* BFD_RELOC_MMIX_ADDR19: howto manager. (line 1048)
9224+* BFD_RELOC_MMIX_ADDR27: howto manager. (line 1052)
9225+* BFD_RELOC_MMIX_BASE_PLUS_OFFSET: howto manager. (line 1064)
9226+* BFD_RELOC_MMIX_CBRANCH: howto manager. (line 1028)
9227+* BFD_RELOC_MMIX_CBRANCH_1: howto manager. (line 1030)
9228+* BFD_RELOC_MMIX_CBRANCH_2: howto manager. (line 1031)
9229+* BFD_RELOC_MMIX_CBRANCH_3: howto manager. (line 1032)
9230+* BFD_RELOC_MMIX_CBRANCH_J: howto manager. (line 1029)
9231+* BFD_RELOC_MMIX_GETA: howto manager. (line 1022)
9232+* BFD_RELOC_MMIX_GETA_1: howto manager. (line 1023)
9233+* BFD_RELOC_MMIX_GETA_2: howto manager. (line 1024)
9234+* BFD_RELOC_MMIX_GETA_3: howto manager. (line 1025)
9235+* BFD_RELOC_MMIX_JMP: howto manager. (line 1042)
9236+* BFD_RELOC_MMIX_JMP_1: howto manager. (line 1043)
9237+* BFD_RELOC_MMIX_JMP_2: howto manager. (line 1044)
9238+* BFD_RELOC_MMIX_JMP_3: howto manager. (line 1045)
9239+* BFD_RELOC_MMIX_LOCAL: howto manager. (line 1068)
9240+* BFD_RELOC_MMIX_PUSHJ: howto manager. (line 1035)
9241+* BFD_RELOC_MMIX_PUSHJ_1: howto manager. (line 1036)
9242+* BFD_RELOC_MMIX_PUSHJ_2: howto manager. (line 1037)
9243+* BFD_RELOC_MMIX_PUSHJ_3: howto manager. (line 1038)
9244+* BFD_RELOC_MMIX_PUSHJ_STUBBABLE: howto manager. (line 1039)
9245+* BFD_RELOC_MMIX_REG: howto manager. (line 1060)
9246+* BFD_RELOC_MMIX_REG_OR_BYTE: howto manager. (line 1056)
9247+* BFD_RELOC_MN10300_16_PCREL: howto manager. (line 952)
9248+* BFD_RELOC_MN10300_32_PCREL: howto manager. (line 948)
9249+* BFD_RELOC_MN10300_COPY: howto manager. (line 408)
9250+* BFD_RELOC_MN10300_GLOB_DAT: howto manager. (line 411)
9251+* BFD_RELOC_MN10300_GOT16: howto manager. (line 404)
9252+* BFD_RELOC_MN10300_GOT24: howto manager. (line 400)
9253+* BFD_RELOC_MN10300_GOT32: howto manager. (line 396)
9254+* BFD_RELOC_MN10300_GOTOFF24: howto manager. (line 393)
9255+* BFD_RELOC_MN10300_JMP_SLOT: howto manager. (line 414)
9256+* BFD_RELOC_MN10300_RELATIVE: howto manager. (line 417)
9257+* BFD_RELOC_MSP430_10_PCREL: howto manager. (line 1599)
9258+* BFD_RELOC_MSP430_16: howto manager. (line 1601)
9259+* BFD_RELOC_MSP430_16_BYTE: howto manager. (line 1603)
9260+* BFD_RELOC_MSP430_16_PCREL: howto manager. (line 1600)
9261+* BFD_RELOC_MSP430_16_PCREL_BYTE: howto manager. (line 1602)
9262+* BFD_RELOC_MSP430_2X_PCREL: howto manager. (line 1604)
9263+* BFD_RELOC_MSP430_RL_PCREL: howto manager. (line 1605)
9264+* BFD_RELOC_NONE: howto manager. (line 116)
9265+* BFD_RELOC_NS32K_DISP_16: howto manager. (line 467)
9266+* BFD_RELOC_NS32K_DISP_16_PCREL: howto manager. (line 470)
9267+* BFD_RELOC_NS32K_DISP_32: howto manager. (line 468)
9268+* BFD_RELOC_NS32K_DISP_32_PCREL: howto manager. (line 471)
9269+* BFD_RELOC_NS32K_DISP_8: howto manager. (line 466)
9270+* BFD_RELOC_NS32K_DISP_8_PCREL: howto manager. (line 469)
9271+* BFD_RELOC_NS32K_IMM_16: howto manager. (line 461)
9272+* BFD_RELOC_NS32K_IMM_16_PCREL: howto manager. (line 464)
9273+* BFD_RELOC_NS32K_IMM_32: howto manager. (line 462)
9274+* BFD_RELOC_NS32K_IMM_32_PCREL: howto manager. (line 465)
9275+* BFD_RELOC_NS32K_IMM_8: howto manager. (line 460)
9276+* BFD_RELOC_NS32K_IMM_8_PCREL: howto manager. (line 463)
9277+* BFD_RELOC_OPENRISC_ABS_26: howto manager. (line 1577)
9278+* BFD_RELOC_OPENRISC_REL_26: howto manager. (line 1578)
9279+* BFD_RELOC_PDP11_DISP_6_PCREL: howto manager. (line 475)
9280+* BFD_RELOC_PDP11_DISP_8_PCREL: howto manager. (line 474)
9281+* BFD_RELOC_PJ_CODE_DIR16: howto manager. (line 480)
9282+* BFD_RELOC_PJ_CODE_DIR32: howto manager. (line 481)
9283+* BFD_RELOC_PJ_CODE_HI16: howto manager. (line 478)
9284+* BFD_RELOC_PJ_CODE_LO16: howto manager. (line 479)
9285+* BFD_RELOC_PJ_CODE_REL16: howto manager. (line 482)
9286+* BFD_RELOC_PJ_CODE_REL32: howto manager. (line 483)
9287+* BFD_RELOC_PPC64_ADDR16_DS: howto manager. (line 528)
9288+* BFD_RELOC_PPC64_ADDR16_LO_DS: howto manager. (line 529)
9289+* BFD_RELOC_PPC64_DTPREL16_DS: howto manager. (line 575)
9290+* BFD_RELOC_PPC64_DTPREL16_HIGHER: howto manager. (line 577)
9291+* BFD_RELOC_PPC64_DTPREL16_HIGHERA: howto manager. (line 578)
9292+* BFD_RELOC_PPC64_DTPREL16_HIGHEST: howto manager. (line 579)
9293+* BFD_RELOC_PPC64_DTPREL16_HIGHESTA: howto manager. (line 580)
9294+* BFD_RELOC_PPC64_DTPREL16_LO_DS: howto manager. (line 576)
9295+* BFD_RELOC_PPC64_GOT16_DS: howto manager. (line 530)
9296+* BFD_RELOC_PPC64_GOT16_LO_DS: howto manager. (line 531)
9297+* BFD_RELOC_PPC64_HIGHER: howto manager. (line 516)
9298+* BFD_RELOC_PPC64_HIGHER_S: howto manager. (line 517)
9299+* BFD_RELOC_PPC64_HIGHEST: howto manager. (line 518)
9300+* BFD_RELOC_PPC64_HIGHEST_S: howto manager. (line 519)
9301+* BFD_RELOC_PPC64_PLT16_LO_DS: howto manager. (line 532)
9302+* BFD_RELOC_PPC64_PLTGOT16: howto manager. (line 524)
9303+* BFD_RELOC_PPC64_PLTGOT16_DS: howto manager. (line 537)
9304+* BFD_RELOC_PPC64_PLTGOT16_HA: howto manager. (line 527)
9305+* BFD_RELOC_PPC64_PLTGOT16_HI: howto manager. (line 526)
9306+* BFD_RELOC_PPC64_PLTGOT16_LO: howto manager. (line 525)
9307+* BFD_RELOC_PPC64_PLTGOT16_LO_DS: howto manager. (line 538)
9308+* BFD_RELOC_PPC64_SECTOFF_DS: howto manager. (line 533)
9309+* BFD_RELOC_PPC64_SECTOFF_LO_DS: howto manager. (line 534)
9310+* BFD_RELOC_PPC64_TOC: howto manager. (line 523)
9311+* BFD_RELOC_PPC64_TOC16_DS: howto manager. (line 535)
9312+* BFD_RELOC_PPC64_TOC16_HA: howto manager. (line 522)
9313+* BFD_RELOC_PPC64_TOC16_HI: howto manager. (line 521)
9314+* BFD_RELOC_PPC64_TOC16_LO: howto manager. (line 520)
9315+* BFD_RELOC_PPC64_TOC16_LO_DS: howto manager. (line 536)
9316+* BFD_RELOC_PPC64_TPREL16_DS: howto manager. (line 569)
9317+* BFD_RELOC_PPC64_TPREL16_HIGHER: howto manager. (line 571)
9318+* BFD_RELOC_PPC64_TPREL16_HIGHERA: howto manager. (line 572)
9319+* BFD_RELOC_PPC64_TPREL16_HIGHEST: howto manager. (line 573)
9320+* BFD_RELOC_PPC64_TPREL16_HIGHESTA: howto manager. (line 574)
9321+* BFD_RELOC_PPC64_TPREL16_LO_DS: howto manager. (line 570)
9322+* BFD_RELOC_PPC_B16: howto manager. (line 489)
9323+* BFD_RELOC_PPC_B16_BRNTAKEN: howto manager. (line 491)
9324+* BFD_RELOC_PPC_B16_BRTAKEN: howto manager. (line 490)
9325+* BFD_RELOC_PPC_B26: howto manager. (line 486)
9326+* BFD_RELOC_PPC_BA16: howto manager. (line 492)
9327+* BFD_RELOC_PPC_BA16_BRNTAKEN: howto manager. (line 494)
9328+* BFD_RELOC_PPC_BA16_BRTAKEN: howto manager. (line 493)
9329+* BFD_RELOC_PPC_BA26: howto manager. (line 487)
9330+* BFD_RELOC_PPC_COPY: howto manager. (line 495)
9331+* BFD_RELOC_PPC_DTPMOD: howto manager. (line 542)
9332+* BFD_RELOC_PPC_DTPREL: howto manager. (line 552)
9333+* BFD_RELOC_PPC_DTPREL16: howto manager. (line 548)
9334+* BFD_RELOC_PPC_DTPREL16_HA: howto manager. (line 551)
9335+* BFD_RELOC_PPC_DTPREL16_HI: howto manager. (line 550)
9336+* BFD_RELOC_PPC_DTPREL16_LO: howto manager. (line 549)
9337+* BFD_RELOC_PPC_EMB_BIT_FLD: howto manager. (line 514)
9338+* BFD_RELOC_PPC_EMB_MRKREF: howto manager. (line 509)
9339+* BFD_RELOC_PPC_EMB_NADDR16: howto manager. (line 501)
9340+* BFD_RELOC_PPC_EMB_NADDR16_HA: howto manager. (line 504)
9341+* BFD_RELOC_PPC_EMB_NADDR16_HI: howto manager. (line 503)
9342+* BFD_RELOC_PPC_EMB_NADDR16_LO: howto manager. (line 502)
9343+* BFD_RELOC_PPC_EMB_NADDR32: howto manager. (line 500)
9344+* BFD_RELOC_PPC_EMB_RELSDA: howto manager. (line 515)
9345+* BFD_RELOC_PPC_EMB_RELSEC16: howto manager. (line 510)
9346+* BFD_RELOC_PPC_EMB_RELST_HA: howto manager. (line 513)
9347+* BFD_RELOC_PPC_EMB_RELST_HI: howto manager. (line 512)
9348+* BFD_RELOC_PPC_EMB_RELST_LO: howto manager. (line 511)
9349+* BFD_RELOC_PPC_EMB_SDA21: howto manager. (line 508)
9350+* BFD_RELOC_PPC_EMB_SDA2I16: howto manager. (line 506)
9351+* BFD_RELOC_PPC_EMB_SDA2REL: howto manager. (line 507)
9352+* BFD_RELOC_PPC_EMB_SDAI16: howto manager. (line 505)
9353+* BFD_RELOC_PPC_GLOB_DAT: howto manager. (line 496)
9354+* BFD_RELOC_PPC_GOT_DTPREL16: howto manager. (line 565)
9355+* BFD_RELOC_PPC_GOT_DTPREL16_HA: howto manager. (line 568)
9356+* BFD_RELOC_PPC_GOT_DTPREL16_HI: howto manager. (line 567)
9357+* BFD_RELOC_PPC_GOT_DTPREL16_LO: howto manager. (line 566)
9358+* BFD_RELOC_PPC_GOT_TLSGD16: howto manager. (line 553)
9359+* BFD_RELOC_PPC_GOT_TLSGD16_HA: howto manager. (line 556)
9360+* BFD_RELOC_PPC_GOT_TLSGD16_HI: howto manager. (line 555)
9361+* BFD_RELOC_PPC_GOT_TLSGD16_LO: howto manager. (line 554)
9362+* BFD_RELOC_PPC_GOT_TLSLD16: howto manager. (line 557)
9363+* BFD_RELOC_PPC_GOT_TLSLD16_HA: howto manager. (line 560)
9364+* BFD_RELOC_PPC_GOT_TLSLD16_HI: howto manager. (line 559)
9365+* BFD_RELOC_PPC_GOT_TLSLD16_LO: howto manager. (line 558)
9366+* BFD_RELOC_PPC_GOT_TPREL16: howto manager. (line 561)
9367+* BFD_RELOC_PPC_GOT_TPREL16_HA: howto manager. (line 564)
9368+* BFD_RELOC_PPC_GOT_TPREL16_HI: howto manager. (line 563)
9369+* BFD_RELOC_PPC_GOT_TPREL16_LO: howto manager. (line 562)
9370+* BFD_RELOC_PPC_JMP_SLOT: howto manager. (line 497)
9371+* BFD_RELOC_PPC_LOCAL24PC: howto manager. (line 499)
9372+* BFD_RELOC_PPC_RELATIVE: howto manager. (line 498)
9373+* BFD_RELOC_PPC_TLS: howto manager. (line 541)
9374+* BFD_RELOC_PPC_TOC16: howto manager. (line 488)
9375+* BFD_RELOC_PPC_TPREL: howto manager. (line 547)
9376+* BFD_RELOC_PPC_TPREL16: howto manager. (line 543)
9377+* BFD_RELOC_PPC_TPREL16_HA: howto manager. (line 546)
9378+* BFD_RELOC_PPC_TPREL16_HI: howto manager. (line 545)
9379+* BFD_RELOC_PPC_TPREL16_LO: howto manager. (line 544)
9380+* BFD_RELOC_RVA: howto manager. (line 85)
9381+* BFD_RELOC_SH_ALIGN: howto manager. (line 677)
9382+* BFD_RELOC_SH_CODE: howto manager. (line 678)
9383+* BFD_RELOC_SH_COPY: howto manager. (line 683)
9384+* BFD_RELOC_SH_COPY64: howto manager. (line 708)
9385+* BFD_RELOC_SH_COUNT: howto manager. (line 676)
9386+* BFD_RELOC_SH_DATA: howto manager. (line 679)
9387+* BFD_RELOC_SH_DISP12: howto manager. (line 659)
9388+* BFD_RELOC_SH_DISP12BY2: howto manager. (line 660)
9389+* BFD_RELOC_SH_DISP12BY4: howto manager. (line 661)
9390+* BFD_RELOC_SH_DISP12BY8: howto manager. (line 662)
9391+* BFD_RELOC_SH_DISP20: howto manager. (line 663)
9392+* BFD_RELOC_SH_DISP20BY8: howto manager. (line 664)
9393+* BFD_RELOC_SH_GLOB_DAT: howto manager. (line 684)
9394+* BFD_RELOC_SH_GLOB_DAT64: howto manager. (line 709)
9395+* BFD_RELOC_SH_GOT10BY4: howto manager. (line 712)
9396+* BFD_RELOC_SH_GOT10BY8: howto manager. (line 713)
9397+* BFD_RELOC_SH_GOT_HI16: howto manager. (line 691)
9398+* BFD_RELOC_SH_GOT_LOW16: howto manager. (line 688)
9399+* BFD_RELOC_SH_GOT_MEDHI16: howto manager. (line 690)
9400+* BFD_RELOC_SH_GOT_MEDLOW16: howto manager. (line 689)
9401+* BFD_RELOC_SH_GOTOFF_HI16: howto manager. (line 703)
9402+* BFD_RELOC_SH_GOTOFF_LOW16: howto manager. (line 700)
9403+* BFD_RELOC_SH_GOTOFF_MEDHI16: howto manager. (line 702)
9404+* BFD_RELOC_SH_GOTOFF_MEDLOW16: howto manager. (line 701)
9405+* BFD_RELOC_SH_GOTPC: howto manager. (line 687)
9406+* BFD_RELOC_SH_GOTPC_HI16: howto manager. (line 707)
9407+* BFD_RELOC_SH_GOTPC_LOW16: howto manager. (line 704)
9408+* BFD_RELOC_SH_GOTPC_MEDHI16: howto manager. (line 706)
9409+* BFD_RELOC_SH_GOTPC_MEDLOW16: howto manager. (line 705)
9410+* BFD_RELOC_SH_GOTPLT10BY4: howto manager. (line 714)
9411+* BFD_RELOC_SH_GOTPLT10BY8: howto manager. (line 715)
9412+* BFD_RELOC_SH_GOTPLT32: howto manager. (line 716)
9413+* BFD_RELOC_SH_GOTPLT_HI16: howto manager. (line 695)
9414+* BFD_RELOC_SH_GOTPLT_LOW16: howto manager. (line 692)
9415+* BFD_RELOC_SH_GOTPLT_MEDHI16: howto manager. (line 694)
9416+* BFD_RELOC_SH_GOTPLT_MEDLOW16: howto manager. (line 693)
9417+* BFD_RELOC_SH_IMM3: howto manager. (line 657)
9418+* BFD_RELOC_SH_IMM3U: howto manager. (line 658)
9419+* BFD_RELOC_SH_IMM4: howto manager. (line 665)
9420+* BFD_RELOC_SH_IMM4BY2: howto manager. (line 666)
9421+* BFD_RELOC_SH_IMM4BY4: howto manager. (line 667)
9422+* BFD_RELOC_SH_IMM8: howto manager. (line 668)
9423+* BFD_RELOC_SH_IMM8BY2: howto manager. (line 669)
9424+* BFD_RELOC_SH_IMM8BY4: howto manager. (line 670)
9425+* BFD_RELOC_SH_IMM_HI16: howto manager. (line 734)
9426+* BFD_RELOC_SH_IMM_HI16_PCREL: howto manager. (line 735)
9427+* BFD_RELOC_SH_IMM_LOW16: howto manager. (line 728)
9428+* BFD_RELOC_SH_IMM_LOW16_PCREL: howto manager. (line 729)
9429+* BFD_RELOC_SH_IMM_MEDHI16: howto manager. (line 732)
9430+* BFD_RELOC_SH_IMM_MEDHI16_PCREL: howto manager. (line 733)
9431+* BFD_RELOC_SH_IMM_MEDLOW16: howto manager. (line 730)
9432+* BFD_RELOC_SH_IMM_MEDLOW16_PCREL: howto manager. (line 731)
9433+* BFD_RELOC_SH_IMMS10: howto manager. (line 722)
9434+* BFD_RELOC_SH_IMMS10BY2: howto manager. (line 723)
9435+* BFD_RELOC_SH_IMMS10BY4: howto manager. (line 724)
9436+* BFD_RELOC_SH_IMMS10BY8: howto manager. (line 725)
9437+* BFD_RELOC_SH_IMMS16: howto manager. (line 726)
9438+* BFD_RELOC_SH_IMMS6: howto manager. (line 719)
9439+* BFD_RELOC_SH_IMMS6BY32: howto manager. (line 720)
9440+* BFD_RELOC_SH_IMMU16: howto manager. (line 727)
9441+* BFD_RELOC_SH_IMMU5: howto manager. (line 718)
9442+* BFD_RELOC_SH_IMMU6: howto manager. (line 721)
9443+* BFD_RELOC_SH_JMP_SLOT: howto manager. (line 685)
9444+* BFD_RELOC_SH_JMP_SLOT64: howto manager. (line 710)
9445+* BFD_RELOC_SH_LABEL: howto manager. (line 680)
9446+* BFD_RELOC_SH_LOOP_END: howto manager. (line 682)
9447+* BFD_RELOC_SH_LOOP_START: howto manager. (line 681)
9448+* BFD_RELOC_SH_PCDISP12BY2: howto manager. (line 656)
9449+* BFD_RELOC_SH_PCDISP8BY2: howto manager. (line 655)
9450+* BFD_RELOC_SH_PCRELIMM8BY2: howto manager. (line 671)
9451+* BFD_RELOC_SH_PCRELIMM8BY4: howto manager. (line 672)
9452+* BFD_RELOC_SH_PLT_HI16: howto manager. (line 699)
9453+* BFD_RELOC_SH_PLT_LOW16: howto manager. (line 696)
9454+* BFD_RELOC_SH_PLT_MEDHI16: howto manager. (line 698)
9455+* BFD_RELOC_SH_PLT_MEDLOW16: howto manager. (line 697)
9456+* BFD_RELOC_SH_PT_16: howto manager. (line 736)
9457+* BFD_RELOC_SH_RELATIVE: howto manager. (line 686)
9458+* BFD_RELOC_SH_RELATIVE64: howto manager. (line 711)
9459+* BFD_RELOC_SH_SHMEDIA_CODE: howto manager. (line 717)
9460+* BFD_RELOC_SH_SWITCH16: howto manager. (line 673)
9461+* BFD_RELOC_SH_SWITCH32: howto manager. (line 674)
9462+* BFD_RELOC_SH_TLS_DTPMOD32: howto manager. (line 742)
9463+* BFD_RELOC_SH_TLS_DTPOFF32: howto manager. (line 743)
9464+* BFD_RELOC_SH_TLS_GD_32: howto manager. (line 737)
9465+* BFD_RELOC_SH_TLS_IE_32: howto manager. (line 740)
9466+* BFD_RELOC_SH_TLS_LD_32: howto manager. (line 738)
9467+* BFD_RELOC_SH_TLS_LDO_32: howto manager. (line 739)
9468+* BFD_RELOC_SH_TLS_LE_32: howto manager. (line 741)
9469+* BFD_RELOC_SH_TLS_TPOFF32: howto manager. (line 744)
9470+* BFD_RELOC_SH_USES: howto manager. (line 675)
9471+* BFD_RELOC_SPARC13: howto manager. (line 119)
9472+* BFD_RELOC_SPARC22: howto manager. (line 118)
9473+* BFD_RELOC_SPARC_10: howto manager. (line 141)
9474+* BFD_RELOC_SPARC_11: howto manager. (line 142)
9475+* BFD_RELOC_SPARC_5: howto manager. (line 154)
9476+* BFD_RELOC_SPARC_6: howto manager. (line 153)
9477+* BFD_RELOC_SPARC_64: howto manager. (line 140)
9478+* BFD_RELOC_SPARC_7: howto manager. (line 152)
9479+* BFD_RELOC_SPARC_BASE13: howto manager. (line 136)
9480+* BFD_RELOC_SPARC_BASE22: howto manager. (line 137)
9481+* BFD_RELOC_SPARC_COPY: howto manager. (line 126)
9482+* BFD_RELOC_SPARC_DISP64: howto manager. (line 155)
9483+* BFD_RELOC_SPARC_GLOB_DAT: howto manager. (line 127)
9484+* BFD_RELOC_SPARC_GOT10: howto manager. (line 120)
9485+* BFD_RELOC_SPARC_GOT13: howto manager. (line 121)
9486+* BFD_RELOC_SPARC_GOT22: howto manager. (line 122)
9487+* BFD_RELOC_SPARC_H44: howto manager. (line 160)
9488+* BFD_RELOC_SPARC_HH22: howto manager. (line 144)
9489+* BFD_RELOC_SPARC_HIX22: howto manager. (line 158)
9490+* BFD_RELOC_SPARC_HM10: howto manager. (line 145)
9491+* BFD_RELOC_SPARC_JMP_SLOT: howto manager. (line 128)
9492+* BFD_RELOC_SPARC_L44: howto manager. (line 162)
9493+* BFD_RELOC_SPARC_LM22: howto manager. (line 146)
9494+* BFD_RELOC_SPARC_LOX10: howto manager. (line 159)
9495+* BFD_RELOC_SPARC_M44: howto manager. (line 161)
9496+* BFD_RELOC_SPARC_OLO10: howto manager. (line 143)
9497+* BFD_RELOC_SPARC_PC10: howto manager. (line 123)
9498+* BFD_RELOC_SPARC_PC22: howto manager. (line 124)
9499+* BFD_RELOC_SPARC_PC_HH22: howto manager. (line 147)
9500+* BFD_RELOC_SPARC_PC_HM10: howto manager. (line 148)
9501+* BFD_RELOC_SPARC_PC_LM22: howto manager. (line 149)
9502+* BFD_RELOC_SPARC_PLT32: howto manager. (line 156)
9503+* BFD_RELOC_SPARC_PLT64: howto manager. (line 157)
9504+* BFD_RELOC_SPARC_REGISTER: howto manager. (line 163)
9505+* BFD_RELOC_SPARC_RELATIVE: howto manager. (line 129)
9506+* BFD_RELOC_SPARC_REV32: howto manager. (line 166)
9507+* BFD_RELOC_SPARC_TLS_DTPMOD32: howto manager. (line 187)
9508+* BFD_RELOC_SPARC_TLS_DTPMOD64: howto manager. (line 188)
9509+* BFD_RELOC_SPARC_TLS_DTPOFF32: howto manager. (line 189)
9510+* BFD_RELOC_SPARC_TLS_DTPOFF64: howto manager. (line 190)
9511+* BFD_RELOC_SPARC_TLS_GD_ADD: howto manager. (line 171)
9512+* BFD_RELOC_SPARC_TLS_GD_CALL: howto manager. (line 172)
9513+* BFD_RELOC_SPARC_TLS_GD_HI22: howto manager. (line 169)
9514+* BFD_RELOC_SPARC_TLS_GD_LO10: howto manager. (line 170)
9515+* BFD_RELOC_SPARC_TLS_IE_ADD: howto manager. (line 184)
9516+* BFD_RELOC_SPARC_TLS_IE_HI22: howto manager. (line 180)
9517+* BFD_RELOC_SPARC_TLS_IE_LD: howto manager. (line 182)
9518+* BFD_RELOC_SPARC_TLS_IE_LDX: howto manager. (line 183)
9519+* BFD_RELOC_SPARC_TLS_IE_LO10: howto manager. (line 181)
9520+* BFD_RELOC_SPARC_TLS_LDM_ADD: howto manager. (line 175)
9521+* BFD_RELOC_SPARC_TLS_LDM_CALL: howto manager. (line 176)
9522+* BFD_RELOC_SPARC_TLS_LDM_HI22: howto manager. (line 173)
9523+* BFD_RELOC_SPARC_TLS_LDM_LO10: howto manager. (line 174)
9524+* BFD_RELOC_SPARC_TLS_LDO_ADD: howto manager. (line 179)
9525+* BFD_RELOC_SPARC_TLS_LDO_HIX22: howto manager. (line 177)
9526+* BFD_RELOC_SPARC_TLS_LDO_LOX10: howto manager. (line 178)
9527+* BFD_RELOC_SPARC_TLS_LE_HIX22: howto manager. (line 185)
9528+* BFD_RELOC_SPARC_TLS_LE_LOX10: howto manager. (line 186)
9529+* BFD_RELOC_SPARC_TLS_TPOFF32: howto manager. (line 191)
9530+* BFD_RELOC_SPARC_TLS_TPOFF64: howto manager. (line 192)
9531+* BFD_RELOC_SPARC_UA16: howto manager. (line 130)
9532+* BFD_RELOC_SPARC_UA32: howto manager. (line 131)
9533+* BFD_RELOC_SPARC_UA64: howto manager. (line 132)
9534+* BFD_RELOC_SPARC_WDISP16: howto manager. (line 150)
9535+* BFD_RELOC_SPARC_WDISP19: howto manager. (line 151)
9536+* BFD_RELOC_SPARC_WDISP22: howto manager. (line 117)
9537+* BFD_RELOC_SPARC_WPLT30: howto manager. (line 125)
9538+* BFD_RELOC_THUMB_PCREL_BLX: howto manager. (line 601)
9539+* BFD_RELOC_THUMB_PCREL_BRANCH12: howto manager. (line 749)
9540+* BFD_RELOC_THUMB_PCREL_BRANCH23: howto manager. (line 750)
9541+* BFD_RELOC_THUMB_PCREL_BRANCH9: howto manager. (line 748)
9542+* BFD_RELOC_TIC30_LDP: howto manager. (line 956)
9543+* BFD_RELOC_TIC54X_16_OF_23: howto manager. (line 974)
9544+* BFD_RELOC_TIC54X_23: howto manager. (line 971)
9545+* BFD_RELOC_TIC54X_MS7_OF_23: howto manager. (line 979)
9546+* BFD_RELOC_TIC54X_PARTLS7: howto manager. (line 961)
9547+* BFD_RELOC_TIC54X_PARTMS9: howto manager. (line 966)
9548+* bfd_reloc_type_lookup: howto manager. (line 1693)
9549+* BFD_RELOC_V850_22_PCREL: howto manager. (line 883)
9550+* BFD_RELOC_V850_9_PCREL: howto manager. (line 880)
9551+* BFD_RELOC_V850_ALIGN: howto manager. (line 941)
9552+* BFD_RELOC_V850_CALLT_16_16_OFFSET: howto manager. (line 932)
9553+* BFD_RELOC_V850_CALLT_6_7_OFFSET: howto manager. (line 929)
9554+* BFD_RELOC_V850_LO16_SPLIT_OFFSET: howto manager. (line 944)
9555+* BFD_RELOC_V850_LONGCALL: howto manager. (line 935)
9556+* BFD_RELOC_V850_LONGJUMP: howto manager. (line 938)
9557+* BFD_RELOC_V850_SDA_15_16_OFFSET: howto manager. (line 889)
9558+* BFD_RELOC_V850_SDA_16_16_OFFSET: howto manager. (line 886)
9559+* BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET: howto manager. (line 921)
9560+* BFD_RELOC_V850_TDA_16_16_OFFSET: howto manager. (line 911)
9561+* BFD_RELOC_V850_TDA_4_4_OFFSET: howto manager. (line 918)
9562+* BFD_RELOC_V850_TDA_4_5_OFFSET: howto manager. (line 914)
9563+* BFD_RELOC_V850_TDA_6_8_OFFSET: howto manager. (line 900)
9564+* BFD_RELOC_V850_TDA_7_7_OFFSET: howto manager. (line 908)
9565+* BFD_RELOC_V850_TDA_7_8_OFFSET: howto manager. (line 904)
9566+* BFD_RELOC_V850_ZDA_15_16_OFFSET: howto manager. (line 896)
9567+* BFD_RELOC_V850_ZDA_16_16_OFFSET: howto manager. (line 893)
9568+* BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET: howto manager. (line 925)
9569+* BFD_RELOC_VAX_GLOB_DAT: howto manager. (line 1594)
9570+* BFD_RELOC_VAX_JMP_SLOT: howto manager. (line 1595)
9571+* BFD_RELOC_VAX_RELATIVE: howto manager. (line 1596)
9572+* BFD_RELOC_VPE4KMATH_DATA: howto manager. (line 1291)
9573+* BFD_RELOC_VPE4KMATH_INSN: howto manager. (line 1292)
9574+* BFD_RELOC_VTABLE_ENTRY: howto manager. (line 1296)
9575+* BFD_RELOC_VTABLE_INHERIT: howto manager. (line 1295)
9576+* BFD_RELOC_X86_64_32S: howto manager. (line 449)
9577+* BFD_RELOC_X86_64_COPY: howto manager. (line 444)
9578+* BFD_RELOC_X86_64_DTPMOD64: howto manager. (line 450)
9579+* BFD_RELOC_X86_64_DTPOFF32: howto manager. (line 455)
9580+* BFD_RELOC_X86_64_DTPOFF64: howto manager. (line 451)
9581+* BFD_RELOC_X86_64_GLOB_DAT: howto manager. (line 445)
9582+* BFD_RELOC_X86_64_GOT32: howto manager. (line 442)
9583+* BFD_RELOC_X86_64_GOTPCREL: howto manager. (line 448)
9584+* BFD_RELOC_X86_64_GOTTPOFF: howto manager. (line 456)
9585+* BFD_RELOC_X86_64_JUMP_SLOT: howto manager. (line 446)
9586+* BFD_RELOC_X86_64_PLT32: howto manager. (line 443)
9587+* BFD_RELOC_X86_64_RELATIVE: howto manager. (line 447)
9588+* BFD_RELOC_X86_64_TLSGD: howto manager. (line 453)
9589+* BFD_RELOC_X86_64_TLSLD: howto manager. (line 454)
9590+* BFD_RELOC_X86_64_TPOFF32: howto manager. (line 457)
9591+* BFD_RELOC_X86_64_TPOFF64: howto manager. (line 452)
9592+* BFD_RELOC_XSTORMY16_12: howto manager. (line 1589)
9593+* BFD_RELOC_XSTORMY16_24: howto manager. (line 1590)
9594+* BFD_RELOC_XSTORMY16_FPTR16: howto manager. (line 1591)
9595+* BFD_RELOC_XSTORMY16_REL_12: howto manager. (line 1588)
9596+* BFD_RELOC_XTENSA_ASM_EXPAND: howto manager. (line 1682)
9597+* BFD_RELOC_XTENSA_ASM_SIMPLIFY: howto manager. (line 1687)
9598+* BFD_RELOC_XTENSA_DIFF16: howto manager. (line 1629)
9599+* BFD_RELOC_XTENSA_DIFF32: howto manager. (line 1630)
9600+* BFD_RELOC_XTENSA_DIFF8: howto manager. (line 1628)
9601+* BFD_RELOC_XTENSA_GLOB_DAT: howto manager. (line 1618)
9602+* BFD_RELOC_XTENSA_JMP_SLOT: howto manager. (line 1619)
9603+* BFD_RELOC_XTENSA_OP0: howto manager. (line 1676)
9604+* BFD_RELOC_XTENSA_OP1: howto manager. (line 1677)
9605+* BFD_RELOC_XTENSA_OP2: howto manager. (line 1678)
9606+* BFD_RELOC_XTENSA_PLT: howto manager. (line 1623)
9607+* BFD_RELOC_XTENSA_RELATIVE: howto manager. (line 1620)
9608+* BFD_RELOC_XTENSA_RTLD: howto manager. (line 1613)
9609+* BFD_RELOC_XTENSA_SLOT0_ALT: howto manager. (line 1658)
9610+* BFD_RELOC_XTENSA_SLOT0_OP: howto manager. (line 1638)
9611+* BFD_RELOC_XTENSA_SLOT10_ALT: howto manager. (line 1668)
9612+* BFD_RELOC_XTENSA_SLOT10_OP: howto manager. (line 1648)
9613+* BFD_RELOC_XTENSA_SLOT11_ALT: howto manager. (line 1669)
9614+* BFD_RELOC_XTENSA_SLOT11_OP: howto manager. (line 1649)
9615+* BFD_RELOC_XTENSA_SLOT12_ALT: howto manager. (line 1670)
9616+* BFD_RELOC_XTENSA_SLOT12_OP: howto manager. (line 1650)
9617+* BFD_RELOC_XTENSA_SLOT13_ALT: howto manager. (line 1671)
9618+* BFD_RELOC_XTENSA_SLOT13_OP: howto manager. (line 1651)
9619+* BFD_RELOC_XTENSA_SLOT14_ALT: howto manager. (line 1672)
9620+* BFD_RELOC_XTENSA_SLOT14_OP: howto manager. (line 1652)
9621+* BFD_RELOC_XTENSA_SLOT1_ALT: howto manager. (line 1659)
9622+* BFD_RELOC_XTENSA_SLOT1_OP: howto manager. (line 1639)
9623+* BFD_RELOC_XTENSA_SLOT2_ALT: howto manager. (line 1660)
9624+* BFD_RELOC_XTENSA_SLOT2_OP: howto manager. (line 1640)
9625+* BFD_RELOC_XTENSA_SLOT3_ALT: howto manager. (line 1661)
9626+* BFD_RELOC_XTENSA_SLOT3_OP: howto manager. (line 1641)
9627+* BFD_RELOC_XTENSA_SLOT4_ALT: howto manager. (line 1662)
9628+* BFD_RELOC_XTENSA_SLOT4_OP: howto manager. (line 1642)
9629+* BFD_RELOC_XTENSA_SLOT5_ALT: howto manager. (line 1663)
9630+* BFD_RELOC_XTENSA_SLOT5_OP: howto manager. (line 1643)
9631+* BFD_RELOC_XTENSA_SLOT6_ALT: howto manager. (line 1664)
9632+* BFD_RELOC_XTENSA_SLOT6_OP: howto manager. (line 1644)
9633+* BFD_RELOC_XTENSA_SLOT7_ALT: howto manager. (line 1665)
9634+* BFD_RELOC_XTENSA_SLOT7_OP: howto manager. (line 1645)
9635+* BFD_RELOC_XTENSA_SLOT8_ALT: howto manager. (line 1666)
9636+* BFD_RELOC_XTENSA_SLOT8_OP: howto manager. (line 1646)
9637+* BFD_RELOC_XTENSA_SLOT9_ALT: howto manager. (line 1667)
9638+* BFD_RELOC_XTENSA_SLOT9_OP: howto manager. (line 1647)
9639+* bfd_scan_arch: Architectures. (line 369)
9640+* bfd_scan_vma: BFD front end. (line 420)
9641+* bfd_seach_for_target: bfd_target. (line 445)
9642+* bfd_section_already_linked: Writing the symbol table.
9643+ (line 55)
9644+* bfd_section_list_clear: section prototypes. (line 8)
9645+* bfd_sections_find_if: section prototypes. (line 145)
9646+* bfd_set_arch_info: Architectures. (line 410)
9647+* bfd_set_archive_head: Archives. (line 66)
9648+* bfd_set_default_target: bfd_target. (line 410)
9649+* bfd_set_error: BFD front end. (line 235)
9650+* bfd_set_error_handler: BFD front end. (line 275)
9651+* bfd_set_error_program_name: BFD front end. (line 284)
9652+* bfd_set_file_flags: BFD front end. (line 340)
9653+* bfd_set_format: Formats. (line 65)
9654+* bfd_set_gp_size: BFD front end. (line 410)
9655+* bfd_set_private_flags: BFD front end. (line 487)
9656+* bfd_set_reloc: BFD front end. (line 330)
9657+* bfd_set_section_contents: section prototypes. (line 176)
9658+* bfd_set_section_flags: section prototypes. (line 109)
9659+* bfd_set_section_size: section prototypes. (line 162)
9660+* bfd_set_start_address: BFD front end. (line 389)
9661+* bfd_set_symtab: symbol handling functions.
9662+ (line 60)
9663+* bfd_symbol_info: symbol handling functions.
9664+ (line 130)
9665+* bfd_target_list: bfd_target. (line 436)
9666+* bfd_write_bigendian_4byte_int: Internal. (line 10)
9667+* bfd_zalloc: Opening and Closing.
9668+ (line 188)
9669+* coff_symbol_type: coff. (line 186)
9670+* core_file_matches_executable_p: Core Files. (line 27)
9671+* find_separate_debug_file: Opening and Closing.
9672+ (line 230)
9673+* get_debug_link_info: Opening and Closing.
9674+ (line 211)
9675+* Hash tables: Hash Tables. (line 6)
9676+* internal object-file format: Canonical format. (line 11)
9677+* Linker: Linker Functions. (line 6)
9678+* Other functions: BFD front end. (line 502)
9679+* separate_debug_file_exists: Opening and Closing.
9680+ (line 221)
9681+* struct bfd_iovec: BFD front end. (line 646)
9682+* target vector (_bfd_final_link): Performing the Final Link.
9683+ (line 6)
9684+* target vector (_bfd_link_add_symbols): Adding Symbols to the Hash Table.
9685+ (line 6)
9686+* target vector (_bfd_link_hash_table_create): Creating a Linker Hash Table.
9687+ (line 6)
9688+* The HOWTO Macro: typedef arelent. (line 290)
9689+* what is it?: Overview. (line 6)
9690+
9691+
239692 
249693 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
9694+Node: Top792
9695+Node: Overview1124
9696+Node: History2175
9697+Node: How It Works3121
9698+Node: What BFD Version 2 Can Do4663
9699+Node: BFD information loss5978
9700+Node: Canonical format8510
9701+Node: BFD front end12882
9702+Node: Memory Usage38109
9703+Node: Initialization39337
9704+Node: Sections39733
9705+Node: Section Input40216
9706+Node: Section Output41581
9707+Node: typedef asection44067
9708+Node: section prototypes61666
9709+Node: Symbols70649
9710+Node: Reading Symbols72244
9711+Node: Writing Symbols73351
9712+Node: Mini Symbols75060
9713+Node: typedef asymbol76034
9714+Node: symbol handling functions80952
9715+Node: Archives86294
9716+Node: Formats89971
9717+Node: Relocations92862
9718+Node: typedef arelent93589
9719+Node: howto manager109307
9720+Node: Core Files165480
9721+Node: Targets166559
9722+Node: bfd_target168529
9723+Node: Architectures187849
9724+Node: Opening and Closing208146
9725+Node: Internal217859
9726+Node: File Caching224131
9727+Node: Linker Functions227438
9728+Node: Creating a Linker Hash Table229111
9729+Node: Adding Symbols to the Hash Table230849
9730+Node: Differing file formats231749
9731+Node: Adding symbols from an object file233497
9732+Node: Adding symbols from an archive235648
9733+Node: Performing the Final Link238062
9734+Node: Information provided by the linker239304
9735+Node: Relocating the section contents240454
9736+Node: Writing the symbol table242205
9737+Node: Hash Tables245198
9738+Node: Creating and Freeing a Hash Table246396
9739+Node: Looking Up or Entering a String247646
9740+Node: Traversing a Hash Table248899
9741+Node: Deriving a New Hash Table Type249688
9742+Node: Define the Derived Structures250754
9743+Node: Write the Derived Creation Routine251835
9744+Node: Write Other Derived Routines254529
9745+Node: BFD back ends255844
9746+Node: What to Put Where256114
9747+Node: aout256252
9748+Node: coff262503
9749+Node: elf287179
9750+Node: mmo288033
9751+Node: File layout288961
9752+Node: Symbol-table294608
9753+Node: mmo section mapping298377
9754+Node: GNU Free Documentation License302029
9755+Node: Index321749
889756 
899757 End Tag Table
--- a/binutils/addr2line.c
+++ b/binutils/addr2line.c
@@ -285,6 +285,8 @@ main (int argc, char **argv)
285285 program_name = *argv;
286286 xmalloc_set_program_name (program_name);
287287
288+ expandargv (&argc, &argv);
289+
288290 bfd_init ();
289291 set_default_bfd_target ();
290292
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -362,6 +362,8 @@ main (int argc, char **argv)
362362 program_name = argv[0];
363363 xmalloc_set_program_name (program_name);
364364
365+ expandargv (&argc, &argv);
366+
365367 if (is_ranlib < 0)
366368 {
367369 char *temp;
--- a/binutils/coffdump.c
+++ b/binutils/coffdump.c
@@ -496,6 +496,8 @@ main (int ac, char **av)
496496 program_name = av[0];
497497 xmalloc_set_program_name (program_name);
498498
499+ expandargv (&ac, &av);
500+
499501 while ((opt = getopt_long (ac, av, "HhVv", long_options,
500502 (int *) NULL))
501503 != EOF)
--- a/binutils/cxxfilt.c
+++ b/binutils/cxxfilt.c
@@ -171,6 +171,8 @@ main (int argc, char **argv)
171171 program_name = argv[0];
172172 xmalloc_set_program_name (program_name);
173173
174+ expandargv (&argc, &argv);
175+
174176 strip_underscore = TARGET_PREPENDS_UNDERSCORE;
175177
176178 while ((c = getopt_long (argc, argv, "_nps:", long_options, (int *) 0)) != EOF)
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -3157,6 +3157,8 @@ main (int ac, char **av)
31573157 bindtextdomain (PACKAGE, LOCALEDIR);
31583158 textdomain (PACKAGE);
31593159
3160+ expandargv (&argc, &argv);
3161+
31603162 while ((c = getopt_long (ac, av,
31613163 #ifdef DLLTOOL_MCORE_ELF
31623164 "m:e:l:aD:d:z:b:xp:cCuUkAS:f:nvVHhM:L:F:",
--- a/binutils/dllwrap.c
+++ b/binutils/dllwrap.c
@@ -632,6 +632,8 @@ main (int argc, char **argv)
632632 bindtextdomain (PACKAGE, LOCALEDIR);
633633 textdomain (PACKAGE);
634634
635+ expandargv (&argc, &argv);
636+
635637 saved_argv = (char **) xmalloc (argc * sizeof (char*));
636638 dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
637639 driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
--- a/binutils/nlmconv.c
+++ b/binutils/nlmconv.c
@@ -210,6 +210,8 @@ main (int argc, char **argv)
210210 program_name = argv[0];
211211 xmalloc_set_program_name (program_name);
212212
213+ expandargv (&argc, &argv);
214+
213215 bfd_init ();
214216 set_default_bfd_target ();
215217
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1490,6 +1490,8 @@ main (int argc, char **argv)
14901490
14911491 START_PROGRESS (program_name, 0);
14921492
1493+ expandargv (&argc, &argv);
1494+
14931495 bfd_init ();
14941496 set_default_bfd_target ();
14951497
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3083,6 +3083,8 @@ main (int argc, char *argv[])
30833083
30843084 START_PROGRESS (program_name, 0);
30853085
3086+ expandargv (&argc, &argv);
3087+
30863088 strip_symbols = STRIP_UNDEF;
30873089 discard_locals = LOCALS_UNDEF;
30883090
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -2802,6 +2802,8 @@ main (int argc, char **argv)
28022802
28032803 START_PROGRESS (program_name, 0);
28042804
2805+ expandargv (&argc, &argv);
2806+
28052807 bfd_init ();
28062808 set_default_bfd_target ();
28072809
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12139,6 +12139,8 @@ main (int argc, char **argv)
1213912139 bindtextdomain (PACKAGE, LOCALEDIR);
1214012140 textdomain (PACKAGE);
1214112141
12142+ expandargv (&argc, &argv);
12143+
1214212144 parse_args (argc, argv);
1214312145
1214412146 if (num_dump_sects > 0)
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -131,6 +131,8 @@ main (int argc, char **argv)
131131 program_name = *argv;
132132 xmalloc_set_program_name (program_name);
133133
134+ expandargv (&argc, &argv);
135+
134136 bfd_init ();
135137 set_default_bfd_target ();
136138
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -1761,6 +1761,8 @@ main (int ac, char **av)
17611761 program_name = av[0];
17621762 xmalloc_set_program_name (program_name);
17631763
1764+ expandargv (&ac, &av);
1765+
17641766 while ((opt = getopt_long (ac, av, "dHhVvqn", long_options,
17651767 (int *) NULL))
17661768 != EOF)
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -176,6 +176,9 @@ main (int argc, char **argv)
176176
177177 program_name = argv[0];
178178 xmalloc_set_program_name (program_name);
179+
180+ expandargv (&argc, &argv);
181+
179182 string_min = -1;
180183 print_addresses = FALSE;
181184 print_filenames = FALSE;
--- a/binutils/sysdump.c
+++ b/binutils/sysdump.c
@@ -680,6 +680,8 @@ main (int ac, char **av)
680680 program_name = av[0];
681681 xmalloc_set_program_name (program_name);
682682
683+ expandargv (&ac, &av);
684+
683685 while ((opt = getopt_long (ac, av, "HhVv", long_options, (int *) NULL)) != EOF)
684686 {
685687 switch (opt)
--- a/binutils/sysinfo.c
+++ b/binutils/sysinfo.c
@@ -1494,6 +1494,8 @@ char writecode;
14941494 int
14951495 main (int ac, char **av)
14961496 {
1497+ expandargv (&ac, &av);
1498+
14971499 yydebug=0;
14981500 if (ac > 1)
14991501 writecode = av[1][1];
--- a/binutils/windres.c
+++ b/binutils/windres.c
@@ -767,6 +767,8 @@ main (int argc, char **argv)
767767 program_name = argv[0];
768768 xmalloc_set_program_name (program_name);
769769
770+ expandargv (&ac, &av);
771+
770772 bfd_init ();
771773 set_default_bfd_target ();
772774
--- a/include/libiberty.h
+++ b/include/libiberty.h
@@ -62,6 +62,9 @@ extern void freeargv PARAMS ((char **));
6262
6363 extern char **dupargv PARAMS ((char **)) ATTRIBUTE_MALLOC;
6464
65+/* Expand "@file" arguments in argv. */
66+
67+extern void expandargv PARAMS ((int *, char ***));
6568
6669 /* Return the last component of a path name. Note that we can't use a
6770 prototype here because the parameter is declared inconsistently
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -197,6 +197,8 @@ main (int argc, char **argv)
197197
198198 START_PROGRESS (program_name, 0);
199199
200+ expandargv (&argc, &argv);
201+
200202 bfd_init ();
201203
202204 bfd_set_error_program_name (program_name);
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -24,8 +24,9 @@ Boston, MA 02111-1307, USA. */
2424
2525 #include "ansidecl.h"
2626 #include "libiberty.h"
27+#include "safe-ctype.h"
2728
28-#define ISBLANK(ch) ((ch) == ' ' || (ch) == '\t')
29+#include <stdio.h>
2930
3031 /* Routines imported from standard C runtime libraries. */
3132
@@ -304,6 +305,144 @@ char **buildargv (input)
304305 return (argv);
305306 }
306307
308+/*
309+
310+@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
311+
312+The @var{argcp} and @code{argvp} arguments are pointers to the usual
313+@code{argc} and @code{argv} arguments to @code{main}. This function
314+looks for arguments that begin with the character @samp{@@}. Any such
315+arguments are interpreted as ``response files''. The contents of the
316+response file are interpreted as additional command line options. In
317+particular, the file is separated into whitespace-separated strings;
318+each such string is taken as a command-line option. The new options
319+are inserted in place of the option naming the response file, and
320+@code{*argcp} and @code{*argvp} will be updated. If the value of
321+@code{*argvp} is modified by this function, then the new value has
322+been dynamically allocated and should be deallocated by the caller
323+with @code{freeargv}.
324+
325+@end deftypefn
326+
327+*/
328+
329+void
330+expandargv (argcp, argvp)
331+ int *argcp;
332+ char ***argvp;
333+{
334+ /* A dynamically allocated buffer used to hold options read from a
335+ response file. NULL until needed. */
336+ char *buffer = NULL;
337+ /* The number of bytes in BUFFER. */
338+ size_t buffer_len = 0;
339+ /* Dynamically allocated storage for the options read from the
340+ response file. NULL until needed. */
341+ char **file_options = NULL;
342+ /* The number of slots in the FILE_OPTIONS array. */
343+ size_t file_options_len = 0;
344+ /* If non-NULL, the name of the response file that caused a
345+ failure. */
346+ const char *error_file = NULL;
347+ /* The argument we are currently processing. */
348+ int i = 0;
349+ /* Non-zero if ***argvp has been dynamically allocated. */
350+ int argv_dynamic = 0;
351+
352+ /* Loop over the arguments, handling response files. We always skip
353+ ARGVP[0], as that is the name of the program being run. */
354+ while (++i != *argcp)
355+ {
356+ /* The name of the response file. */
357+ const char *filename;
358+ /* The response file. */
359+ FILE *f;
360+ /* The number of options read from the response file, if any. */
361+ size_t num_options;
362+
363+ /* We are only interested in options of the form "@file". */
364+ filename = (*argvp)[i];
365+ if (filename[0] != '@')
366+ continue;
367+
368+ /* Open the file. */
369+ f = fopen (++filename, "r");
370+ if (!f)
371+ continue;
372+
373+ /* Read all the options. */
374+ num_options = 0;
375+ while (1)
376+ {
377+ /* The insertion point in BUFFER. */
378+ size_t buffer_pos = 0;
379+ /* The character immediately following the option in
380+ BUFFER. */
381+ int c;
382+ /* Read the next option from the file. */
383+ while (1)
384+ {
385+ if (buffer_pos + 32 > buffer_len)
386+ {
387+ buffer_len = buffer_len ? 2 * buffer_len : 32;
388+ buffer = (char *) xrealloc (buffer, buffer_len);
389+ }
390+ c = fscanf (f, "%31s", buffer + buffer_pos);
391+ if (c == EOF)
392+ break;
393+ /* If the next character in the file is not whitespace,
394+ then we didn't yet read the entire argument. */
395+ c = getc (f);
396+ if (c == EOF || ISSPACE (c))
397+ break;
398+ /* Put back the character at which we peeked. */
399+ ungetc (c, f);
400+ buffer_pos += 31;
401+ }
402+ if (c == EOF)
403+ break;
404+ /* Insert the option into FILE_OPTIONS. */
405+ if (num_options == file_options_len)
406+ {
407+ file_options_len = file_options_len ? 2 * file_options_len : 32;
408+ file_options
409+ = (char **) xrealloc (file_options,
410+ file_options_len * sizeof (char *));
411+ }
412+ file_options[num_options++] = xstrdup(buffer);
413+ }
414+
415+ /* We're done with the file now. */
416+ fclose (f);
417+ /* Insert all the options into ARGV. */
418+ if (!argv_dynamic)
419+ {
420+ *argvp = dupargv (*argvp);
421+ if (!*argvp)
422+ /* We do not know exactly many bytes dupargv tried to
423+ allocate, so make a guess. */
424+ xmalloc_failed (*argcp * 32);
425+ }
426+ /* The "+1" below handles the NULL terminator at the end of ARGV. */
427+ *argvp = ((char **)
428+ xrealloc (*argvp,
429+ (*argcp + num_options + 1) * sizeof (char *)));
430+ memmove (*argvp + i + num_options, *argvp + i + 1,
431+ (*argcp - i) * sizeof (char *));
432+ memcpy (*argvp + i, file_options, num_options * sizeof (char *));
433+ /* The original option has been replaced by all the new
434+ options. */
435+ *argcp += num_options - 1;
436+ }
437+
438+ if (buffer)
439+ free (buffer);
440+ if (file_options)
441+ free (file_options);
442+
443+ return error_file;
444+}
445+
307446 #ifdef MAIN
308447
309448 /* Simple little test driver. */