Commit Graph

1037 Commits

Author SHA1 Message Date
Jeff Law ada45a2a82 * som.c (som_prep_headers): Do not set the system_id here, private
bfd data has not been copied yet.
	(som_write_headers): Instead do it here.
1994-05-26 16:13:47 +00:00
Ian Lance Taylor 5315c42827 Make MIPS ELF use new ELF backend linker. No shared library
support yet.
	* elf32-mips.c (bfd_mips_elf32_swap_gptab_in): New function.
	(bfd_mips_elf32_swap_gptab_out): New function.
	(mips_elf_object_p): If last symbol is LOCAL, set elf_bad_symtab.
	(mips_elf_final_write_processing): Set sh_info field for .gptab.*
	sections.
	(mips_elf_fake_sections): Set sh_entsize for .gptab.* sections.
	(mips_elf_read_ecoff_info): Read and free external symbols last,
	not first, for clarity.
	(struct mips_elf_link_hash_entry): Define new structure.
	(struct mips_elf_link_hash_table): Define new structure.
	(mips_elf_link_hash_lookup): Define new macro.
	(mips_elf_link_hash_traverse): Define new macro.
	(mips_elf_hash_table): Define new macro.
	(mips_elf_link_hash_newfunc): New static function.
	(mips_elf_link_hash_table_create): New static function.
	(mips_elf_add_symbol_hook): New static function.
	(struct extsym_info): Define new structure.
	(mips_elf_get_extr, mips_elf_set_index): Remove.
	(mips_elf_output_extsym): New static function.
	(gptab_compare): New static function.
	(mips_elf_final_link): Rewrite to use ELF backend linker, and to
	merge gptab information in input files.
	(mips_elf_relocate_hi16): New static function.
	(mips_elf_relocate_section): New static function.
	(bfd_elf32_bfd_link_hash_table_create): Define as macro before
	including elf32-target.h.
	(elf_backend_relocate_section): Likewise.
	(elf_backend_add_symbol_hook): Likewise.
	* elf.c (_bfd_elf_link_hash_newfunc): Rename from
	elf_link_hash_newfunc and make globally visible.  Change caller.
	(_bfd_elf_link_hash_table_init): New function, broken out of
	_bfd_elf_link_hash_table_create.
	(_bfd_elf_link_hash_table_create): Use
	_bfd_elf_link_hash_table_init.
	* libelf.h (struct elf_obj_tdata): Add new field bad_symtab.
	(elf_bad_symtab): Define new accessor macro.
	(_bfd_elf_link_hash_newfunc): Declare.
	(_bew_elf_link_hash_table_init): Declare.
	* elfcode.h (elf_object_p): Call backend object_p hook after
	swapping in all the section headers.
	(map_program_segments): Correct typo: Internal for External.
	(elf_link_add_object_symbols): If elf_bad_symtab is set, read all
	the symbols.  Skip STB_LOCAL symbols rather than giving an error.
	(elf_bfd_final_link): If elf_bad_symtab is set, allocate space for
	all symbols, not just locals.
	(elf_link_output_extsym): Only skip a symbol not mentioned by a
	regular file if it is mentioned by a dynamic object.
	(elf_link_input_bfd): If elf_bad_symtab is set, read all the
	symbols.
1994-05-24 20:44:50 +00:00
Ian Lance Taylor c8588f2f74 * coff-mips.c (mips_relocate_section): Add MIPS_R_JMPADDR overflow
checking.
1994-05-20 20:17:50 +00:00
Jeff Law 88bbe402bb * som.c (som_set_reloc_info): Do not set any relocation info
for SOM fixups which are never passed to BFD.
1994-05-20 19:43:18 +00:00
Ian Lance Taylor 7ce8b9d18d Removed sanitization of PowerPC NetWare. Also rebuilt Makefile
dependencies.
1994-05-20 18:22:45 +00:00
Ian Lance Taylor 95b77361ab * elf32-i386.c (elf_i386_size_dynamic_sections): Add DT_DEBUG to
the dynamic linking information for the benefit of the debugger.
	From Peter Schauer.
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
1994-05-20 16:14:35 +00:00
Ian Lance Taylor 497c543457 * elf.c (_bfd_elf_make_section_from_shdr): New function, based on
code repeated three times in bfd_section_from_shdr in elfcode.h.
	* libelf.h (_bfd_elf_make_section_from_shdr): Declare.
	* elfcode.h (bfd_section_from_shdr): Use new function
	_bfd_elf_make_section_from_shdr to create BFD sections.  If a
	reloc section does not use the main symbol table, or it is part of
	the process image, treat it as a normal section, not relocs.
	* elf32-mips.c (mips_elf_section_from_shdr): Use new function
	_bfd_elf_make_section_from_shdr.
