(ns32k-*-netbsd): use ns32knbsd.
* hosts/{nbsd,i386nbsd,ns32knbsd,sparcnbsd}.h: New files, NetBSD
host support.
* sparcnetbsd.c: New file, adds support for NetBSD/sparc.
* config/sparc-nbsd.mt: Likewise.
* netbsd.h: New file, definitions common to all netbsd ports.
* i386netbsd.c: Use it.
* ns32knetbsd.c: Use it.
* Makefile.in, configure.in, targets.c, config/i386-nbsd.mt,
config/ns32k-nbsd.mt: canonicalize netbsd targets to conform to
file/variable naming conventions.
* i386netbsd.c: New file, renamed from netbsd386.c.
* ns32knetbsd.c: New file, renamed from netbsd532.c.
* cofflink.c: New file.
* libcoff-in.h: Include bfdlink.h.
(obj_coff_external_syms, obj_coff_strings): Define accessor macro.
(obj_coff_sym_hashes): Define accessor macro.
(struct coff_tdata): Add fields external_syms, strings, and
sym_hashes.
(struct coff_link_hash_entry): Define.
(struct coff_link_hash_table): Define.
(coff_link_hash_lookup, coff_link_hash_traverse): Define.
(coff_hash_table): Define.
(_bfd_coff_link_hash_table_create): Declare.
(_bfd_coff_link_add_symbols, _bfd_coff_final_link): Declare.
* coffcode.h (bfd_coff_backend_data): Add fields _bfd_relsz,
_bfd_coff_swap_reloc_in, _bfd_coff_sym_is_global,
_bfd_coff_compute_section_file_positions,
_bfd_coff_relocate_section.
(bfd_coff_relsz, bfd_coff_swap_reloc_in): Define.
(bfd_coff_sym_is_global): Define.
(bfd_coff_compute_section_file_positions): Define.
(bfd_coff_relocate_section): Define.
(coff_mkobject_hook): Initialize obj_raw_syment_count and
obj_conv_table_size.
(coff_compute_section_file_positions): Set target_index of all
sections. Set output_has_begun field.
(coff_write_object_contents): Don't set target_index; now done by
coff_compute_section_file_positions. Remove obsolete handling of
scn_base and data_base. Don't bother to check that target_index
is positive, since it always is. Remove use of pad, which is
always zero. Check obj_raw_syment_count, not bfd_get_symcount,
for the number of symbols, but only write them out if
bfd_get_symcount is non-zero.
(coff_slurp_symbol_table): Use obj_raw_syment_count, not
bfd_get_symcount for the number of symbols. Don't set
obj_conv_table_size.
(coff_sym_is_global): New static function or macro.
(coff_slurp_reloc_table): Call coff_swap_reloc_in, not
bfd_swap_reloc_in.
(coff_bfd_link_hash_table_create): If coff_relocate_section is
defined, define as _bfd_coff_link_hash_table_create.
(coff_bfd_link_add_symbols): Similar change.
(coff_bfd_final_link): Similar change.
(coff_relocate_section): Define as NULL if not defined.
(bfd_coff_std_swap_table): Initialize new fields.
* coffgen.c (coff_real_object_p): Don't set obj_raw_syment_count
and obj_conv_table_size here.
(coff_count_linenumbers): Reindent. If bfd_get_symcount is zero,
add up the line numbers from the sections.
(coff_write_symbols): Don't set bfd_get_symcount.
(coff_pointerize_aux): Don't pointerize a nonpositive x_endndx
field.
(coff_get_normalized_symtab): Use obj_raw_syment_count, not
bfd_get_symcount.
(coff_print_symbol): If auxp->fix_end, print x_endndx value.
* coffswap.h (coff_swap_reloc_in): Rename from bfd_swap_reloc_in.
Reindent. Change argument type to PTR.
* coff-a29k.c (coff_a29k_relocate_section): New static function.
(coff_relocate_section): Define.
* configure.in (a29kcoff_big_vec): Compile cofflink.o.
* coff-alpha.c (alpha_ecoff_backend_data): Initialize new fields.
* coff-mips.c (mips_ecoff_backend_data): Likewise.
* libcoff.h: Rebuilt.
* Makefile.in: Rebuilt dependencies.
(BFD32_BACKENDS): Add cofflink.o.
(CFILES): Add cofflink.c.
These changes separate PA-SOM support from PA-ELF support.
A sun4-x-hppaosf assembler can now be built.
* elf32-hppa.c (elf_hppa_howto_table): Now static.
(symext_rootP, symext_lastP, global_value, GOT_value, global_symbol,
global_sym_defined, symextn_contents, symextn_contents_real_size,
elf_hppa_stub_rootP, elf32_hppa_symextn_map, elf32_hppa_symextn_map_size): Rely
on default initialization.
(hppa_elf_gen_reloc_type): Macro "UNDEFINED" doesn't need a trailing semicolon.
(hppa_look_for_stubs_in_section): Introduce temporaries to make code more
readable in 80 columns.
* libhppa.h (all functions): Now inline under GNU C.
* elf32-hppa.c (AR_WARN): Give argument which caused the invalid argument
relocation.
(AR_UNIMP): Delete unused macro.
(hppa_elf_set_section_contents): Always return a value.
(elf32_hppa_backend_table_processing): Likewise.
(elf32_hppa_backend_section_processing: Likewise.
* som.c: New file containing SOM specific code extracted from hppa.c
* som.h: New file containing SOM specific code extracted from libhppa.h
* hppa.c: Deleted.
* libhppa.h: Delete SOM specific code. Add generic PA code which can be shared
by both SOM and ELF backends.
* Makefile.in: Replace hppa.c with som.c. elf32-hppa.o depends on libhppa.h
now.
* configure.in (hppa_vec): Needs som.o module instead of hppa.o.
* elf32-hppa.c: Include libhppa.h. Do not define BYTES_IN_WORD.
* elf32-hppa.h (hppa_reloc_field_selector_type): Delete now lives in libhppa.h.
(hppa_reloc_field_selector_type_alt): Likewise.
* elf32-hppa.c (hppa_elf_relocate_unwind_table): Delete unused variables.
(elf_hppa_reloc_type_lookup): Likewise.
(elf_hppa_tc_make_sections): Likewise.
(hppa_elf_arg_reloc_needed_p): Likewise.
(hppa_elf_build_long_branch_stub): Likewise.
(elf_reloc_map): Delete, no longer used.
(elf_hppa_reloc_map): Likewise.
(elf32_hppa_symextn_map_max_size): Likewise.
(elf32_hppa_get_sym_extn): Abort if type is bogus.
* elf32-hppa.c (elf32_hppa_backend_fake_sections): Add processing
of the .hppa_unwind section.
* config/u68k-coff.mt: Fix typo, DEFAULT_TARGET for
DEFAULT_VECTOR.
* config/h8300-coff.mt, h8500-coff.mt, sh-coff.mt, st2000.mt,
z8k-coff.mt (DEFAULT_VECTOR): Define. Don't explicitly add
S-records via SELECT_VECS.
* targets.c (target_vector), Makefile.in (BFD_LIBS): Always
support S-records, for convenience.
* config.bfd: New file, broken out of configure.in.
* configure.in: Use it, and use standard target names for
--with-targets, replacing --with-bfd-targets.
* Makefile.in (ALL_MACHINES): Renamed from BFD_MACHINES.
(ofiles): New target. Build a list of unique file names, in case
any got duplicated.
(TARGETLIB): Use list of files from ofiles.
* configure.in: Set BFD_MACHINES and BFD_BACKENDS depending on
minimal-bfd flag and target makefile frag contents.
perhaps we can later remove the the_bfd field from each symbol.
* syms.c (struct symbol_cache_entry): Remove unused field
app_data. Add comment noting that the_bfd is almost redundant,
but not quite.
* aoutx.h, coff-a29k.c, coff-i386.c, coff-i960.c, coffcode.h:
Use new macros bfd_asymbol_bfd and bfd_asymbol_flavour.
* hppa.c (fill_spaces): Make slightly more rebust.
* configure.in: Allow std-host as the "default" host.
* Patches from Minh Tran-le <mtranle@paris.intellicorp.com>.
* configure.in (i386-*-isc*, i386-*-aix*): New targets.
* configure.host (i386-*-isc*, i386-*-aix*): New hosts.
* hosts/i386isc.h, config/i386isc.mh: New files for Interactive
Unix.
* hosts/i386aix.h, config/i386aix.mh: New files for AIX on PS/2.
* aix386-core.c: New file for handling core files on AIX on PS/2.
* targets.c: if AIX386_CORE, use aix386_core_vec.
* coffcode.h (coff_real_object_p): check for I386SVMAGIC as well
as I386MAGIC.