aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-02-15 10:58:06 +1030
committerAlan Modra <amodra@gmail.com>2018-02-16 19:09:23 +1030
commitd00dd7dc5e415503de88614bf2ea4aafa2bca819 (patch)
tree3222981795fcacbdba9e81c14437f6e0fd36d09a /bfd
parent3281b315c89caf1d539a316e41cc095e46482f75 (diff)
downloadgdb-d00dd7dc5e415503de88614bf2ea4aafa2bca819.zip
gdb-d00dd7dc5e415503de88614bf2ea4aafa2bca819.tar.gz
gdb-d00dd7dc5e415503de88614bf2ea4aafa2bca819.tar.bz2
Remove bfd stub function casts.
This patch defines a bunch of new functions to use in the BFD target structs rather than casting bfd_false or bfd_true and similar stub functions. I've also renamed the stub functions to reflect their parameters and put "error" in the name if they set bfd_error. The latter change is important since there were quite a few uses of bfd_false where setting bfd_error was inappropriate, for example in elf_backend_allow_non_load_phdr and is_target_special_symbol. * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false. (_bfd_bool_bfd_true): Rename from bfd_true. (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr. (_bfd_int_bfd_0): Rename from bfd_0. (_bfd_uint_bfd_0): Rename from bfd_0u. (_bfd_long_bfd_0): Rename from bfd_0l. (_bfd_long_bfd_n1_error): Rename from _bfd_n1. (_bfd_void_bfd): Rename from bfd_void. (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false), (_bfd_bool_bfd_link_false_error), (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true), (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true), (_bfd_bool_bfd_asection_bfd_asection_true), (_bfd_bool_bfd_asymbol_bfd_asymbol_true), (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions. * archive.c (_bfd_noarchive_get_elt_at_index), (_bfd_noarchive_openr_next_archived_file), (_bfd_noarchive_construct_extended_name_table), (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname), (_bfd_noarchive_write_armap): New functions. * archures.c (_bfd_nowrite_set_arch_mach): New function. * coff-alpha.c (alpha_ecoff_swap_coff_aux_in), (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in), (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out), (alpha_ecoff_swap_coff_lineno_out), (alpha_ecoff_swap_coff_reloc_out): New functions. * coff-mips.c (mips_ecoff_swap_coff_aux_in), (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in), (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out), (mips_ecoff_swap_coff_lineno_out), (mips_ecoff_swap_coff_reloc_out): New functions. * coffcode.h (coff_set_alignment_hook): Replace define with new function. (symname_in_debug_hook): Likewise. * ecoff.c (_bfd_ecoff_set_alignment_hook): New function. * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0. * elf.c (assign_file_positions_except_relocs): Test elf_backend_allow_non_load_phdr for NULL. * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from _bfd_elf_link_omit_section_dynsym. Update uses. (_bfd_elf_omit_section_dynsym_all): New function. * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete. (_bfd_elf_omit_section_dynsym_default): Declare. (_bfd_elf_omit_section_dynsym_all): Declare. * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section), (_bfd_nolink_bfd_get_relocated_section_contents), (_bfd_nolink_bfd_lookup_section_flags), (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group), (_bfd_nolink_bfd_link_hash_table_create), (_bfd_nolink_bfd_link_just_syms), (_bfd_nolink_bfd_copy_link_hash_symbol_type), (_bfd_nolink_bfd_link_split_section), (_bfd_nolink_section_already_linked), (_bfd_nolink_bfd_define_common_symbol), (_bfd_nolink_bfd_define_start_stop): New functions. * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup), (_bfd_norelocs_bfd_reloc_name_lookup), (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions. * section.c (_bfd_nowrite_set_section_contents): New function. * syms.c (_bfd_nosymbols_canonicalize_symtab), (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info), (_bfd_nosymbols_get_symbol_version_string), (_bfd_nosymbols_bfd_is_local_label_name), (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line), (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info), (_bfd_nosymbols_bfd_make_debug_symbol), ( _bfd_nosymbols_read_minisymbols), ( _bfd_nosymbols_minisymbol_to_symbol), (_bfd_nodynamic_get_synthetic_symtab): New functions. * libbfd-in.h: Declare new functions. Update existing defines, removing casts. * aix386-core.c: Update to use new hooks. Formatting. * aout-adobe.c: Likewise. * aout-arm.c: Likewise. * aout-target.h: Likewise. * aout-tic30.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * bout.c: Likewise. * cisco-core.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-i860.c: Likewise. * coff-i960.c: Likewise. * coff-ia64.c: Likewise. * coff-mips.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic30.c: Likewise. * coff-tic54x.c: Likewise. * coff-x86_64.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * elf-m10300.c: Likewise. * elf32-cr16.c: Likewise. * elf32-lm32.c: Likewise. * elf32-m32r.c: Likewise. * elf32-metag.c: Likewise. * elf32-score.c: Likewise. * elf32-score7.c: Likewise. * elf32-tilepro.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-ia64-vms.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfnn-ia64.c: Likewise. * elfxx-sparc.c: Likewise. * elfxx-target.h: Likewise. * elfxx-tilegx.c: Likewise. * elfxx-x86.h: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386msdos.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * libaout.h: Likewise. * libecoff.h: Likewise. * mach-o-target.c: Likewise. * mach-o.c: Likewise. * mipsbsd.c: Likewise. * mmo.c: Likewise. * netbsd-core.c: Likewise. * nlm-target.h: Likewise. * oasys.c: Likewise. * osf-core.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * pe-x86_64.c: Likewise. * pef.c: Likewise. * plugin.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * sco5-core.c: Likewise. * som.c: Likewise. * sparclynx.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * trad-core.c: Likewise. * verilog.c: Likewise. * versados.c: Likewise. * vms-alpha.c: Likewise. * vms-lib.c: Likewise. * wasm-module.c: Likewise. * xsym.c: Likewise. * libbfd.h: Regenerate.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog155
-rw-r--r--bfd/aix386-core.c24
-rw-r--r--bfd/aout-adobe.c24
-rw-r--r--bfd/aout-arm.c50
-rw-r--r--bfd/aout-target.h33
-rw-r--r--bfd/aout-tic30.c34
-rw-r--r--bfd/aoutf1.h6
-rw-r--r--bfd/archive.c47
-rw-r--r--bfd/archures.c8
-rw-r--r--bfd/binary.c16
-rw-r--r--bfd/bout.c97
-rw-r--r--bfd/cisco-core.c196
-rw-r--r--bfd/coff-alpha.c124
-rw-r--r--bfd/coff-i386.c53
-rw-r--r--bfd/coff-i860.c50
-rw-r--r--bfd/coff-i960.c58
-rw-r--r--bfd/coff-ia64.c50
-rw-r--r--bfd/coff-mips.c241
-rw-r--r--bfd/coff-ppc.c64
-rw-r--r--bfd/coff-rs6000.c20
-rw-r--r--bfd/coff-sh.c68
-rw-r--r--bfd/coff-tic30.c30
-rw-r--r--bfd/coff-tic54x.c234
-rw-r--r--bfd/coff-x86_64.c30
-rw-r--r--bfd/coff64-rs6000.c24
-rw-r--r--bfd/coffcode.h103
-rw-r--r--bfd/ecoff.c7
-rw-r--r--bfd/elf-bfd.h4
-rw-r--r--bfd/elf-m10300.c3
-rw-r--r--bfd/elf.c4
-rw-r--r--bfd/elf32-cr16.c3
-rw-r--r--bfd/elf32-lm32.c3
-rw-r--r--bfd/elf32-m32r.c3
-rw-r--r--bfd/elf32-metag.c2
-rw-r--r--bfd/elf32-score.c3
-rw-r--r--bfd/elf32-score7.c3
-rw-r--r--bfd/elf32-tilepro.c2
-rw-r--r--bfd/elf32-xstormy16.c2
-rw-r--r--bfd/elf32-xtensa.c3
-rw-r--r--bfd/elf64-alpha.c2
-rw-r--r--bfd/elf64-hppa.c4
-rw-r--r--bfd/elf64-ia64-vms.c2
-rw-r--r--bfd/elf64-mmix.c3
-rw-r--r--bfd/elf64-sh64.c3
-rw-r--r--bfd/elflink.c21
-rw-r--r--bfd/elfnn-ia64.c2
-rw-r--r--bfd/elfxx-sparc.c2
-rw-r--r--bfd/elfxx-target.h35
-rw-r--r--bfd/elfxx-tilegx.c2
-rw-r--r--bfd/elfxx-x86.h2
-rw-r--r--bfd/hp300hpux.c2
-rw-r--r--bfd/hppabsd-core.c12
-rw-r--r--bfd/hpux-core.c12
-rw-r--r--bfd/i386msdos.c10
-rw-r--r--bfd/i386os9k.c24
-rw-r--r--bfd/ieee.c31
-rw-r--r--bfd/ihex.c14
-rw-r--r--bfd/irix-core.c12
-rw-r--r--bfd/libaout.h3
-rw-r--r--bfd/libbfd-in.h284
-rw-r--r--bfd/libbfd.c96
-rw-r--r--bfd/libbfd.h284
-rw-r--r--bfd/libecoff.h9
-rw-r--r--bfd/linker.c101
-rw-r--r--bfd/mach-o-target.c6
-rw-r--r--bfd/mach-o.c2
-rw-r--r--bfd/mipsbsd.c74
-rw-r--r--bfd/mmo.c15
-rw-r--r--bfd/netbsd-core.c12
-rw-r--r--bfd/nlm-target.h18
-rw-r--r--bfd/oasys.c29
-rw-r--r--bfd/osf-core.c12
-rw-r--r--bfd/pdp11.c44
-rw-r--r--bfd/pe-mips.c30
-rw-r--r--bfd/pe-x86_64.c30
-rw-r--r--bfd/pef.c31
-rw-r--r--bfd/plugin.c14
-rw-r--r--bfd/ppcboot.c17
-rw-r--r--bfd/ptrace-core.c8
-rw-r--r--bfd/reloc.c23
-rw-r--r--bfd/sco5-core.c8
-rw-r--r--bfd/section.c10
-rw-r--r--bfd/som.c13
-rw-r--r--bfd/sparclynx.c7
-rw-r--r--bfd/srec.c18
-rw-r--r--bfd/syms.c114
-rw-r--r--bfd/tekhex.c10
-rw-r--r--bfd/trad-core.c12
-rw-r--r--bfd/verilog.c14
-rw-r--r--bfd/versados.c13
-rw-r--r--bfd/vms-alpha.c30
-rw-r--r--bfd/vms-lib.c24
-rw-r--r--bfd/wasm-module.c10
-rw-r--r--bfd/xsym.c16
94 files changed, 2306 insertions, 1211 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b48afd6..c314485 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,158 @@
+2018-02-16 Alan Modra <amodra@gmail.com>
+
+ * libbfd.c (_bfd_bool_bfd_false_error): Rename from bfd_false.
+ (_bfd_bool_bfd_true): Rename from bfd_true.
+ (_bfd_ptr_bfd_null_error): Rename from bfd_nullvoidptr.
+ (_bfd_int_bfd_0): Rename from bfd_0.
+ (_bfd_uint_bfd_0): Rename from bfd_0u.
+ (_bfd_long_bfd_0): Rename from bfd_0l.
+ (_bfd_long_bfd_n1_error): Rename from _bfd_n1.
+ (_bfd_void_bfd): Rename from bfd_void.
+ (_bfd_bool_bfd_false, _bfd_bool_bfd_asymbol_false),
+ (_bfd_bool_bfd_link_false_error),
+ (_bfd_bool_bfd_link_true, _bfd_bool_bfd_bfd_true),
+ (_bfd_bool_bfd_uint_true, _bfd_bool_bfd_ptr_true),
+ (_bfd_bool_bfd_asection_bfd_asection_true),
+ (_bfd_bool_bfd_asymbol_bfd_asymbol_true),
+ (_bfd_void_bfd_link, _bfd_void_bfd_asection): New functions.
+ * archive.c (_bfd_noarchive_get_elt_at_index),
+ (_bfd_noarchive_openr_next_archived_file),
+ (_bfd_noarchive_construct_extended_name_table),
+ (_bfd_noarchive_write_ar_hdr, _bfd_noarchive_truncate_arname),
+ (_bfd_noarchive_write_armap): New functions.
+ * archures.c (_bfd_nowrite_set_arch_mach): New function.
+ * coff-alpha.c (alpha_ecoff_swap_coff_aux_in),
+ (alpha_ecoff_swap_coff_sym_in, alpha_ecoff_swap_coff_lineno_in),
+ (alpha_ecoff_swap_coff_aux_out, alpha_ecoff_swap_coff_sym_out),
+ (alpha_ecoff_swap_coff_lineno_out),
+ (alpha_ecoff_swap_coff_reloc_out): New functions.
+ * coff-mips.c (mips_ecoff_swap_coff_aux_in),
+ (mips_ecoff_swap_coff_sym_in, mips_ecoff_swap_coff_lineno_in),
+ (mips_ecoff_swap_coff_aux_out, mips_ecoff_swap_coff_sym_out),
+ (mips_ecoff_swap_coff_lineno_out),
+ (mips_ecoff_swap_coff_reloc_out): New functions.
+ * coffcode.h (coff_set_alignment_hook): Replace define with
+ new function.
+ (symname_in_debug_hook): Likewise.
+ * ecoff.c (_bfd_ecoff_set_alignment_hook): New function.
+ * elfxx-target.h (elf_backend_allow_non_load_phdr): Default to 0.
+ * elf.c (assign_file_positions_except_relocs): Test
+ elf_backend_allow_non_load_phdr for NULL.
+ * elflink.c (_bfd_elf_omit_section_dynsym_default): Rename from
+ _bfd_elf_link_omit_section_dynsym. Update uses.
+ (_bfd_elf_omit_section_dynsym_all): New function.
+ * elf-bfd.h (_bfd_elf_link_omit_section_dynsym): Delete.
+ (_bfd_elf_omit_section_dynsym_default): Declare.
+ (_bfd_elf_omit_section_dynsym_all): Declare.
+ * linker.c (_bfd_nolink_sizeof_headers, _bfd_nolink_bfd_relax_section),
+ (_bfd_nolink_bfd_get_relocated_section_contents),
+ (_bfd_nolink_bfd_lookup_section_flags),
+ (_bfd_nolink_bfd_is_group_section, _bfd_nolink_bfd_discard_group),
+ (_bfd_nolink_bfd_link_hash_table_create),
+ (_bfd_nolink_bfd_link_just_syms),
+ (_bfd_nolink_bfd_copy_link_hash_symbol_type),
+ (_bfd_nolink_bfd_link_split_section),
+ (_bfd_nolink_section_already_linked),
+ (_bfd_nolink_bfd_define_common_symbol),
+ (_bfd_nolink_bfd_define_start_stop): New functions.
+ * reloc.c (_bfd_norelocs_bfd_reloc_type_lookup),
+ (_bfd_norelocs_bfd_reloc_name_lookup),
+ (_bfd_nodynamic_canonicalize_dynamic_reloc): New functions.
+ * section.c (_bfd_nowrite_set_section_contents): New function.
+ * syms.c (_bfd_nosymbols_canonicalize_symtab),
+ (_bfd_nosymbols_print_symbol, _bfd_nosymbols_get_symbol_info),
+ (_bfd_nosymbols_get_symbol_version_string),
+ (_bfd_nosymbols_bfd_is_local_label_name),
+ (_bfd_nosymbols_get_lineno, _bfd_nosymbols_find_nearest_line),
+ (_bfd_nosymbols_find_line, _bfd_nosymbols_find_inliner_info),
+ (_bfd_nosymbols_bfd_make_debug_symbol),
+ ( _bfd_nosymbols_read_minisymbols),
+ ( _bfd_nosymbols_minisymbol_to_symbol),
+ (_bfd_nodynamic_get_synthetic_symtab): New functions.
+ * libbfd-in.h: Declare new functions. Update existing defines,
+ removing casts.
+ * aix386-core.c: Update to use new hooks. Formatting.
+ * aout-adobe.c: Likewise.
+ * aout-arm.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * binary.c: Likewise.
+ * bout.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-x86_64.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf32-cr16.c: Likewise.
+ * elf32-lm32.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-metag.c: Likewise.
+ * elf32-score.c: Likewise.
+ * elf32-score7.c: Likewise.
+ * elf32-tilepro.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ia64-vms.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elfnn-ia64.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * elfxx-target.h: Likewise.
+ * elfxx-tilegx.c: Likewise.
+ * elfxx-x86.h: Likewise.
+ * hp300hpux.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
+ * i386msdos.c: Likewise.
+ * i386os9k.c: Likewise.
+ * ieee.c: Likewise.
+ * ihex.c: Likewise.
+ * irix-core.c: Likewise.
+ * libaout.h: Likewise.
+ * libecoff.h: Likewise.
+ * mach-o-target.c: Likewise.
+ * mach-o.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * mmo.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * nlm-target.h: Likewise.
+ * oasys.c: Likewise.
+ * osf-core.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-mips.c: Likewise.
+ * pe-x86_64.c: Likewise.
+ * pef.c: Likewise.
+ * plugin.c: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
+ * sco5-core.c: Likewise.
+ * som.c: Likewise.
+ * sparclynx.c: Likewise.
+ * srec.c: Likewise.
+ * tekhex.c: Likewise.
+ * trad-core.c: Likewise.
+ * verilog.c: Likewise.
+ * versados.c: Likewise.
+ * vms-alpha.c: Likewise.
+ * vms-lib.c: Likewise.
+ * wasm-module.c: Likewise.
+ * xsym.c: Likewise.
+ * libbfd.h: Regenerate.
+
2018-02-15 Jim Wilson <jimw@sifive.com>
* elfnn-riscv.c (_bfd_riscv_relax_section): Ifdef out check to ignore
diff --git a/bfd/aix386-core.c b/bfd/aix386-core.c
index 77d068f..de3afd5 100644
--- a/bfd/aix386-core.c
+++ b/bfd/aix386-core.c
@@ -246,12 +246,24 @@ const bfd_target core_aix386_vec =
NO_GET, NO_GETS, NO_PUT,
NO_GET, NO_GETS, NO_PUT, /* hdrs */
- {_bfd_dummy_target, _bfd_dummy_target,
- _bfd_dummy_target, aix386_core_file_p},
- {bfd_false, bfd_false, /* bfd_create_object */
- bfd_false, bfd_false},
- {bfd_false, bfd_false, /* bfd_write_contents */
- bfd_false, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ _bfd_dummy_target,
+ _bfd_dummy_target,
+ aix386_core_file_p
+ },
+ { /* bfd_create_object */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c
index 4063a8a..6ec3d50 100644
--- a/bfd/aout-adobe.c
+++ b/bfd/aout-adobe.c
@@ -500,12 +500,24 @@ const bfd_target aout_adobe_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
- {_bfd_dummy_target, aout_adobe_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, aout_adobe_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, aout_adobe_write_object_contents,/* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ aout_adobe_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ aout_adobe_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ aout_adobe_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (aout_32),
BFD_JUMP_TABLE_COPY (_bfd_generic),
diff --git a/bfd/aout-arm.c b/bfd/aout-arm.c
index ac05b93..211f51f 100644
--- a/bfd/aout-arm.c
+++ b/bfd/aout-arm.c
@@ -483,12 +483,25 @@ const bfd_target arm_aout_le_vec =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
@@ -525,12 +538,25 @@ const bfd_target arm_aout_be_vec =
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
diff --git a/bfd/aout-target.h b/bfd/aout-target.h
index 7e33fbf..f245b1e 100644
--- a/bfd/aout-target.h
+++ b/bfd/aout-target.h
@@ -407,14 +407,13 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
#endif
#ifndef MY_bfd_debug_info_start
-#define MY_bfd_debug_info_start bfd_void
+#define MY_bfd_debug_info_start _bfd_void_bfd
#endif
#ifndef MY_bfd_debug_info_end
-#define MY_bfd_debug_info_end bfd_void
+#define MY_bfd_debug_info_end _bfd_void_bfd
#endif
#ifndef MY_bfd_debug_info_accumulate
-#define MY_bfd_debug_info_accumulate \
- (void (*) (bfd *, struct bfd_section *)) bfd_void
+#define MY_bfd_debug_info_accumulate _bfd_void_bfd_asection
#endif
#ifndef MY_core_file_failing_command
@@ -581,7 +580,7 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
#endif
#ifndef MY_bfd_is_target_special_symbol
-#define MY_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define MY_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#endif
#ifndef MY_bfd_free_cached_info
@@ -669,12 +668,24 @@ const bfd_target MY (vec) =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
#endif
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c
index aca9291..31248ec 100644
--- a/bfd/aout-tic30.c
+++ b/bfd/aout-tic30.c
@@ -862,14 +862,13 @@ tic30_aout_set_arch_mach (bfd *abfd,
#endif
#ifndef MY_bfd_debug_info_start
-#define MY_bfd_debug_info_start bfd_void
+#define MY_bfd_debug_info_start _bfd_void_bfd
#endif
#ifndef MY_bfd_debug_info_end
-#define MY_bfd_debug_info_end bfd_void
+#define MY_bfd_debug_info_end _bfd_void_bfd
#endif
#ifndef MY_bfd_debug_info_accumulate
-#define MY_bfd_debug_info_accumulate \
- (void (*) (bfd*, struct bfd_section *)) bfd_void
+#define MY_bfd_debug_info_accumulate _bfd_void_bfd_asection
#endif
#ifndef MY_core_file_failing_command
@@ -1036,8 +1035,7 @@ tic30_aout_set_arch_mach (bfd *abfd,
#endif
#ifndef MY_bfd_is_target_special_symbol
-#define MY_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define MY_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#endif
#ifndef MY_bfd_free_cached_info
@@ -1099,12 +1097,24 @@ const bfd_target tic30_aout_vec =
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
diff --git a/bfd/aoutf1.h b/bfd/aoutf1.h
index 88ecf1e..b039d6a 100644
--- a/bfd/aoutf1.h
+++ b/bfd/aoutf1.h
@@ -779,9 +779,9 @@ static const struct aout_backend_data sunos4_aout_backend =
#define MY_core_file_failing_signal sunos4_core_file_failing_signal
#define MY_core_file_matches_executable_p sunos4_core_file_matches_executable_p
-#define MY_bfd_debug_info_start bfd_void
-#define MY_bfd_debug_info_end bfd_void
-#define MY_bfd_debug_info_accumulate (void (*) (bfd *, struct bfd_section *)) bfd_void
+#define MY_bfd_debug_info_start _bfd_void_bfd
+#define MY_bfd_debug_info_end _bfd_void_bfd
+#define MY_bfd_debug_info_accumulate _bfd_void_bfd_asection
#define MY_core_file_p sunos4_core_file_p
#define MY_write_object_contents NAME(aout, sunos4_write_object_contents)
#define MY_backend_data & sunos4_aout_backend
diff --git a/bfd/archive.c b/bfd/archive.c
index de08b19..e11d022 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -754,6 +754,13 @@ _bfd_generic_get_elt_at_index (bfd *abfd, symindex sym_index)
return _bfd_get_elt_at_filepos (abfd, entry->file_offset);
}
+bfd *
+_bfd_noarchive_get_elt_at_index (bfd *abfd,
+ symindex sym_index ATTRIBUTE_UNUSED)
+{
+ return (bfd *) _bfd_ptr_bfd_null_error (abfd);
+}
+
/*
FUNCTION
bfd_openr_next_archived_file
@@ -816,6 +823,13 @@ bfd_generic_openr_next_archived_file (bfd *archive, bfd *last_file)
return _bfd_get_elt_at_filepos (archive, filestart);
}
+bfd *
+_bfd_noarchive_openr_next_archived_file (bfd *archive,
+ bfd *last_file ATTRIBUTE_UNUSED)
+{
+ return (bfd *) _bfd_ptr_bfd_null_error (archive);
+}
+
const bfd_target *
bfd_generic_archive_p (bfd *abfd)
{
@@ -1586,6 +1600,15 @@ _bfd_archive_coff_construct_extended_name_table (bfd *abfd,
return _bfd_construct_extended_name_table (abfd, TRUE, tabloc, tablen);
}
+bfd_boolean
+_bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED,
+ char **tabloc ATTRIBUTE_UNUSED,
+ bfd_size_type *len ATTRIBUTE_UNUSED,
+ const char **name ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
/* Follows archive_head and produces an extended name table if
necessary. Returns (in tabloc) a pointer to an extended name
table, and in tablen the length of the table. If it makes an entry
@@ -1884,6 +1907,12 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd)
}
return TRUE;
}
+
+bfd_boolean
+_bfd_noarchive_write_ar_hdr (bfd *archive, bfd *abfd ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (archive);
+}
/* A couple of functions for creating ar_hdrs. */
@@ -2154,6 +2183,13 @@ bfd_gnu_truncate_arname (bfd *abfd, const char *pathname, char *arhdr)
if (length < 16)
(hdr->ar_name)[length] = ar_padchar (abfd);
}
+
+void
+_bfd_noarchive_truncate_arname (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *pathname ATTRIBUTE_UNUSED,
+ char *arhdr ATTRIBUTE_UNUSED)
+{
+}
/* The BFD is open for write and has its format set to bfd_archive. */
@@ -2834,6 +2870,17 @@ _bfd_coff_write_armap (bfd *arch,
return TRUE;
}
+bfd_boolean
+_bfd_noarchive_write_armap
+ (bfd *arch ATTRIBUTE_UNUSED,
+ unsigned int elength ATTRIBUTE_UNUSED,
+ struct orl *map ATTRIBUTE_UNUSED,
+ unsigned int orl_count ATTRIBUTE_UNUSED,
+ int stridx ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
static int
archive_close_worker (void **slot, void *inf ATTRIBUTE_UNUSED)
{
diff --git a/bfd/archures.c b/bfd/archures.c
index e83c57a..7327f5f 100644
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -1452,3 +1452,11 @@ bfd_arch_default_fill (bfd_size_type count,
memset (fill, 0, count);
return fill;
}
+
+bfd_boolean
+_bfd_nowrite_set_arch_mach (bfd *abfd,
+ enum bfd_architecture arch ATTRIBUTE_UNUSED,
+ unsigned long mach ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
diff --git a/bfd/binary.c b/bfd/binary.c
index 2bc9ff0..51c8287 100644
--- a/bfd/binary.c
+++ b/bfd/binary.c
@@ -211,7 +211,7 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
#define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define binary_read_minisymbols _bfd_generic_read_minisymbols
#define binary_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-#define binary_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define binary_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
/* Set the architecture of a binary file. */
#define binary_set_arch_mach _bfd_generic_set_arch_mach
@@ -346,16 +346,16 @@ const bfd_target binary_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
binary_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents */
- bfd_false,
- bfd_true,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_true,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (binary),
diff --git a/bfd/bout.c b/bfd/bout.c
index 1098cf9..c766633 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -1417,24 +1417,37 @@ const bfd_target bout_be_vec =
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* Headers. */
- {_bfd_dummy_target, b_out_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, b_out_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, b_out_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (aout_32),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
- BFD_JUMP_TABLE_SYMBOLS (aout_32),
- BFD_JUMP_TABLE_RELOCS (b_out),
- BFD_JUMP_TABLE_WRITE (b_out),
- BFD_JUMP_TABLE_LINK (b_out),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & bout_le_vec,
+
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ b_out_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ b_out_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ b_out_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (aout_32),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
+ BFD_JUMP_TABLE_SYMBOLS (aout_32),
+ BFD_JUMP_TABLE_RELOCS (b_out),
+ BFD_JUMP_TABLE_WRITE (b_out),
+ BFD_JUMP_TABLE_LINK (b_out),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &bout_le_vec,
NULL
};
@@ -1460,24 +1473,36 @@ const bfd_target bout_le_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
- {_bfd_dummy_target, b_out_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, b_out_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, b_out_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (aout_32),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
- BFD_JUMP_TABLE_SYMBOLS (aout_32),
- BFD_JUMP_TABLE_RELOCS (b_out),
- BFD_JUMP_TABLE_WRITE (b_out),
- BFD_JUMP_TABLE_LINK (b_out),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & bout_be_vec,
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ b_out_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ b_out_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ b_out_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (aout_32),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd),
+ BFD_JUMP_TABLE_SYMBOLS (aout_32),
+ BFD_JUMP_TABLE_RELOCS (b_out),
+ BFD_JUMP_TABLE_WRITE (b_out),
+ BFD_JUMP_TABLE_LINK (b_out),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &bout_be_vec,
NULL
};
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index e591ef6..7c0654b 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -317,102 +317,110 @@ extern const bfd_target core_cisco_le_vec;
const bfd_target core_cisco_be_vec =
{
- "cisco-ios-core-big",
- bfd_target_unknown_flavour,
- BFD_ENDIAN_BIG, /* target byte order */
- BFD_ENDIAN_BIG, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* symbol prefix */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
- 0, /* match priority. */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
- bfd_getb64, bfd_getb_signed_64, bfd_putb64,
- bfd_getb32, bfd_getb_signed_32, bfd_putb32,
- bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
-
- { /* bfd_check_format */
- _bfd_dummy_target, /* unknown format */
- _bfd_dummy_target, /* object file */
- _bfd_dummy_target, /* archive */
- cisco_core_file_p /* a core file */
- },
- { /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
- },
- { /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
- },
-
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (cisco),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & core_cisco_le_vec,
-
- NULL /* backend_data */
+ "cisco-ios-core-big",
+ bfd_target_unknown_flavour,
+ BFD_ENDIAN_BIG, /* target byte order */
+ BFD_ENDIAN_BIG, /* target headers byte order */
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* symbol prefix */
+ ' ', /* ar_pad_char */
+ 16, /* ar_max_namelen */
+ 0, /* match priority. */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb32, bfd_getb_signed_32, bfd_putb32,
+ bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
+
+ { /* bfd_check_format */
+ _bfd_dummy_target, /* unknown format */
+ _bfd_dummy_target, /* object file */
+ _bfd_dummy_target, /* archive */
+ cisco_core_file_p /* a core file */
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (cisco),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &core_cisco_le_vec,
+
+ NULL /* backend_data */
};
const bfd_target core_cisco_le_vec =
{
- "cisco-ios-core-little",
- bfd_target_unknown_flavour,
- BFD_ENDIAN_LITTLE, /* target byte order */
- BFD_ENDIAN_LITTLE, /* target headers byte order */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- 0, /* symbol prefix */
- ' ', /* ar_pad_char */
- 16, /* ar_max_namelen */
- 0, /* match_priority */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
- bfd_getl64, bfd_getl_signed_64, bfd_putl64,
- bfd_getl32, bfd_getl_signed_32, bfd_putl32,
- bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
-
- { /* bfd_check_format */
- _bfd_dummy_target, /* unknown format */
- _bfd_dummy_target, /* object file */
- _bfd_dummy_target, /* archive */
- cisco_core_file_p /* a core file */
- },
- { /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
- },
- { /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
- },
-
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (cisco),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
- BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
- BFD_JUMP_TABLE_WRITE (_bfd_generic),
- BFD_JUMP_TABLE_LINK (_bfd_nolink),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- &core_cisco_be_vec,
-
- NULL /* backend_data */
+ "cisco-ios-core-little",
+ bfd_target_unknown_flavour,
+ BFD_ENDIAN_LITTLE, /* target byte order */
+ BFD_ENDIAN_LITTLE, /* target headers byte order */
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* symbol prefix */
+ ' ', /* ar_pad_char */
+ 16, /* ar_max_namelen */
+ 0, /* match_priority */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl32, bfd_getl_signed_32, bfd_putl32,
+ bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
+
+ { /* bfd_check_format */
+ _bfd_dummy_target, /* unknown format */
+ _bfd_dummy_target, /* object file */
+ _bfd_dummy_target, /* archive */
+ cisco_core_file_p /* a core file */
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (cisco),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
+ BFD_JUMP_TABLE_WRITE (_bfd_generic),
+ BFD_JUMP_TABLE_LINK (_bfd_nolink),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &core_cisco_be_vec,
+
+ NULL /* backend_data */
};
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 2fe8757..3f88ff5 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -2218,6 +2218,67 @@ alpha_ecoff_get_elt_at_index (bfd *abfd, symindex sym_index)
entry = bfd_ardata (abfd)->symdefs + sym_index;
return alpha_ecoff_get_elt_at_filepos (abfd, entry->file_offset);
}
+
+static void
+alpha_ecoff_swap_coff_aux_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ int in_class ATTRIBUTE_UNUSED,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static void
+alpha_ecoff_swap_coff_sym_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static void
+alpha_ecoff_swap_coff_lineno_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static unsigned int
+alpha_ecoff_swap_coff_aux_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ int in_class ATTRIBUTE_UNUSED,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+alpha_ecoff_swap_coff_sym_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+alpha_ecoff_swap_coff_lineno_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+alpha_ecoff_swap_coff_reloc_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
/* This is the ECOFF backend structure. The backend field of the
target vector points to this. */
@@ -2226,13 +2287,10 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
{
/* COFF backend structure. */
{
- (void (*) (bfd *, void *, int, int, int, int, void *)) (void (*)) bfd_void, /* aux_in */
- (void (*) (bfd *, void *, void *)) (void (*)) bfd_void, /* sym_in */
- (void (*) (bfd *, void *, void *)) (void (*)) bfd_void, /* lineno_in */
- (unsigned (*) (bfd *, void *, int, int, int, int, void *)) (unsigned (*)) bfd_0u,/*aux_out*/
- (unsigned (*) (bfd *, void *, void *)) (unsigned (*)) bfd_0u, /* sym_out */
- (unsigned (*) (bfd *, void *, void *)) (unsigned (*)) bfd_0u, /* lineno_out */
- (unsigned (*) (bfd *, void *, void *)) (unsigned (*)) bfd_0u, /* reloc_out */
+ alpha_ecoff_swap_coff_aux_in, alpha_ecoff_swap_coff_sym_in,
+ alpha_ecoff_swap_coff_lineno_in, alpha_ecoff_swap_coff_aux_out,
+ alpha_ecoff_swap_coff_sym_out, alpha_ecoff_swap_coff_lineno_out,
+ alpha_ecoff_swap_coff_reloc_out,
alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out,
alpha_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
@@ -2353,9 +2411,9 @@ const bfd_target alpha_ecoff_le_vec =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | DYNAMIC | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
0, /* leading underscore */
@@ -2369,24 +2427,36 @@ const bfd_target alpha_ecoff_le_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, alpha_ecoff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
- BFD_JUMP_TABLE_COPY (_bfd_ecoff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (alpha_ecoff),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
- BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
- BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
- BFD_JUMP_TABLE_LINK (_bfd_ecoff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ alpha_ecoff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+ BFD_JUMP_TABLE_COPY (_bfd_ecoff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (alpha_ecoff),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+ BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+ BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+ BFD_JUMP_TABLE_LINK (_bfd_ecoff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
- & alpha_ecoff_backend_data
+ &alpha_ecoff_backend_data
};
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 8b8f601..9782206 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -661,27 +661,44 @@ const bfd_target
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
/* Note that we allow an object file to be treated as a core file as well. */
- /* bfd_check_format */
+
#ifdef COFF_CHECK_FORMAT
- {_bfd_dummy_target, COFF_CHECK_FORMAT,
- bfd_generic_archive_p, COFF_CHECK_FORMAT},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ COFF_CHECK_FORMAT,
+ bfd_generic_archive_p,
+ COFF_CHECK_FORMAT
+ },
#else
- {_bfd_dummy_target, coff_object_p, bfd_generic_archive_p, coff_object_p},
+ {
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ coff_object_p
+ },
#endif
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
diff --git a/bfd/coff-i860.c b/bfd/coff-i860.c
index 13c84af..50d156c 100644
--- a/bfd/coff-i860.c
+++ b/bfd/coff-i860.c
@@ -677,9 +677,9 @@ const bfd_target
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
'_', /* leading underscore */
@@ -695,22 +695,34 @@ const bfd_target
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
/* Note that we allow an object file to be treated as a core file as well. */
- {_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, i3coff_object_p},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ i3coff_object_p,
+ bfd_generic_archive_p,
+ i3coff_object_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index 8b91bfe..4e68d44 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -614,9 +614,9 @@ const bfd_target icoff_be_vec =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
'_', /* leading underscore */
@@ -624,31 +624,43 @@ const bfd_target icoff_be_vec =
15, /* ar_max_namelen */
0, /* match priority. */
-bfd_getl64, bfd_getl_signed_64, bfd_putl64,
+ bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
-bfd_getb64, bfd_getb_signed_64, bfd_putb64,
+ bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & icoff_le_vec,
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &icoff_le_vec,
COFF_SWAP_TABLE
};
diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c
index 270c959..dfe8d94 100644
--- a/bfd/coff-ia64.c
+++ b/bfd/coff-ia64.c
@@ -149,9 +149,9 @@ const bfd_target
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* section flags */
@@ -179,22 +179,34 @@ const bfd_target
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
/* Note that we allow an object file to be treated as a core file as well. */
- {_bfd_dummy_target, ia64coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, ia64coff_object_p},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (coff),
- BFD_JUMP_TABLE_COPY (coff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
- BFD_JUMP_TABLE_SYMBOLS (coff),
- BFD_JUMP_TABLE_RELOCS (coff),
- BFD_JUMP_TABLE_WRITE (coff),
- BFD_JUMP_TABLE_LINK (coff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ ia64coff_object_p,
+ bfd_generic_archive_p,
+ ia64coff_object_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (coff),
+ BFD_JUMP_TABLE_COPY (coff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
+ BFD_JUMP_TABLE_SYMBOLS (coff),
+ BFD_JUMP_TABLE_RELOCS (coff),
+ BFD_JUMP_TABLE_WRITE (coff),
+ BFD_JUMP_TABLE_LINK (coff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c
index 11eb0e1..3a0163a 100644
--- a/bfd/coff-mips.c
+++ b/bfd/coff-mips.c
@@ -1236,6 +1236,67 @@ mips_relocate_section (bfd *output_bfd,
return TRUE;
}
+
+static void
+mips_ecoff_swap_coff_aux_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ int in_class ATTRIBUTE_UNUSED,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static void
+mips_ecoff_swap_coff_sym_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static void
+mips_ecoff_swap_coff_lineno_in (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ext1 ATTRIBUTE_UNUSED,
+ void *in1 ATTRIBUTE_UNUSED)
+{
+}
+
+static unsigned int
+mips_ecoff_swap_coff_aux_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ int type ATTRIBUTE_UNUSED,
+ int in_class ATTRIBUTE_UNUSED,
+ int indx ATTRIBUTE_UNUSED,
+ int numaux ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+mips_ecoff_swap_coff_sym_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+mips_ecoff_swap_coff_lineno_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+static unsigned int
+mips_ecoff_swap_coff_reloc_out (bfd *abfd ATTRIBUTE_UNUSED,
+ void *inp ATTRIBUTE_UNUSED,
+ void *extp ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
/* This is the ECOFF backend structure. The backend field of the
target vector points to this. */
@@ -1244,13 +1305,10 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
{
/* COFF backend structure. */
{
- (void (*) (bfd *,void *,int,int,int,int,void *)) (void (*)) bfd_void, /* aux_in */
- (void (*) (bfd *,void *,void *)) (void (*)) bfd_void, /* sym_in */
- (void (*) (bfd *,void *,void *)) (void (*)) bfd_void, /* lineno_in */
- (unsigned (*) (bfd *,void *,int,int,int,int,void *)) (unsigned (*)) bfd_0u,/*aux_out*/
- (unsigned (*) (bfd *,void *,void *)) (unsigned (*)) bfd_0u, /* sym_out */
- (unsigned (*) (bfd *,void *,void *)) (unsigned (*)) bfd_0u, /* lineno_out */
- (unsigned (*) (bfd *,void *,void *)) (unsigned (*)) bfd_0u, /* reloc_out */
+ mips_ecoff_swap_coff_aux_in, mips_ecoff_swap_coff_sym_in,
+ mips_ecoff_swap_coff_lineno_in, mips_ecoff_swap_coff_aux_out,
+ mips_ecoff_swap_coff_sym_out, mips_ecoff_swap_coff_lineno_out,
+ mips_ecoff_swap_coff_reloc_out,
mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out,
mips_ecoff_swap_scnhdr_out,
FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE,
@@ -1374,9 +1432,9 @@ const bfd_target mips_ecoff_le_vec =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
0, /* leading underscore */
@@ -1390,26 +1448,38 @@ const bfd_target mips_ecoff_le_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
- BFD_JUMP_TABLE_COPY (_bfd_ecoff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
- BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
- BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
- BFD_JUMP_TABLE_LINK (_bfd_ecoff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & mips_ecoff_be_vec,
-
- & mips_ecoff_backend_data
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+ BFD_JUMP_TABLE_COPY (_bfd_ecoff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+ BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+ BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+ BFD_JUMP_TABLE_LINK (_bfd_ecoff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &mips_ecoff_be_vec,
+
+ &mips_ecoff_backend_data
};
const bfd_target mips_ecoff_be_vec =
@@ -1419,9 +1489,9 @@ const bfd_target mips_ecoff_be_vec =
BFD_ENDIAN_BIG, /* data byte order is big */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
0, /* leading underscore */
@@ -1434,26 +1504,39 @@ const bfd_target mips_ecoff_be_vec =
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16,
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
- BFD_JUMP_TABLE_COPY (_bfd_ecoff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
- BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
- BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
- BFD_JUMP_TABLE_LINK (_bfd_ecoff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
-
- & mips_ecoff_le_vec,
-
- & mips_ecoff_backend_data
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+ BFD_JUMP_TABLE_COPY (_bfd_ecoff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+ BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+ BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+ BFD_JUMP_TABLE_LINK (_bfd_ecoff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+
+ &mips_ecoff_le_vec,
+
+ &mips_ecoff_backend_data
};
const bfd_target mips_ecoff_bele_vec =
@@ -1463,9 +1546,9 @@ const bfd_target mips_ecoff_bele_vec =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
0, /* leading underscore */
@@ -1479,24 +1562,36 @@ const bfd_target mips_ecoff_bele_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, _bfd_ecoff_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, _bfd_ecoff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
- BFD_JUMP_TABLE_COPY (_bfd_ecoff),
- BFD_JUMP_TABLE_CORE (_bfd_nocore),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
- BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
- BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
- BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
- BFD_JUMP_TABLE_LINK (_bfd_ecoff),
- BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_ecoff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_ecoff),
+ BFD_JUMP_TABLE_COPY (_bfd_ecoff),
+ BFD_JUMP_TABLE_CORE (_bfd_nocore),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_ecoff),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_ecoff),
+ BFD_JUMP_TABLE_RELOCS (_bfd_ecoff),
+ BFD_JUMP_TABLE_WRITE (_bfd_ecoff),
+ BFD_JUMP_TABLE_LINK (_bfd_ecoff),
+ BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
- & mips_ecoff_backend_data
+ &mips_ecoff_backend_data
};
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 74f93d5..42d9963 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -2480,9 +2480,9 @@ const bfd_target TARGET_LITTLE_SYM =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* FIXME: object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* FIXME: object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
@@ -2505,12 +2505,24 @@ const bfd_target TARGET_LITTLE_SYM =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, /* _bfd_dummy_target */ coff_object_p },
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ coff_object_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -2524,7 +2536,7 @@ const bfd_target TARGET_LITTLE_SYM =
/* Alternative_target. */
#ifdef TARGET_BIG_SYM
- & TARGET_BIG_SYM,
+ &TARGET_BIG_SYM,
#else
NULL,
#endif
@@ -2541,9 +2553,9 @@ const bfd_target TARGET_BIG_SYM =
BFD_ENDIAN_BIG, /* data byte order is big */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* FIXME: object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* FIXME: object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
@@ -2566,12 +2578,24 @@ const bfd_target TARGET_BIG_SYM =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, /* _bfd_dummy_target */ coff_object_p },
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ coff_object_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -2585,7 +2609,7 @@ const bfd_target TARGET_BIG_SYM =
/* Alternative_target. */
#ifdef TARGET_LITTLE_SYM
- & TARGET_LITTLE_SYM,
+ &TARGET_LITTLE_SYM,
#else
NULL,
#endif
diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
index d02835e..cf53921 100644
--- a/bfd/coff-rs6000.c
+++ b/bfd/coff-rs6000.c
@@ -3970,7 +3970,7 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
/* For generic entry points. */
#define _bfd_xcoff_close_and_cleanup _bfd_archive_close_and_cleanup
-#define _bfd_xcoff_bfd_free_cached_info bfd_true
+#define _bfd_xcoff_bfd_free_cached_info _bfd_bool_bfd_true
#define _bfd_xcoff_new_section_hook coff_new_section_hook
#define _bfd_xcoff_get_section_contents _bfd_generic_get_section_contents
#define _bfd_xcoff_get_section_contents_in_window \
@@ -4001,7 +4001,7 @@ const struct xcoff_dwsect_name xcoff_dwsect_names[] = {
#define _bfd_xcoff_write_ar_hdr _bfd_generic_write_ar_hdr
#define _bfd_xcoff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_xcoff_generic_stat_arch_elt _bfd_xcoff_stat_arch_elt
-#define _bfd_xcoff_update_armap_timestamp bfd_true
+#define _bfd_xcoff_update_armap_timestamp _bfd_bool_bfd_true
/* For symbols entry points. */
#define _bfd_xcoff_get_symtab_upper_bound coff_get_symtab_upper_bound
@@ -4195,17 +4195,17 @@ const bfd_target rs6000_xcoff_vec =
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{/* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_write_object_contents,
_bfd_xcoff_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_xcoff),
@@ -4376,17 +4376,17 @@ const bfd_target powerpc_xcoff_vec =
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{/* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_write_object_contents,
_bfd_xcoff_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_xcoff),
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index 3a921fd..99b5617 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -3130,9 +3130,9 @@ const bfd_target sh_coff_small_vec =
BFD_ENDIAN_BIG, /* data byte order is big */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
'_', /* leading symbol underscore */
@@ -3146,12 +3146,24 @@ const bfd_target sh_coff_small_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_small_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff_small),
BFD_JUMP_TABLE_COPY (coff),
@@ -3163,9 +3175,9 @@ const bfd_target sh_coff_small_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & sh_coff_small_le_vec,
+ &sh_coff_small_le_vec,
- & bfd_coff_small_swap_table
+ &bfd_coff_small_swap_table
};
const bfd_target sh_coff_small_le_vec =
@@ -3175,9 +3187,9 @@ const bfd_target sh_coff_small_le_vec =
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little endian too*/
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | BFD_IS_RELAXABLE),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
'_', /* leading symbol underscore */
@@ -3191,12 +3203,24 @@ const bfd_target sh_coff_small_le_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_small_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_small_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff_small),
BFD_JUMP_TABLE_COPY (coff),
@@ -3208,8 +3232,8 @@ const bfd_target sh_coff_small_le_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & sh_coff_small_vec,
+ &sh_coff_small_vec,
- & bfd_coff_small_swap_table
+ &bfd_coff_small_swap_table
};
#endif
diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c
index f597a28..79d2ba1 100644
--- a/bfd/coff-tic30.c
+++ b/bfd/coff-tic30.c
@@ -183,9 +183,9 @@ const bfd_target tic30_coff_vec =
BFD_ENDIAN_BIG, /* data byte order is big */
BFD_ENDIAN_LITTLE, /* header byte order is little */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
'_', /* leading symbol underscore */
@@ -199,12 +199,24 @@ const bfd_target tic30_coff_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c
index 0b6848f..322cbe2 100644
--- a/bfd/coff-tic54x.c
+++ b/bfd/coff-tic54x.c
@@ -400,18 +400,18 @@ tic54x_reloc_processing (arelent *relent,
/* TI COFF v0, DOS tools (little-endian headers). */
const bfd_target tic54x_coff0_vec =
{
- "coff0-c54x", /* name */
+ "coff0-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -421,12 +421,24 @@ const bfd_target tic54x_coff0_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -439,24 +451,24 @@ const bfd_target tic54x_coff0_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
- & ticoff0_swap_table
+ &ticoff0_swap_table
};
/* TI COFF v0, SPARC tools (big-endian headers). */
const bfd_target tic54x_coff0_beh_vec =
{
- "coff0-beh-c54x", /* name */
+ "coff0-beh-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -466,12 +478,24 @@ const bfd_target tic54x_coff0_beh_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -483,26 +507,26 @@ const bfd_target tic54x_coff0_beh_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & tic54x_coff0_vec,
+ &tic54x_coff0_vec,
- & ticoff0_swap_table
+ &ticoff0_swap_table
};
/* TI COFF v1, DOS tools (little-endian headers). */
const bfd_target tic54x_coff1_vec =
{
- "coff1-c54x", /* name */
+ "coff1-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -512,12 +536,24 @@ const bfd_target tic54x_coff1_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -529,26 +565,26 @@ const bfd_target tic54x_coff1_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & tic54x_coff0_beh_vec,
+ &tic54x_coff0_beh_vec,
- & ticoff1_swap_table
+ &ticoff1_swap_table
};
/* TI COFF v1, SPARC tools (big-endian headers). */
const bfd_target tic54x_coff1_beh_vec =
{
- "coff1-beh-c54x", /* name */
+ "coff1-beh-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -558,12 +594,24 @@ const bfd_target tic54x_coff1_beh_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -575,26 +623,26 @@ const bfd_target tic54x_coff1_beh_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & tic54x_coff1_vec,
+ &tic54x_coff1_vec,
- & ticoff1_swap_table
+ &ticoff1_swap_table
};
/* TI COFF v2, TI DOS tools output (little-endian headers). */
const bfd_target tic54x_coff2_vec =
{
- "coff2-c54x", /* name */
+ "coff2-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_LITTLE, /* header byte order is little (DOS tools) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -604,12 +652,24 @@ const bfd_target tic54x_coff2_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -621,7 +681,7 @@ const bfd_target tic54x_coff2_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & tic54x_coff1_beh_vec,
+ &tic54x_coff1_beh_vec,
COFF_SWAP_TABLE
};
@@ -629,18 +689,18 @@ const bfd_target tic54x_coff2_vec =
/* TI COFF v2, TI SPARC tools output (big-endian headers). */
const bfd_target tic54x_coff2_beh_vec =
{
- "coff2-beh-c54x", /* name */
+ "coff2-beh-c54x", /* name */
bfd_target_coff_flavour,
BFD_ENDIAN_LITTLE, /* data byte order is little */
BFD_ENDIAN_BIG, /* header byte order is big */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT ),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT ),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
- '_', /* leading symbol underscore */
- '/', /* ar_pad_char */
+ '_', /* leading symbol underscore */
+ '/', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -650,12 +710,24 @@ const bfd_target tic54x_coff2_beh_vec =
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
@@ -667,7 +739,7 @@ const bfd_target tic54x_coff2_beh_vec =
BFD_JUMP_TABLE_LINK (coff),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & tic54x_coff2_vec,
+ &tic54x_coff2_vec,
COFF_SWAP_TABLE
};
diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c
index 25e9883..f0108ea 100644
--- a/bfd/coff-x86_64.c
+++ b/bfd/coff-x86_64.c
@@ -761,9 +761,9 @@ const bfd_target
BFD_ENDIAN_LITTLE, /* Data byte order is little. */
BFD_ENDIAN_LITTLE, /* Header byte order is little. */
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
+ (HAS_RELOC | EXEC_P /* Object flags. */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
#if defined(COFF_WITH_PE)
@@ -788,12 +788,24 @@ const bfd_target
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs. */
/* Note that we allow an object file to be treated as a core file as well. */
- { _bfd_dummy_target, amd64coff_object_p, /* BFD_check_format. */
- bfd_generic_archive_p, amd64coff_object_p },
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */
- bfd_false },
- { bfd_false, coff_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false },
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ amd64coff_object_p,
+ bfd_generic_archive_p,
+ amd64coff_object_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c
index 884d82a..ddee235 100644
--- a/bfd/coff64-rs6000.c
+++ b/bfd/coff64-rs6000.c
@@ -2694,22 +2694,22 @@ const bfd_target rs6000_xcoff64_vec =
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{/* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
xcoff64_write_object_contents,
_bfd_xcoff_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* Generic */
_bfd_archive_close_and_cleanup,
- bfd_true,
+ _bfd_bool_bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
_bfd_generic_get_section_contents_in_window,
@@ -2738,7 +2738,7 @@ const bfd_target rs6000_xcoff64_vec =
xcoff64_openr_next_archived_file,
_bfd_generic_get_elt_at_index,
_bfd_xcoff_stat_arch_elt,
- bfd_true,
+ _bfd_bool_bfd_true,
/* Symbols */
coff_get_symtab_upper_bound,
@@ -2955,22 +2955,22 @@ const bfd_target rs6000_xcoff64_aix_vec =
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
coff_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{/* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
xcoff64_write_object_contents,
_bfd_xcoff_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* Generic */
_bfd_archive_close_and_cleanup,
- bfd_true,
+ _bfd_bool_bfd_true,
coff_new_section_hook,
_bfd_generic_get_section_contents,
_bfd_generic_get_section_contents_in_window,
@@ -2999,7 +2999,7 @@ const bfd_target rs6000_xcoff64_aix_vec =
xcoff64_openr_next_archived_file,
_bfd_generic_get_elt_at_index,
_bfd_xcoff_stat_arch_elt,
- bfd_true,
+ _bfd_bool_bfd_true,
/* Symbols */
coff_get_symtab_upper_bound,
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 498b531..87ccecd 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1985,8 +1985,12 @@ coff_set_alignment_hook (bfd *abfd, asection *section, void * scnhdr)
#else /* ! RS6000COFF_C */
-#define coff_set_alignment_hook \
- ((void (*) (bfd *, asection *, void *)) (void (*)) bfd_void)
+static void
+coff_set_alignment_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section ATTRIBUTE_UNUSED,
+ void *scnhdr ATTRIBUTE_UNUSED)
+{
+}
#endif /* ! RS6000COFF_C */
#endif /* ! COFF_WITH_PE */
@@ -2497,20 +2501,16 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
return TRUE;
}
-#ifdef SYMNAME_IN_DEBUG
-
static bfd_boolean
-symname_in_debug_hook (bfd * abfd ATTRIBUTE_UNUSED, struct internal_syment *sym)
+symname_in_debug_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct internal_syment *sym ATTRIBUTE_UNUSED)
{
+#ifdef SYMNAME_IN_DEBUG
return SYMNAME_IN_DEBUG (sym) != 0;
-}
-
#else
-
-#define symname_in_debug_hook \
- (bfd_boolean (*) (bfd *, struct internal_syment *)) (bfd_boolean (*)) bfd_false
-
+ return FALSE;
#endif
+}
#ifdef RS6000COFF_C
@@ -6024,7 +6024,7 @@ static bfd_coff_backend_data bigobj_swap_table =
#endif
#ifndef coff_bfd_is_target_special_symbol
-#define coff_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define coff_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#endif
#ifndef coff_read_minisymbols
@@ -6113,14 +6113,24 @@ const bfd_target VAR = \
bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
\
- /* bfd_check_format. */ \
- { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
- _bfd_dummy_target }, \
- /* bfd_set_format. */ \
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents. */ \
- { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
- bfd_false }, \
+ { /* bfd_check_format. */ \
+ _bfd_dummy_target, \
+ coff_object_p, \
+ bfd_generic_archive_p, \
+ _bfd_dummy_target \
+ }, \
+ { /* bfd_set_format. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_mkobject, \
+ _bfd_generic_mkarchive, \
+ _bfd_bool_bfd_false_error \
+ }, \
+ { /* bfd_write_contents. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_write_object_contents, \
+ _bfd_write_archive_contents, \
+ _bfd_bool_bfd_false_error \
+ }, \
\
BFD_JUMP_TABLE_GENERIC (coff), \
BFD_JUMP_TABLE_COPY (coff), \
@@ -6164,14 +6174,24 @@ const bfd_target VAR = \
bfd_getb32, bfd_getb_signed_32, bfd_putb32, \
bfd_getb16, bfd_getb_signed_16, bfd_putb16, \
\
- /* bfd_check_format. */ \
- { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
- _bfd_dummy_target }, \
- /* bfd_set_format. */ \
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents. */ \
- { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
- bfd_false }, \
+ { /* bfd_check_format. */ \
+ _bfd_dummy_target, \
+ coff_object_p, \
+ bfd_generic_archive_p, \
+ _bfd_dummy_target \
+ }, \
+ { /* bfd_set_format. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_mkobject, \
+ _bfd_generic_mkarchive, \
+ _bfd_bool_bfd_false_error \
+ }, \
+ { /* bfd_write_contents. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_write_object_contents, \
+ _bfd_write_archive_contents, \
+ _bfd_bool_bfd_false_error \
+ }, \
\
BFD_JUMP_TABLE_GENERIC (coff), \
BFD_JUMP_TABLE_COPY (coff), \
@@ -6213,14 +6233,25 @@ const bfd_target VAR = \
bfd_getl64, bfd_getl_signed_64, bfd_putl64, \
bfd_getl32, bfd_getl_signed_32, bfd_putl32, \
bfd_getl16, bfd_getl_signed_16, bfd_putl16, \
- /* bfd_check_format. */ \
- { _bfd_dummy_target, coff_object_p, bfd_generic_archive_p, \
- _bfd_dummy_target }, \
- /* bfd_set_format. */ \
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false }, \
- /* bfd_write_contents. */ \
- { bfd_false, coff_write_object_contents, _bfd_write_archive_contents, \
- bfd_false }, \
+ \
+ { /* bfd_check_format. */ \
+ _bfd_dummy_target, \
+ coff_object_p, \
+ bfd_generic_archive_p, \
+ _bfd_dummy_target \
+ }, \
+ { /* bfd_set_format. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_mkobject, \
+ _bfd_generic_mkarchive, \
+ _bfd_bool_bfd_false_error \
+ }, \
+ { /* bfd_write_contents. */ \
+ _bfd_bool_bfd_false_error, \
+ coff_write_object_contents, \
+ _bfd_write_archive_contents, \
+ _bfd_bool_bfd_false_error \
+ }, \
\
BFD_JUMP_TABLE_GENERIC (coff), \
BFD_JUMP_TABLE_COPY (coff), \
diff --git a/bfd/ecoff.c b/bfd/ecoff.c
index e9d1eae..b1d530c 100644
--- a/bfd/ecoff.c
+++ b/bfd/ecoff.c
@@ -182,6 +182,13 @@ _bfd_ecoff_new_section_hook (bfd *abfd, asection *section)
return _bfd_generic_new_section_hook (abfd, section);
}
+void
+_bfd_ecoff_set_alignment_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *section ATTRIBUTE_UNUSED,
+ void *scnhdr ATTRIBUTE_UNUSED)
+{
+}
+
/* Determine the machine architecture and type. This is called from
the generic COFF routines. It is the inverse of ecoff_get_magic,
below. This could be an ECOFF backend routine, with one version
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index b580dc2..51e3fac 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -2270,7 +2270,9 @@ extern bfd_boolean _bfd_elf_validate_reloc
extern bfd_boolean _bfd_elf_link_create_dynamic_sections
(bfd *, struct bfd_link_info *);
-extern bfd_boolean _bfd_elf_link_omit_section_dynsym
+extern bfd_boolean _bfd_elf_omit_section_dynsym_default
+ (bfd *, struct bfd_link_info *, asection *);
+extern bfd_boolean _bfd_elf_omit_section_dynsym_all
(bfd *, struct bfd_link_info *, asection *);
extern bfd_boolean _bfd_elf_create_dynamic_sections
(bfd *, struct bfd_link_info *);
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 82f2253..66fe1a5 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -5574,8 +5574,7 @@ mn10300_elf_mkobject (bfd *abfd)
_bfd_mn10300_elf_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
_bfd_mn10300_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_symbol \
_bfd_mn10300_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf.c b/bfd/elf.c
index 934052d..397fa62 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -6138,7 +6138,9 @@ assign_file_positions_except_relocs (bfd *abfd,
changed or the programs updated. */
if (alloc > 1
&& tdata->phdr[0].p_type == PT_PHDR
- && ! bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr, alloc)
+ && (bed->elf_backend_allow_non_load_phdr == NULL
+ || !bed->elf_backend_allow_non_load_phdr (abfd, tdata->phdr,
+ alloc))
&& tdata->phdr[1].p_type == PT_LOAD
&& (tdata->phdr[1].p_vaddr > tdata->phdr[0].p_vaddr
|| (tdata->phdr[1].p_vaddr + tdata->phdr[1].p_memsz)
diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c
index 5c0b54f..e9c2de6 100644
--- a/bfd/elf32-cr16.c
+++ b/bfd/elf32-cr16.c
@@ -2921,8 +2921,7 @@ _bfd_cr16_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE
_bfd_cr16_elf_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
_bfd_cr16_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_symbol \
_bfd_cr16_elf_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c
index ccd075e..b008d5c 100644
--- a/bfd/elf32-lm32.c
+++ b/bfd/elf32-lm32.c
@@ -2580,8 +2580,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
#define elf_backend_reloc_type_class lm32_elf_reloc_type_class
#define elf_backend_copy_indirect_symbol lm32_elf_copy_indirect_symbol
#define elf_backend_size_dynamic_sections lm32_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_create_dynamic_sections lm32_elf_create_dynamic_sections
#define elf_backend_finish_dynamic_sections lm32_elf_finish_dynamic_sections
#define elf_backend_adjust_dynamic_symbol lm32_elf_adjust_dynamic_symbol
diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c
index f989acd..5e9f09a 100644
--- a/bfd/elf32-m32r.c
+++ b/bfd/elf32-m32r.c
@@ -3854,8 +3854,7 @@ m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED,
#define elf_backend_create_dynamic_sections m32r_elf_create_dynamic_sections
#define bfd_elf32_bfd_link_hash_table_create m32r_elf_link_hash_table_create
#define elf_backend_size_dynamic_sections m32r_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_sections m32r_elf_finish_dynamic_sections
#define elf_backend_adjust_dynamic_symbol m32r_elf_adjust_dynamic_symbol
#define elf_backend_finish_dynamic_symbol m32r_elf_finish_dynamic_symbol
diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c
index d7b7059..6932a3b 100644
--- a/bfd/elf32-metag.c
+++ b/bfd/elf32-metag.c
@@ -4141,7 +4141,7 @@ elf_metag_plt_sym_val (bfd_vma i, const asection *plt,
#define elf_backend_finish_dynamic_sections elf_metag_finish_dynamic_sections
#define elf_backend_size_dynamic_sections elf_metag_size_dynamic_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_post_process_headers elf_metag_post_process_headers
#define elf_backend_reloc_type_class elf_metag_reloc_type_class
#define elf_backend_copy_indirect_symbol elf_metag_copy_indirect_symbol
diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c
index bce1c86..595e4af 100644
--- a/bfd/elf32-score.c
+++ b/bfd/elf32-score.c
@@ -4466,8 +4466,7 @@ _bfd_score_elf_common_definition (Elf_Internal_Sym *sym)
_bfd_score_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_score_elf_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_create_dynamic_sections \
_bfd_score_elf_create_dynamic_sections
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c
index 5e458f4..9ec8a31 100644
--- a/bfd/elf32-score7.c
+++ b/bfd/elf32-score7.c
@@ -3871,5 +3871,4 @@ s7_elf32_score_new_section_hook (bfd *abfd, asection *sec)
return _bfd_elf_new_section_hook (abfd, sec);
}
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c
index 96ba98d..4fe1d14 100644
--- a/bfd/elf32-tilepro.c
+++ b/bfd/elf32-tilepro.c
@@ -2257,7 +2257,7 @@ tilepro_elf_omit_section_dynsym (bfd *output_bfd,
if (strcmp (p->name, ".got") == 0)
return FALSE;
- return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
+ return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p);
}
/* Set the sizes of the dynamic sections. */
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index 575c33a..6e38219 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -1009,7 +1009,7 @@ xstormy16_elf_gc_mark_hook (asection *sec,
#define elf_backend_always_size_sections \
xstormy16_elf_always_size_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_sections \
xstormy16_elf_finish_dynamic_sections
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 247f563..4f280c2 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -11243,8 +11243,7 @@ static const struct bfd_elf_special_section elf_xtensa_special_sections[] =
#define elf_backend_relocate_section elf_xtensa_relocate_section
#define elf_backend_size_dynamic_sections elf_xtensa_size_dynamic_sections
#define elf_backend_always_size_sections elf_xtensa_always_size_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_special_sections elf_xtensa_special_sections
#define elf_backend_action_discarded elf_xtensa_action_discarded
#define elf_backend_copy_indirect_symbol elf_xtensa_copy_indirect_symbol
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 23b809c..079301a 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -5495,7 +5495,7 @@ static const struct elf_size_info alpha_elf_size_info =
#define elf_backend_size_dynamic_sections \
elf64_alpha_size_dynamic_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_relocate_section \
elf64_alpha_relocate_section
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index fd7afb7..4b0f53b 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -4052,8 +4052,8 @@ const struct elf_size_info hppa64_elf_size_info =
elf64_hppa_create_dynamic_sections
#define elf_backend_post_process_headers elf64_hppa_post_process_headers
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
+
#define elf_backend_adjust_dynamic_symbol \
elf64_hppa_adjust_dynamic_symbol
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c
index d675046..faaf419 100644
--- a/bfd/elf64-ia64-vms.c
+++ b/bfd/elf64-ia64-vms.c
@@ -5481,7 +5481,7 @@ static const struct elf_size_info elf64_ia64_vms_size_info = {
#define elf_backend_size_dynamic_sections \
elf64_ia64_size_dynamic_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_relocate_section \
elf64_ia64_relocate_section
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c
index c6ac556..2132a1b 100644
--- a/bfd/elf64-mmix.c
+++ b/bfd/elf64-mmix.c
@@ -2901,8 +2901,7 @@ mmix_elf_relax_section (bfd *abfd,
#define elf_backend_check_relocs mmix_elf_check_relocs
#define elf_backend_symbol_processing mmix_elf_symbol_processing
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define bfd_elf64_bfd_copy_link_hash_symbol_type \
_bfd_generic_copy_link_hash_symbol_type
diff --git a/bfd/elf64-sh64.c b/bfd/elf64-sh64.c
index 63b12a1..0c6ae2e 100644
--- a/bfd/elf64-sh64.c
+++ b/bfd/elf64-sh64.c
@@ -3926,8 +3926,7 @@ static const struct bfd_elf_special_section sh64_elf64_special_sections[]=
sh64_elf64_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
sh64_elf64_size_dynamic_sections
-#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
#define elf_backend_finish_dynamic_symbol \
sh64_elf64_finish_dynamic_symbol
#define elf_backend_finish_dynamic_sections \
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6eb47ee..22d7d26 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -881,9 +881,9 @@ elf_link_renumber_local_hash_table_dynsyms (struct elf_link_hash_entry *h,
/* Return true if the dynamic symbol for a given section should be
omitted when creating a shared library. */
bfd_boolean
-_bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info,
- asection *p)
+_bfd_elf_omit_section_dynsym_default (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
+ asection *p)
{
struct elf_link_hash_table *htab;
asection *ip;
@@ -913,6 +913,15 @@ _bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
}
}
+bfd_boolean
+_bfd_elf_omit_section_dynsym_all
+ (bfd *output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *p ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
/* Assign dynsym indices. In a shared library we generate a section
symbol for each output section, which come first. Next come symbols
which have been forced to local binding. Then all of the back-end
@@ -6901,7 +6910,7 @@ _bfd_elf_init_1_index_section (bfd *output_bfd, struct bfd_link_info *info)
for (s = output_bfd->sections; s != NULL; s = s->next)
if ((s->flags & (SEC_EXCLUDE | SEC_ALLOC)) == SEC_ALLOC
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ && !_bfd_elf_omit_section_dynsym_default (output_bfd, info, s))
{
elf_hash_table (info)->text_index_section = s;
break;
@@ -6919,7 +6928,7 @@ _bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info)
_bfd_elf_link_omit_section_dynsym. */
for (s = output_bfd->sections; s != NULL; s = s->next)
if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC)
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ && !_bfd_elf_omit_section_dynsym_default (output_bfd, info, s))
{
elf_hash_table (info)->data_index_section = s;
break;
@@ -6928,7 +6937,7 @@ _bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info)
for (s = output_bfd->sections; s != NULL; s = s->next)
if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY))
== (SEC_ALLOC | SEC_READONLY))
- && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ && !_bfd_elf_omit_section_dynsym_default (output_bfd, info, s))
{
elf_hash_table (info)->text_index_section = s;
break;
diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c
index 7483424..be495b9 100644
--- a/bfd/elfnn-ia64.c
+++ b/bfd/elfnn-ia64.c
@@ -5046,7 +5046,7 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_size_dynamic_sections \
elfNN_ia64_size_dynamic_sections
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_relocate_section \
elfNN_ia64_relocate_section
#define elf_backend_finish_dynamic_symbol \
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 10c5acd..c7a05b4 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -2438,7 +2438,7 @@ _bfd_sparc_elf_omit_section_dynsym (bfd *output_bfd,
if (strcmp (p->name, ".got") == 0)
return FALSE;
- return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
+ return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p);
}
/* Set the sizes of the dynamic sections. */
diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h
index efbce8b..9593e34 100644
--- a/bfd/elfxx-target.h
+++ b/bfd/elfxx-target.h
@@ -145,10 +145,9 @@
#define elf_backend_strtab_flags 0
#endif
-#define bfd_elfNN_bfd_debug_info_start bfd_void
-#define bfd_elfNN_bfd_debug_info_end bfd_void
-#define bfd_elfNN_bfd_debug_info_accumulate \
- ((void (*) (bfd*, struct bfd_section *)) (void (*)) bfd_void)
+#define bfd_elfNN_bfd_debug_info_start _bfd_void_bfd
+#define bfd_elfNN_bfd_debug_info_end _bfd_void_bfd
+#define bfd_elfNN_bfd_debug_info_accumulate _bfd_void_bfd_asection
#ifndef bfd_elfNN_bfd_get_relocated_section_contents
#define bfd_elfNN_bfd_get_relocated_section_contents \
@@ -211,8 +210,7 @@
#endif
#ifndef bfd_elfNN_bfd_make_debug_symbol
-#define bfd_elfNN_bfd_make_debug_symbol \
- ((asymbol * (*) (bfd *, void *, unsigned long)) (asymbol * (*)) bfd_nullvoidptr)
+#define bfd_elfNN_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#endif
#ifndef bfd_elfNN_bfd_copy_private_symbol_data
@@ -237,19 +235,16 @@
_bfd_elf_print_private_bfd_data
#endif
#ifndef bfd_elfNN_bfd_merge_private_bfd_data
-#define bfd_elfNN_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) (bfd_boolean (*)) bfd_true)
+#define bfd_elfNN_bfd_merge_private_bfd_data _bfd_bool_bfd_link_true
#endif
#ifndef bfd_elfNN_bfd_set_private_flags
-#define bfd_elfNN_bfd_set_private_flags \
- ((bfd_boolean (*) (bfd *, flagword)) (bfd_boolean (*)) bfd_true)
+#define bfd_elfNN_bfd_set_private_flags _bfd_bool_bfd_uint_true
#endif
#ifndef bfd_elfNN_bfd_is_local_label_name
#define bfd_elfNN_bfd_is_local_label_name _bfd_elf_is_local_label_name
#endif
#ifndef bfd_elfNN_bfd_is_target_special_symbol
-#define bfd_elfNN_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define bfd_elfNN_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#endif
#ifndef bfd_elfNN_get_dynamic_reloc_upper_bound
@@ -449,7 +444,7 @@
#define elf_backend_create_dynamic_sections 0
#endif
#ifndef elf_backend_omit_section_dynsym
-#define elf_backend_omit_section_dynsym _bfd_elf_link_omit_section_dynsym
+#define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_default
#endif
#ifndef elf_backend_relocs_compatible
#define elf_backend_relocs_compatible _bfd_elf_default_relocs_compatible
@@ -473,8 +468,7 @@
#define elf_backend_size_dynamic_sections 0
#endif
#ifndef elf_backend_init_index_section
-#define elf_backend_init_index_section \
- ((void (*) (bfd *, struct bfd_link_info *)) (void (*)) bfd_void)
+#define elf_backend_init_index_section _bfd_void_bfd_link
#endif
#ifndef elf_backend_relocate_section
#define elf_backend_relocate_section 0
@@ -501,8 +495,7 @@
#define elf_backend_modify_program_headers 0
#endif
#ifndef elf_backend_allow_non_load_phdr
-#define elf_backend_allow_non_load_phdr \
- ((bfd_boolean (*) (bfd *, const Elf_Internal_Phdr *, unsigned)) (bfd_boolean (*)) bfd_false)
+#define elf_backend_allow_non_load_phdr 0
#endif
#ifndef elf_backend_ecoff_debug_swap
#define elf_backend_ecoff_debug_swap 0
@@ -967,14 +960,14 @@ const bfd_target TARGET_BIG_SYM =
},
/* bfd_set_format: set the format of a file being written */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
bfd_elfNN_mkobject,
bfd_elfNN_mkarchive,
bfd_elfNN_mkcorefile
},
/* bfd_write_contents: write cached information into a file being written */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
bfd_elfNN_write_object_contents,
bfd_elfNN_write_archive_contents,
bfd_elfNN_write_corefile_contents,
@@ -1068,14 +1061,14 @@ const bfd_target TARGET_LITTLE_SYM =
},
/* bfd_set_format: set the format of a file being written */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
bfd_elfNN_mkobject,
bfd_elfNN_mkarchive,
bfd_elfNN_mkcorefile
},
/* bfd_write_contents: write cached information into a file being written */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
bfd_elfNN_write_object_contents,
bfd_elfNN_write_archive_contents,
bfd_elfNN_write_corefile_contents,
diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c
index 7596b49..b57c879 100644
--- a/bfd/elfxx-tilegx.c
+++ b/bfd/elfxx-tilegx.c
@@ -2499,7 +2499,7 @@ tilegx_elf_omit_section_dynsym (bfd *output_bfd,
if (strcmp (p->name, ".got") == 0)
return FALSE;
- return _bfd_elf_link_omit_section_dynsym (output_bfd, info, p);
+ return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p);
}
bfd_boolean
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 619de90..efa835e 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -704,7 +704,7 @@ extern bfd * _bfd_x86_elf_link_setup_gnu_properties
#define elf_backend_gc_mark_hook \
_bfd_x86_elf_gc_mark_hook
#define elf_backend_omit_section_dynsym \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_elf_omit_section_dynsym_all
#define elf_backend_parse_gnu_properties \
_bfd_x86_elf_parse_gnu_properties
#define elf_backend_merge_gnu_properties \
diff --git a/bfd/hp300hpux.c b/bfd/hp300hpux.c
index 9df222b..f51092a 100644
--- a/bfd/hp300hpux.c
+++ b/bfd/hp300hpux.c
@@ -146,7 +146,7 @@
routines in this file, we can not use the default aout
free_cached_info routine which assumes that the relocs and symtabs
were allocated using malloc. */
-#define MY_bfd_free_cached_info bfd_true
+#define MY_bfd_free_cached_info _bfd_bool_bfd_true
#define m68k_aout_hp300hpux_write_syms aout_32_write_syms
diff --git a/bfd/hppabsd-core.c b/bfd/hppabsd-core.c
index a14a57a..aea9d27 100644
--- a/bfd/hppabsd-core.c
+++ b/bfd/hppabsd-core.c
@@ -244,12 +244,16 @@ const bfd_target core_hppabsd_vec =
hppabsd_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index aab3d9a..4be09e0 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -406,12 +406,16 @@ const bfd_target core_hpux_vec =
hpux_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/i386msdos.c b/bfd/i386msdos.c
index 8334f19..a47acf4 100644
--- a/bfd/i386msdos.c
+++ b/bfd/i386msdos.c
@@ -251,7 +251,7 @@ msdos_set_section_contents (bfd *abfd,
#define msdos_find_line _bfd_nosymbols_find_line
#define msdos_find_inliner_info _bfd_nosymbols_find_inliner_info
#define msdos_get_lineno _bfd_nosymbols_get_lineno
-#define msdos_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define msdos_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define msdos_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
#define msdos_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define msdos_read_minisymbols _bfd_nosymbols_read_minisymbols
@@ -289,16 +289,16 @@ const bfd_target i386_msdos_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
msdos_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
msdos_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (msdos),
diff --git a/bfd/i386os9k.c b/bfd/i386os9k.c
index e401c7c..1c8ef84 100644
--- a/bfd/i386os9k.c
+++ b/bfd/i386os9k.c
@@ -207,12 +207,24 @@ const bfd_target i386_aout_os9k_vec =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, os9k_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, bfd_false, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, bfd_false, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ os9k_object_p,
+ bfd_generic_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (aout_32),
BFD_JUMP_TABLE_COPY (_bfd_generic),
diff --git a/bfd/ieee.c b/bfd/ieee.c
index 8ee73b6..c7b27d8 100644
--- a/bfd/ieee.c
+++ b/bfd/ieee.c
@@ -3853,27 +3853,20 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
#define ieee_close_and_cleanup _bfd_generic_close_and_cleanup
#define ieee_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define ieee_slurp_armap bfd_true
-#define ieee_slurp_extended_name_table bfd_true
+#define ieee_slurp_armap _bfd_bool_bfd_true
+#define ieee_slurp_extended_name_table _bfd_bool_bfd_true
#define ieee_construct_extended_name_table \
- ((bfd_boolean (*) \
- (bfd *, char **, bfd_size_type *, const char **)) \
- (bfd_boolean (*)) bfd_true)
+ _bfd_noarchive_construct_extended_name_table
#define ieee_truncate_arname bfd_dont_truncate_arname
-#define ieee_write_armap \
- ((bfd_boolean (*) \
- (bfd *, unsigned int, struct orl *, unsigned int, int)) \
- (bfd_boolean (*)) bfd_true)
-#define ieee_read_ar_hdr bfd_nullvoidptr
-#define ieee_write_ar_hdr \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_false)
-#define ieee_update_armap_timestamp bfd_true
+#define ieee_write_armap _bfd_noarchive_write_armap
+#define ieee_read_ar_hdr _bfd_ptr_bfd_null_error
+#define ieee_write_ar_hdr _bfd_noarchive_write_ar_hdr
+#define ieee_update_armap_timestamp _bfd_bool_bfd_true
#define ieee_get_elt_at_index _bfd_generic_get_elt_at_index
#define ieee_get_symbol_version_string \
_bfd_nosymbols_get_symbol_version_string
-#define ieee_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define ieee_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define ieee_bfd_is_local_label_name bfd_generic_is_local_label_name
#define ieee_get_lineno _bfd_nosymbols_get_lineno
#define ieee_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
@@ -3937,16 +3930,16 @@ const bfd_target ieee_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
ieee_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
ieee_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
/* ieee_close_and_cleanup, ieee_bfd_free_cached_info, ieee_new_section_hook,
diff --git a/bfd/ihex.c b/bfd/ihex.c
index fdc254d..2ccc707 100644
--- a/bfd/ihex.c
+++ b/bfd/ihex.c
@@ -918,13 +918,13 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
#define ihex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define ihex_new_section_hook _bfd_generic_new_section_hook
#define ihex_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
-#define ihex_get_symtab_upper_bound bfd_0l
-#define ihex_canonicalize_symtab ((long (*) (bfd *, asymbol **)) (long (*)) bfd_0l)
+#define ihex_get_symtab_upper_bound _bfd_long_bfd_0
+#define ihex_canonicalize_symtab _bfd_nosymbols_canonicalize_symtab
#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
#define ihex_print_symbol _bfd_nosymbols_print_symbol
#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
#define ihex_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
-#define ihex_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define ihex_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
#define ihex_get_lineno _bfd_nosymbols_get_lineno
#define ihex_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -979,16 +979,16 @@ const bfd_target ihex_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
ihex_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
ihex_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (ihex),
diff --git a/bfd/irix-core.c b/bfd/irix-core.c
index 0bd7975..06f6a42 100644
--- a/bfd/irix-core.c
+++ b/bfd/irix-core.c
@@ -307,12 +307,16 @@ const bfd_target core_irix_vec =
irix_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/libaout.h b/bfd/libaout.h
index d3a325c..c7d787d 100644
--- a/bfd/libaout.h
+++ b/bfd/libaout.h
@@ -617,8 +617,7 @@ extern bfd_boolean NAME (aout, bfd_free_cached_info)
#endif
#ifndef aout_32_bfd_is_target_special_symbol
-#define aout_32_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define aout_32_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#endif
#ifndef WRITE_HEADERS
diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
index 7ac0841..b4477fc 100644
--- a/bfd/libbfd-in.h
+++ b/bfd/libbfd-in.h
@@ -158,8 +158,7 @@ bfd_boolean _bfd_archive_64_bit_write_armap
_bfd_generic_get_elt_at_index
#define _bfd_archive_64_bit_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
-#define _bfd_archive_64_bit_update_armap_timestamp \
- bfd_true
+#define _bfd_archive_64_bit_update_armap_timestamp _bfd_bool_bfd_true
bfd_boolean _bfd_slurp_extended_name_table
(bfd *);
@@ -178,22 +177,44 @@ bfd * _bfd_new_bfd
bfd_boolean _bfd_free_cached_info
(bfd *);
-extern bfd_boolean bfd_false
+extern bfd_boolean _bfd_bool_bfd_false
(bfd *);
-extern bfd_boolean bfd_true
+extern bfd_boolean _bfd_bool_bfd_asymbol_false
+ (bfd *, asymbol *);
+extern bfd_boolean _bfd_bool_bfd_false_error
(bfd *);
-extern void * bfd_nullvoidptr
+extern bfd_boolean _bfd_bool_bfd_link_false_error
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_bool_bfd_true
(bfd *);
-extern int bfd_0
+extern bfd_boolean _bfd_bool_bfd_link_true
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_bool_bfd_bfd_true
+ (bfd *, bfd *);
+extern bfd_boolean _bfd_bool_bfd_uint_true
+ (bfd *, unsigned int);
+extern bfd_boolean _bfd_bool_bfd_asection_bfd_asection_true
+ (bfd *, asection *, bfd *, asection *);
+extern bfd_boolean _bfd_bool_bfd_asymbol_bfd_asymbol_true
+ (bfd *, asymbol *, bfd *, asymbol *);
+extern bfd_boolean _bfd_bool_bfd_ptr_true
+ (bfd *, void *);
+extern void *_bfd_ptr_bfd_null_error
+ (bfd *);
+extern int _bfd_int_bfd_0
(bfd *);
-extern unsigned int bfd_0u
+extern unsigned int _bfd_uint_bfd_0
(bfd *);
-extern long bfd_0l
+extern long _bfd_long_bfd_0
(bfd *);
-extern long _bfd_n1
+extern long _bfd_long_bfd_n1_error
(bfd *);
-extern void bfd_void
+extern void _bfd_void_bfd
(bfd *);
+extern void _bfd_void_bfd_link
+ (bfd *, struct bfd_link_info *);
+extern void _bfd_void_bfd_asection
+ (bfd *, asection *);
bfd *_bfd_new_bfd_contained_in
(bfd *);
@@ -246,7 +267,7 @@ int bfd_generic_stat_arch_elt
#define _bfd_generic_close_and_cleanup _bfd_archive_close_and_cleanup
extern bfd_boolean _bfd_archive_close_and_cleanup
(bfd *);
-#define _bfd_generic_bfd_free_cached_info bfd_true
+#define _bfd_generic_bfd_free_cached_info _bfd_bool_bfd_true
extern bfd_boolean _bfd_generic_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_generic_get_section_contents
@@ -257,20 +278,16 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
/* Generic routines to use for BFD_JUMP_TABLE_COPY. Use
BFD_JUMP_TABLE_COPY (_bfd_generic). */
-#define _bfd_generic_bfd_copy_private_bfd_data \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_true)
+#define _bfd_generic_bfd_copy_private_bfd_data _bfd_bool_bfd_bfd_true
#define _bfd_generic_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_set_private_flags \
- ((bfd_boolean (*) (bfd *, flagword)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_link_true
+#define _bfd_generic_bfd_set_private_flags _bfd_bool_bfd_uint_true
#define _bfd_generic_bfd_copy_private_section_data \
- ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_asection_bfd_asection_true
#define _bfd_generic_bfd_copy_private_symbol_data \
- ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_copy_private_header_data \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_print_private_bfd_data \
- ((bfd_boolean (*) (bfd *, void *)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_asymbol_bfd_asymbol_true
+#define _bfd_generic_bfd_copy_private_header_data _bfd_bool_bfd_bfd_true
+#define _bfd_generic_bfd_print_private_bfd_data _bfd_bool_bfd_ptr_true
extern bfd_boolean _bfd_generic_init_private_section_data
(bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
@@ -290,25 +307,24 @@ extern int _bfd_nocore_core_file_pid
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive
file support. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive). */
-#define _bfd_noarchive_slurp_armap bfd_false
-#define _bfd_noarchive_slurp_extended_name_table bfd_false
-#define _bfd_noarchive_construct_extended_name_table \
- ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_truncate_arname \
- ((void (*) (bfd *, const char *, char *)) (void (*)) bfd_void)
-#define _bfd_noarchive_write_armap \
- ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr
-#define _bfd_noarchive_write_ar_hdr \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_openr_next_archived_file \
- ((bfd * (*) (bfd *, bfd *)) (bfd * (*)) bfd_nullvoidptr)
-#define _bfd_noarchive_get_elt_at_index \
- ((bfd * (*) (bfd *, symindex)) (bfd * (*)) bfd_nullvoidptr)
+#define _bfd_noarchive_slurp_armap _bfd_bool_bfd_false_error
+#define _bfd_noarchive_slurp_extended_name_table _bfd_bool_bfd_false_error
+extern bfd_boolean _bfd_noarchive_construct_extended_name_table
+ (bfd *, char **, bfd_size_type *, const char **);
+extern void _bfd_noarchive_truncate_arname
+ (bfd *, const char *, char *);
+extern bfd_boolean _bfd_noarchive_write_armap
+ (bfd *, unsigned int, struct orl *, unsigned int, int);
+#define _bfd_noarchive_read_ar_hdr _bfd_ptr_bfd_null_error
+extern bfd_boolean _bfd_noarchive_write_ar_hdr
+ (bfd *, bfd *);
+extern bfd *
+_bfd_noarchive_openr_next_archived_file
+ (bfd *, bfd *);
+extern bfd * _bfd_noarchive_get_elt_at_index
+ (bfd *, symindex);
#define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define _bfd_noarchive_update_armap_timestamp bfd_false
+#define _bfd_noarchive_update_armap_timestamp _bfd_bool_bfd_false_error
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */
@@ -347,7 +363,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_archive_coff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_archive_coff_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
-#define _bfd_archive_coff_update_armap_timestamp bfd_true
+#define _bfd_archive_coff_update_armap_timestamp _bfd_bool_bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD4.4 style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd44). */
@@ -386,7 +402,7 @@ extern bfd_boolean _bfd_vms_lib_write_archive_contents (bfd *);
extern bfd *_bfd_vms_lib_openr_next_archived_file (bfd *, bfd *);
extern bfd *_bfd_vms_lib_get_elt_at_index (bfd *, symindex);
extern int _bfd_vms_lib_generic_stat_arch_elt (bfd *, struct stat *);
-#define _bfd_vms_lib_update_armap_timestamp bfd_true
+#define _bfd_vms_lib_update_armap_timestamp _bfd_bool_bfd_true
/* Extra routines for VMS style archives. */
@@ -400,43 +416,34 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *);
/* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
-#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
-#define _bfd_nosymbols_canonicalize_symtab \
- ((long (*) (bfd *, asymbol **)) (long (*)) _bfd_n1)
+#define _bfd_nosymbols_get_symtab_upper_bound _bfd_long_bfd_n1_error
+extern long _bfd_nosymbols_canonicalize_symtab
+ (bfd *, asymbol **);
#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
-#define _bfd_nosymbols_print_symbol \
- ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) (void (*)) bfd_void)
-#define _bfd_nosymbols_get_symbol_info \
- ((void (*) (bfd *, asymbol *, symbol_info *)) (void (*)) bfd_void)
-#define _bfd_nosymbols_get_symbol_version_string \
- ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) (const char * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_bfd_is_local_label_name \
- ((bfd_boolean (*) (bfd *, const char *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_get_lineno \
- ((alent *(*) (bfd *, asymbol *)) (alent * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_find_nearest_line \
- ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \
- const char **, const char **, unsigned int *, \
- unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_find_line \
- ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \
- const char **, unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_find_inliner_info \
- ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_bfd_make_debug_symbol \
- ((asymbol * (*) (bfd *, void *, unsigned long)) \
- (asymbol * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_read_minisymbols \
- ((long (*) (bfd *, bfd_boolean, void **, unsigned int *)) \
- (long (*)) _bfd_n1)
-#define _bfd_nosymbols_minisymbol_to_symbol \
- ((asymbol * (*) (bfd *, bfd_boolean, const void *, asymbol *)) \
- (asymbol * (*)) bfd_nullvoidptr)
+extern void _bfd_nosymbols_print_symbol
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
+extern void _bfd_nosymbols_get_symbol_info
+ (bfd *, asymbol *, symbol_info *);
+extern const char * _bfd_nosymbols_get_symbol_version_string
+ (bfd *, asymbol *, bfd_boolean *);
+extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name
+ (bfd *, const char *);
+#define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
+extern alent *_bfd_nosymbols_get_lineno
+ (bfd *, asymbol *);
+extern bfd_boolean _bfd_nosymbols_find_nearest_line
+ (bfd *, asymbol **, asection *, bfd_vma,
+ const char **, const char **, unsigned int *, unsigned int *);
+extern bfd_boolean _bfd_nosymbols_find_line
+ (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+extern bfd_boolean _bfd_nosymbols_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
+extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol
+ (bfd *, void *, unsigned long);
+extern long _bfd_nosymbols_read_minisymbols
+ (bfd *, bfd_boolean, void **, unsigned int *);
+extern asymbol *_bfd_nosymbols_minisymbol_to_symbol
+ (bfd *, bfd_boolean, const void *, asymbol *);
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
@@ -446,22 +453,18 @@ extern long _bfd_norelocs_canonicalize_reloc (bfd *, asection *,
arelent **, asymbol **);
extern void _bfd_norelocs_set_reloc (bfd *, asection *,
arelent **, unsigned int);
-#define _bfd_norelocs_bfd_reloc_type_lookup \
- ((reloc_howto_type * (*) (bfd *, bfd_reloc_code_real_type)) \
- (reloc_howto_type * (*)) bfd_nullvoidptr)
-#define _bfd_norelocs_bfd_reloc_name_lookup \
- ((reloc_howto_type * (*) (bfd *, const char *)) \
- (reloc_howto_type * (*)) bfd_nullvoidptr)
+extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
+ (bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type *_bfd_norelocs_bfd_reloc_name_lookup
+ (bfd *, const char *);
/* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */
-#define _bfd_nowrite_set_arch_mach \
- ((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nowrite_set_section_contents \
- ((bfd_boolean (*) (bfd *, asection *, const void *, file_ptr, bfd_size_type)) \
- (bfd_boolean (*)) bfd_false)
+extern bfd_boolean _bfd_nowrite_set_arch_mach
+ (bfd *, enum bfd_architecture, unsigned long);
+extern bfd_boolean _bfd_nowrite_set_section_contents
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
/* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use
BFD_JUMP_TABLE_WRITE (_bfd_generic). */
@@ -473,61 +476,37 @@ extern bfd_boolean _bfd_generic_set_section_contents
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers \
- ((int (*) (bfd *, struct bfd_link_info *)) (int (*)) bfd_0)
-#define _bfd_nolink_bfd_get_relocated_section_contents \
- ((bfd_byte * (*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
- bfd_byte *, bfd_boolean, asymbol **)) \
- (bfd_byte * (*)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_relax_section \
- ((bfd_boolean (*) \
- (bfd *, asection *, struct bfd_link_info *, bfd_boolean *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_gc_sections \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_lookup_section_flags \
- ((bfd_boolean (*) (struct bfd_link_info *, struct flag_info *, asection *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_merge_sections \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_is_group_section \
- ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_discard_group \
- ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_hash_table_create \
- ((struct bfd_link_hash_table * (*) (bfd *)) \
- (struct bfd_link_hash_table * (*)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_link_add_symbols \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_just_syms \
- ((void (*) (asection *, struct bfd_link_info *)) \
- (void (*)) bfd_void)
-#define _bfd_nolink_bfd_copy_link_hash_symbol_type \
- ((void (*) (bfd *, struct bfd_link_hash_entry *, \
- struct bfd_link_hash_entry *)) \
- (void (*)) bfd_void)
-#define _bfd_nolink_bfd_final_link \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_split_section \
- ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_section_already_linked \
- ((bfd_boolean (*) (bfd *, asection *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_define_common_symbol \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \
- struct bfd_link_hash_entry *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_define_start_stop \
- ((struct bfd_link_hash_entry * (*) (struct bfd_link_info *, \
- const char *, asection *)) \
- (struct bfd_link_hash_entry * (*)) bfd_nullvoidptr)
+extern int _bfd_nolink_sizeof_headers
+ (bfd *, struct bfd_link_info *);
+extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
+extern bfd_boolean _bfd_nolink_bfd_relax_section
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
+#define _bfd_nolink_bfd_gc_sections _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_lookup_section_flags
+ (struct bfd_link_info *, struct flag_info *, asection *);
+#define _bfd_nolink_bfd_merge_sections _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_is_group_section
+ (bfd *, const asection *);
+extern bfd_boolean _bfd_nolink_bfd_discard_group
+ (bfd *, asection *);
+extern struct bfd_link_hash_table *_bfd_nolink_bfd_link_hash_table_create
+ (bfd *);
+#define _bfd_nolink_bfd_link_add_symbols _bfd_bool_bfd_link_false_error
+extern void _bfd_nolink_bfd_link_just_syms
+ (asection *, struct bfd_link_info *);
+extern void _bfd_nolink_bfd_copy_link_hash_symbol_type
+ (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
+#define _bfd_nolink_bfd_final_link _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_link_split_section
+ (bfd *, struct bfd_section *);
+extern bfd_boolean _bfd_nolink_section_already_linked
+ (bfd *, asection *, struct bfd_link_info *);
+extern bfd_boolean _bfd_nolink_bfd_define_common_symbol
+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
+extern struct bfd_link_hash_entry *_bfd_nolink_bfd_define_start_stop
+ (struct bfd_link_info *, const char *, asection *);
#define _bfd_nolink_bfd_link_check_relocs \
_bfd_generic_link_check_relocs
@@ -535,15 +514,14 @@ extern bfd_boolean _bfd_generic_set_section_contents
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
(_bfd_nodynamic). */
-#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
+#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_long_bfd_n1_error
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
- ((long (*) (bfd *, asymbol **)) (long (*)) _bfd_n1)
-#define _bfd_nodynamic_get_synthetic_symtab \
- ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) \
- (long (*)) _bfd_n1)
-#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
-#define _bfd_nodynamic_canonicalize_dynamic_reloc \
- ((long (*) (bfd *, arelent **, asymbol **)) (long (*)) _bfd_n1)
+ _bfd_nosymbols_canonicalize_symtab
+extern long _bfd_nodynamic_get_synthetic_symtab
+ (bfd *, long, asymbol **, long, asymbol **, asymbol **);
+#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_long_bfd_n1_error
+extern long _bfd_nodynamic_canonicalize_dynamic_reloc
+ (bfd *, arelent **, asymbol **);
/* Generic routine to determine of the given symbol is a local
label. */
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 638989d..24da441 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -40,21 +40,87 @@ DESCRIPTION
completeness.
*/
+bfd_boolean
+_bfd_bool_bfd_false (bfd *abfd ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_asymbol_false (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *sym ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
/* A routine which is used in target vectors for unsupported
operations. */
bfd_boolean
-bfd_false (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_bool_bfd_false_error (bfd *ignore ATTRIBUTE_UNUSED)
{
bfd_set_error (bfd_error_invalid_operation);
return FALSE;
}
+bfd_boolean
+_bfd_bool_bfd_link_false_error (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
/* A routine which is used in target vectors for supported operations
which do not actually do anything. */
bfd_boolean
-bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_bool_bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_link_true (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_bfd_true (bfd *ibfd ATTRIBUTE_UNUSED,
+ bfd *obfd ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_uint_true (bfd *abfd ATTRIBUTE_UNUSED,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_asection_bfd_asection_true (bfd *ibfd ATTRIBUTE_UNUSED,
+ asection *isec ATTRIBUTE_UNUSED,
+ bfd *obfd ATTRIBUTE_UNUSED,
+ asection *osec ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_asymbol_bfd_asymbol_true (bfd *ibfd ATTRIBUTE_UNUSED,
+ asymbol *isym ATTRIBUTE_UNUSED,
+ bfd *obfd ATTRIBUTE_UNUSED,
+ asymbol *osym ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+bfd_boolean
+_bfd_bool_bfd_ptr_true (bfd *abfd ATTRIBUTE_UNUSED,
+ void *ptr ATTRIBUTE_UNUSED)
{
return TRUE;
}
@@ -63,42 +129,54 @@ bfd_true (bfd *ignore ATTRIBUTE_UNUSED)
operations which return a pointer value. */
void *
-bfd_nullvoidptr (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_ptr_bfd_null_error (bfd *ignore ATTRIBUTE_UNUSED)
{
bfd_set_error (bfd_error_invalid_operation);
return NULL;
}
int
-bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_int_bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
{
return 0;
}
unsigned int
-bfd_0u (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_uint_bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
{
return 0;
}
long
-bfd_0l (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_long_bfd_0 (bfd *ignore ATTRIBUTE_UNUSED)
{
- return 0l;
+ return 0;
}
/* A routine which is used in target vectors for unsupported
operations which return -1 on error. */
long
-_bfd_n1 (bfd *ignore_abfd ATTRIBUTE_UNUSED)
+_bfd_long_bfd_n1_error (bfd *ignore_abfd ATTRIBUTE_UNUSED)
{
bfd_set_error (bfd_error_invalid_operation);
return -1;
}
void
-bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
+_bfd_void_bfd (bfd *ignore ATTRIBUTE_UNUSED)
+{
+}
+
+void
+_bfd_void_bfd_link (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+}
+
+void
+_bfd_void_bfd_asection (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED)
{
}
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 9ee40bd..5cc00d3 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -163,8 +163,7 @@ bfd_boolean _bfd_archive_64_bit_write_armap
_bfd_generic_get_elt_at_index
#define _bfd_archive_64_bit_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
-#define _bfd_archive_64_bit_update_armap_timestamp \
- bfd_true
+#define _bfd_archive_64_bit_update_armap_timestamp _bfd_bool_bfd_true
bfd_boolean _bfd_slurp_extended_name_table
(bfd *);
@@ -183,22 +182,44 @@ bfd * _bfd_new_bfd
bfd_boolean _bfd_free_cached_info
(bfd *);
-extern bfd_boolean bfd_false
+extern bfd_boolean _bfd_bool_bfd_false
(bfd *);
-extern bfd_boolean bfd_true
+extern bfd_boolean _bfd_bool_bfd_asymbol_false
+ (bfd *, asymbol *);
+extern bfd_boolean _bfd_bool_bfd_false_error
(bfd *);
-extern void * bfd_nullvoidptr
+extern bfd_boolean _bfd_bool_bfd_link_false_error
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_bool_bfd_true
(bfd *);
-extern int bfd_0
+extern bfd_boolean _bfd_bool_bfd_link_true
+ (bfd *, struct bfd_link_info *);
+extern bfd_boolean _bfd_bool_bfd_bfd_true
+ (bfd *, bfd *);
+extern bfd_boolean _bfd_bool_bfd_uint_true
+ (bfd *, unsigned int);
+extern bfd_boolean _bfd_bool_bfd_asection_bfd_asection_true
+ (bfd *, asection *, bfd *, asection *);
+extern bfd_boolean _bfd_bool_bfd_asymbol_bfd_asymbol_true
+ (bfd *, asymbol *, bfd *, asymbol *);
+extern bfd_boolean _bfd_bool_bfd_ptr_true
+ (bfd *, void *);
+extern void *_bfd_ptr_bfd_null_error
+ (bfd *);
+extern int _bfd_int_bfd_0
(bfd *);
-extern unsigned int bfd_0u
+extern unsigned int _bfd_uint_bfd_0
(bfd *);
-extern long bfd_0l
+extern long _bfd_long_bfd_0
(bfd *);
-extern long _bfd_n1
+extern long _bfd_long_bfd_n1_error
(bfd *);
-extern void bfd_void
+extern void _bfd_void_bfd
(bfd *);
+extern void _bfd_void_bfd_link
+ (bfd *, struct bfd_link_info *);
+extern void _bfd_void_bfd_asection
+ (bfd *, asection *);
bfd *_bfd_new_bfd_contained_in
(bfd *);
@@ -251,7 +272,7 @@ int bfd_generic_stat_arch_elt
#define _bfd_generic_close_and_cleanup _bfd_archive_close_and_cleanup
extern bfd_boolean _bfd_archive_close_and_cleanup
(bfd *);
-#define _bfd_generic_bfd_free_cached_info bfd_true
+#define _bfd_generic_bfd_free_cached_info _bfd_bool_bfd_true
extern bfd_boolean _bfd_generic_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_generic_get_section_contents
@@ -262,20 +283,16 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window
/* Generic routines to use for BFD_JUMP_TABLE_COPY. Use
BFD_JUMP_TABLE_COPY (_bfd_generic). */
-#define _bfd_generic_bfd_copy_private_bfd_data \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_true)
+#define _bfd_generic_bfd_copy_private_bfd_data _bfd_bool_bfd_bfd_true
#define _bfd_generic_bfd_merge_private_bfd_data \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_set_private_flags \
- ((bfd_boolean (*) (bfd *, flagword)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_link_true
+#define _bfd_generic_bfd_set_private_flags _bfd_bool_bfd_uint_true
#define _bfd_generic_bfd_copy_private_section_data \
- ((bfd_boolean (*) (bfd *, asection *, bfd *, asection *)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_asection_bfd_asection_true
#define _bfd_generic_bfd_copy_private_symbol_data \
- ((bfd_boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_copy_private_header_data \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_true)
-#define _bfd_generic_bfd_print_private_bfd_data \
- ((bfd_boolean (*) (bfd *, void *)) (bfd_boolean (*)) bfd_true)
+ _bfd_bool_bfd_asymbol_bfd_asymbol_true
+#define _bfd_generic_bfd_copy_private_header_data _bfd_bool_bfd_bfd_true
+#define _bfd_generic_bfd_print_private_bfd_data _bfd_bool_bfd_ptr_true
extern bfd_boolean _bfd_generic_init_private_section_data
(bfd *, asection *, bfd *, asection *, struct bfd_link_info *);
@@ -295,25 +312,24 @@ extern int _bfd_nocore_core_file_pid
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive
file support. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive). */
-#define _bfd_noarchive_slurp_armap bfd_false
-#define _bfd_noarchive_slurp_extended_name_table bfd_false
-#define _bfd_noarchive_construct_extended_name_table \
- ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_truncate_arname \
- ((void (*) (bfd *, const char *, char *)) (void (*)) bfd_void)
-#define _bfd_noarchive_write_armap \
- ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr
-#define _bfd_noarchive_write_ar_hdr \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_noarchive_openr_next_archived_file \
- ((bfd * (*) (bfd *, bfd *)) (bfd * (*)) bfd_nullvoidptr)
-#define _bfd_noarchive_get_elt_at_index \
- ((bfd * (*) (bfd *, symindex)) (bfd * (*)) bfd_nullvoidptr)
+#define _bfd_noarchive_slurp_armap _bfd_bool_bfd_false_error
+#define _bfd_noarchive_slurp_extended_name_table _bfd_bool_bfd_false_error
+extern bfd_boolean _bfd_noarchive_construct_extended_name_table
+ (bfd *, char **, bfd_size_type *, const char **);
+extern void _bfd_noarchive_truncate_arname
+ (bfd *, const char *, char *);
+extern bfd_boolean _bfd_noarchive_write_armap
+ (bfd *, unsigned int, struct orl *, unsigned int, int);
+#define _bfd_noarchive_read_ar_hdr _bfd_ptr_bfd_null_error
+extern bfd_boolean _bfd_noarchive_write_ar_hdr
+ (bfd *, bfd *);
+extern bfd *
+_bfd_noarchive_openr_next_archived_file
+ (bfd *, bfd *);
+extern bfd * _bfd_noarchive_get_elt_at_index
+ (bfd *, symindex);
#define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define _bfd_noarchive_update_armap_timestamp bfd_false
+#define _bfd_noarchive_update_armap_timestamp _bfd_bool_bfd_false_error
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */
@@ -352,7 +368,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_archive_coff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_archive_coff_generic_stat_arch_elt \
bfd_generic_stat_arch_elt
-#define _bfd_archive_coff_update_armap_timestamp bfd_true
+#define _bfd_archive_coff_update_armap_timestamp _bfd_bool_bfd_true
/* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD4.4 style
archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd44). */
@@ -391,7 +407,7 @@ extern bfd_boolean _bfd_vms_lib_write_archive_contents (bfd *);
extern bfd *_bfd_vms_lib_openr_next_archived_file (bfd *, bfd *);
extern bfd *_bfd_vms_lib_get_elt_at_index (bfd *, symindex);
extern int _bfd_vms_lib_generic_stat_arch_elt (bfd *, struct stat *);
-#define _bfd_vms_lib_update_armap_timestamp bfd_true
+#define _bfd_vms_lib_update_armap_timestamp _bfd_bool_bfd_true
/* Extra routines for VMS style archives. */
@@ -405,43 +421,34 @@ extern bfd_boolean _bfd_vms_lib_ia64_mkarchive (bfd *);
/* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol
support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */
-#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
-#define _bfd_nosymbols_canonicalize_symtab \
- ((long (*) (bfd *, asymbol **)) (long (*)) _bfd_n1)
+#define _bfd_nosymbols_get_symtab_upper_bound _bfd_long_bfd_n1_error
+extern long _bfd_nosymbols_canonicalize_symtab
+ (bfd *, asymbol **);
#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
-#define _bfd_nosymbols_print_symbol \
- ((void (*) (bfd *, void *, asymbol *, bfd_print_symbol_type)) (void (*)) bfd_void)
-#define _bfd_nosymbols_get_symbol_info \
- ((void (*) (bfd *, asymbol *, symbol_info *)) (void (*)) bfd_void)
-#define _bfd_nosymbols_get_symbol_version_string \
- ((const char *(*) (bfd *, asymbol *, bfd_boolean *)) (const char * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_bfd_is_local_label_name \
- ((bfd_boolean (*) (bfd *, const char *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_get_lineno \
- ((alent *(*) (bfd *, asymbol *)) (alent * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_find_nearest_line \
- ((bfd_boolean (*) (bfd *, asymbol **, asection *, bfd_vma, \
- const char **, const char **, unsigned int *, \
- unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_find_line \
- ((bfd_boolean (*) (bfd *, asymbol **, asymbol *, \
- const char **, unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_find_inliner_info \
- ((bfd_boolean (*) (bfd *, const char **, const char **, unsigned int *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nosymbols_bfd_make_debug_symbol \
- ((asymbol * (*) (bfd *, void *, unsigned long)) \
- (asymbol * (*)) bfd_nullvoidptr)
-#define _bfd_nosymbols_read_minisymbols \
- ((long (*) (bfd *, bfd_boolean, void **, unsigned int *)) \
- (long (*)) _bfd_n1)
-#define _bfd_nosymbols_minisymbol_to_symbol \
- ((asymbol * (*) (bfd *, bfd_boolean, const void *, asymbol *)) \
- (asymbol * (*)) bfd_nullvoidptr)
+extern void _bfd_nosymbols_print_symbol
+ (bfd *, void *, asymbol *, bfd_print_symbol_type);
+extern void _bfd_nosymbols_get_symbol_info
+ (bfd *, asymbol *, symbol_info *);
+extern const char * _bfd_nosymbols_get_symbol_version_string
+ (bfd *, asymbol *, bfd_boolean *);
+extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name
+ (bfd *, const char *);
+#define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
+extern alent *_bfd_nosymbols_get_lineno
+ (bfd *, asymbol *);
+extern bfd_boolean _bfd_nosymbols_find_nearest_line
+ (bfd *, asymbol **, asection *, bfd_vma,
+ const char **, const char **, unsigned int *, unsigned int *);
+extern bfd_boolean _bfd_nosymbols_find_line
+ (bfd *, asymbol **, asymbol *, const char **, unsigned int *);
+extern bfd_boolean _bfd_nosymbols_find_inliner_info
+ (bfd *, const char **, const char **, unsigned int *);
+extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol
+ (bfd *, void *, unsigned long);
+extern long _bfd_nosymbols_read_minisymbols
+ (bfd *, bfd_boolean, void **, unsigned int *);
+extern asymbol *_bfd_nosymbols_minisymbol_to_symbol
+ (bfd *, bfd_boolean, const void *, asymbol *);
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
@@ -451,22 +458,18 @@ extern long _bfd_norelocs_canonicalize_reloc (bfd *, asection *,
arelent **, asymbol **);
extern void _bfd_norelocs_set_reloc (bfd *, asection *,
arelent **, unsigned int);
-#define _bfd_norelocs_bfd_reloc_type_lookup \
- ((reloc_howto_type * (*) (bfd *, bfd_reloc_code_real_type)) \
- (reloc_howto_type * (*)) bfd_nullvoidptr)
-#define _bfd_norelocs_bfd_reloc_name_lookup \
- ((reloc_howto_type * (*) (bfd *, const char *)) \
- (reloc_howto_type * (*)) bfd_nullvoidptr)
+extern reloc_howto_type *_bfd_norelocs_bfd_reloc_type_lookup
+ (bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type *_bfd_norelocs_bfd_reloc_name_lookup
+ (bfd *, const char *);
/* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */
-#define _bfd_nowrite_set_arch_mach \
- ((bfd_boolean (*) (bfd *, enum bfd_architecture, unsigned long)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nowrite_set_section_contents \
- ((bfd_boolean (*) (bfd *, asection *, const void *, file_ptr, bfd_size_type)) \
- (bfd_boolean (*)) bfd_false)
+extern bfd_boolean _bfd_nowrite_set_arch_mach
+ (bfd *, enum bfd_architecture, unsigned long);
+extern bfd_boolean _bfd_nowrite_set_section_contents
+ (bfd *, asection *, const void *, file_ptr, bfd_size_type);
/* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use
BFD_JUMP_TABLE_WRITE (_bfd_generic). */
@@ -478,61 +481,37 @@ extern bfd_boolean _bfd_generic_set_section_contents
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers \
- ((int (*) (bfd *, struct bfd_link_info *)) (int (*)) bfd_0)
-#define _bfd_nolink_bfd_get_relocated_section_contents \
- ((bfd_byte * (*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
- bfd_byte *, bfd_boolean, asymbol **)) \
- (bfd_byte * (*)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_relax_section \
- ((bfd_boolean (*) \
- (bfd *, asection *, struct bfd_link_info *, bfd_boolean *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_gc_sections \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_lookup_section_flags \
- ((bfd_boolean (*) (struct bfd_link_info *, struct flag_info *, asection *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_merge_sections \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_is_group_section \
- ((bfd_boolean (*) (bfd *, const struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_discard_group \
- ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_hash_table_create \
- ((struct bfd_link_hash_table * (*) (bfd *)) \
- (struct bfd_link_hash_table * (*)) bfd_nullvoidptr)
-#define _bfd_nolink_bfd_link_add_symbols \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_just_syms \
- ((void (*) (asection *, struct bfd_link_info *)) \
- (void (*)) bfd_void)
-#define _bfd_nolink_bfd_copy_link_hash_symbol_type \
- ((void (*) (bfd *, struct bfd_link_hash_entry *, \
- struct bfd_link_hash_entry *)) \
- (void (*)) bfd_void)
-#define _bfd_nolink_bfd_final_link \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_link_split_section \
- ((bfd_boolean (*) (bfd *, struct bfd_section *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_section_already_linked \
- ((bfd_boolean (*) (bfd *, asection *, struct bfd_link_info *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_define_common_symbol \
- ((bfd_boolean (*) (bfd *, struct bfd_link_info *, \
- struct bfd_link_hash_entry *)) \
- (bfd_boolean (*)) bfd_false)
-#define _bfd_nolink_bfd_define_start_stop \
- ((struct bfd_link_hash_entry * (*) (struct bfd_link_info *, \
- const char *, asection *)) \
- (struct bfd_link_hash_entry * (*)) bfd_nullvoidptr)
+extern int _bfd_nolink_sizeof_headers
+ (bfd *, struct bfd_link_info *);
+extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents
+ (bfd *, struct bfd_link_info *, struct bfd_link_order *,
+ bfd_byte *, bfd_boolean, asymbol **);
+extern bfd_boolean _bfd_nolink_bfd_relax_section
+ (bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
+#define _bfd_nolink_bfd_gc_sections _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_lookup_section_flags
+ (struct bfd_link_info *, struct flag_info *, asection *);
+#define _bfd_nolink_bfd_merge_sections _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_is_group_section
+ (bfd *, const asection *);
+extern bfd_boolean _bfd_nolink_bfd_discard_group
+ (bfd *, asection *);
+extern struct bfd_link_hash_table *_bfd_nolink_bfd_link_hash_table_create
+ (bfd *);
+#define _bfd_nolink_bfd_link_add_symbols _bfd_bool_bfd_link_false_error
+extern void _bfd_nolink_bfd_link_just_syms
+ (asection *, struct bfd_link_info *);
+extern void _bfd_nolink_bfd_copy_link_hash_symbol_type
+ (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
+#define _bfd_nolink_bfd_final_link _bfd_bool_bfd_link_false_error
+extern bfd_boolean _bfd_nolink_bfd_link_split_section
+ (bfd *, struct bfd_section *);
+extern bfd_boolean _bfd_nolink_section_already_linked
+ (bfd *, asection *, struct bfd_link_info *);
+extern bfd_boolean _bfd_nolink_bfd_define_common_symbol
+ (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *);
+extern struct bfd_link_hash_entry *_bfd_nolink_bfd_define_start_stop
+ (struct bfd_link_info *, const char *, asection *);
#define _bfd_nolink_bfd_link_check_relocs \
_bfd_generic_link_check_relocs
@@ -540,15 +519,14 @@ extern bfd_boolean _bfd_generic_set_section_contents
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
(_bfd_nodynamic). */
-#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1
+#define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_long_bfd_n1_error
#define _bfd_nodynamic_canonicalize_dynamic_symtab \
- ((long (*) (bfd *, asymbol **)) (long (*)) _bfd_n1)
-#define _bfd_nodynamic_get_synthetic_symtab \
- ((long (*) (bfd *, long, asymbol **, long, asymbol **, asymbol **)) \
- (long (*)) _bfd_n1)
-#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1
-#define _bfd_nodynamic_canonicalize_dynamic_reloc \
- ((long (*) (bfd *, arelent **, asymbol **)) (long (*)) _bfd_n1)
+ _bfd_nosymbols_canonicalize_symtab
+extern long _bfd_nodynamic_get_synthetic_symtab
+ (bfd *, long, asymbol **, long, asymbol **, asymbol **);
+#define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_long_bfd_n1_error
+extern long _bfd_nodynamic_canonicalize_dynamic_reloc
+ (bfd *, arelent **, asymbol **);
/* Generic routine to determine of the given symbol is a local
label. */
diff --git a/bfd/libecoff.h b/bfd/libecoff.h
index e3890c5..0de4e96 100644
--- a/bfd/libecoff.h
+++ b/bfd/libecoff.h
@@ -275,9 +275,8 @@ extern bfd_boolean _bfd_ecoff_write_armap
bfd_generic_openr_next_archived_file
#define _bfd_ecoff_get_elt_at_index _bfd_generic_get_elt_at_index
#define _bfd_ecoff_generic_stat_arch_elt bfd_generic_stat_arch_elt
-#define _bfd_ecoff_update_armap_timestamp bfd_true
-#define _bfd_ecoff_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define _bfd_ecoff_update_armap_timestamp _bfd_bool_bfd_true
+#define _bfd_ecoff_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
extern long _bfd_ecoff_get_symtab_upper_bound (bfd *);
extern long _bfd_ecoff_canonicalize_symtab (bfd *, asymbol **);
@@ -326,8 +325,8 @@ extern bfd_boolean _bfd_ecoff_bfd_final_link
/* Hook functions for the generic COFF section reading code. */
extern void * _bfd_ecoff_mkobject_hook (bfd *, void *, void *);
-#define _bfd_ecoff_set_alignment_hook \
- ((void (*) (bfd *, asection *, void *)) (void (*)) bfd_void)
+extern void _bfd_ecoff_set_alignment_hook
+ (bfd *, asection *, void *);
extern bfd_boolean _bfd_ecoff_set_arch_mach_hook
(bfd *, void *);
extern bfd_boolean _bfd_ecoff_no_long_sections
diff --git a/bfd/linker.c b/bfd/linker.c
index dac21bd..21e0c93 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -3370,3 +3370,104 @@ _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info)
return TRUE;
}
+
+int
+_bfd_nolink_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+bfd_boolean
+_bfd_nolink_bfd_relax_section (bfd *abfd,
+ asection *section ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ bfd_boolean *again ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_byte *
+_bfd_nolink_bfd_get_relocated_section_contents
+ (bfd *abfd,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ struct bfd_link_order *link_order ATTRIBUTE_UNUSED,
+ bfd_byte *data ATTRIBUTE_UNUSED,
+ bfd_boolean relocatable ATTRIBUTE_UNUSED,
+ asymbol **symbols ATTRIBUTE_UNUSED)
+{
+ return (bfd_byte *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+bfd_boolean
+_bfd_nolink_bfd_lookup_section_flags
+ (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct flag_info *flaginfo ATTRIBUTE_UNUSED,
+ asection *section)
+{
+ return _bfd_bool_bfd_false_error (section->owner);
+}
+
+bfd_boolean
+_bfd_nolink_bfd_is_group_section (bfd *abfd,
+ const asection *sec ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_boolean
+_bfd_nolink_bfd_discard_group (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+struct bfd_link_hash_table *
+_bfd_nolink_bfd_link_hash_table_create (bfd *abfd)
+{
+ return (struct bfd_link_hash_table *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+void
+_bfd_nolink_bfd_link_just_syms (asection *sec ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+}
+
+void
+_bfd_nolink_bfd_copy_link_hash_symbol_type
+ (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *from ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *to ATTRIBUTE_UNUSED)
+{
+}
+
+bfd_boolean
+_bfd_nolink_bfd_link_split_section (bfd *abfd, asection *sec ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_boolean
+_bfd_nolink_section_already_linked (bfd *abfd,
+ asection *sec ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_boolean
+_bfd_nolink_bfd_define_common_symbol
+ (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+struct bfd_link_hash_entry *
+_bfd_nolink_bfd_define_start_stop (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ asection *sec)
+{
+ return (struct bfd_link_hash_entry *) _bfd_ptr_bfd_null_error (sec->owner);
+}
diff --git a/bfd/mach-o-target.c b/bfd/mach-o-target.c
index 59d8521..8859b23 100644
--- a/bfd/mach-o-target.c
+++ b/bfd/mach-o-target.c
@@ -27,7 +27,7 @@
#define bfd_mach_o_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define bfd_mach_o_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
#define bfd_mach_o_bfd_print_private_bfd_data _bfd_generic_bfd_print_private_bfd_data
-#define bfd_mach_o_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define bfd_mach_o_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define bfd_mach_o_bfd_is_local_label_name bfd_generic_is_local_label_name
#define bfd_mach_o_get_lineno _bfd_nosymbols_get_lineno
#define bfd_mach_o_find_inliner_info _bfd_nosymbols_find_inliner_info
@@ -165,13 +165,13 @@ const bfd_target TARGET_NAME =
#endif
},
{ /* bfd_set_format. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
bfd_mach_o_mkobject,
_bfd_generic_mkarchive,
bfd_mach_o_mkobject,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
bfd_mach_o_write_contents,
_bfd_write_archive_contents,
bfd_mach_o_write_contents,
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index a6299d0..734e610 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -5901,7 +5901,7 @@ bfd_boolean bfd_mach_o_free_cached_info (bfd *abfd)
/* Not yet handled: creating an archive. */
#define bfd_mach_o_mkarchive _bfd_noarchive_mkarchive
-#define bfd_mach_o_close_and_cleanup bfd_true
+#define bfd_mach_o_close_and_cleanup _bfd_bool_bfd_true
/* Not used. */
#define bfd_mach_o_generic_stat_arch_elt bfd_mach_o_fat_stat_arch_elt
diff --git a/bfd/mipsbsd.c b/bfd/mipsbsd.c
index 6598eb3..1dc287a 100644
--- a/bfd/mipsbsd.c
+++ b/bfd/mipsbsd.c
@@ -401,17 +401,17 @@ static const struct aout_backend_data MY(backend_data) =
extern const bfd_target mips_aout_be_vec;
const bfd_target mips_aout_le_vec =
-{
- "a.out-mips-little", /* name */
+ {
+ "a.out-mips-little", /* name */
bfd_target_aout_flavour,
BFD_ENDIAN_LITTLE, /* target byte order (little) */
BFD_ENDIAN_LITTLE, /* target headers byte order (little) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
MY_symbol_leading_char,
- ' ', /* ar_pad_char */
+ ' ', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
@@ -420,12 +420,25 @@ const bfd_target mips_aout_le_vec =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
@@ -437,7 +450,7 @@ const bfd_target mips_aout_le_vec =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & mips_aout_be_vec,
+ &mips_aout_be_vec,
MY_backend_data
};
@@ -448,12 +461,12 @@ const bfd_target mips_aout_be_vec =
bfd_target_aout_flavour,
BFD_ENDIAN_BIG, /* target byte order (big) */
BFD_ENDIAN_BIG, /* target headers byte order (big) */
- (HAS_RELOC | EXEC_P | /* object flags */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* object flags */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_CODE | SEC_DATA),
MY_symbol_leading_char,
- ' ', /* ar_pad_char */
+ ' ', /* ar_pad_char */
15, /* ar_max_namelen */
0, /* match priority. */
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
@@ -462,12 +475,25 @@ const bfd_target mips_aout_be_vec =
bfd_getb64, bfd_getb_signed_64, bfd_putb64,
bfd_getb32, bfd_getb_signed_32, bfd_putb32,
bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (MY),
BFD_JUMP_TABLE_COPY (MY),
@@ -479,7 +505,7 @@ const bfd_target mips_aout_be_vec =
BFD_JUMP_TABLE_LINK (MY),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
- & mips_aout_le_vec,
+ &mips_aout_le_vec,
MY_backend_data
};
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 94276cb..4446a55 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -3275,8 +3275,7 @@ mmo_write_object_contents (bfd *abfd)
/* Perhaps we need to adjust this one; mmo labels (originally) without a
leading ':' might more appropriately be called local. */
#define mmo_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define mmo_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define mmo_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define mmo_get_symbol_version_string \
_bfd_nosymbols_get_symbol_version_string
@@ -3364,16 +3363,16 @@ const bfd_target mmix_mmo_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
mmo_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents */
- bfd_false,
+ _bfd_bool_bfd_false_error,
mmo_write_object_contents,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (mmo),
diff --git a/bfd/netbsd-core.c b/bfd/netbsd-core.c
index 7fdb5b6..da8a14c 100644
--- a/bfd/netbsd-core.c
+++ b/bfd/netbsd-core.c
@@ -294,12 +294,16 @@ const bfd_target core_netbsd_vec =
netbsd_core_file_p /* A core file. */
},
{ /* bfd_set_format. */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents. */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/nlm-target.h b/bfd/nlm-target.h
index ed021b9..a299843 100644
--- a/bfd/nlm-target.h
+++ b/bfd/nlm-target.h
@@ -27,7 +27,7 @@
#define nlm_get_symbol_info nlmNAME (get_symbol_info)
#define nlm_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define nlm_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define nlm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define nlm_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define nlm_get_lineno _bfd_nosymbols_get_lineno
#define nlm_find_nearest_line _bfd_nosymbols_find_nearest_line
#define nlm_find_line _bfd_nosymbols_find_line
@@ -133,17 +133,17 @@ const bfd_target TARGET_BIG_SYM =
},
/* bfd_set_format: set the format of a file being written. */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
nlm_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* bfd_write_contents: write cached information into a file being written. */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
nlmNAME (write_object_contents),
_bfd_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* Initialize a jump table with the standard macro.
@@ -227,17 +227,17 @@ const bfd_target TARGET_LITTLE_SYM =
},
/* bfd_set_format: set the format of a file being written. */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
nlm_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* bfd_write_contents: write cached information into a file being written. */
- { bfd_false,
+ { _bfd_bool_bfd_false_error,
nlmNAME(write_object_contents),
_bfd_write_archive_contents,
- bfd_false
+ _bfd_bool_bfd_false_error
},
/* Initialize a jump table with the standard macro.
diff --git a/bfd/oasys.c b/bfd/oasys.c
index 04faf45..66cf8ef 100644
--- a/bfd/oasys.c
+++ b/bfd/oasys.c
@@ -1157,21 +1157,18 @@ oasys_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
#define oasys_close_and_cleanup _bfd_generic_close_and_cleanup
#define oasys_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
-#define oasys_slurp_armap bfd_true
-#define oasys_slurp_extended_name_table bfd_true
-#define oasys_construct_extended_name_table \
- ((bfd_boolean (*) (bfd *, char **, bfd_size_type *, const char **)) (bfd_boolean (*)) bfd_true)
+#define oasys_slurp_armap _bfd_bool_bfd_true
+#define oasys_slurp_extended_name_table _bfd_bool_bfd_true
+#define oasys_construct_extended_name_table \
+ _bfd_noarchive_construct_extended_name_table
#define oasys_truncate_arname bfd_dont_truncate_arname
-#define oasys_write_armap \
- ((bfd_boolean (*) (bfd *, unsigned int, struct orl *, unsigned int, int)) (bfd_boolean (*)) bfd_true)
-#define oasys_read_ar_hdr bfd_nullvoidptr
-#define oasys_write_ar_hdr \
- ((bfd_boolean (*) (bfd *, bfd *)) (bfd_boolean (*)) bfd_false)
+#define oasys_write_armap _bfd_noarchive_write_armap
+#define oasys_read_ar_hdr _bfd_ptr_bfd_null_error
+#define oasys_write_ar_hdr _bfd_noarchive_write_ar_hdr
#define oasys_get_elt_at_index _bfd_generic_get_elt_at_index
-#define oasys_update_armap_timestamp bfd_true
+#define oasys_update_armap_timestamp _bfd_bool_bfd_true
#define oasys_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define oasys_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define oasys_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define oasys_get_lineno _bfd_nosymbols_get_lineno
#define oasys_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define oasys_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
@@ -1229,16 +1226,16 @@ const bfd_target oasys_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
oasys_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
oasys_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (oasys),
diff --git a/bfd/osf-core.c b/bfd/osf-core.c
index dee2cbe..798c4b8 100644
--- a/bfd/osf-core.c
+++ b/bfd/osf-core.c
@@ -201,12 +201,16 @@ const bfd_target core_osf_vec =
osf_core_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index c9311dc..7bbdc14 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -4519,22 +4519,34 @@ const bfd_target MY (vec) =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getp32, bfd_getp_signed_32, bfd_putp32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
- {_bfd_dummy_target, MY_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, MY_core_file_p},
- {bfd_false, MY_mkobject, /* bfd_set_format. */
- _bfd_generic_mkarchive, bfd_false},
- {bfd_false, MY_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
-
- BFD_JUMP_TABLE_GENERIC (MY),
- BFD_JUMP_TABLE_COPY (MY),
- BFD_JUMP_TABLE_CORE (MY),
- BFD_JUMP_TABLE_ARCHIVE (MY),
- BFD_JUMP_TABLE_SYMBOLS (MY),
- BFD_JUMP_TABLE_RELOCS (MY),
- BFD_JUMP_TABLE_WRITE (MY),
- BFD_JUMP_TABLE_LINK (MY),
- BFD_JUMP_TABLE_DYNAMIC (MY),
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ MY_object_p,
+ bfd_generic_archive_p,
+ MY_core_file_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ MY_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ MY_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
+
+ BFD_JUMP_TABLE_GENERIC (MY),
+ BFD_JUMP_TABLE_COPY (MY),
+ BFD_JUMP_TABLE_CORE (MY),
+ BFD_JUMP_TABLE_ARCHIVE (MY),
+ BFD_JUMP_TABLE_SYMBOLS (MY),
+ BFD_JUMP_TABLE_RELOCS (MY),
+ BFD_JUMP_TABLE_WRITE (MY),
+ BFD_JUMP_TABLE_LINK (MY),
+ BFD_JUMP_TABLE_DYNAMIC (MY),
/* Alternative_target. */
NULL,
diff --git a/bfd/pe-mips.c b/bfd/pe-mips.c
index b81f683..082bb4d 100644
--- a/bfd/pe-mips.c
+++ b/bfd/pe-mips.c
@@ -871,9 +871,9 @@ const bfd_target
BFD_ENDIAN_LITTLE, /* Data byte order is little. */
BFD_ENDIAN_LITTLE, /* Header byte order is little. */
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P /* Object flags. */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
#ifndef COFF_WITH_PE
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
@@ -901,12 +901,24 @@ const bfd_target
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Headers. */
/* Note that we allow an object file to be treated as a core file as well. */
- {_bfd_dummy_target, coff_object_p, /* bfd_check_format. */
- bfd_generic_archive_p, coff_object_p},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false},
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ coff_object_p,
+ bfd_generic_archive_p,
+ coff_object_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
diff --git a/bfd/pe-x86_64.c b/bfd/pe-x86_64.c
index 44543e8..1f4e982 100644
--- a/bfd/pe-x86_64.c
+++ b/bfd/pe-x86_64.c
@@ -76,9 +76,9 @@ x86_64_pe_be_vec =
BFD_ENDIAN_LITTLE, /* Data byte order is little. */
BFD_ENDIAN_LITTLE, /* Header byte order is little. */
- (HAS_RELOC | EXEC_P | /* Object flags. */
- HAS_LINENO | HAS_DEBUG |
- HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
+ (HAS_RELOC | EXEC_P /* Object flags. */
+ | HAS_LINENO | HAS_DEBUG
+ | HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED | BFD_COMPRESS | BFD_DECOMPRESS),
(SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC /* Section flags. */
| SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_READONLY | SEC_DEBUGGING
@@ -97,12 +97,24 @@ x86_64_pe_be_vec =
bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* Hdrs. */
/* Note that we allow an object file to be treated as a core file as well. */
- { _bfd_dummy_target, amd64coff_object_p, /* BFD_check_format. */
- bfd_generic_archive_p, amd64coff_object_p },
- { bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format. */
- bfd_false },
- { bfd_false, coff_write_object_contents, /* bfd_write_contents. */
- _bfd_write_archive_contents, bfd_false },
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ amd64coff_object_p,
+ bfd_generic_archive_p,
+ amd64coff_object_p
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ coff_write_object_contents,
+ _bfd_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (coff),
BFD_JUMP_TABLE_COPY (coff),
diff --git a/bfd/pef.c b/bfd/pef.c
index 980c78c..a55ca06 100644
--- a/bfd/pef.c
+++ b/bfd/pef.c
@@ -38,8 +38,7 @@
#define bfd_pef_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define bfd_pef_new_section_hook _bfd_generic_new_section_hook
#define bfd_pef_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define bfd_pef_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define bfd_pef_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define bfd_pef_get_lineno _bfd_nosymbols_get_lineno
#define bfd_pef_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_pef_find_line _bfd_nosymbols_find_line
@@ -1031,16 +1030,16 @@ const bfd_target pef_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
bfd_pef_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
- bfd_true,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_true,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (bfd_pef),
@@ -1175,16 +1174,16 @@ const bfd_target pef_xlib_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
bfd_pef_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
- bfd_true,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_true,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (bfd_pef_xlib),
diff --git a/bfd/plugin.c b/bfd/plugin.c
index 6301967..a2c1bd5 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -80,7 +80,7 @@ dlerror (void)
#define bfd_plugin_bfd_set_private_flags _bfd_generic_bfd_set_private_flags
#define bfd_plugin_core_file_matches_executable_p generic_core_file_matches_executable_p
#define bfd_plugin_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
-#define bfd_plugin_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define bfd_plugin_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define bfd_plugin_get_lineno _bfd_nosymbols_get_lineno
#define bfd_plugin_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_plugin_find_line _bfd_nosymbols_find_line
@@ -594,16 +594,16 @@ const bfd_target plugin_vec =
_bfd_dummy_target
},
{ /* bfd_set_format. */
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (bfd_plugin),
diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c
index a1f8f3d..bbb2cc7 100644
--- a/bfd/ppcboot.c
+++ b/bfd/ppcboot.c
@@ -328,8 +328,7 @@ ppcboot_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
#define ppcboot_get_symbol_version_string \
_bfd_nosymbols_get_symbol_version_string
-#define ppcboot_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define ppcboot_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define ppcboot_bfd_is_local_label_name bfd_generic_is_local_label_name
#define ppcboot_get_lineno _bfd_nosymbols_get_lineno
#define ppcboot_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -507,16 +506,16 @@ const bfd_target powerpc_boot_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format */
- bfd_false,
+ _bfd_bool_bfd_false_error,
ppcboot_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents */
- bfd_false,
- bfd_true,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_true,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (ppcboot),
diff --git a/bfd/ptrace-core.c b/bfd/ptrace-core.c
index 7a659a0..529093d 100644
--- a/bfd/ptrace-core.c
+++ b/bfd/ptrace-core.c
@@ -191,12 +191,12 @@ const bfd_target core_ptrace_vec =
ptrace_unix_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error, bfd_false,
+ _bfd_bool_bfd_false_error, bfd_false
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error, bfd_false,
+ _bfd_bool_bfd_false_error, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 301199a..21ef884 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -8398,3 +8398,26 @@ _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type)
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
+
+reloc_howto_type *
+_bfd_norelocs_bfd_reloc_type_lookup
+ (bfd *abfd,
+ bfd_reloc_code_real_type code ATTRIBUTE_UNUSED)
+{
+ return (reloc_howto_type *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+reloc_howto_type *
+_bfd_norelocs_bfd_reloc_name_lookup (bfd *abfd,
+ const char *reloc_name ATTRIBUTE_UNUSED)
+{
+ return (reloc_howto_type *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+long
+_bfd_nodynamic_canonicalize_dynamic_reloc (bfd *abfd,
+ arelent **relp ATTRIBUTE_UNUSED,
+ asymbol **symp ATTRIBUTE_UNUSED)
+{
+ return _bfd_long_bfd_n1_error (abfd);
+}
diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c
index abf0ee9..26df93d 100644
--- a/bfd/sco5-core.c
+++ b/bfd/sco5-core.c
@@ -372,12 +372,12 @@ const bfd_target core_sco5_vec =
sco5_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error, bfd_false,
+ _bfd_bool_bfd_false_error, bfd_false
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error, bfd_false,
+ _bfd_bool_bfd_false_error, bfd_false
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/section.c b/bfd/section.c
index 8e11c90..ef0af8a 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -1698,3 +1698,13 @@ bfd_generic_discard_group (bfd *abfd ATTRIBUTE_UNUSED,
{
return TRUE;
}
+
+bfd_boolean
+_bfd_nowrite_set_section_contents (bfd *abfd,
+ sec_ptr section ATTRIBUTE_UNUSED,
+ const void *location ATTRIBUTE_UNUSED,
+ file_ptr offset ATTRIBUTE_UNUSED,
+ bfd_size_type count ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
diff --git a/bfd/som.c b/bfd/som.c
index 9fc04e4..6220df7 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6737,9 +6737,8 @@ som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
#define som_truncate_arname bfd_bsd_truncate_arname
#define som_slurp_extended_name_table _bfd_slurp_extended_name_table
#define som_construct_extended_name_table _bfd_archive_coff_construct_extended_name_table
-#define som_update_armap_timestamp bfd_true
-#define som_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define som_update_armap_timestamp _bfd_bool_bfd_true
+#define som_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define som_get_lineno _bfd_nosymbols_get_lineno
#define som_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define som_read_minisymbols _bfd_generic_read_minisymbols
@@ -6798,16 +6797,16 @@ const bfd_target hppa_som_vec =
_bfd_dummy_target
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
som_mkobject,
_bfd_generic_mkarchive,
- bfd_false
+ _bfd_bool_bfd_false_error
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
som_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
#undef som
diff --git a/bfd/sparclynx.c b/bfd/sparclynx.c
index b2856fd..9815afd 100644
--- a/bfd/sparclynx.c
+++ b/bfd/sparclynx.c
@@ -219,10 +219,9 @@ static const struct aout_backend_data sparclynx_aout_backend =
};
-#define MY_bfd_debug_info_start bfd_void
-#define MY_bfd_debug_info_end bfd_void
-#define MY_bfd_debug_info_accumulate \
- (void (*) (bfd *, struct bfd_section *)) bfd_void
+#define MY_bfd_debug_info_start _bfd_void_bfd
+#define MY_bfd_debug_info_end _bfd_void_bfd
+#define MY_bfd_debug_info_accumulate _bfd_void_bfd_asection
#define MY_write_object_contents NAME(aout,sparclynx_write_object_contents)
#define MY_backend_data &sparclynx_aout_backend
diff --git a/bfd/srec.c b/bfd/srec.c
index 10c6ceb..a7148f1 100644
--- a/bfd/srec.c
+++ b/bfd/srec.c
@@ -1257,7 +1257,7 @@ srec_print_symbol (bfd *abfd,
#define srec_close_and_cleanup _bfd_generic_close_and_cleanup
#define srec_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define srec_new_section_hook _bfd_generic_new_section_hook
-#define srec_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define srec_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
#define srec_get_lineno _bfd_nosymbols_get_lineno
#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -1316,16 +1316,16 @@ const bfd_target srec_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
srec_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
srec_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (srec),
@@ -1372,16 +1372,16 @@ const bfd_target symbolsrec_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
srec_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
symbolsrec_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (srec),
diff --git a/bfd/syms.c b/bfd/syms.c
index 7eafb7d..8ba1b40 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -1427,3 +1427,117 @@ _bfd_stab_section_find_nearest_line (bfd *abfd,
return TRUE;
}
+
+long
+_bfd_nosymbols_canonicalize_symtab (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol **location ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+void
+_bfd_nosymbols_print_symbol (bfd *abfd ATTRIBUTE_UNUSED,
+ void *afile ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ bfd_print_symbol_type how ATTRIBUTE_UNUSED)
+{
+}
+
+void
+_bfd_nosymbols_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED,
+ asymbol *sym ATTRIBUTE_UNUSED,
+ symbol_info *ret ATTRIBUTE_UNUSED)
+{
+}
+
+const char *
+_bfd_nosymbols_get_symbol_version_string (bfd *abfd,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ bfd_boolean *hidden ATTRIBUTE_UNUSED)
+{
+ return (const char *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+bfd_boolean
+_bfd_nosymbols_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED)
+{
+ return FALSE;
+}
+
+alent *
+_bfd_nosymbols_get_lineno (bfd *abfd, asymbol *sym ATTRIBUTE_UNUSED)
+{
+ return (alent *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+bfd_boolean
+_bfd_nosymbols_find_nearest_line
+ (bfd *abfd,
+ asymbol **symbols ATTRIBUTE_UNUSED,
+ asection *section ATTRIBUTE_UNUSED,
+ bfd_vma offset ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED,
+ unsigned int *discriminator_ptr ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_boolean
+_bfd_nosymbols_find_line (bfd *abfd,
+ asymbol **symbols ATTRIBUTE_UNUSED,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+bfd_boolean
+_bfd_nosymbols_find_inliner_info
+ (bfd *abfd,
+ const char **filename_ptr ATTRIBUTE_UNUSED,
+ const char **functionname_ptr ATTRIBUTE_UNUSED,
+ unsigned int *line_ptr ATTRIBUTE_UNUSED)
+{
+ return _bfd_bool_bfd_false_error (abfd);
+}
+
+asymbol *
+_bfd_nosymbols_bfd_make_debug_symbol (bfd *abfd,
+ void *ptr ATTRIBUTE_UNUSED,
+ unsigned long sz ATTRIBUTE_UNUSED)
+{
+ return (asymbol *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+long
+_bfd_nosymbols_read_minisymbols (bfd *abfd,
+ bfd_boolean dynamic ATTRIBUTE_UNUSED,
+ void **minisymsp ATTRIBUTE_UNUSED,
+ unsigned int *sizep ATTRIBUTE_UNUSED)
+{
+ return _bfd_long_bfd_n1_error (abfd);
+}
+
+asymbol *
+_bfd_nosymbols_minisymbol_to_symbol (bfd *abfd,
+ bfd_boolean dynamic ATTRIBUTE_UNUSED,
+ const void *minisym ATTRIBUTE_UNUSED,
+ asymbol *sym ATTRIBUTE_UNUSED)
+{
+ return (asymbol *) _bfd_ptr_bfd_null_error (abfd);
+}
+
+long
+_bfd_nodynamic_get_synthetic_symtab (bfd *abfd,
+ long symcount ATTRIBUTE_UNUSED,
+ asymbol **syms ATTRIBUTE_UNUSED,
+ long dynsymcount ATTRIBUTE_UNUSED,
+ asymbol **dynsyms ATTRIBUTE_UNUSED,
+ asymbol **ret ATTRIBUTE_UNUSED)
+{
+ return _bfd_long_bfd_n1_error (abfd);
+}
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 42bd36a..6a00c9f 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -962,7 +962,7 @@ tekhex_print_symbol (bfd *abfd,
#define tekhex_close_and_cleanup _bfd_generic_close_and_cleanup
#define tekhex_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define tekhex_new_section_hook _bfd_generic_new_section_hook
-#define tekhex_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define tekhex_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define tekhex_bfd_is_local_label_name bfd_generic_is_local_label_name
#define tekhex_get_lineno _bfd_nosymbols_get_lineno
#define tekhex_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -1020,16 +1020,16 @@ const bfd_target tekhex_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
tekhex_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
tekhex_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (tekhex),
diff --git a/bfd/trad-core.c b/bfd/trad-core.c
index 4fe5b6b..7d17688 100644
--- a/bfd/trad-core.c
+++ b/bfd/trad-core.c
@@ -293,12 +293,16 @@ const bfd_target core_trad_vec =
trad_unix_core_file_p /* a core file */
},
{ /* bfd_set_format */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
{ /* bfd_write_contents */
- bfd_false, bfd_false,
- bfd_false, bfd_false
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/verilog.c b/bfd/verilog.c
index df261d1..64a7869 100644
--- a/bfd/verilog.c
+++ b/bfd/verilog.c
@@ -293,7 +293,7 @@ verilog_mkobject (bfd *abfd)
#define verilog_close_and_cleanup _bfd_generic_close_and_cleanup
#define verilog_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define verilog_new_section_hook _bfd_generic_new_section_hook
-#define verilog_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define verilog_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define verilog_bfd_is_local_label_name bfd_generic_is_local_label_name
#define verilog_get_lineno _bfd_nosymbols_get_lineno
#define verilog_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -345,16 +345,16 @@ const bfd_target verilog_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
verilog_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
verilog_write_object_contents,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/versados.c b/bfd/versados.c
index 1fb9887..cfaba72 100644
--- a/bfd/versados.c
+++ b/bfd/versados.c
@@ -848,8 +848,7 @@ versados_canonicalize_reloc (bfd *abfd,
#define versados_close_and_cleanup _bfd_generic_close_and_cleanup
#define versados_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define versados_new_section_hook _bfd_generic_new_section_hook
-#define versados_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define versados_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define versados_bfd_is_local_label_name bfd_generic_is_local_label_name
#define versados_get_lineno _bfd_nosymbols_get_lineno
#define versados_find_nearest_line _bfd_nosymbols_find_nearest_line
@@ -912,16 +911,16 @@ const bfd_target m68k_versados_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
versados_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (versados),
diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 5dee02d..07a7eba 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -9489,8 +9489,7 @@ bfd_vms_get_data (bfd *abfd)
return (struct vms_private_data_struct *)abfd->tdata.any;
}
-#define vms_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define vms_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define vms_bfd_link_just_syms _bfd_generic_link_just_syms
#define vms_bfd_copy_link_hash_symbol_type \
_bfd_generic_copy_link_hash_symbol_type
@@ -9510,8 +9509,7 @@ bfd_vms_get_data (bfd *abfd)
/* Symbols table. */
#define alpha_vms_make_empty_symbol _bfd_generic_make_empty_symbol
-#define alpha_vms_bfd_is_target_special_symbol \
- ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define alpha_vms_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define alpha_vms_print_symbol vms_print_symbol
#define alpha_vms_get_symbol_info vms_get_symbol_info
#define alpha_vms_get_symbol_version_string \
@@ -9586,12 +9584,24 @@ const bfd_target alpha_vms_vec =
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16,
- {_bfd_dummy_target, alpha_vms_object_p, /* bfd_check_format. */
- _bfd_vms_lib_alpha_archive_p, _bfd_dummy_target},
- {bfd_false, alpha_vms_mkobject, /* bfd_set_format. */
- _bfd_vms_lib_alpha_mkarchive, bfd_false},
- {bfd_false, alpha_vms_write_object_contents, /* bfd_write_contents. */
- _bfd_vms_lib_write_archive_contents, bfd_false},
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ alpha_vms_object_p,
+ _bfd_vms_lib_alpha_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ alpha_vms_mkobject,
+ _bfd_vms_lib_alpha_mkarchive,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ alpha_vms_write_object_contents,
+ _bfd_vms_lib_write_archive_contents,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (alpha_vms),
BFD_JUMP_TABLE_COPY (vms),
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index d10e6d9..a31cadd 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -2330,12 +2330,24 @@ const bfd_target alpha_vms_lib_txt_vec =
bfd_getl64, bfd_getl_signed_64, bfd_putl64,
bfd_getl32, bfd_getl_signed_32, bfd_putl32,
bfd_getl16, bfd_getl_signed_16, bfd_putl16,
-
- {_bfd_dummy_target, _bfd_dummy_target, /* bfd_check_format. */
- _bfd_vms_lib_txt_archive_p, _bfd_dummy_target},
- {bfd_false, bfd_false, bfd_false, bfd_false}, /* bfd_set_format. */
- {bfd_false, bfd_false, bfd_false, bfd_false}, /* bfd_write_contents. */
-
+ { /* bfd_check_format. */
+ _bfd_dummy_target,
+ _bfd_dummy_target,
+ _bfd_vms_lib_txt_archive_p,
+ _bfd_dummy_target
+ },
+ { /* bfd_set_format. */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
+ { /* bfd_write_contents. */
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error
+ },
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (_bfd_nocore),
diff --git a/bfd/wasm-module.c b/bfd/wasm-module.c
index 14e7386..6806e0f 100644
--- a/bfd/wasm-module.c
+++ b/bfd/wasm-module.c
@@ -773,7 +773,7 @@ wasm_object_p (bfd *abfd)
/* BFD_JUMP_TABLE_SYMBOLS */
#define wasm_get_symbol_version_string _bfd_nosymbols_get_symbol_version_string
#define wasm_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define wasm_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define wasm_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define wasm_get_lineno _bfd_nosymbols_get_lineno
#define wasm_find_nearest_line _bfd_nosymbols_find_nearest_line
#define wasm_find_line _bfd_nosymbols_find_line
@@ -811,16 +811,16 @@ const bfd_target wasm_vec =
_bfd_dummy_target,
},
{
- bfd_false,
+ _bfd_bool_bfd_false_error,
wasm_mkobject,
_bfd_generic_mkarchive,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
wasm_write_object_contents,
_bfd_write_archive_contents,
- bfd_false,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (_bfd_generic),
diff --git a/bfd/xsym.c b/bfd/xsym.c
index c51b715..8ea0e7e 100644
--- a/bfd/xsym.c
+++ b/bfd/xsym.c
@@ -30,7 +30,7 @@
#define bfd_sym_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
#define bfd_sym_new_section_hook _bfd_generic_new_section_hook
#define bfd_sym_bfd_is_local_label_name bfd_generic_is_local_label_name
-#define bfd_sym_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) (bfd_boolean (*)) bfd_false)
+#define bfd_sym_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false
#define bfd_sym_get_lineno _bfd_nosymbols_get_lineno
#define bfd_sym_find_nearest_line _bfd_nosymbols_find_nearest_line
#define bfd_sym_find_line _bfd_nosymbols_find_line
@@ -2332,16 +2332,16 @@ const bfd_target sym_vec =
_bfd_dummy_target,
},
{ /* bfd_set_format. */
- bfd_false,
+ _bfd_bool_bfd_false_error,
bfd_sym_mkobject,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
{ /* bfd_write_contents. */
- bfd_false,
- bfd_true,
- bfd_false,
- bfd_false,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_true,
+ _bfd_bool_bfd_false_error,
+ _bfd_bool_bfd_false_error,
},
BFD_JUMP_TABLE_GENERIC (bfd_sym),