1994-05-20 16:04:59 +00:00
Ian Lance Taylor 7a0c782d39 * elf32-target.h, elf64-target.h: Change ar_max_namelen value from
15 to 14 to match SVR4 ar.
1994-05-19 21:39:15 +00:00
Ian Lance Taylor 013dec1ad9 Add support for ELF shared libraries. Loosely based on work by
Eric Youngdale <ericy@cais.com>.
	* libelf.h (struct elf_backend_data): Add new fields for dynamic
	linking: elf_backend_create_dynamic_sections,
	elf_backend_adjust_dynamic_symbol,
	elf_backend_size_dynamic_sections,
	elf_backend_finish_dynamic_symbol,
	elf_backend_finish_dynamic_sections.
	(struct elf_link_hash_entry): Change type of align field to
	bfd_size_type.  Add fields dynindx, dynstr_index, weakdef,
	elf_link_hash_flags.
	(struct elf_link_hash_table): Add fields dynobj, dynsymcount,
	dynstr, bucketcount.
	(bfd_elf32_swap_reloc_in, bfd_elf32_swap_reloc_out): Declare.
	(bfd_elf32_swap_reloca_in, bfd_elf32_swap_reloca_out): Declare.
	(bfd_elf32_swap_dyn_in, bfd_elf32_swap_dyn_out): Declare.
	(bfd_elf32_add_dynamic_entry): Declare.
	(bfd_elf64_swap_reloc_in, bfd_elf64_swap_reloc_out): Declare.
	(bfd_elf64_swap_reloca_in, bfd_elf64_swap_reloca_out): Declare.
	(bfd_elf64_swap_dyn_in, bfd_elf64_swap_dyn_out): Declare.
	(bfd_elf64_add_dynamic_entry): Declare.
	* elfcode.h (Elf_External_Dyn): Define.
	(elf_swap_reloc_in): Define as macro using NAME.  Make externally
	visible.
	(elf_swap_reloc_out): Likewise.
	(elf_swap_reloca_in, elf_swap_reloca_out): Likewise.
	(elf_swap_dyn_in, elf_swap_dyn_out): Define as macro using NAME
	and as new externally visible function.
	(elf_fake_sections): Set section type of dynamic sections based on
	section names.
	(elf_write_phdrs): Remove.
	(assign_file_position_for_section): Add new align argument.
	Change all callers.
	(get_program_header_size): New static function.
	(struct seg_info): Remove.
	(map_program_segments): Completely rewrite.
	(assign_file_positions_except_relocs): Completely rewrite.
	(assign_file_positions_for_relocs): Don't set a file position for
	sections which already have one.  Don't bother to align the file
	position here.
	(section_from_elf_index): Handle SHT_HASH and SHT_DYNAMIC
	section types.
	(elf_section_from_bfd_section): Likewise.
	(elf_slurp_symbol_table): If section_from_elf_index fails, just
	use bfd_abs_section rather than returning an error.
	(elf_sizeof_headers): Make useful.
	(elf_link_record_dynamic_symbol): New static function.
	(elf_link_add_object_symbols): Handle dynamic objects.
	(elf_link_create_dynamic_sections): New static function.
	(elf_add_dynamic_entry): Define as macro using NAME and as new
	externally visible function.
	(NAME(bfd_elf,record_link_assignment)): New function.
	(elf_buckets): New static variable.
	(NAME(bfd_elf,size_dynamic_sections)): New function.
	(struct elf_final_link_info): Add dynsym_sec and hash_sec fields.
	(elf_bfd_final_link): Handle dynamic linking.  Create a section
	symbol for all ELF sections, not all BFD sections.  Store section
	symbol index in target_index field, not index field.  Traverse
	over global symbols even if stripping.
	(elf_link_output_extsym): Output dynamic symbols.  Mark symbols
	defined by dynamic objects as undefined.
	(elf_link_input_bfd): Ignore dynamic objects.  Use target_index
	field for section relocs, and make sure it is set.
	(elf_reloc_link_order): Use target_index field for section relocs,
	and make sure it is set.
	* elf.c (elf_link_hash_newfunc): Initialize dynindx, dynstr_index,
	weakdef and elf_link_hash_flags fields.
	(_bfd_elf_link_hash_table_create): Initialize dynobj, dynsymcount,
	dynstr and bucketcount fields.
	* elf32-target.h: Initialize new dynamic linking fields.
	* elf64-target.h: Likewise.
	* elf32-i386.c: New functions for dynamic linking support.
	* elf32-sparc.c: Likewise.
	* bfd-in.h (bfd_elf32_record_link_assignment): Declare.
	(bfd_elf64_record_link_assignment): Declare.
	(bfd_elf32_size_dynamic_sections): Declare.
	(bfd_elf64_size_dynamic_sections): Declare.
	* bfd-in2.h: Rebuilt.
