summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd/doc
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-03-20 21:37:13 +0000
committerobrien <obrien@FreeBSD.org>2002-03-20 21:37:13 +0000
commit1d1ccbf8e10277966ecf3c150370a50c9e184b35 (patch)
tree797055ecec4fa9a6a5ca1f6b6d6d966f5c3ca6aa /contrib/binutils/bfd/doc
parent670387a18a22cf299c750186efe8ca24cebb7e05 (diff)
downloadFreeBSD-src-1d1ccbf8e10277966ecf3c150370a50c9e184b35.zip
FreeBSD-src-1d1ccbf8e10277966ecf3c150370a50c9e184b35.tar.gz
Import of Binutils from the FSF 2.12 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 20-March-2002 13:33:33 PST.
Diffstat (limited to 'contrib/binutils/bfd/doc')
-rw-r--r--contrib/binutils/bfd/doc/archures.texi41
-rw-r--r--contrib/binutils/bfd/doc/bfdt.texi274
-rw-r--r--contrib/binutils/bfd/doc/coffcode.texi499
-rw-r--r--contrib/binutils/bfd/doc/core.texi2
-rw-r--r--contrib/binutils/bfd/doc/format.texi2
-rw-r--r--contrib/binutils/bfd/doc/libbfd.texi96
-rw-r--r--contrib/binutils/bfd/doc/opncls.texi8
-rw-r--r--contrib/binutils/bfd/doc/reloc.texi486
-rw-r--r--contrib/binutils/bfd/doc/section.texi141
-rw-r--r--contrib/binutils/bfd/doc/syms.texi159
-rw-r--r--contrib/binutils/bfd/doc/targets.texi410
11 files changed, 1203 insertions, 915 deletions
diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi
index 5924e7b..dcdaff9 100644
--- a/contrib/binutils/bfd/doc/archures.texi
+++ b/contrib/binutils/bfd/doc/archures.texi
@@ -35,8 +35,8 @@ and 68020 and 68030 for Motorola 68020 and 68030.
@example
enum bfd_architecture
@{
- bfd_arch_unknown, /* File arch not known */
- bfd_arch_obscure, /* Arch known, not one of these */
+ bfd_arch_unknown, /* File arch not known. */
+ bfd_arch_obscure, /* Arch known, not one of these. */
bfd_arch_m68k, /* Motorola 68xxx */
#define bfd_mach_m68000 1
#define bfd_mach_m68008 2
@@ -58,7 +58,7 @@ enum bfd_architecture
available to machines with higher numbers.
The exception is the "ca", which is
incompatible with all other machines except
- "core". */
+ "core". */
#define bfd_mach_i960_core 1
#define bfd_mach_i960_ka_sa 2
@@ -69,6 +69,8 @@ enum bfd_architecture
#define bfd_mach_i960_jx 7
#define bfd_mach_i960_hx 8
+ bfd_arch_or32, /* OpenRISC 32 */
+
bfd_arch_a29k, /* AMD 29000 */
bfd_arch_sparc, /* SPARC */
#define bfd_mach_sparc 1
@@ -76,12 +78,12 @@ enum bfd_architecture
#define bfd_mach_sparc_sparclet 2
#define bfd_mach_sparc_sparclite 3
#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns */
+#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
#define bfd_mach_sparc_sparclite_le 6
#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns */
+#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
+#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
+#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
/* Nonzero if MACH has the v9 instruction set. */
#define bfd_mach_sparc_v9_p(mach) \
((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
@@ -103,11 +105,10 @@ enum bfd_architecture
#define bfd_mach_mips10000 10000
#define bfd_mach_mips12000 12000
#define bfd_mach_mips16 16
-#define bfd_mach_mips32 32
-#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */
#define bfd_mach_mips5 5
-#define bfd_mach_mips64 64
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
+#define bfd_mach_mipsisa32 32
+#define bfd_mach_mipsisa64 64
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
@@ -127,8 +128,10 @@ enum bfd_architecture
#define bfd_mach_h8300 1
#define bfd_mach_h8300h 2
#define bfd_mach_h8300s 3
+ bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
#define bfd_mach_ppc 0
+#define bfd_mach_ppc64 1
#define bfd_mach_ppc_403 403
#define bfd_mach_ppc_403gc 4030
#define bfd_mach_ppc_505 505
@@ -170,11 +173,12 @@ enum bfd_architecture
#define bfd_mach_sh3_dsp 0x3d
#define bfd_mach_sh3e 0x3e
#define bfd_mach_sh4 0x40
+#define bfd_mach_sh5 0x50
bfd_arch_alpha, /* Dec Alpha */
#define bfd_mach_alpha_ev4 0x10
#define bfd_mach_alpha_ev5 0x20
#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM */
+ bfd_arch_arm, /* Advanced Risc Machines ARM. */
#define bfd_mach_arm_2 1
#define bfd_mach_arm_2a 2
#define bfd_mach_arm_3 3
@@ -200,7 +204,7 @@ enum bfd_architecture
#define bfd_mach_arc_7 2
#define bfd_mach_arc_8 3
bfd_arch_m32r, /* Mitsubishi M32R/D */
-#define bfd_mach_m32r 0 /* backwards compatibility */
+#define bfd_mach_m32r 0 /* For backwards compatibility. */
#define bfd_mach_m32rx 'x'
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
@@ -213,13 +217,20 @@ enum bfd_architecture
#define bfd_mach_ia64_elf64 0
#define bfd_mach_ia64_elf32 1
bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers */
+ bfd_arch_avr, /* Atmel AVR microcontrollers. */
#define bfd_mach_avr1 1
#define bfd_mach_avr2 2
#define bfd_mach_avr3 3
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
+ bfd_arch_s390, /* IBM s390 */
+#define bfd_mach_s390_esa 0
+#define bfd_mach_s390_esame 1
+ bfd_arch_openrisc, /* OpenRISC */
+ bfd_arch_mmix, /* Donald Knuth's educational processor. */
+ bfd_arch_xstormy16,
+#define bfd_mach_xstormy16 0
bfd_arch_last
@};
@end example
@@ -251,7 +262,9 @@ typedef struct bfd_arch_info
boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
const struct bfd_arch_info *next;
-@} bfd_arch_info_type;
+@}
+bfd_arch_info_type;
+
@end example
@findex bfd_printable_name
diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi
index b9e6fb7..0b85d3d 100644
--- a/contrib/binutils/bfd/doc/bfdt.texi
+++ b/contrib/binutils/bfd/doc/bfdt.texi
@@ -12,121 +12,118 @@ to the rest of the data.
struct _bfd
@{
- /* The filename the application opened the BFD with. */
- CONST char *filename;
+ /* The filename the application opened the BFD with. */
+ const char *filename;
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
+ /* A pointer to the target jump table. */
+ const struct bfd_target *xvec;
- /* To avoid dragging too many header files into every file that
- includes `@code{bfd.h}', IOSTREAM has been declared as a "char
- *", and MTIME as a "long". Their correct types, to which they
- are cast when used, are "FILE *" and "time_t". The iostream
- is the result of an fopen on the filename. However, if the
- BFD_IN_MEMORY flag is set, then iostream is actually a pointer
- to a bfd_in_memory struct. */
- PTR iostream;
+ /* To avoid dragging too many header files into every file that
+ includes `@code{bfd.h}', IOSTREAM has been declared as a "char *",
+ and MTIME as a "long". Their correct types, to which they
+ are cast when used, are "FILE *" and "time_t". The iostream
+ is the result of an fopen on the filename. However, if the
+ BFD_IN_MEMORY flag is set, then iostream is actually a pointer
+ to a bfd_in_memory struct. */
+ PTR iostream;
+
+ /* Is the file descriptor being cached? That is, can it be closed as
+ needed, and re-opened when accessed later? */
+ boolean cacheable;
+
+ /* Marks whether there was a default target specified when the
+ BFD was opened. This is used to select which matching algorithm
+ to use to choose the back end. */
+ boolean target_defaulted;
+
+ /* The caching routines use these to maintain a
+ least-recently-used list of BFDs. */
+ struct _bfd *lru_prev, *lru_next;
+
+ /* When a file is closed by the caching routines, BFD retains
+ state information on the file here... */
+ ufile_ptr where;
+
+ /* ... and here: (``once'' means at least once). */
+ boolean opened_once;
+
+ /* Set if we have a locally maintained mtime value, rather than
+ getting it from the file each time. */
+ boolean mtime_set;
+
+ /* File modified time, if mtime_set is true. */
+ long mtime;
+
+ /* Reserved for an unimplemented file locking extension. */
+ int ifd;
+
+ /* The format which belongs to the BFD. (object, core, etc.) */
+ bfd_format format;
+
+ /* The direction with which the BFD was opened. */
+ enum bfd_direction
+ @{
+ no_direction = 0,
+ read_direction = 1,
+ write_direction = 2,
+ both_direction = 3
+ @}
+ direction;
+
+ /* Format_specific flags. */
+ flagword flags;
+
+ /* Currently my_archive is tested before adding origin to
+ anything. I believe that this can become always an add of
+ origin, with origin set to 0 for non archive files. */
+ ufile_ptr origin;
+
+ /* Remember when output has begun, to stop strange things
+ from happening. */
+ boolean output_has_begun;
+
+ /* A hash table for section names. */
+ struct bfd_hash_table section_htab;
+
+ /* Pointer to linked list of sections. */
+ struct sec *sections;
+
+ /* The place where we add to the section list. */
+ struct sec **section_tail;
+
+ /* The number of sections. */
+ unsigned int section_count;
+
+ /* Stuff only useful for object files:
+ The start address. */
+ bfd_vma start_address;
+
+ /* Used for input and output. */
+ unsigned int symcount;
+
+ /* Symbol table for output BFD (with symcount entries). */
+ struct symbol_cache_entry **outsymbols;
+
+ /* Pointer to structure which contains architecture information. */
+ const struct bfd_arch_info *arch_info;
+
+ /* Stuff only useful for archives. */
+ PTR arelt_data;
+ struct _bfd *my_archive; /* The containing archive BFD. */
+ struct _bfd *next; /* The next BFD in the archive. */
+ struct _bfd *archive_head; /* The first BFD in the archive. */
+ boolean has_armap;
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
-
- boolean cacheable;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
-
- boolean target_defaulted;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs */
-
- struct _bfd *lru_prev, *lru_next;
-
- /* When a file is closed by the caching routines, BFD retains
- state information on the file here: */
-
- file_ptr where;
-
- /* and here: (``once'' means at least once) */
-
- boolean opened_once;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time: */
-
- boolean mtime_set;
-
- /* File modified time, if mtime_set is true: */
-
- long mtime;
-
- /* Reserved for an unimplemented file locking extension.*/
-
- int ifd;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
-
- bfd_format format;
-
- /* The direction the BFD was opened with*/
-
- enum bfd_direction @{no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3@} direction;
-
- /* Format_specific flags*/
-
- flagword flags;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
-
- file_ptr origin;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- boolean output_has_begun;
-
- /* Pointer to linked list of sections*/
- struct sec *sections;
-
- /* The number of sections */
- unsigned int section_count;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Used for input and output*/
- unsigned int symcount;
-
- /* Symbol table for output BFD (with symcount entries) */
- struct symbol_cache_entry **outsymbols;
-
- /* Pointer to structure which contains architecture information*/
- const struct bfd_arch_info *arch_info;
-
- /* Stuff only useful for archives:*/
- PTR arelt_data;
- struct _bfd *my_archive; /* The containing archive BFD. */
- struct _bfd *next; /* The next BFD in the archive. */
- struct _bfd *archive_head; /* The first BFD in the archive. */
- boolean has_armap;
-
- /* A chain of BFD structures involved in a link. */
- struct _bfd *link_next;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Used by the back end to hold private data. */
-
- union
- @{
+ /* A chain of BFD structures involved in a link. */
+ struct _bfd *link_next;
+
+ /* A field used by _bfd_generic_link_add_archive_symbols. This will
+ be used only for archive elements. */
+ int archive_pass;
+
+ /* Used by the back end to hold private data. */
+ union
+ @{
struct aout_data_struct *aout_data;
struct artdata *aout_ar_data;
struct _oasys_data *oasys_obj_data;
@@ -143,6 +140,7 @@ struct _bfd
struct elf_obj_tdata *elf_obj_data;
struct nlm_obj_tdata *nlm_obj_data;
struct bout_data_struct *bout_data;
+ struct mmo_data_struct *mmo_data;
struct sun_core_struct *sun_core_data;
struct sco5_core_struct *sco5_core_data;
struct trad_core_struct *trad_core_data;
@@ -156,15 +154,16 @@ struct _bfd
struct versados_data_struct *versados_data;
struct netbsd_core_struct *netbsd_core_data;
PTR any;
- @} tdata;
+ @}
+ tdata;
- /* Used by the application to hold private data*/
- PTR usrdata;
+ /* Used by the application to hold private data. */
+ PTR usrdata;
/* Where all the allocated stuff under this BFD goes. This is a
struct objalloc *, but we use PTR to avoid requiring the inclusion of
objalloc.h. */
- PTR memory;
+ PTR memory;
@};
@end example
@@ -192,6 +191,7 @@ typedef enum bfd_error
bfd_error_system_call,
bfd_error_invalid_target,
bfd_error_wrong_format,
+ bfd_error_wrong_object_format,
bfd_error_invalid_operation,
bfd_error_no_memory,
bfd_error_no_symbols,
@@ -207,7 +207,8 @@ typedef enum bfd_error
bfd_error_file_truncated,
bfd_error_file_too_big,
bfd_error_invalid_error_code
-@} bfd_error_type;
+@}
+bfd_error_type;
@end example
@findex bfd_get_error
@@ -232,7 +233,7 @@ Set the BFD error condition to be @var{error_tag}.
@subsubsection @code{bfd_errmsg}
@strong{Synopsis}
@example
-CONST char *bfd_errmsg (bfd_error_type error_tag);
+const char *bfd_errmsg (bfd_error_type error_tag);
@end example
@strong{Description}@*
Return a string describing the error @var{error_tag}, or
@@ -242,7 +243,7 @@ the system error if @var{error_tag} is @code{bfd_error_system_call}.
@subsubsection @code{bfd_perror}
@strong{Synopsis}
@example
-void bfd_perror (CONST char *message);
+void bfd_perror (const char *message);
@end example
@strong{Description}@*
Print to the standard error stream a string describing the
@@ -295,6 +296,17 @@ bfd_error_handler_type bfd_get_error_handler (void);
@strong{Description}@*
Return the BFD error handler function.
+@findex bfd_archive_filename
+@subsubsection @code{bfd_archive_filename}
+@strong{Synopsis}
+@example
+const char *bfd_archive_filename (bfd *);
+@end example
+@strong{Description}@*
+For a BFD that is a component of an archive, returns a string
+with both the archive name and file name. For other BFDs, just
+returns the file name.
+
@section Symbols
@@ -336,7 +348,7 @@ reasons.
@strong{Synopsis}
@example
void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count)
+ (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
@end example
@strong{Description}@*
Set the relocation pointer and count within
@@ -456,7 +468,7 @@ size reasonable?".
@subsubsection @code{bfd_get_gp_size}
@strong{Synopsis}
@example
-int bfd_get_gp_size(bfd *abfd);
+unsigned int bfd_get_gp_size(bfd *abfd);
@end example
@strong{Description}@*
Return the maximum size of objects to be optimized using the GP
@@ -467,7 +479,7 @@ argument to the compiler, assembler or linker.
@subsubsection @code{bfd_set_gp_size}
@strong{Synopsis}
@example
-void bfd_set_gp_size(bfd *abfd, int i);
+void bfd_set_gp_size(bfd *abfd, unsigned int i);
@end example
@strong{Description}@*
Set the maximum size of objects to be optimized using the GP
@@ -478,7 +490,7 @@ the @code{-G} argument to the compiler, assembler or linker.
@subsubsection @code{bfd_scan_vma}
@strong{Synopsis}
@example
-bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
+bfd_vma bfd_scan_vma(const char *string, const char **end, int base);
@end example
@strong{Description}@*
Convert, like @code{strtoul}, a numerical expression
@@ -598,6 +610,9 @@ Stuff which should be documented:
#define bfd_gc_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
+#define bfd_merge_sections(abfd, link_info) \
+ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
@@ -632,3 +647,16 @@ extern bfd_byte *bfd_get_relocated_section_contents
@end example
+@findex bfd_alt_mach_code
+@subsubsection @code{bfd_alt_mach_code}
+@strong{Synopsis}
+@example
+boolean bfd_alt_mach_code(bfd *abfd, int index);
+@end example
+@strong{Description}@*
+When more than one machine code number is available for the
+same machine type, this function can be used to switch between
+the preferred one (index == 0) and any others. Currently,
+only ELF supports this feature, with up to two alternate
+machine codes.
+
diff --git a/contrib/binutils/bfd/doc/coffcode.texi b/contrib/binutils/bfd/doc/coffcode.texi
index 8406a04..e7c9d77 100644
--- a/contrib/binutils/bfd/doc/coffcode.texi
+++ b/contrib/binutils/bfd/doc/coffcode.texi
@@ -211,39 +211,37 @@ The hidden information for an @code{asymbol} is described in a
typedef struct coff_ptr_struct
@{
-
- /* Remembers the offset from the first symbol in the file for
- this symbol. Generated by coff_renumber_symbols. */
-unsigned int offset;
-
- /* Should the value of this symbol be renumbered. Used for
- XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
-unsigned int fix_value : 1;
-
- /* Should the tag field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_tag : 1;
-
- /* Should the endidx field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_end : 1;
-
- /* Should the x_csect.x_scnlen field be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_scnlen : 1;
-
- /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
- index into the line number entries. Set by
- coff_slurp_symbol_table. */
-unsigned int fix_line : 1;
-
- /* The container for the symbol structure as read and translated
- from the file. */
-
-union @{
- union internal_auxent auxent;
- struct internal_syment syment;
- @} u;
+ /* Remembers the offset from the first symbol in the file for
+ this symbol. Generated by coff_renumber_symbols. */
+ unsigned int offset;
+
+ /* Should the value of this symbol be renumbered. Used for
+ XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
+ unsigned int fix_value : 1;
+
+ /* Should the tag field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_tag : 1;
+
+ /* Should the endidx field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_end : 1;
+
+ /* Should the x_csect.x_scnlen field be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_scnlen : 1;
+
+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
+ index into the line number entries. Set by coff_slurp_symbol_table. */
+ unsigned int fix_line : 1;
+
+ /* The container for the symbol structure as read and translated
+ from the file. */
+ union
+ @{
+ union internal_auxent auxent;
+ struct internal_syment syment;
+ @} u;
@} combined_entry_type;
@@ -251,17 +249,17 @@ union @{
typedef struct coff_symbol_struct
@{
- /* The actual symbol which the rest of BFD works with */
-asymbol symbol;
+ /* The actual symbol which the rest of BFD works with */
+ asymbol symbol;
- /* A pointer to the hidden information for this symbol */
-combined_entry_type *native;
+ /* A pointer to the hidden information for this symbol */
+ combined_entry_type *native;
- /* A pointer to the linenumber information for this symbol */
-struct lineno_cache_entry *lineno;
+ /* A pointer to the linenumber information for this symbol */
+ struct lineno_cache_entry *lineno;
- /* Have the line numbers been relocated yet ? */
-boolean done_lineno;
+ /* Have the line numbers been relocated yet ? */
+ boolean done_lineno;
@} coff_symbol_type;
@end example
@findex bfd_coff_backend_data
@@ -289,234 +287,166 @@ Special entry points for gdb to swap in coff symbol table parts:
@example
typedef struct
@{
- void (*_bfd_coff_swap_aux_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- int type,
- int class,
- int indaux,
- int numaux,
- PTR in));
-
- void (*_bfd_coff_swap_sym_in) PARAMS ((
- bfd *abfd ,
- PTR ext,
- PTR in));
-
- void (*_bfd_coff_swap_lineno_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
+ void (*_bfd_coff_swap_aux_in)
+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
-@end example
-Special entry points for gas to swap out coff parts:
-@example
- unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
- bfd *abfd,
- PTR in,
- int type,
- int class,
- int indaux,
- int numaux,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
- bfd *abfd,
- PTR src,
- PTR dst));
-
- unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
-
- unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
-
- unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
+ void (*_bfd_coff_swap_sym_in)
+ PARAMS ((bfd *, PTR, PTR));
-@end example
-Special entry points for generic COFF routines to call target
-dependent COFF routines:
-@example
- unsigned int _bfd_filhsz;
- unsigned int _bfd_aoutsz;
- unsigned int _bfd_scnhsz;
- unsigned int _bfd_symesz;
- unsigned int _bfd_auxesz;
- unsigned int _bfd_relsz;
- unsigned int _bfd_linesz;
- unsigned int _bfd_filnmlen;
- boolean _bfd_coff_long_filenames;
- boolean _bfd_coff_long_section_names;
- unsigned int _bfd_coff_default_section_alignment_power;
- boolean _bfd_coff_force_symnames_in_strings;
- unsigned int _bfd_coff_debug_string_prefix_length;
- void (*_bfd_coff_swap_filehdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_reloc_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- boolean (*_bfd_coff_bad_format_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr));
- boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr));
- PTR (*_bfd_coff_mkobject_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr,
- PTR internal_aouthdr));
- flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
- bfd *abfd,
- PTR internal_scnhdr,
- const char *name,
- asection *section));
- void (*_bfd_set_alignment_hook) PARAMS ((
- bfd *abfd,
- asection *sec,
- PTR internal_scnhdr));
- boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
- bfd *abfd));
- boolean (*_bfd_coff_symname_in_debug) PARAMS ((
- bfd *abfd,
- struct internal_syment *sym));
- boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
- bfd *abfd,
- combined_entry_type *table_base,
- combined_entry_type *symbol,
- unsigned int indaux,
- combined_entry_type *aux));
- boolean (*_bfd_coff_print_aux) PARAMS ((
- bfd *abfd,
- FILE *file,
- combined_entry_type *table_base,
- combined_entry_type *symbol,
- combined_entry_type *aux,
- unsigned int indaux));
- void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
- bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- arelent *reloc,
- bfd_byte *data,
- unsigned int *src_ptr,
- unsigned int *dst_ptr));
- int (*_bfd_coff_reloc16_estimate) PARAMS ((
- bfd *abfd,
- asection *input_section,
- arelent *r,
- unsigned int shrink,
- struct bfd_link_info *link_info));
- enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
- bfd *abfd,
- struct internal_syment *));
- boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
- bfd *abfd));
- boolean (*_bfd_coff_start_final_link) PARAMS ((
- bfd *output_bfd,
- struct bfd_link_info *info));
- boolean (*_bfd_coff_relocate_section) PARAMS ((
- bfd *output_bfd,
- struct bfd_link_info *info,
- bfd *input_bfd,
- asection *input_section,
- bfd_byte *contents,
- struct internal_reloc *relocs,
- struct internal_syment *syms,
- asection **sections));
- reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
- bfd *abfd,
- asection *sec,
- struct internal_reloc *rel,
- struct coff_link_hash_entry *h,
- struct internal_syment *sym,
- bfd_vma *addendp));
- boolean (*_bfd_coff_adjust_symndx) PARAMS ((
- bfd *obfd,
- struct bfd_link_info *info,
- bfd *ibfd,
- asection *sec,
- struct internal_reloc *reloc,
- boolean *adjustedp));
- boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
- struct bfd_link_info *info,
- bfd *abfd,
- const char *name,
- flagword flags,
- asection *section,
- bfd_vma value,
- const char *string,
- boolean copy,
- boolean collect,
- struct bfd_link_hash_entry **hashp));
-
- boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
- bfd * abfd,
- struct coff_final_link_info * pfinfo));
- boolean (*_bfd_coff_final_link_postscript) PARAMS ((
- bfd * abfd,
- struct coff_final_link_info * pfinfo));
+ void (*_bfd_coff_swap_lineno_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_aux_out)
+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+
+ unsigned int (*_bfd_coff_swap_sym_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_lineno_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_reloc_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_filehdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_aouthdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_scnhdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int _bfd_filhsz;
+ unsigned int _bfd_aoutsz;
+ unsigned int _bfd_scnhsz;
+ unsigned int _bfd_symesz;
+ unsigned int _bfd_auxesz;
+ unsigned int _bfd_relsz;
+ unsigned int _bfd_linesz;
+ unsigned int _bfd_filnmlen;
+ boolean _bfd_coff_long_filenames;
+ boolean _bfd_coff_long_section_names;
+ unsigned int _bfd_coff_default_section_alignment_power;
+ boolean _bfd_coff_force_symnames_in_strings;
+ unsigned int _bfd_coff_debug_string_prefix_length;
+
+ void (*_bfd_coff_swap_filehdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_aouthdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_scnhdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_reloc_in)
+ PARAMS ((bfd *abfd, PTR, PTR));
+
+ boolean (*_bfd_coff_bad_format_hook)
+ PARAMS ((bfd *, PTR));
+
+ boolean (*_bfd_coff_set_arch_mach_hook)
+ PARAMS ((bfd *, PTR));
+
+ PTR (*_bfd_coff_mkobject_hook)
+ PARAMS ((bfd *, PTR, PTR));
+
+ boolean (*_bfd_styp_to_sec_flags_hook)
+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+
+ void (*_bfd_set_alignment_hook)
+ PARAMS ((bfd *, asection *, PTR));
+
+ boolean (*_bfd_coff_slurp_symbol_table)
+ PARAMS ((bfd *));
+
+ boolean (*_bfd_coff_symname_in_debug)
+ PARAMS ((bfd *, struct internal_syment *));
+
+ boolean (*_bfd_coff_pointerize_aux_hook)
+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *));
+
+ boolean (*_bfd_coff_print_aux)
+ PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+ combined_entry_type *, unsigned int));
+
+ void (*_bfd_coff_reloc16_extra_cases)
+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ bfd_byte *, unsigned int *, unsigned int *));
+
+ int (*_bfd_coff_reloc16_estimate)
+ PARAMS ((bfd *, asection *, arelent *, unsigned int,
+ struct bfd_link_info *));
+
+ enum coff_symbol_classification (*_bfd_coff_classify_symbol)
+ PARAMS ((bfd *, struct internal_syment *));
+
+ boolean (*_bfd_coff_compute_section_file_positions)
+ PARAMS ((bfd *));
+
+ boolean (*_bfd_coff_start_final_link)
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+ boolean (*_bfd_coff_relocate_section)
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+
+ reloc_howto_type *(*_bfd_coff_rtype_to_howto)
+ PARAMS ((bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+ bfd_vma *));
+
+ boolean (*_bfd_coff_adjust_symndx)\
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
+ struct internal_reloc *, boolean *));
+
+ boolean (*_bfd_coff_link_add_one_symbol)
+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ asection *, bfd_vma, const char *, boolean, boolean,
+ struct bfd_link_hash_entry **));
+
+ boolean (*_bfd_coff_link_output_has_begun)
+ PARAMS ((bfd *, struct coff_final_link_info *));
+
+ boolean (*_bfd_coff_final_link_postscript)
+ PARAMS ((bfd *, struct coff_final_link_info *));
@} bfd_coff_backend_data;
-#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
+#define coff_backend_info(abfd) \
+ ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
- ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
#define bfd_coff_swap_sym_in(a,e,i) \
- ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
+ ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
#define bfd_coff_swap_lineno_in(a,e,i) \
- ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
+ ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
#define bfd_coff_swap_reloc_out(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
#define bfd_coff_swap_lineno_out(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
#define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
- ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
#define bfd_coff_swap_sym_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
#define bfd_coff_swap_filehdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
#define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
@@ -526,90 +456,91 @@ dependent COFF routines:
#define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
-#define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames)
+#define bfd_coff_long_filenames(abfd) \
+ (coff_backend_info (abfd)->_bfd_coff_long_filenames)
#define bfd_coff_long_section_names(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_long_section_names)
+ (coff_backend_info (abfd)->_bfd_coff_long_section_names)
#define bfd_coff_default_section_alignment_power(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
#define bfd_coff_swap_scnhdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
#define bfd_coff_swap_reloc_in(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
#define bfd_coff_bad_format_hook(abfd, filehdr) \
- ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
+ ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
#define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
- ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
+ ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
- ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
+ ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr))
-#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\
- ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
- (abfd, scnhdr, name, section))
+#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+ (abfd, scnhdr, name, section, flags_ptr))
#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
- ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
+ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
#define bfd_coff_slurp_symbol_table(abfd)\
- ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
+ ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
#define bfd_coff_symname_in_debug(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
+ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
#define bfd_coff_force_symnames_in_strings(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
+ (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
#define bfd_coff_debug_string_prefix_length(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
+ (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
- ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
- (abfd, file, base, symbol, aux, indaux))
+ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
+ (abfd, file, base, symbol, aux, indaux))
#define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
- ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
- (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
+ (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
#define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
- ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
- (abfd, section, reloc, shrink, link_info))
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
+ (abfd, section, reloc, shrink, link_info))
#define bfd_coff_classify_symbol(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
- (abfd, sym))
+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
+ (abfd, sym))
#define bfd_coff_compute_section_file_positions(abfd)\
- ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
- (abfd))
+ ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
+ (abfd))
#define bfd_coff_start_final_link(obfd, info)\
- ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
- (obfd, info))
+ ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
+ (obfd, info))
#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
- ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
- (obfd, info, ibfd, o, con, rel, isyms, secs))
+ ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
+ (obfd, info, ibfd, o, con, rel, isyms, secs))
#define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
- ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
- (abfd, sec, rel, h, sym, addendp))
+ ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
+ (abfd, sec, rel, h, sym, addendp))
#define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
- ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
- (obfd, info, ibfd, sec, rel, adjustedp))
+ ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
+ (obfd, info, ibfd, sec, rel, adjustedp))
#define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
- ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
- (info, abfd, name, flags, section, value, string, cp, coll, hashp))
+ ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
+ (info, abfd, name, flags, section, value, string, cp, coll, hashp))
#define bfd_coff_link_output_has_begun(a,p) \
- ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a,p))
#define bfd_coff_final_link_postscript(a,p) \
- ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
+ ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
@end example
@subsubsection Writing relocations
diff --git a/contrib/binutils/bfd/doc/core.texi b/contrib/binutils/bfd/doc/core.texi
index 55e369a..08a8c25 100644
--- a/contrib/binutils/bfd/doc/core.texi
+++ b/contrib/binutils/bfd/doc/core.texi
@@ -8,7 +8,7 @@ These are functions pertaining to core files.
@subsubsection @code{bfd_core_file_failing_command}
@strong{Synopsis}
@example
-CONST char *bfd_core_file_failing_command(bfd *abfd);
+const char *bfd_core_file_failing_command(bfd *abfd);
@end example
@strong{Description}@*
Return a read-only string explaining which program was running
diff --git a/contrib/binutils/bfd/doc/format.texi b/contrib/binutils/bfd/doc/format.texi
index a181d1c..d64bba1 100644
--- a/contrib/binutils/bfd/doc/format.texi
+++ b/contrib/binutils/bfd/doc/format.texi
@@ -99,7 +99,7 @@ is not open for writing, then an error occurs.
@subsubsection @code{bfd_format_string}
@strong{Synopsis}
@example
-CONST char *bfd_format_string(bfd_format format);
+const char *bfd_format_string(bfd_format format);
@end example
@strong{Description}@*
Return a pointer to a const string
diff --git a/contrib/binutils/bfd/doc/libbfd.texi b/contrib/binutils/bfd/doc/libbfd.texi
index b4b0a14..0c20a07 100644
--- a/contrib/binutils/bfd/doc/libbfd.texi
+++ b/contrib/binutils/bfd/doc/libbfd.texi
@@ -10,7 +10,7 @@ completeness.
@subsubsection @code{bfd_write_bigendian_4byte_int}
@strong{Synopsis}
@example
-void bfd_write_bigendian_4byte_int(bfd *abfd, int i);
+void bfd_write_bigendian_4byte_int (bfd *, unsigned int);
@end example
@strong{Description}@*
Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
@@ -47,9 +47,9 @@ To detect calling these with less than a @code{bfd_vma}, use
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
- (*(unsigned char *) (ptr))
+ (*(unsigned char *) (ptr) & 0xff)
#define bfd_get_signed_8(abfd, ptr) \
- ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
+ (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -79,14 +79,14 @@ To detect calling these with less than a @code{bfd_vma}, use
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
+ ( (bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \
: (abort (), (bfd_vma) - 1))
#define bfd_put(bits, abfd, val, ptr) \
- ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
+ ( (bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
: (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
: (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
: (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
@@ -98,7 +98,7 @@ To detect calling these with less than a @code{bfd_vma}, use
@subsubsection @code{bfd_h_put_size}
@strong{Description}@*
These macros have the same function as their @code{bfd_get_x}
-bretheren, except that they are used for removing information
+brethren, except that they are used for removing information
for the header records of object files. Believe it or not,
some object files keep their header records in big endian
order and their data in little endian order.
@@ -107,40 +107,88 @@ order and their data in little endian order.
/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
+ bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
+ bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
+ BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
#define bfd_h_put_signed_16 \
- bfd_h_put_16
+ bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx16,(ptr))
+ BFD_SEND (abfd, bfd_h_getx16, (ptr))
#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
+ BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
#define bfd_h_put_signed_32 \
- bfd_h_put_32
+ bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx32,(ptr))
+ BFD_SEND (abfd, bfd_h_getx32, (ptr))
#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
+ BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
#define bfd_h_put_signed_64 \
- bfd_h_put_64
+ bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx64,(ptr))
+ BFD_SEND (abfd, bfd_h_getx64, (ptr))
#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
+
+/* Refinements on the above, which should eventually go away. Save
+ cluttering the source with (bfd_vma) and (bfd_byte *) casts. */
+
+#define H_PUT_64(abfd, val, where) \
+ bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_32(abfd, val, where) \
+ bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_16(abfd, val, where) \
+ bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_8 bfd_h_put_8
+
+#define H_PUT_S64(abfd, val, where) \
+ bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S32(abfd, val, where) \
+ bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S16(abfd, val, where) \
+ bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S8 bfd_h_put_signed_8
+
+#define H_GET_64(abfd, where) \
+ bfd_h_get_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_32(abfd, where) \
+ bfd_h_get_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_16(abfd, where) \
+ bfd_h_get_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_8 bfd_h_get_8
+
+#define H_GET_S64(abfd, where) \
+ bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S32(abfd, where) \
+ bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S16(abfd, where) \
+ bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S8 bfd_h_get_signed_8
+
@end example
@@ -148,9 +196,9 @@ order and their data in little endian order.
@subsubsection @code{bfd_log2}
@strong{Synopsis}
@example
-unsigned int bfd_log2(bfd_vma x);
+unsigned int bfd_log2 (bfd_vma x);
@end example
@strong{Description}@*
Return the log base 2 of the value supplied, rounded up. E.g., an
-@var{x} of 1025 returns 11.
+@var{x} of 1025 returns 11. A @var{x} of 0 returns 0.
diff --git a/contrib/binutils/bfd/doc/opncls.texi b/contrib/binutils/bfd/doc/opncls.texi
index fcea49b..6c778f9 100644
--- a/contrib/binutils/bfd/doc/opncls.texi
+++ b/contrib/binutils/bfd/doc/opncls.texi
@@ -5,7 +5,7 @@
@subsubsection @code{bfd_openr}
@strong{Synopsis}
@example
-bfd *bfd_openr(CONST char *filename, CONST char *target);
+bfd *bfd_openr(const char *filename, const char *target);
@end example
@strong{Description}@*
Open the file @var{filename} (using @code{fopen}) with the target
@@ -21,7 +21,7 @@ are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or @code{system_
@subsubsection @code{bfd_fdopenr}
@strong{Synopsis}
@example
-bfd *bfd_fdopenr(CONST char *filename, CONST char *target, int fd);
+bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
@end example
@strong{Description}@*
@code{bfd_fdopenr} is to @code{bfd_fopenr} much like @code{fdopen} is to @code{fopen}.
@@ -55,7 +55,7 @@ the BFD is passed to @code{bfd_close}, the stream will be closed.
@subsubsection @code{bfd_openw}
@strong{Synopsis}
@example
-bfd *bfd_openw(CONST char *filename, CONST char *target);
+bfd *bfd_openw(const char *filename, const char *target);
@end example
@strong{Description}@*
Create a BFD, associated with file @var{filename}, using the
@@ -108,7 +108,7 @@ All memory attached to the BFD is released.
@subsubsection @code{bfd_create}
@strong{Synopsis}
@example
-bfd *bfd_create(CONST char *filename, bfd *templ);
+bfd *bfd_create(const char *filename, bfd *templ);
@end example
@strong{Description}@*
Create a new BFD in the manner of
diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi
index 52fa2bd..2b449d3 100644
--- a/contrib/binutils/bfd/doc/reloc.texi
+++ b/contrib/binutils/bfd/doc/reloc.texi
@@ -27,31 +27,31 @@ This is the structure of a relocation entry:
typedef enum bfd_reloc_status
@{
- /* No errors detected */
+ /* No errors detected. */
bfd_reloc_ok,
- /* The relocation was performed, but there was an overflow. */
+ /* The relocation was performed, but there was an overflow. */
bfd_reloc_overflow,
- /* The address to relocate was not within the section supplied. */
+ /* The address to relocate was not within the section supplied. */
bfd_reloc_outofrange,
- /* Used by special functions */
+ /* Used by special functions. */
bfd_reloc_continue,
- /* Unsupported relocation size requested. */
+ /* Unsupported relocation size requested. */
bfd_reloc_notsupported,
- /* Unused */
+ /* Unused. */
bfd_reloc_other,
- /* The symbol to relocate against was undefined. */
+ /* The symbol to relocate against was undefined. */
bfd_reloc_undefined,
- /* The relocation was performed, but may not be ok - presently
- generated only when linking i960 coff files with i960 b.out
- symbols. If this type is returned, the error_message argument
- to bfd_perform_relocation will be set. */
+ /* The relocation was performed, but may not be ok - presently
+ generated only when linking i960 coff files with i960 b.out
+ symbols. If this type is returned, the error_message argument
+ to bfd_perform_relocation will be set. */
bfd_reloc_dangerous
@}
bfd_reloc_status_type;
@@ -59,19 +59,21 @@ typedef enum bfd_reloc_status
typedef struct reloc_cache_entry
@{
- /* A pointer into the canonical table of pointers */
+ /* A pointer into the canonical table of pointers. */
struct symbol_cache_entry **sym_ptr_ptr;
- /* offset in section */
+ /* offset in section. */
bfd_size_type address;
- /* addend for relocation value */
+ /* addend for relocation value. */
bfd_vma addend;
- /* Pointer to how to perform the required relocation */
+ /* Pointer to how to perform the required relocation. */
reloc_howto_type *howto;
-@} arelent;
+@}
+arelent;
+
@end example
@strong{Description}@*
Here is a description of each of the fields within an @code{arelent}:
@@ -230,19 +232,19 @@ performing a relocation.
enum complain_overflow
@{
- /* Do not complain on overflow. */
+ /* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
- number. */
+ /* Complain if the value overflows when considered as signed
+ number. */
complain_overflow_signed,
- /* Complain if the value overflows when considered as an
- unsigned number. */
+ /* Complain if the value overflows when considered as an
+ unsigned number. */
complain_overflow_unsigned
@};
@end example
@@ -252,117 +254,114 @@ information that libbfd needs to know to tie up a back end's data.
@example
-struct symbol_cache_entry; /* Forward declaration */
+struct symbol_cache_entry; /* Forward declaration. */
struct reloc_howto_struct
@{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's
- external idea of what a reloc number is stored
- in this field. For example, a PC relative word relocation
- in a coff environment has the type 023 - because that's
- what the outside world calls a R_PCRWORD reloc. */
+ /* The type field has mainly a documentary use - the back end can
+ do what it wants with it, though normally the back end's
+ external idea of what a reloc number is stored
+ in this field. For example, a PC relative word relocation
+ in a coff environment has the type 023 - because that's
+ what the outside world calls a R_PCRWORD reloc. */
unsigned int type;
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
+ /* The value the final relocation is shifted right by. This drops
+ unwanted data from the relocation. */
unsigned int rightshift;
- /* The size of the item to be relocated. This is *not* a
- power-of-two measure. To get the number of bytes operated
- on by a type of relocation, use bfd_get_reloc_size. */
+ /* The size of the item to be relocated. This is *not* a
+ power-of-two measure. To get the number of bytes operated
+ on by a type of relocation, use bfd_get_reloc_size. */
int size;
- /* The number of bits in the item to be relocated. This is used
- when doing overflow checking. */
+ /* The number of bits in the item to be relocated. This is used
+ when doing overflow checking. */
unsigned int bitsize;
- /* Notes that the relocation is relative to the location in the
- data section of the addend. The relocation function will
- subtract from the relocation value the address of the location
- being relocated. */
+ /* Notes that the relocation is relative to the location in the
+ data section of the addend. The relocation function will
+ subtract from the relocation value the address of the location
+ being relocated. */
boolean pc_relative;
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
+ /* The bit position of the reloc value in the destination.
+ The relocated value is left shifted by this amount. */
unsigned int bitpos;
- /* What type of overflow error should be checked for when
- relocating. */
+ /* What type of overflow error should be checked for when
+ relocating. */
enum complain_overflow complain_on_overflow;
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accomodated (e.g., i960 callj
- instructions). */
+ /* If this field is non null, then the supplied function is
+ called rather than the normal function. This allows really
+ strange relocation methods to be accomodated (e.g., i960 callj
+ instructions). */
bfd_reloc_status_type (*special_function)
- PARAMS ((bfd *abfd,
- arelent *reloc_entry,
- struct symbol_cache_entry *symbol,
- PTR data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message));
-
- /* The textual name of the relocation type. */
+ PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+ bfd *, char **));
+
+ /* The textual name of the relocation type. */
char *name;
- /* Some formats record a relocation addend in the section contents
- rather than with the relocation. For ELF formats this is the
- distinction between USE_REL and USE_RELA (though the code checks
- for USE_REL == 1/0). The value of this field is TRUE if the
- addend is recorded with the section contents; when performing a
- partial link (ld -r) the section contents (the data) will be
- modified. The value of this field is FALSE if addends are
- recorded with the relocation (in arelent.addend); when performing
- a partial link the relocation will be modified.
- All relocations for all ELF USE_RELA targets should set this field
- to FALSE (values of TRUE should be looked on with suspicion).
- However, the converse is not true: not all relocations of all ELF
- USE_REL targets set this field to TRUE. Why this is so is peculiar
- to each particular target. For relocs that aren't used in partial
- links (e.g. GOT stuff) it doesn't matter what this is set to. */
+ /* Some formats record a relocation addend in the section contents
+ rather than with the relocation. For ELF formats this is the
+ distinction between USE_REL and USE_RELA (though the code checks
+ for USE_REL == 1/0). The value of this field is TRUE if the
+ addend is recorded with the section contents; when performing a
+ partial link (ld -r) the section contents (the data) will be
+ modified. The value of this field is FALSE if addends are
+ recorded with the relocation (in arelent.addend); when performing
+ a partial link the relocation will be modified.
+ All relocations for all ELF USE_RELA targets should set this field
+ to FALSE (values of TRUE should be looked on with suspicion).
+ However, the converse is not true: not all relocations of all ELF
+ USE_REL targets set this field to TRUE. Why this is so is peculiar
+ to each particular target. For relocs that aren't used in partial
+ links (e.g. GOT stuff) it doesn't matter what this is set to. */
boolean partial_inplace;
- /* The src_mask selects which parts of the read in data
- are to be used in the relocation sum. E.g., if this was an 8 bit
- byte of data which we read and relocated, this would be
- 0x000000ff. When we have relocs which have an addend, such as
- sun4 extended relocs, the value in the offset part of a
- relocating field is garbage so we never use it. In this case
- the mask would be 0x00000000. */
+ /* The src_mask selects which parts of the read in data
+ are to be used in the relocation sum. E.g., if this was an 8 bit
+ byte of data which we read and relocated, this would be
+ 0x000000ff. When we have relocs which have an addend, such as
+ sun4 extended relocs, the value in the offset part of a
+ relocating field is garbage so we never use it. In this case
+ the mask would be 0x00000000. */
bfd_vma src_mask;
- /* The dst_mask selects which parts of the instruction are replaced
- into the instruction. In most cases src_mask == dst_mask,
- except in the above special case, where dst_mask would be
- 0x000000ff, and src_mask would be 0x00000000. */
+ /* The dst_mask selects which parts of the instruction are replaced
+ into the instruction. In most cases src_mask == dst_mask,
+ except in the above special case, where dst_mask would be
+ 0x000000ff, and src_mask would be 0x00000000. */
bfd_vma dst_mask;
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., m88k bcs); this flag signals the fact.*/
+ /* When some formats create PC relative instructions, they leave
+ the value of the pc of the place being relocated in the offset
+ slot of the instruction, so that a PC relative relocation can
+ be made just by adding in an ordinary offset (e.g., sun3 a.out).
+ Some formats leave the displacement part of an instruction
+ empty (e.g., m88k bcs); this flag signals the fact. */
boolean pcrel_offset;
-
@};
+
@end example
@findex The HOWTO Macro
@subsubsection @code{The HOWTO Macro}
@strong{Description}@*
The HOWTO define is horrible and will go away.
@example
-#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
- @{(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC@}
+#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
+ @{ (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC @}
@end example
@strong{Description}@*
And will be replaced with the totally magic way. But for the
moment, we are compatible, so do it this way.
@example
-#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
+#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
+ HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
+ NAME, false, 0, 0, IN)
@end example
@@ -370,24 +369,29 @@ moment, we are compatible, so do it this way.
This is used to fill in an empty howto entry in an array.
@example
#define EMPTY_HOWTO(C) \
- HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false)
+ HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \
+ NULL, false, 0, 0, false)
@end example
@strong{Description}@*
Helper routine to turn a symbol into a relocation value.
@example
-#define HOWTO_PREPARE(relocation, symbol) \
- @{ \
- if (symbol != (asymbol *)NULL) @{ \
- if (bfd_is_com_section (symbol->section)) @{ \
- relocation = 0; \
- @} \
- else @{ \
- relocation = symbol->value; \
- @} \
- @} \
-@}
+#define HOWTO_PREPARE(relocation, symbol) \
+ @{ \
+ if (symbol != (asymbol *) NULL) \
+ @{ \
+ if (bfd_is_com_section (symbol->section)) \
+ @{ \
+ relocation = 0; \
+ @} \
+ else \
+ @{ \
+ relocation = symbol->value; \
+ @} \
+ @} \
+ @}
+
@end example
@findex bfd_get_reloc_size
@@ -405,10 +409,13 @@ this returns the number of bytes operated on.
@strong{Description}@*
How relocs are tied together in an @code{asection}:
@example
-typedef struct relent_chain @{
+typedef struct relent_chain
+@{
arelent relent;
- struct relent_chain *next;
-@} arelent_chain;
+ struct relent_chain *next;
+@}
+arelent_chain;
+
@end example
@findex bfd_check_overflow
@@ -531,10 +538,12 @@ The 24-bit relocation is used in some Intel 960 configurations.
@deffnx {} BFD_RELOC_HI16_GOTOFF
@deffnx {} BFD_RELOC_HI16_S_GOTOFF
@deffnx {} BFD_RELOC_8_GOTOFF
+@deffnx {} BFD_RELOC_64_PLT_PCREL
@deffnx {} BFD_RELOC_32_PLT_PCREL
@deffnx {} BFD_RELOC_24_PLT_PCREL
@deffnx {} BFD_RELOC_16_PLT_PCREL
@deffnx {} BFD_RELOC_8_PLT_PCREL
+@deffnx {} BFD_RELOC_64_PLTOFF
@deffnx {} BFD_RELOC_32_PLTOFF
@deffnx {} BFD_RELOC_16_PLTOFF
@deffnx {} BFD_RELOC_LO16_PLTOFF
@@ -625,6 +634,7 @@ I think these are specific to SPARC a.out (e.g., Sun 4).
@deffnx {} BFD_RELOC_SPARC_6
@deffnx {} BFD_RELOC_SPARC_5
@deffnx {} BFD_RELOC_SPARC_DISP64
+@deffnx {} BFD_RELOC_SPARC_PLT32
@deffnx {} BFD_RELOC_SPARC_PLT64
@deffnx {} BFD_RELOC_SPARC_HIX22
@deffnx {} BFD_RELOC_SPARC_LOX10
@@ -682,19 +692,6 @@ of instruction using the register:
1 - "memory" fmt insn
2 - byte-manipulation (byte offset reg)
3 - jsr (target of branch)
-
-The GNU linker currently doesn't do any of this optimizing.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_USER_LITERAL
-@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BASE
-@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF
-@deffnx {} BFD_RELOC_ALPHA_USER_LITUSE_JSR
-@deffnx {} BFD_RELOC_ALPHA_USER_GPDISP
-@deffnx {} BFD_RELOC_ALPHA_USER_GPRELHIGH
-@deffnx {} BFD_RELOC_ALPHA_USER_GPRELLOW
-The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to
-process the explicit !<reloc>!sequence relocations, and are mapped
-into the normal relocations at the end of processing.
@end deffn
@deffn {} BFD_RELOC_ALPHA_HINT
The HINT relocation indicates a value that should be filled into the
@@ -709,6 +706,16 @@ which is filled by the linker.
The CODEADDR relocation outputs a STO_CA in the object file,
which is filled by the linker.
@end deffn
+@deffn {} BFD_RELOC_ALPHA_GPREL_HI16
+@deffnx {} BFD_RELOC_ALPHA_GPREL_LO16
+The GPREL_HI/LO relocations together form a 32-bit offset from the
+GP register.
+@end deffn
+@deffn {} BFD_RELOC_ALPHA_BRSGP
+Like BFD_RELOC_23_PCREL_S2, except that the source and target must
+share a common GP, and the target address is adjusted for
+STO_ALPHA_STD_GPLOAD.
+@end deffn
@deffn {} BFD_RELOC_MIPS_JMP
Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise.
@@ -737,15 +744,11 @@ Like BFD_RELOC_HI16_S, but PC relative.
@deffn {} BFD_RELOC_PCREL_LO16
Like BFD_RELOC_LO16, but PC relative.
@end deffn
-@deffn {} BFD_RELOC_MIPS_GPREL
-Relocation relative to the global pointer.
-@end deffn
@deffn {} BFD_RELOC_MIPS_LITERAL
Relocation against a MIPS literal section.
@end deffn
@deffn {} BFD_RELOC_MIPS_GOT16
@deffnx {} BFD_RELOC_MIPS_CALL16
-@deffnx {} BFD_RELOC_MIPS_GPREL32
@deffnx {} BFD_RELOC_MIPS_GOT_HI16
@deffnx {} BFD_RELOC_MIPS_GOT_LO16
@deffnx {} BFD_RELOC_MIPS_CALL_HI16
@@ -765,6 +768,55 @@ Relocation against a MIPS literal section.
@deffnx {} BFD_RELOC_MIPS_REL16
@deffnx {} BFD_RELOC_MIPS_RELGOT
@deffnx {} BFD_RELOC_MIPS_JALR
+@deffnx {} BFD_RELOC_SH_GOT_LOW16
+@deffnx {} BFD_RELOC_SH_GOT_MEDLOW16
+@deffnx {} BFD_RELOC_SH_GOT_MEDHI16
+@deffnx {} BFD_RELOC_SH_GOT_HI16
+@deffnx {} BFD_RELOC_SH_GOTPLT_LOW16
+@deffnx {} BFD_RELOC_SH_GOTPLT_MEDLOW16
+@deffnx {} BFD_RELOC_SH_GOTPLT_MEDHI16
+@deffnx {} BFD_RELOC_SH_GOTPLT_HI16
+@deffnx {} BFD_RELOC_SH_PLT_LOW16
+@deffnx {} BFD_RELOC_SH_PLT_MEDLOW16
+@deffnx {} BFD_RELOC_SH_PLT_MEDHI16
+@deffnx {} BFD_RELOC_SH_PLT_HI16
+@deffnx {} BFD_RELOC_SH_GOTOFF_LOW16
+@deffnx {} BFD_RELOC_SH_GOTOFF_MEDLOW16
+@deffnx {} BFD_RELOC_SH_GOTOFF_MEDHI16
+@deffnx {} BFD_RELOC_SH_GOTOFF_HI16
+@deffnx {} BFD_RELOC_SH_GOTPC_LOW16
+@deffnx {} BFD_RELOC_SH_GOTPC_MEDLOW16
+@deffnx {} BFD_RELOC_SH_GOTPC_MEDHI16
+@deffnx {} BFD_RELOC_SH_GOTPC_HI16
+@deffnx {} BFD_RELOC_SH_COPY64
+@deffnx {} BFD_RELOC_SH_GLOB_DAT64
+@deffnx {} BFD_RELOC_SH_JMP_SLOT64
+@deffnx {} BFD_RELOC_SH_RELATIVE64
+@deffnx {} BFD_RELOC_SH_GOT10BY4
+@deffnx {} BFD_RELOC_SH_GOT10BY8
+@deffnx {} BFD_RELOC_SH_GOTPLT10BY4
+@deffnx {} BFD_RELOC_SH_GOTPLT10BY8
+@deffnx {} BFD_RELOC_SH_GOTPLT32
+@deffnx {} BFD_RELOC_SH_SHMEDIA_CODE
+@deffnx {} BFD_RELOC_SH_IMMU5
+@deffnx {} BFD_RELOC_SH_IMMS6
+@deffnx {} BFD_RELOC_SH_IMMS6BY32
+@deffnx {} BFD_RELOC_SH_IMMU6
+@deffnx {} BFD_RELOC_SH_IMMS10
+@deffnx {} BFD_RELOC_SH_IMMS10BY2
+@deffnx {} BFD_RELOC_SH_IMMS10BY4
+@deffnx {} BFD_RELOC_SH_IMMS10BY8
+@deffnx {} BFD_RELOC_SH_IMMS16
+@deffnx {} BFD_RELOC_SH_IMMU16
+@deffnx {} BFD_RELOC_SH_IMM_LOW16
+@deffnx {} BFD_RELOC_SH_IMM_LOW16_PCREL
+@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16
+@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16_PCREL
+@deffnx {} BFD_RELOC_SH_IMM_MEDHI16
+@deffnx {} BFD_RELOC_SH_IMM_MEDHI16_PCREL
+@deffnx {} BFD_RELOC_SH_IMM_HI16
+@deffnx {} BFD_RELOC_SH_IMM_HI16_PCREL
+@deffnx {} BFD_RELOC_SH_PT_16
MIPS ELF relocations.
@end deffn
@deffn {} BFD_RELOC_386_GOT32
@@ -801,6 +853,10 @@ x86-64/elf relocations
@deffnx {} BFD_RELOC_NS32K_DISP_32_PCREL
ns32k relocations
@end deffn
+@deffn {} BFD_RELOC_PDP11_DISP_8_PCREL
+@deffnx {} BFD_RELOC_PDP11_DISP_6_PCREL
+PDP11 relocations
+@end deffn
@deffn {} BFD_RELOC_PJ_CODE_HI16
@deffnx {} BFD_RELOC_PJ_CODE_LO16
@deffnx {} BFD_RELOC_PJ_CODE_DIR16
@@ -839,6 +895,29 @@ Picojava relocs. Not all of these appear in object files.
@deffnx {} BFD_RELOC_PPC_EMB_RELST_HA
@deffnx {} BFD_RELOC_PPC_EMB_BIT_FLD
@deffnx {} BFD_RELOC_PPC_EMB_RELSDA
+@deffnx {} BFD_RELOC_PPC64_HIGHER
+@deffnx {} BFD_RELOC_PPC64_HIGHER_S
+@deffnx {} BFD_RELOC_PPC64_HIGHEST
+@deffnx {} BFD_RELOC_PPC64_HIGHEST_S
+@deffnx {} BFD_RELOC_PPC64_TOC16_LO
+@deffnx {} BFD_RELOC_PPC64_TOC16_HI
+@deffnx {} BFD_RELOC_PPC64_TOC16_HA
+@deffnx {} BFD_RELOC_PPC64_TOC
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HI
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HA
+@deffnx {} BFD_RELOC_PPC64_ADDR16_DS
+@deffnx {} BFD_RELOC_PPC64_ADDR16_LO_DS
+@deffnx {} BFD_RELOC_PPC64_GOT16_DS
+@deffnx {} BFD_RELOC_PPC64_GOT16_LO_DS
+@deffnx {} BFD_RELOC_PPC64_PLT16_LO_DS
+@deffnx {} BFD_RELOC_PPC64_SECTOFF_DS
+@deffnx {} BFD_RELOC_PPC64_SECTOFF_LO_DS
+@deffnx {} BFD_RELOC_PPC64_TOC16_DS
+@deffnx {} BFD_RELOC_PPC64_TOC16_LO_DS
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16_DS
+@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO_DS
Power(rs6000) and PowerPC relocations.
@end deffn
@deffn {} BFD_RELOC_I370_D12
@@ -1162,6 +1241,54 @@ short offset into 11 bits.
@deffnx {} BFD_RELOC_MCORE_RVA
Motorola Mcore relocations.
@end deffn
+@deffn {} BFD_RELOC_MMIX_GETA
+@deffnx {} BFD_RELOC_MMIX_GETA_1
+@deffnx {} BFD_RELOC_MMIX_GETA_2
+@deffnx {} BFD_RELOC_MMIX_GETA_3
+These are relocations for the GETA instruction.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_CBRANCH
+@deffnx {} BFD_RELOC_MMIX_CBRANCH_J
+@deffnx {} BFD_RELOC_MMIX_CBRANCH_1
+@deffnx {} BFD_RELOC_MMIX_CBRANCH_2
+@deffnx {} BFD_RELOC_MMIX_CBRANCH_3
+These are relocations for a conditional branch instruction.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_PUSHJ
+@deffnx {} BFD_RELOC_MMIX_PUSHJ_1
+@deffnx {} BFD_RELOC_MMIX_PUSHJ_2
+@deffnx {} BFD_RELOC_MMIX_PUSHJ_3
+These are relocations for the PUSHJ instruction.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_JMP
+@deffnx {} BFD_RELOC_MMIX_JMP_1
+@deffnx {} BFD_RELOC_MMIX_JMP_2
+@deffnx {} BFD_RELOC_MMIX_JMP_3
+These are relocations for the JMP instruction.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_ADDR19
+This is a relocation for a relative address as in a GETA instruction or
+a branch.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_ADDR27
+This is a relocation for a relative address as in a JMP instruction.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_REG_OR_BYTE
+This is a relocation for an instruction field that may be a general
+register or a value 0..255.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_REG
+This is a relocation for an instruction field that may be a general
+register.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_BASE_PLUS_OFFSET
+This is a relocation for two instruction fields holding a register and
+an offset, the equivalent of the relocation.
+@end deffn
+@deffn {} BFD_RELOC_MMIX_LOCAL
+This relocation is an assertion that the expression is not allocated as
+a global register. It does not modify contents.
+@end deffn
@deffn {} BFD_RELOC_AVR_7_PCREL
This is a 16 bit reloc for the AVR that stores 8 bit pc relative
short offset into 7 bits.
@@ -1230,6 +1357,57 @@ value of SUBI insn.
This is a 32 bit reloc for the AVR that stores 23 bit value
into 22 bits.
@end deffn
+@deffn {} BFD_RELOC_390_12
+Direct 12 bit.
+@end deffn
+@deffn {} BFD_RELOC_390_GOT12
+12 bit GOT offset.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT32
+32 bit PC relative PLT address.
+@end deffn
+@deffn {} BFD_RELOC_390_COPY
+Copy symbol at runtime.
+@end deffn
+@deffn {} BFD_RELOC_390_GLOB_DAT
+Create GOT entry.
+@end deffn
+@deffn {} BFD_RELOC_390_JMP_SLOT
+Create PLT entry.
+@end deffn
+@deffn {} BFD_RELOC_390_RELATIVE
+Adjust by program base.
+@end deffn
+@deffn {} BFD_RELOC_390_GOTPC
+32 bit PC relative offset to GOT.
+@end deffn
+@deffn {} BFD_RELOC_390_GOT16
+16 bit GOT offset.
+@end deffn
+@deffn {} BFD_RELOC_390_PC16DBL
+PC relative 16 bit shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT16DBL
+16 bit PC rel. PLT shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_PC32DBL
+PC relative 32 bit shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT32DBL
+32 bit PC rel. PLT shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_GOTPCDBL
+32 bit PC rel. GOT shifted by 1.
+@end deffn
+@deffn {} BFD_RELOC_390_GOT64
+64 bit GOT offset.
+@end deffn
+@deffn {} BFD_RELOC_390_PLT64
+64 bit PC relative PLT address.
+@end deffn
+@deffn {} BFD_RELOC_390_GOTENT
+32 bit rel. offset to GOT entry.
+@end deffn
@deffn {} BFD_RELOC_VTABLE_INHERIT
@deffnx {} BFD_RELOC_VTABLE_ENTRY
These two relocations are used by the linker to determine which of
@@ -1287,6 +1465,8 @@ this offset in the reloc's section offset.
@deffnx {} BFD_RELOC_IA64_PCREL64LSB
@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR22
@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64I
+@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32MSB
+@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32LSB
@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64MSB
@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64LSB
@deffnx {} BFD_RELOC_IA64_SEGREL32MSB
@@ -1336,6 +1516,33 @@ This is the 3 bits of a value.
These relocs are only used within the CRIS assembler. They are not
(at present) written to any object files.
@end deffn
+@deffn {} BFD_RELOC_CRIS_COPY
+@deffnx {} BFD_RELOC_CRIS_GLOB_DAT
+@deffnx {} BFD_RELOC_CRIS_JUMP_SLOT
+@deffnx {} BFD_RELOC_CRIS_RELATIVE
+Relocs used in ELF shared libraries for CRIS.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_32_GOT
+32-bit offset to symbol-entry within GOT.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_16_GOT
+16-bit offset to symbol-entry within GOT.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_32_GOTPLT
+32-bit offset to symbol-entry within GOT, with PLT handling.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_16_GOTPLT
+16-bit offset to symbol-entry within GOT, with PLT handling.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_32_GOTREL
+32-bit offset to symbol, relative to GOT.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_32_PLT_GOTREL
+32-bit offset to symbol with PLT entry, relative to GOT.
+@end deffn
+@deffn {} BFD_RELOC_CRIS_32_PLT_PCREL
+32-bit offset to symbol with PLT entry, relative to this relocation.
+@end deffn
@deffn {} BFD_RELOC_860_COPY
@deffnx {} BFD_RELOC_860_GLOB_DAT
@deffnx {} BFD_RELOC_860_JUMP_SLOT
@@ -1370,6 +1577,22 @@ These relocs are only used within the CRIS assembler. They are not
@deffnx {} BFD_RELOC_860_HIGOTOFF
Intel i860 Relocations.
@end deffn
+@deffn {} BFD_RELOC_OPENRISC_ABS_26
+@deffnx {} BFD_RELOC_OPENRISC_REL_26
+OpenRISC Relocations.
+@end deffn
+@deffn {} BFD_RELOC_H8_DIR16A8
+@deffnx {} BFD_RELOC_H8_DIR16R8
+@deffnx {} BFD_RELOC_H8_DIR24A8
+@deffnx {} BFD_RELOC_H8_DIR24R8
+@deffnx {} BFD_RELOC_H8_DIR32A16
+H8 elf Relocations.
+@end deffn
+@deffn {} BFD_RELOC_XSTORMY16_REL_12
+@deffnx {} BFD_RELOC_XSTORMY16_24
+@deffnx {} BFD_RELOC_XSTORMY16_FPTR16
+Sony Xstormy16 Relocations.
+@end deffn
@example
@@ -1432,6 +1655,17 @@ boolean bfd_generic_gc_sections
Provides default handling for relaxing for back ends which
don't do section gc -- i.e., does nothing.
+@findex bfd_generic_merge_sections
+@subsubsection @code{bfd_generic_merge_sections}
+@strong{Synopsis}
+@example
+boolean bfd_generic_merge_sections
+ (bfd *, struct bfd_link_info *);
+@end example
+@strong{Description}@*
+Provides default handling for SEC_MERGE section merging for back ends
+which don't have SEC_MERGE support -- i.e., does nothing.
+
@findex bfd_generic_get_relocated_section_contents
@subsubsection @code{bfd_generic_get_relocated_section_contents}
@strong{Synopsis}
diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi
index 0167def..520a296 100644
--- a/contrib/binutils/bfd/doc/section.texi
+++ b/contrib/binutils/bfd/doc/section.texi
@@ -128,25 +128,20 @@ typedef struct sec
@{
/* The name of the section; the name isn't a copy, the pointer is
the same as that passed to bfd_make_section. */
-
const char *name;
/* A unique sequence number. */
-
int id;
- /* Which section is it; 0..nth. */
-
+ /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
int index;
/* The next section in the list belonging to the BFD, or NULL. */
-
struct sec *next;
/* The field flags contains attributes of the section. Some
flags are read in from the object file, and some are
synthesized from other information. */
-
flagword flags;
#define SEC_NO_FLAGS 0x000
@@ -163,9 +158,11 @@ typedef struct sec
some relocation information too. */
#define SEC_RELOC 0x004
-#if 0 /* Obsolete ? */
-#define SEC_BALIGN 0x008
-#endif
+ /* ELF reserves 4 processor specific bits and 8 operating system
+ specific bits in sh_flags; at present we can get away with just
+ one in communicating between the assembler and BFD, but this
+ isn't a good long-term solution. */
+#define SEC_ARCH_BIT_0 0x008
/* A signal to the OS that the section contains read only data. */
#define SEC_READONLY 0x010
@@ -248,9 +245,10 @@ typedef struct sec
objects are to be further relocated. */
#define SEC_EXCLUDE 0x40000
- /* The contents of this section are to be sorted by the
- based on the address specified in the associated symbol
- table. */
+ /* The contents of this section are to be sorted based on the sum of
+ the symbol and addend values specified by the associated relocation
+ entries. Entries without associated relocation entries will be
+ appended to the end of the section in an unspecified order. */
#define SEC_SORT_ENTRIES 0x80000
/* When linking, duplicate sections of the same name should be
@@ -308,6 +306,18 @@ typedef struct sec
references found to any symbol in the section. */
#define SEC_CLINK 0x10000000
+ /* Attempt to merge identical entities in the section.
+ Entity size is given in the entsize field. */
+#define SEC_MERGE 0x20000000
+
+ /* If given with SEC_MERGE, entities to merge are zero terminated
+ strings where entsize specifies character size instead of fixed
+ size entries. */
+#define SEC_STRINGS 0x40000000
+
+ /* This section contains data about section groups. */
+#define SEC_GROUP 0x80000000
+
/* End of section flags. */
/* Some internal packed boolean fields. */
@@ -322,13 +332,14 @@ typedef struct sec
unsigned int linker_mark : 1;
/* Another mark flag used by some of the linker backends. Set for
- output sections that have a input section. */
+ output sections that have an input section. */
unsigned int linker_has_input : 1;
/* A mark flag used by some linker backends for garbage collection. */
unsigned int gc_mark : 1;
- /* Used by the ELF code to mark sections which have been allocated to segments. */
+ /* Used by the ELF code to mark sections which have been allocated
+ to segments. */
unsigned int segment_mark : 1;
/* End of internal packed boolean fields. */
@@ -339,25 +350,21 @@ typedef struct sec
backend can assign addresses (for example, in @code{a.out}, where
the default address for @code{.data} is dependent on the specific
target and various flags). */
-
bfd_vma vma;
/* The load address of the section - where it would be in a
rom image; really only used for writing section header
- information. */
-
+ information. */
bfd_vma lma;
/* The size of the section in octets, as it will be output.
Contains a value even if the section has no contents (e.g., the
size of @code{.bss}). This will be filled in after relocation. */
-
bfd_size_type _cooked_size;
/* The original size on disk of the section, in octets. Normally this
value is the same as the size, but if some relaxing has
been done, then this value will be bigger. */
-
bfd_size_type _raw_size;
/* If this section is going to be output, then this value is the
@@ -367,49 +374,39 @@ typedef struct sec
100th octet (8-bit quantity) in the output section, this value
would be 100. However, if the target byte size is 16 bits
(bfd_octets_per_byte is "2"), this value would be 50. */
-
bfd_vma output_offset;
/* The output section through which to map on output. */
-
struct sec *output_section;
/* The alignment requirement of the section, as an exponent of 2 -
e.g., 3 aligns to 2^3 (or 8). */
-
unsigned int alignment_power;
/* If an input section, a pointer to a vector of relocation
records for the data in this section. */
-
struct reloc_cache_entry *relocation;
/* If an output section, a pointer to a vector of pointers to
relocation records for the data in this section. */
-
struct reloc_cache_entry **orelocation;
- /* The number of relocation records in one of the above */
-
+ /* The number of relocation records in one of the above. */
unsigned reloc_count;
/* Information below is back end specific - and not always used
or updated. */
/* File position of section data. */
-
file_ptr filepos;
/* File position of relocation info. */
-
file_ptr rel_filepos;
/* File position of line data. */
-
file_ptr line_filepos;
/* Pointer to data for applications. */
-
PTR userdata;
/* If the SEC_IN_MEMORY flag is set, this points to the actual
@@ -417,48 +414,40 @@ typedef struct sec
unsigned char *contents;
/* Attached line number information. */
-
alent *lineno;
/* Number of line number records. */
-
unsigned int lineno_count;
- /* Optional information about a COMDAT entry; NULL if not COMDAT. */
+ /* Entity size for merging purposes. */
+ unsigned int entsize;
+ /* Optional information about a COMDAT entry; NULL if not COMDAT. */
struct bfd_comdat_info *comdat;
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct sec *kept_section;
-
/* When a section is being output, this value changes as more
linenumbers are written out. */
-
file_ptr moving_line_filepos;
/* What the section number is in the target world. */
-
int target_index;
PTR used_by_bfd;
/* If this is a constructor section then here is a list of the
relocations created to relocate items within it. */
-
struct relent_chain *constructor_chain;
/* The BFD which owns the section. */
-
bfd *owner;
- /* A symbol which points at this section only */
+ /* A symbol which points at this section only. */
struct symbol_cache_entry *symbol;
struct symbol_cache_entry **symbol_ptr_ptr;
struct bfd_link_order *link_order_head;
struct bfd_link_order *link_order_tail;
-@} asection ;
+@} asection;
/* These sections are global, and are managed by BFD. The application
and target back end are not permitted to change the values in
@@ -470,22 +459,28 @@ typedef struct sec
#define BFD_COM_SECTION_NAME "*COM*"
#define BFD_IND_SECTION_NAME "*IND*"
-/* the absolute section */
+/* The absolute section. */
extern const asection bfd_abs_section;
#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-/* Pointer to the undefined section */
+/* Pointer to the undefined section. */
extern const asection bfd_und_section;
#define bfd_und_section_ptr ((asection *) &bfd_und_section)
#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-/* Pointer to the common section */
+/* Pointer to the common section. */
extern const asection bfd_com_section;
#define bfd_com_section_ptr ((asection *) &bfd_com_section)
-/* Pointer to the indirect section */
+/* Pointer to the indirect section. */
extern const asection bfd_ind_section;
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
+#define bfd_is_const_section(SEC) \
+ ( ((SEC) == bfd_abs_section_ptr) \
+ || ((SEC) == bfd_und_section_ptr) \
+ || ((SEC) == bfd_com_section_ptr) \
+ || ((SEC) == bfd_ind_section_ptr))
+
extern const struct symbol_cache_entry * const bfd_abs_symbol;
extern const struct symbol_cache_entry * const bfd_com_symbol;
extern const struct symbol_cache_entry * const bfd_und_symbol;
@@ -496,12 +491,48 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
#define bfd_get_section_size_after_reloc(section) \
((section)->reloc_done ? (section)->_cooked_size \
: (abort (), (bfd_size_type) 1))
+
+/* Macros to handle insertion and deletion of a bfd's sections. These
+ only handle the list pointers, ie. do not adjust section_count,
+ target_index etc. */
+#define bfd_section_list_remove(ABFD, PS) \
+ do \
+ @{ \
+ asection **_ps = PS; \
+ asection *_s = *_ps; \
+ *_ps = _s->next; \
+ if (_s->next == NULL) \
+ (ABFD)->section_tail = _ps; \
+ @} \
+ while (0)
+#define bfd_section_list_insert(ABFD, PS, S) \
+ do \
+ @{ \
+ asection **_ps = PS; \
+ asection *_s = S; \
+ _s->next = *_ps; \
+ *_ps = _s; \
+ if (_s->next == NULL) \
+ (ABFD)->section_tail = &_s->next; \
+ @} \
+ while (0)
+
@end example
@node section prototypes, , typedef asection, Sections
@subsection Section prototypes
These are the functions exported by the section handling part of BFD.
+@findex bfd_section_list_clear
+@subsubsection @code{bfd_section_list_clear}
+@strong{Synopsis}
+@example
+void bfd_section_list_clear (bfd *);
+@end example
+@strong{Description}@*
+Clears the section list, and also resets the section count and
+hash table entries.
+
@findex bfd_get_section_by_name
@subsubsection @code{bfd_get_section_by_name}
@strong{Synopsis}
@@ -662,11 +693,8 @@ Writing has started to the BFD, so setting the size is invalid.
@subsubsection @code{bfd_set_section_contents}
@strong{Synopsis}
@example
-boolean bfd_set_section_contents
- (bfd *abfd,
- asection *section,
- PTR data,
- file_ptr offset,
+boolean bfd_set_section_contents (bfd *abfd, asection *section,
+ PTR data, file_ptr offset,
bfd_size_type count);
@end example
@strong{Description}@*
@@ -693,9 +721,9 @@ This routine is front end to the back end function
@subsubsection @code{bfd_get_section_contents}
@strong{Synopsis}
@example
-boolean bfd_get_section_contents
- (bfd *abfd, asection *section, PTR location,
- file_ptr offset, bfd_size_type count);
+boolean bfd_get_section_contents (bfd *abfd, asection *section,
+ PTR location, file_ptr offset,
+ bfd_size_type count);
@end example
@strong{Description}@*
Read data from @var{section} in BFD @var{abfd}
@@ -713,7 +741,8 @@ with zeroes. If no errors occur, @code{true} is returned, else
@subsubsection @code{bfd_copy_private_section_data}
@strong{Synopsis}
@example
-boolean bfd_copy_private_section_data(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
+boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec,
+ bfd *obfd, asection *osec);
@end example
@strong{Description}@*
Copy private section information from @var{isec} in the BFD
diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi
index 400a106..1987e23 100644
--- a/contrib/binutils/bfd/doc/syms.texi
+++ b/contrib/binutils/bfd/doc/syms.texi
@@ -141,126 +141,125 @@ An @code{asymbol} has the form:
typedef struct symbol_cache_entry
@{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_@{abs,com,und@}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
-
- struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- CONST char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
+ /* A pointer to the BFD which owns the symbol. This information
+ is necessary so that a back end can work out what additional
+ information (invisible to the application writer) is carried
+ with the symbol.
+
+ This field is *almost* redundant, since you can use section->owner
+ instead, except that some symbols point to the global sections
+ bfd_@{abs,com,und@}_section. This could be fixed by making
+ these globals be per-bfd (or per-target-flavor). FIXME. */
+ struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
+
+ /* The text of the symbol. The name is left alone, and not copied; the
+ application may not alter it. */
+ const char *name;
+
+ /* The value of the symbol. This really should be a union of a
+ numeric value with a pointer, since some flags indicate that
+ a pointer to another symbol is stored here. */
symvalue value;
- /* Attributes of a symbol: */
-
+ /* Attributes of a symbol. */
#define BSF_NO_FLAGS 0x00
- /* The symbol has local scope; @code{static} in @code{C}. The value
- is the offset into the section of the data. */
+ /* The symbol has local scope; @code{static} in @code{C}. The value
+ is the offset into the section of the data. */
#define BSF_LOCAL 0x01
- /* The symbol has global scope; initialized data in @code{C}. The
- value is the offset into the section of the data. */
+ /* The symbol has global scope; initialized data in @code{C}. The
+ value is the offset into the section of the data. */
#define BSF_GLOBAL 0x02
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* no real difference */
+ /* The symbol has global scope and is exported. The value is
+ the offset into the section of the data. */
+#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
- /* A normal C symbol would be one of:
- @code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
- @code{BSF_GLOBAL} */
+ /* A normal C symbol would be one of:
+ @code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
+ @code{BSF_GLOBAL}. */
- /* The symbol is a debugging record. The value has an arbitary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
+ /* The symbol is a debugging record. The value has an arbitary
+ meaning, unless BSF_DEBUGGING_RELOC is also set. */
#define BSF_DEBUGGING 0x08
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
+ /* The symbol denotes a function entry point. Used in ELF,
+ perhaps others someday. */
#define BSF_FUNCTION 0x10
- /* Used by the linker. */
+ /* Used by the linker. */
#define BSF_KEEP 0x20
#define BSF_KEEP_G 0x40
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
+ /* A weak global symbol, overridable without warnings by
+ a regular global symbol of the same name. */
#define BSF_WEAK 0x80
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
+ /* This symbol was created to point to a section, e.g. ELF's
+ STT_SECTION symbols. */
#define BSF_SECTION_SYM 0x100
- /* The symbol used to be a common symbol, but now it is
- allocated. */
+ /* The symbol used to be a common symbol, but now it is
+ allocated. */
#define BSF_OLD_COMMON 0x200
- /* The default value for common data. */
+ /* The default value for common data. */
#define BFD_FORT_COMM_DEFAULT_VALUE 0
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a @code{ISFCN} symbol
- which is also @code{C_EXT} symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-
+ /* In some files the type of a symbol sometimes alters its
+ location in an output file - ie in coff a @code{ISFCN} symbol
+ which is also @code{C_EXT} symbol appears where it was
+ declared and not at the end of a section. This bit is set
+ by the target BFD part to convey this information. */
#define BSF_NOT_AT_END 0x400
- /* Signal that the symbol is the label of constructor section. */
+ /* Signal that the symbol is the label of constructor section. */
#define BSF_CONSTRUCTOR 0x800
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
+ /* Signal that the symbol is a warning symbol. The name is a
+ warning. The name of the next symbol is the one to warn about;
+ if a reference is made to a symbol with the same name as the next
+ symbol, a warning is issued by the linker. */
#define BSF_WARNING 0x1000
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
+ /* Signal that the symbol is indirect. This symbol is an indirect
+ pointer to the symbol with the same name as the next symbol. */
#define BSF_INDIRECT 0x2000
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
+ /* BSF_FILE marks symbols that contain a file name. This is used
+ for ELF STT_FILE symbols. */
#define BSF_FILE 0x4000
- /* Symbol is from dynamic linking information. */
+ /* Symbol is from dynamic linking information. */
#define BSF_DYNAMIC 0x8000
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
+ /* The symbol denotes a data object. Used in ELF, and perhaps
+ others someday. */
#define BSF_OBJECT 0x10000
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
+ /* This symbol is a debugging symbol. The value is the offset
+ into the section of the data. BSF_DEBUGGING should be set
+ as well. */
#define BSF_DEBUGGING_RELOC 0x20000
flagword flags;
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
+ /* A pointer to the section to which this symbol is
+ relative. This will always be non NULL, there are special
+ sections for undefined and absolute symbols. */
struct sec *section;
- /* Back end special data. */
+ /* Back end special data. */
union
@{
PTR p;
bfd_vma i;
- @} udata;
+ @}
+ udata;
+@}
+asymbol;
-@} asymbol;
@end example
@node symbol handling functions, , typedef asymbol, Symbols
@@ -277,6 +276,7 @@ the BFD, then return 0. If an error occurs, return -1.
@example
#define bfd_get_symtab_upper_bound(abfd) \
BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
+
@end example
@findex bfd_is_local_label
@@ -303,6 +303,7 @@ local label.
@example
#define bfd_is_local_label_name(abfd, name) \
BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
+
@end example
@findex bfd_canonicalize_symtab
@@ -317,6 +318,7 @@ including the NULL.
#define bfd_canonicalize_symtab(abfd, location) \
BFD_SEND (abfd, _bfd_canonicalize_symtab,\
(abfd, location))
+
@end example
@findex bfd_set_symtab
@@ -334,7 +336,7 @@ will be written.
@subsubsection @code{bfd_print_symbol_vandf}
@strong{Synopsis}
@example
-void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
+void bfd_print_symbol_vandf(bfd *abfd, PTR file, asymbol *symbol);
@end example
@strong{Description}@*
Print the value and flags of the @var{symbol} supplied to the
@@ -353,8 +355,21 @@ information, and will cause problems later on.
@example
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+
@end example
+@findex _bfd_generic_make_empty_symbol
+@subsubsection @code{_bfd_generic_make_empty_symbol}
+@strong{Synopsis}
+@example
+asymbol *_bfd_generic_make_empty_symbol (bfd *);
+@end example
+@strong{Description}@*
+Create a new @code{asymbol} structure for the BFD @var{abfd}
+and return a pointer to it. Used by core file routines,
+binary back-end and anywhere else where no private info
+is needed.
+
@findex bfd_make_debug_symbol
@subsubsection @code{bfd_make_debug_symbol}
@strong{Description}@*
@@ -364,6 +379,7 @@ yet to be worked out.
@example
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
+
@end example
@findex bfd_decode_symclass
@@ -420,5 +436,6 @@ Not enough memory exists to create private data for @var{osec}.
#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
(ibfd, isymbol, obfd, osymbol))
+
@end example
diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi
index 0526faf..c45d6b6 100644
--- a/contrib/binutils/bfd/doc/targets.texi
+++ b/contrib/binutils/bfd/doc/targets.texi
@@ -101,6 +101,7 @@ For operations which index on the BFD format:
(((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
(bfd_assert (__FILE__,__LINE__), NULL))
#endif
+
@end example
This is the structure which defines the type of BFD this is. The
@code{xvec} member of the struct @code{bfd} itself points here. Each
@@ -111,7 +112,8 @@ FIXME, these names should be rationalised with the names of
the entry points which call them. Too bad we can't have one
macro to define them both!
@example
-enum bfd_flavour @{
+enum bfd_flavour
+@{
bfd_target_unknown_flavour,
bfd_target_aout_flavour,
bfd_target_coff_flavour,
@@ -129,7 +131,8 @@ enum bfd_flavour @{
bfd_target_versados_flavour,
bfd_target_msdos_flavour,
bfd_target_ovax_flavour,
- bfd_target_evax_flavour
+ bfd_target_evax_flavour,
+ bfd_target_mmo_flavour
@};
enum bfd_endian @{ BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN @};
@@ -139,301 +142,287 @@ typedef struct bfd_link_info _bfd_link_info;
typedef struct bfd_target
@{
-@end example
-Identifies the kind of target, e.g., SunOS4, Ultrix, etc.
-@example
+ /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
char *name;
-@end example
-The "flavour" of a back end is a general indication about the contents
-of a file.
-@example
+
+ /* The "flavour" of a back end is a general indication about
+ the contents of a file. */
enum bfd_flavour flavour;
-@end example
-The order of bytes within the data area of a file.
-@example
+
+ /* The order of bytes within the data area of a file. */
enum bfd_endian byteorder;
-@end example
-The order of bytes within the header parts of a file.
-@example
+
+ /* The order of bytes within the header parts of a file. */
enum bfd_endian header_byteorder;
-@end example
-A mask of all the flags which an executable may have set -
-from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}.
-@example
+
+ /* A mask of all the flags which an executable may have set -
+ from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}. */
flagword object_flags;
-@end example
-A mask of all the flags which a section may have set - from
-the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}.
-@example
+
+ /* A mask of all the flags which a section may have set - from
+ the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}. */
flagword section_flags;
-@end example
-The character normally found at the front of a symbol
-(if any), perhaps `_'.
-@example
+
+ /* The character normally found at the front of a symbol.
+ (if any), perhaps `_'. */
char symbol_leading_char;
-@end example
-The pad character for file names within an archive header.
-@example
+
+ /* The pad character for file names within an archive header. */
char ar_pad_char;
-@end example
-The maximum number of characters in an archive header.
-@example
+
+ /* The maximum number of characters in an archive header. */
unsigned short ar_max_namelen;
-@end example
-Entries for byte swapping for data. These are different from the other
-entry points, since they don't take a BFD asthe first argument.
-Certain other handlers could do the same.
-@example
- bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
+
+ /* Entries for byte swapping for data. These are different from the
+ other entry points, since they don't take a BFD asthe first argument.
+ Certain other handlers could do the same. */
+ bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
- void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
+ void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
- void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
+ void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
- void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
-@end example
-Byte swapping for the headers
-@example
- bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
+ void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
+
+ /* Byte swapping for the headers. */
+ bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
+ void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
+ void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-@end example
-Format dependent routines: these are vectors of entry points
-within the target vector structure, one for each format to check.
+ void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-Check the format of a file being read. Return a @code{bfd_target *} or zero.
-@example
+ /* Format dependent routines: these are vectors of entry points
+ within the target vector structure, one for each format to check. */
+
+ /* Check the format of a file being read. Return a @code{bfd_target *} or zero. */
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
-@end example
-Set the format of a file being written.
-@example
- boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
-@end example
-Write cached information into a file being written, at @code{bfd_close}.
-@example
- boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+
+ /* Set the format of a file being written. */
+ boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+
+ /* Write cached information into a file being written, at @code{bfd_close}. */
+ boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+
@end example
The general target vector. These vectors are initialized using the
BFD_JUMP_TABLE macros.
@example
/* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME)\
-CAT(NAME,_close_and_cleanup),\
-CAT(NAME,_bfd_free_cached_info),\
-CAT(NAME,_new_section_hook),\
-CAT(NAME,_get_section_contents),\
-CAT(NAME,_get_section_contents_in_window)
+@end example
+Do not "beautify" the CONCAT* macro args. Traditional C will not
+remove whitespace added here, and thus will fail to concatenate
+the tokens.
+@example
+#define BFD_JUMP_TABLE_GENERIC(NAME) \
+CONCAT2 (NAME,_close_and_cleanup), \
+CONCAT2 (NAME,_bfd_free_cached_info), \
+CONCAT2 (NAME,_new_section_hook), \
+CONCAT2 (NAME,_get_section_contents), \
+CONCAT2 (NAME,_get_section_contents_in_window)
/* Called when the BFD is being closed to do any necessary cleanup. */
- boolean (*_close_and_cleanup) PARAMS ((bfd *));
+ boolean (*_close_and_cleanup) PARAMS ((bfd *));
/* Ask the BFD to free all cached information. */
- boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+ boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
/* Called when a new section is created. */
- boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+ boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
/* Read the contents of a section. */
- boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
- file_ptr, bfd_size_type));
- boolean (*_bfd_get_section_contents_in_window)
- PARAMS ((bfd *, sec_ptr, bfd_window *,
- file_ptr, bfd_size_type));
+ boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+ file_ptr, bfd_size_type));
+ boolean (*_bfd_get_section_contents_in_window)
+ PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
/* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME)\
-CAT(NAME,_bfd_copy_private_bfd_data),\
-CAT(NAME,_bfd_merge_private_bfd_data),\
-CAT(NAME,_bfd_copy_private_section_data),\
-CAT(NAME,_bfd_copy_private_symbol_data),\
-CAT(NAME,_bfd_set_private_flags),\
-CAT(NAME,_bfd_print_private_bfd_data)\
+#define BFD_JUMP_TABLE_COPY(NAME) \
+CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
+CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
+CONCAT2 (NAME,_bfd_copy_private_section_data), \
+CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
+CONCAT2 (NAME,_bfd_set_private_flags), \
+CONCAT2 (NAME,_bfd_print_private_bfd_data) \
/* Called to copy BFD general private data from one object file
to another. */
- boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
- boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to copy BFD private section data from one object file
to another. */
- boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
- bfd *, sec_ptr));
+ boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
+ bfd *, sec_ptr));
/* Called to copy BFD private symbol data from one symbol
to another. */
- boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
- bfd *, asymbol *));
- /* Called to set private backend flags */
- boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+ boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
+ bfd *, asymbol *));
+ /* Called to set private backend flags. */
+ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
- /* Called to print private BFD data */
- boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+ /* Called to print private BFD data. */
+ boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
/* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME)\
-CAT(NAME,_core_file_failing_command),\
-CAT(NAME,_core_file_failing_signal),\
-CAT(NAME,_core_file_matches_executable_p)
+#define BFD_JUMP_TABLE_CORE(NAME) \
+CONCAT2 (NAME,_core_file_failing_command), \
+CONCAT2 (NAME,_core_file_failing_signal), \
+CONCAT2 (NAME,_core_file_matches_executable_p)
char * (*_core_file_failing_command) PARAMS ((bfd *));
int (*_core_file_failing_signal) PARAMS ((bfd *));
boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
/* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
-CAT(NAME,_slurp_armap),\
-CAT(NAME,_slurp_extended_name_table),\
-CAT(NAME,_construct_extended_name_table),\
-CAT(NAME,_truncate_arname),\
-CAT(NAME,_write_armap),\
-CAT(NAME,_read_ar_hdr),\
-CAT(NAME,_openr_next_archived_file),\
-CAT(NAME,_get_elt_at_index),\
-CAT(NAME,_generic_stat_arch_elt),\
-CAT(NAME,_update_armap_timestamp)
+#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
+CONCAT2 (NAME,_slurp_armap), \
+CONCAT2 (NAME,_slurp_extended_name_table), \
+CONCAT2 (NAME,_construct_extended_name_table), \
+CONCAT2 (NAME,_truncate_arname), \
+CONCAT2 (NAME,_write_armap), \
+CONCAT2 (NAME,_read_ar_hdr), \
+CONCAT2 (NAME,_openr_next_archived_file), \
+CONCAT2 (NAME,_get_elt_at_index), \
+CONCAT2 (NAME,_generic_stat_arch_elt), \
+CONCAT2 (NAME,_update_armap_timestamp)
boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
boolean (*_bfd_construct_extended_name_table)
- PARAMS ((bfd *, char **, bfd_size_type *, const char **));
- void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
- boolean (*write_armap) PARAMS ((bfd *arch,
- unsigned int elength,
- struct orl *map,
- unsigned int orl_count,
- int stridx));
- PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
- bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+ void (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+ boolean (*write_armap)
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+ PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+ bfd * (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
/* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
-CAT(NAME,_get_symtab_upper_bound),\
-CAT(NAME,_get_symtab),\
-CAT(NAME,_make_empty_symbol),\
-CAT(NAME,_print_symbol),\
-CAT(NAME,_get_symbol_info),\
-CAT(NAME,_bfd_is_local_label_name),\
-CAT(NAME,_get_lineno),\
-CAT(NAME,_find_nearest_line),\
-CAT(NAME,_bfd_make_debug_symbol),\
-CAT(NAME,_read_minisymbols),\
-CAT(NAME,_minisymbol_to_symbol)
- long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
- long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
- struct symbol_cache_entry **));
- struct symbol_cache_entry *
- (*_bfd_make_empty_symbol) PARAMS ((bfd *));
- void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
- struct symbol_cache_entry *,
- bfd_print_symbol_type));
+#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
+CONCAT2 (NAME,_get_symtab_upper_bound), \
+CONCAT2 (NAME,_get_symtab), \
+CONCAT2 (NAME,_make_empty_symbol), \
+CONCAT2 (NAME,_print_symbol), \
+CONCAT2 (NAME,_get_symbol_info), \
+CONCAT2 (NAME,_bfd_is_local_label_name), \
+CONCAT2 (NAME,_get_lineno), \
+CONCAT2 (NAME,_find_nearest_line), \
+CONCAT2 (NAME,_bfd_make_debug_symbol), \
+CONCAT2 (NAME,_read_minisymbols), \
+CONCAT2 (NAME,_minisymbol_to_symbol)
+ long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
+ long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
+ struct symbol_cache_entry **));
+ struct symbol_cache_entry *
+ (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+ void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
+ struct symbol_cache_entry *,
+ bfd_print_symbol_type));
#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) PARAMS ((bfd *,
- struct symbol_cache_entry *,
- symbol_info *));
+ void (*_bfd_get_symbol_info) PARAMS ((bfd *,
+ struct symbol_cache_entry *,
+ symbol_info *));
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
- boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+ boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
- alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
- boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
- struct sec *section, struct symbol_cache_entry **symbols,
- bfd_vma offset, CONST char **file, CONST char **func,
- unsigned int *line));
+ alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+ boolean (*_bfd_find_nearest_line)
+ PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+ const char **, const char **, unsigned int *));
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) PARAMS ((
- bfd *abfd,
- void *ptr,
- unsigned long size));
+ asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *,
+ unsigned long size));
#define bfd_read_minisymbols(b, d, m, s) \
BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
- unsigned int *));
+ long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
+ unsigned int *));
#define bfd_minisymbol_to_symbol(b, d, m, f) \
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
asymbol *));
/* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME)\
-CAT(NAME,_get_reloc_upper_bound),\
-CAT(NAME,_canonicalize_reloc),\
-CAT(NAME,_bfd_reloc_type_lookup)
- long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
- long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
- struct symbol_cache_entry **));
+#define BFD_JUMP_TABLE_RELOCS(NAME) \
+CONCAT2 (NAME,_get_reloc_upper_bound), \
+CONCAT2 (NAME,_canonicalize_reloc), \
+CONCAT2 (NAME,_bfd_reloc_type_lookup)
+ long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+ long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+ struct symbol_cache_entry **));
/* See documentation on reloc types. */
reloc_howto_type *
- (*reloc_type_lookup) PARAMS ((bfd *abfd,
- bfd_reloc_code_real_type code));
+ (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
/* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME)\
-CAT(NAME,_set_arch_mach),\
-CAT(NAME,_set_section_contents)
- boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
- unsigned long));
- boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
- file_ptr, bfd_size_type));
+#define BFD_JUMP_TABLE_WRITE(NAME) \
+CONCAT2 (NAME,_set_arch_mach), \
+CONCAT2 (NAME,_set_section_contents)
+ boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+ unsigned long));
+ boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+ file_ptr, bfd_size_type));
/* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME)\
-CAT(NAME,_sizeof_headers),\
-CAT(NAME,_bfd_get_relocated_section_contents),\
-CAT(NAME,_bfd_relax_section),\
-CAT(NAME,_bfd_link_hash_table_create),\
-CAT(NAME,_bfd_link_add_symbols),\
-CAT(NAME,_bfd_final_link),\
-CAT(NAME,_bfd_link_split_section),\
-CAT(NAME,_bfd_gc_sections)
- int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
- bfd_byte * (*_bfd_get_relocated_section_contents) PARAMS ((bfd *,
- struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *data, boolean relocateable,
- struct symbol_cache_entry **));
-
- boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
- struct bfd_link_info *, boolean *again));
+#define BFD_JUMP_TABLE_LINK(NAME) \
+CONCAT2 (NAME,_sizeof_headers), \
+CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
+CONCAT2 (NAME,_bfd_relax_section), \
+CONCAT2 (NAME,_bfd_link_hash_table_create), \
+CONCAT2 (NAME,_bfd_link_add_symbols), \
+CONCAT2 (NAME,_bfd_final_link), \
+CONCAT2 (NAME,_bfd_link_split_section), \
+CONCAT2 (NAME,_bfd_gc_sections), \
+CONCAT2 (NAME,_bfd_merge_sections)
+ int (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
+ bfd_byte *(*_bfd_get_relocated_section_contents)
+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, boolean, struct symbol_cache_entry **));
+
+ boolean (*_bfd_relax_section)
+ PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *));
/* Create a hash table for the linker. Different backends store
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
/* Add symbols from this object file into the hash table. */
- boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
/* Do a link based on the link_order structures attached to each
section of the BFD. */
- boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
/* Should this section be split up into smaller pieces during linking. */
- boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+ boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
/* Remove sections that are not referenced from the output. */
- boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+
+ /* Attempt to merge SEC_MERGE sections. */
+ boolean (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
/* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME)\
-CAT(NAME,_get_dynamic_symtab_upper_bound),\
-CAT(NAME,_canonicalize_dynamic_symtab),\
-CAT(NAME,_get_dynamic_reloc_upper_bound),\
-CAT(NAME,_canonicalize_dynamic_reloc)
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
+CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
+CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
+CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
+CONCAT2 (NAME,_canonicalize_dynamic_reloc)
+ /* Get the amount of memory required to hold the dynamic symbols. */
+ long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
/* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab)
+ long (*_bfd_canonicalize_dynamic_symtab)
PARAMS ((bfd *, struct symbol_cache_entry **));
/* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
+ long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
/* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc)
+ long (*_bfd_canonicalize_dynamic_reloc)
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
@end example
@@ -443,16 +432,15 @@ and little endian code, and target chosen by the linker has the wrong
endianness. The function open_output() in ld/ldlang.c uses this field
to find an alternative output format that is suitable.
@example
- /* Opposite endian version of this target. */
- const struct bfd_target * alternative_target;
+ /* Opposite endian version of this target. */
+ const struct bfd_target * alternative_target;
-@end example
-Data for use by back-end routines, which isn't generic enough to belong
-in this structure.
-@example
- PTR backend_data;
+ /* Data for use by back-end routines, which isn't
+ generic enough to belong in this structure. */
+ PTR backend_data;
@} bfd_target;
+
@end example
@findex bfd_set_default_target
@@ -470,7 +458,7 @@ name or a configuration triplet.
@subsubsection @code{bfd_find_target}
@strong{Synopsis}
@example
-const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd);
+const bfd_target *bfd_find_target(const char *target_name, bfd *abfd);
@end example
@strong{Description}@*
Return a pointer to the transfer vector for the object target
OpenPOWER on IntegriCloud