1994-05-19 18:23:40 +00:00
Ian Lance Taylor 82492ca110 * som.c: Don't include <sys/dir.h> or <sys/user.h>.
(som_reloc_queue_find): Call memcmp instead of bcmp.
	(som_bfd_reloc_type_lookup): Change first argument to bfd *.
	(compare_syms): Change types of arguments to const void *.
	(bfd_section_from_som_symbol): Removed unused local found.
	(som_write_armap): Add elength, map, orl_count and int arguments.
	(som_write_armap): Use %ld and cast to long for getuid result.
1994-05-18 15:32:15 +00:00
Jeff Law 673acecaa5 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.
* elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls.

	* som.h (R_HPPA_ABS_CALL): Define.
	* som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
1994-05-18 15:13:27 +00:00
Ken Raeburn 0f62bdc03b * coff-i960.c (icoff_little_vec, icoff_big_vec): Indicate leading underscore,
for compatibility with Intel tool chain (gnu960v2).
1994-05-17 23:43:48 +00:00
Jeff Law 459ae909b9 * bfd-in2.h: Rebuilt.
* elf32-hppa.c: Change .hppa_linker_stubs to .PARISC.stubs,
	likewise for other PA specific sections.
	(hppa_elf_relocate_unwind_table): Delete unused
	function.
	(elf_hppa_howto_table): Completely new table based on 94-02-02
	draft PA ELF spec.  Change relocation tags appropriately
	throughout elf32-hppa.c
	(hppa_elf_gen_reloc_type): Rewrite and simplify based on 94-02-02
	spec.
	(hppa_elf_reloc): Likewise.
	(hppa_look_for_stubs_in_section): Likewise
	(ELF_MACHINE_CODE): Change to EM_PARISC.
	* elf32-hppa.h: Include "elf/hppa.h".  Change relocation tags
	appropriately throughout elf32-hppa.h.
	(elf32_hppa_reloc_type): New table based on 94-02-02 draft PA ELF
	spec.
	(R_HPPA_ABS_CALL, R_HPPA_COMPLEX*, R_HPPA_UNWIND): Delete definitions.
	* elfcode.h (prep_headers): Use EM_PARISC instead of EM_HPPA.
	* reloc.c (bfd_reloc_code_real): Delete unused HPPA relocations.
	* som.h (R_HPPA_ABS_CALL, R_HPPA_COMPLEX): Delete definitions.

	* libhppa.h (hppa_field_adjust): Avoid adding constant_value into
	the final value twice for LR and RR field selectors.
1994-05-16 19:34:13 +00:00
Jeff Law c3cb04b440 * libhppa.h (hppa_field_adjust): Avoid adding constant_value into
the final value twice for LR and RR field selectors.
1994-05-16 16:13:34 +00:00
Jim Kingdon cb9461ffc2 * aoutx.h (add_to_stringtab): Use BFD_ASSERT not assert. This
avoids __eprintf troubles.
1994-05-14 16:19:58 +00:00
Ian Lance Taylor 0d898d0338 * bout.c (b_out_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR. 1994-05-14 03:16:13 +00:00
Ian Lance Taylor 55a90acef6 Rewrite history. 1994-05-13 18:51:52 +00:00
Jim Kingdon 1bbf43eec5 Fix typo in last entry 1994-05-13 18:47:34 +00:00
Bill Cox f3e72e3771 * Makefile.in (sysdep.h): Copy Ian's version of this from
progressive/bfd/Makefile.in.
1994-05-13 18:15:46 +00:00
Bill Cox f666bb79ca * Makefile.in (stmp-bfd.h): Add an 'if' to mask a harmless
grep error.  Already in progressive/bfd/Makefile.in.
1994-05-13 17:52:46 +00:00
Ian Lance Taylor 8db528c845 * config/mipsbelf.mt (SELECT_VECS): Add ecoff_big_vec and
ecoff_little_vec since Irix 5 supports ECOFF executables.
1994-05-13 14:53:07 +00:00
Jim Kingdon 291c622da4 Remove CVS conflict markers from file 1994-05-12 18:13:17 +00:00
Ian Lance Taylor 4fa4476bf8 * ecoff.c (ecoff_find_nearest_line): Handle fdr.adr != pdr.adr
correctly.
1994-05-11 16:46:04 +00:00
Ian Lance Taylor 666f5925d2 * Makefile.in (stmp-bfd.h): Use || instead of ; to force SunOS
make to invoke the shell.
1994-05-11 04:32:52 +00:00
Ian Lance Taylor c16313f06c * section.c (SEC_COFF_SHARED_LIBRARY): Renamed from
SEC_SHARED_LIBRARY for clarity.  Changed all uses.
	* bfd-in2.h: Rebuilt.
	* coffcode.h (sec_to_styp_flags): If SEC_COFF_SHARED_LIBRARY is
	set, set STYP_NOLOAD.
	* coffgen.c (coff_section_from_bfd_index): Don't get an assertion
	failure because of a bad shared library.
1994-05-10 18:29:19 +00:00
Bill Cox eeb8c1873a * linker.c: Add missing comment terminator. 1994-05-10 01:58:35 +00:00
Ian Lance Taylor 8e5090ce3a * linker.c (_bfd_generic_link_add_one_symbol): If hashp and *hashp
are not NULL, assume the caller has already looked up the symbol
	in the hash table and has stored the entry in *hashp.
	(generic_link_add_symbol_list): Set h to NULL before calling
	_bfd_generic_link_add_one_symbol.
	* ecoff.c (ecoff_link_add_externals): Likewise.
1994-05-09 23:22:00 +00:00
Ian Lance Taylor 6ec3bb6a75 * elfcode.h: Include bfdlink.h. Added several new functions to do
linking.
	(ELF_R_TYPE): Define.
	(bfd_add_to_strtab): Return unsigned long.  Change check for
	realloc failure.
	(elf_fake_sections): Check return value of bfd_add_to_strtab.
	(elf_compute_section_file_positions): Add link_info argument.
	Call elf_backend_begin_write_processing hook and prep_headers
	here.  Only call swap_out_syms if link_info is NULL.  Set up
	.shstrtab section here.  Pass dosyms argument to
	assign_file_positions_except_relocs.  Set output_has_begun flag.
	(assign_file_positions_for_symtab_and_strtabs): Add dosyms
	argument, and use it to control setting .symtab and .strtab file
	positions.
	(assign_file_positions_except_relocs): Add dosyms argument, and
	pass it on.
	(prep_headers): Check return value of bfd_add_to_strtab.
	(swap_out_syms): Likewise.  Also, don't set up .shstrtab here.
	(NAME(bfd_elf,write_object_contents)): Some calls moved into
	elf_compute_section_file_positions.
	(elf_set_section_contents): Likewise.
	(elf_slurp_symbol_table): SHN_LORESERV corrected to SHN_LORESERVE.
	* libelf.h: Include bfdlink.h.
	(struct elf_backend_data): Add fields collect,
	elf_add_symbol_hook, elf_backend_relocate_section.
	(struct bfd_elf_section_data): Add field rel_hashes.
	(struct elf_obj_tdata): Remove fields internal_syms and symbols.
	Add field sym_hashes.
	(obj_symbols, obj_internal_syms): Remove definitions.
	(elf_sym_hashes): Define.
	(struct elf_link_hash_entry): Define.
	(struct elf_link_hash_table): Define.
	(elf_link_hash_lookup): Define.
	(elf_link_hash_traverse): Define.
	(elf_hash_table): Define.
	(_bfd_elf_link_hash_table_create): Declare.
	(bfd_elf32_bfd_link_add_symbols): Declare.
	(bfd_elf32_bfd_final_link): Declare.
	(bfd_elf64_bfd_link_add_symbols): Declare.
	(bfd_elf64_bfd_final_link): Declare.
	* elf.c: Include bfdlink.h.
	(elf_link_hash_newfunc): New function.
	(_bfd_elf_link_hash_table_create): New function.
	* elf32-target.h (elf_backend_relocate_section): If not defined,
	define as 0 and use generic linker.  Otherwise, use ELF backend
	linker.
	(elf_backend_collect): If not defined, define as false.
	(elf_backend_add_symbol_hook): If not defined, define as 0.
	(elf32_bed): Initialize new fields.
	* elf64-target.h: Same changes as elf32-target.h.
	* elf32-i386.c: Include bfdlink.h.
	(elf_i386_relocate_section): New function.
	(elf_backend_relocate_section): Define.
	* elf32-sparc.c: Include bfdlink.h.
	(elf_info_to_howto): Change type of dst from Elf32_Internal_Rela
	to Elf_Internal_Rela (they're the same type anyhow).
	(elf_sparc_relocate_section): New function.
	(elf_backend_relocate_section): Define.
	* elf32-mips.c (elf_backend_collect): Define.
1994-05-09 16:58:36 +00:00
Steve Chamberlain d66da74230 * config/go32.mh: XX support.
From bill
	* Makefile.in: Build sysdep.h without causing worrying but
	harmless error message.
1994-05-06 18:53:44 +00:00
Ian Lance Taylor 973bfc476b * nlmcode.h (nlm_swap_auxiliary_headers_in): Rework custom header
handling for latest suggested format.
	(nlm_swap_auxiliary_headers_out): Likewise.
	(nlm_compute_section_file_positions): Likewise.
1994-05-06 17:37:39 +00:00
Ian Lance Taylor 77d1128466 For PR 1927.
Changed m68k-aout to set flags to 0; m68k-sunos still uses 1.
	* aout0.c: New file.
	* targets.c (aout0_big_vec): Declare.
	(bfd_target_vector): Add aout0_big_vec.
	* config.bfd (m68*-*-aout*): Use m68k-0aout, not m68k-aout.
	* config/m68k-aout.mt (SELECT_VECS): Removed.
	* config/m68k-0aout.mt: New file.
	* configure.in (aout0_big_vec): New target vector: use aout0.o,
	aout32.o and stab-syms.o.
	* Makefile.in: Rebuilt dependencies.
	(BFD32_BACKENDS): Add aout0.o.
	(CFILES): Add aout0.c.

	* libaout.h (struct aout_backend_data): Add field exec_hdr_flags.
	* aout-target.h (MY_exec_hdr_flags): If not defined, define as 0.
	MY(backend_data): Initialize exec_hdr_flags field.
	* aoutf1.h (sunos_32_set_arch_mach): Make static.
	(aout32_sunos4_write_object_contents): Set flags from backend
	info.
	(MY_exec_hdr_flags): If not defined, define as 1.
	(sunos4_aout_backend): Initialize exec_hdr_flags field.
	* aout-encap.c (encap_write_object_contents): Set flags from
	backend info.
	(MY_exec_hdr_flags): Define as N_FLAGS_COFF_ENCAPSULATE.
	* hp300hpux.c (MY_exec_hdr_flags): Define as 0x2.
	(MY(write_object_contents)): Set flags from backend info.
	* i386aout.c (MY(backend_data)): Initialize exec_hdr_flags field.
	* i386mach3.c (MY(backend_data)): Likewise.
	* mipsbsd.c (MY(backend_data)): Likewise.
	* sparclynx.c (NAME(aout,sparclynx_write_object_contents)): Set
	flags from backend info.
	(sparclynx_aout_backend): Initialize exec_hdr_flags field.
1994-05-04 19:37:36 +00:00
Ken Raeburn 127f8e91ee * config.bfd (i386-*-gnu*): Treat like i386-*-mach*.
(m68*-apollo-*): Treat all Apollo configs the same, don't handle BSD specially.
1994-05-04 17:31:36 +00:00
Ian Lance Taylor 92400edbcd * cache.c: Rewrote to work correctly.
* libbfd.h: Rebuilt.
	* opncls.c (bfd_cache_init, bfd_open_file): Don't declare.
	(bfd_fdopenr): Check return value of bfd_cache_init.
1994-05-03 23:58:06 +00:00
Ian Lance Taylor e3361fc35c * cf-m68klynx.c (CALC_ADDEND): Check for PC relative relocs by
enumerating them, since the reloc type can not serve as an index
	into the m68k COFF howto_table.
1994-04-29 19:09:51 +00:00
Steve Chamberlain dbf13547b7 * config.bfd (*-go32): Changed to coff.
* coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches.
	* srec.c (srec_write_symbols): Write out the correct number of
	symbols and don't stick in extra nulls.
1994-04-29 16:48:25 +00:00
Steve Chamberlain 7c6ba20141 * coff-h8300.c (JMPL1): Get HOWTO right for 24bit branches. 1994-04-29 16:44:48 +00:00
Stan Shebs 380c60b19a Tue Apr 26 15:07:24 1994 Stan Shebs (shebs@andros.cygnus.com)
* cf-sparclynx.c (LYNXOS, COFF_LONG_FILENAMES): Define.
	* coff-sparc.c (BADMAG): Recognize LYNXCOFFMAGIC.
	(COFF_SPARC): Define.
	* coffcode.h (coff_new_section_hook): If COFF_SPARC, set alignment
	power of data and bss sections to 3.
	* hosts/lynx.h (__LYNXOS): Define.

Brought over from 94Q1.
1994-04-26 22:10:10 +00:00
Jeff Law 6c101bcf78 * elf32-hppa.c (hppa_elf_reloc): Adjust the addend of relocations
against section symbols to avoid losing during ld -r.
1994-04-26 22:06:13 +00:00
Ian Lance Taylor ba436e33cd * elfcode.h (write_relocs): Undo patch of Apr 10; breaks Solaris. 1994-04-25 19:52:15 +00:00
Ian Lance Taylor 2e03ce1861 * elfcode.h (bfd_section_from_shdr): Use bfd_make_section_anyway
to create sections.  Check return value of recursive calls.
	(bfd_section_from_phdr): Check return value of bfd_make_section.
	(elf_symbol_from_bfd_symbol): Likewise.
	(elf_object_p): Check return value of bfd_section_from_shdr.
	(section_from_elf_index): Likewise.
	(elf_slurp_symbol_table): Check return value of
	section_from_elf_index.
	(bfd_prstatus): Return boolean value.  Check return value of
	bfd_make_section.
	(bfd_fpregset): Likewise.
	(bfd_prpsinfo): Return boolean value.
	(elf_corefile_note): Check return values of bfd_prstatus,
	bfd_fpregset, and bfd_prpsinfo.
	(elf_core_file_p): Check return value of elf_corefile_note.
1994-04-25 19:36:51 +00:00
Ian Lance Taylor cc71e155b6 Get rid of the ECOFF .reginfo section hack.
* ecoff.c (ecoff_mkobject_hook): Don't create a .reginfo section.
	(ecoff_new_section_hook): Don't handle the .reginfo section.
	(ecoff_sizeof_headers): Likewise.
	(ecoff_get_section_contents): Likewise.
	(ecoff_compute_section_file_positions): Likewise.
	(ecoff_compute_reloc_file_positions): Likewise.
	(ecoff_set_section_contents): Likewise.
	(ecoff_write_object_contents): Likewise.
	(ecoff_bfd_final_link): Likewise.
	(ecoff_bfd_copy_private_bfd_data): Copy the GP value and the
	register masks.
	(bfd_ecoff_get_gp_value): New function.
	(bfd_ecoff_set_gp_value): New function.
	(bfd_ecoff_set_regmasks): New function.
	* bfd-in.h (bfd_ecoff_get_gp_value): Declare.
	(bfd_ecoff_set_gp_value): Declare.
	(bfd_ecoff_set_regmasks): Declare.
	* bfd-in2.h: Rebuilt.
1994-04-22 22:09:25 +00:00
Ian Lance Taylor 1bb42b1f2b Fix ECOFF objcopy to actually copy debugging information.
* ecoff.c (ecoff_bfd_copy_private_bfd_data): New function.
	(ecoff_get_extr): Assume that any ECOFF symbol with local clear is
	an external symbol, rather than checking the symbol flags.  Only
	check the flags for non-ECOFF symbols.
	* ecofflink.c (bfd_ecoff_debug_externals): Don't crash if the
	output_section field of the symbol section is NULL.
	* libecoff.h (ecoff_bfd_copy_private_bfd_data): Declare as
	function rather than defining as macro.
1994-04-22 20:32:51 +00:00
Ian Lance Taylor d290d8da0e * targets.c (bfd_target_vector): Add bfd_elf32_powerpc_vec. 1994-04-22 17:38:20 +00:00
Ian Lance Taylor 80a903c960 * aout-adobe.c (aout_adobe_set_arch_mach): Check return value of
bfd_default_set_arch_mach.  Accept bfd_arch_m68k as well as
	bfd_arch_unknown.
	* elfcode.h (elf_set_arch_mach): Don't check a list of ELF
	architectures, just see if the desired architecture matches what
	the ELF backend permits.
1994-04-22 17:11:37 +00:00
Ian Lance Taylor 79167def08 Follow convention in which each NLM header has an 8 byte stamp
followed by a four byte length.
	* libnlm.h (struct nlm_obj_tdata): Rename nlm_cygnus_section_hdr
	to nlm_cygnus_ext_header, and change type to
	Nlm_Internal_Cygnus_Ext_Header.
	(nlm_cygnus_ext_header): Rename from nlm_cygnus_section_header.
	* nlmcode.h (nlm_swap_auxiliary_headers_in): Use CyGnUsEx instead
	of CyGnUsSeCs.  Rename from cygnus_section to cygnus_ext.  Require
	length word to be 8.
	(nlm_swap_auxiliary_headers_out): Rename from cygnus_section to
	cygnus_ext.  Set length word to 8.
	(nlm_compute_section_file_positions): Rename from cygnus_section
	to cygnus_ext.
1994-04-22 15:16:34 +00:00
Stu Grossman 7f772644c7 * nlmcode.h (nlm_swap_auxiliary_headers_in): Keep section table
(from CyGnUsSeCs) in more permanent memory to keep section names
	from getting trashed.
1994-04-22 05:59:24 +00:00
Ian Lance Taylor 1eff2af3ba Clean up uses of _bfd_dummy_target (from Peter Schauer).
* libbfd.c (_bfd_dummy_target): Set bfd_error_wrong_format.
	* nlm-target.h (nlm_core_file_p): Define as _bfd_dummy_target, not
	NULL.
	* srec.c (srec_vec): Use _bfd_dummy_target, not NULL, in
	_bfd_check_format.
	(symbolsrec_vec): Likewise.
	* tekhex.c (tekhex_vec): Likewise.
1994-04-21 18:19:22 +00:00
Peter Schauer cb71adf12b * libelf.h (elf_obj_tdata): Add members for dynamic symbol table
handling.
	* elfcode.h (bfd_section_from_shdr):  Handle dynamic symbol table.
	* elfcode.h (elf_slurp_symbol_table):  Take additional parameter
	to select static or dynamic symbol table and return number of
	symbols slurped or -1 on error.
	* elfcode.h (elf_get_symtab):  Set bfd symcount from
	elf_slurp_symbol_table result.
	* elfcode.h (elf_get_dynamic_symtab_upper_bound,
	elf_canonicalize_dynamic_symtab):  New functions to handle dynamic
	symbol table.
	* elf32-target.h, elf64-target.h (BFD_JUMP_TABLE_DYNAMIC):
	Change to handle dynamic symbol table, provide default definitions
	for dynamic relocs.
	* aoutx.h (howto_table_std, NAME(aout,swap_std_reloc_out),
	NAME(aout,swap_std_reloc_in), aout_link_input_section_std,
	aout_link_reloc_link_order):  Handle r_jmptable and r_relative
	relocations.
1994-04-21 17:01:12 +00:00
Ian Lance Taylor 6c534df0c9 * libnlm.h (struct nlm_obj_tdata): Add nlm_cygnus_section_hdr
field.
	(nlm_cygnus_section_header): New accessor macro.
	* nlmcode.h (nlm_object_p): Free new tdata structure if failure.
	Add fixed sections before swapping in auxiliary headers.  After
	adding sections, treat errors as real, not as wrong format.
	(nlm_swap_auxiliary_headers_in): Swap in the sections header; add
	sections to the BFD for each section it describes.
	(nlm_swap_auxiliary_headers_out): Swap out the sections header.
	(nlm_compute_section_file_positions): Account for the size of the
	sections header.
1994-04-21 16:13:01 +00:00
Ken Raeburn 4a5bfdbc73 * coff-sparc.c (sparccoff_vec): Change minimum alignment power to 2, so that
stab sections can be multiples of 4 bytes only.
1994-04-20 22:44:52 +00:00