Commit graph

1730 commits

Author SHA1 Message Date
Jeff Law
9a5334e590 * elfcode.h (write_relocs): For rela relocations, adjust the
addend for relocations involving section symbols to account
        for the lossage of 1:1 mapping from input section symbols to
        output section symbols.
1994-04-10 08:12:33 +00:00
Ian Lance Taylor
ec6b18c4fa * aoutx.h (NAME(aout,make_sections)): New function.
(NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections)
	rather than making sections inline.
	(NAME(aout,mkobject)): Don't make any sections.
	(NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections).
	(NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or
	obj_datasec (abfd) if they are NULL.
	* libaout.h (NAME(aout,make_sections)): Declare.
	* bout.c (b_out_mkobject): Don't make any sections.
	(b_out_write_object_contents): Call aout_32_make_sections.
	(b_out_set_section_contents): Likewise.
	* i386os9k.c (os9k_mkobject): Don't make any sections.
	(os9k_write_object_contents): Call aout_32_make_sections.
	(os9k_set_section_contents): Likewise.
1994-04-08 21:40:38 +00:00
Ian Lance Taylor
e48f985cd2 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in target
index.
1994-04-08 16:24:01 +00:00
Peter Schauer
06863047a5 * config.bfd, configure.host: Add mips-*-sysv4* support. 1994-04-08 00:17:32 +00:00
Ian Lance Taylor
dabf906e9b * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.
(mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into
	r_offset and set r_symndx to RELOC_SECTION_TEXT.
	(mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx
	value from the r_offset field.
	(mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH.
	For MIPS_R_SWITCH, copy the r_offset field into the addend field.
	(mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field
	into the r_offset field.
	(mips_switch_reloc): New function.
	(mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into
	MIPS_R_SWITCH.
	(mips_relocate_section): Handle MIPS_R_SWITCH.
	(mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
1994-04-07 18:29:38 +00:00
Ian Lance Taylor
14bf9e4b42 Comment change. 1994-04-07 18:28:03 +00:00
Jeff Law
99a6c7613c * elfcode.h (elf_set_section_contents): Support calling the backend
function elf_backend_begin_write_processing when just beginning to
	write an object file.

	* libelf.h (elf_backend_begin_write_processing): Declare.

	* elf{32,64}-target.h (elf_backend_begin_write_processing): Provide
	a default definition.
	(elf{32,64}_bed): Add elf_backend_begin_write_processing.

	* elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration.
	(elf_hppa_tc_make_sections): Likewise.

	* elf32-hppa.c (symext_chain_built): Delete.
	(symext_chain_size): Renamed from symextn_contents_real_size.
	(elf32_hppa_backend_{begin,final}_write_processing): New functions.
	(add_entry_to_symext_chain): New function.
	(hppa_elf_set_section_contents): Ignore writes to the symbol extension
	section until it's been rebuilt internally.
	(hppa_elf_get_section_contents): Symbol extension section is no
	longer special.
	(elf_backend_{begin,final}_write_processing): Define.
	(elf_hppa_tc_make_sections): Simplify now that much code has
	migrated into elf32_hppa_backend_{being,final}_write_processing.
1994-04-07 18:12:25 +00:00
Ian Lance Taylor
dfc1c00613 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector. 1994-04-07 01:58:27 +00:00
Ian Lance Taylor
fa77c7041c * sunos.c (MY_read_dynamic_symbols): Don't define.
(MY_read_dynamic_relocs): Don't define.
	(MY_get_dynamic_symtab_upper_bound): Define.
	(MY_canonicalize_dynamic_symtab): Define.
	(MY_get_dynamic_reloc_upper_bound): Define.
	(MY_canonicalize_dynamic_reloc): Define.
	(struct sunos_dynamic_info): Change type of dynsym_count and
	dynrel_count to long.  Add fields canonical_dynsym and
	canonical_dynrel.
	(sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set.
	Clear info->canonical_dynsym and info->canonical_dynrel.
	(MY(read_dynamic_symbols)): Removed.
	(MY(read_dynamic_relocs)): Removed.
	(sunos_get_dynamic_symtab_upper_bound): New function.
	(sunos_canonicalize_dynamic_symtab): New function.
	(sunos_get_dynamic_reloc_upper_bound): New function.
	(sunos_canonicalize_dynamic_reloc): New function.
	* libaout.h: Declare struct reloc_ext_external and
	reloc_std_external to avoid prototype problems.
	(struct aout_backend_data): Remove fields read_dynamic_symbols and
	read_dynamic_relocs.
	(NAME(aout,translate_symbol_table)): Declare.
	(NAME(aout,swap_ext_reloc_in)): Declare.
	(NAME(aout,swap_std_reloc_in)): Declare.
	* aoutx.h (NAME(aout,translate_symbol_table)): Renamed from
	translate_symbol_table and made non-static.  Changed all callers.
	(NAME(aout,slurp_symbol_table)): Don't read dynamic symbols.
	(NAME(aout,slurp_reloc_table)): Don't read dynamic relocs.
	(NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs.
	* aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to
	remove dynamic symbols and relocs.  They will no longer be
	present.
	(MY_read_dynamic_symbols): Don't define.
	(MY_read_dynamic_relocs): Don't define.
	(sunos4_aout_backend): Don't initialize dynamic entry points.
	* aout-target.h (MY_read_dynamic_symbols): Don't define.
	(MY_read_dynamic_relocs): Don't define.
	(MY(backend_data)): Don't initialize dynamic entry points.
	(MY_get_dynamic_symtab_upper_bound): If not defined, define to
	_bfd_nodynamic version.
	(MY_canonicalize_dynamic_symtab): Likewise.
	(MY_get_dynamic_reloc_upper_bound): Likewise.
	(MY_canonicalize_dynamic_reloc): Likewise.
1994-04-07 01:50:10 +00:00
Ian Lance Taylor
ad46bd1d13 * targets.c (bfd_target): Add fields
_bfd_get_dynamic_symtab_upper_bound,
	_bfd_canonicalize_dynamic_symtab,
	_bfd_get_dynamic_reloc_upper_bound,
	_bfd_canonicalize_dynamic_reloc.
	(BFD_JUMP_TABLE_DYNAMIC): Define.
	* libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound):
	Define.
	(_bfd_nodynamic_canonicalize_dynamic_symtab): Define.
	(_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define.
	(_bfd_nodynamic_canonicalize_dynamic_reloc): Define.
	* bfd.c (bfd_get_dynamic_symtab_upper_bound): Define.
	(bfd_canonicalize_dynamic_symtab): Define.
	(bfd_get_dynamic_reloc_upper_bound): Define.
	(bfd_canonicalize_dynamic_reloc): Define.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
1994-04-07 01:48:51 +00:00
Ian Lance Taylor
7e29158a44 * cf-m68klynx.c: Include sysdep.h. 1994-04-07 01:47:16 +00:00
Ian Lance Taylor
93a8fd8dec Updated copyright (bfd-in2.h check in coming soon). 1994-04-07 01:40:54 +00:00
Ian Lance Taylor
6812b6077e * targets.c (bfd_target): Rearranged fields in target vector.
Removed _bfd_debug_info_start, _bfd_debug_info_end and
	_bfd_debug_info_accumulate, which were never used.
	(BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined.
	(BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined.
	(BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined.
	(BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined.
	* All backends: Changed to use the new BFD_JUMP_TABLE_* macros
	rather than the single JUMP_TABLE macro.  Removed many of the
	weird macro definitions needed to support the monolithic
	JUMP_TABLE.
	* bfd-in.h (JUMP_TABLE): Removed.
	* libbfd-in.h: Define a bunch of macros, and declare a few
	functions, for use with the new BFD_JUMP_TABLE_* macros.
	* libbfd.c (_bfd_dummy_new_section_hook): Removed.
	(bfd_false): Set bfd_error_invalid_operation.
	(bfd_nullvoidptr): Likewise.
	(bfd_n1): New function.
	(_bfd_nocore_core_file_matches_executable_p): Renamed from
	_bfd_dummy_core_file_matches_executable_p.
	(_bfd_nocore_core_file_failing_command): Similar rename.  Set
	bfd_error_invalid_operation.
	(_bfd_nocore_core_file_failing_signal): Likewise.
	(_bfd_generic_get_section_contents): Renamed from
	bfd_generic_get_section_contents.  Changed all callers.
	(_bfd_generic_set_section_contents): Similar rename.
	* ieee.c: #if 0 out ieee_bfd_debug_info_start,
	ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate.  They
	were never called.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
1994-04-06 22:00:40 +00:00
Jeff Law
65b1ef4963 * Crude support for examining dynamic libraries.
* som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and
        DL_MAGIC objects.
        (som_prep_headers): Preserve the system_id for DYNAMIC objects.
        Use SHL_MAGIC as the magic number of the DYNAMIC flag is set.
        Write exec headers for DYNAMIC objects.
        (som_begin_writing): DYNAMIC objects have the same alignment
        restrictions as D_PAGED objects.
        (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P
        objects.
        (object_flags): Add DYNAMIC.
1994-04-06 05:11:31 +00:00
Stan Shebs
117dbbc609 Tue Apr 5 17:54:07 1994 Stan Shebs (shebs@andros.cygnus.com)
* hosts/mpw.h (CLOSE_BEFORE_UNLINK): Define.
1994-04-06 00:55:51 +00:00
Stan Shebs
08a431621f Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)
* i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in
	macro uses, confuses some non-ANSI compilers.
1994-04-06 00:53:20 +00:00
Jeff Law
b2452d3918 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.
Don't free anything if we don't have a bfd_object.
        (som_close_and_cleanup): Call som_bfd_free_cached_info.
1994-04-05 22:50:42 +00:00
Ian Lance Taylor
856613c4fe * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.
It turns out not to be required on Irix 5, and it causes problems
	if the sections happen to contain symbols.
1994-04-05 16:29:00 +00:00
Ian Lance Taylor
d909628bb7 * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check. 1994-04-05 16:27:36 +00:00
Ian Lance Taylor
b3cee0a981 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out if
section->relocation is NULL; malloc might have returned NULL when
	given a zero size if there were no relocations.
	* bout.c (b_out_canonicalize_reloc): Likewise.
	* coffcode.h (coff_canonicalize_reloc): Likewise.
	* ecoff.c (ecoff_canonicalize_reloc): Likewise.
	* elfcode.h (elf_canonicalize_reloc): Likewise.
	* mipsbsd.c (MY(canonicalize_reloc)): Likewise.
	* i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
	* nlmcode.h (nlm_canonicalize_reloc): Likewise.
	* som.c (som_canonicalize_reloc): Likewise.
	* hp300hpux.c (MY(slurp_reloc_table)): Likewise.  Also, if malloc
	returns NULL, don't report an error if we asked for zero bytes.
	* i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns
	NULL, don't report an error if we asked for zero bytes.
	* nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
1994-04-05 15:32:49 +00:00
Ian Lance Taylor
c4dd531f11 * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anything
if we don't have a bfd_object.
1994-04-04 23:44:13 +00:00
Ian Lance Taylor
4002f18a05 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.
1994-04-04 22:49:04 +00:00
Ian Lance Taylor
6d4f771502 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.  Also:
	* srec.c (srec_write_record): Change return type to boolean.
	(srec_write_header): Likewise.  Also, check srec_write_record
	return value.
	(srec_write_section, srec_write_terminator): Likewise.
	(srec_write_symbols): Change return type to boolean.
	(internal_srec_write_object_contents): Check return value of
	srec_write_symbols, srec_write_header, srec_write_section, and
	srec_write_terminator.
1994-04-04 22:43:30 +00:00
Ian Lance Taylor
5f322b5eb0 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.  Also:
	* oasys.c (oasys_read_record): Change return type to boolean.
	(oasys_slurp_symbol_table: Check oasys_read_record return value.
	(oasys_object_p, oasys_slurp_section_data): Likewise.
	(oasys_write_record): Change return type to boolean.
	(oasys_write_syms): Likewise.  Also, check oasys_write_record
	return value.
	(oasys_write_sections): Check oasys_write_record return value.
	(oasys_write_header): Change return type to boolean.  Check
	oasys_write_record return value.
	(oasys_write_end, oasys_write_data): Likewise.
	(oasys_write_object_contents): Check return values of
	oasys_write_header, oasys_write_syms, oasys_write_data, and
	oasys_write_end.
1994-04-04 22:42:45 +00:00
Ian Lance Taylor
2baa7d54a6 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.  Also:
	* i386os9k.c (os9k_swap_exec_header_in): Change return type to
	boolean.
	(os9k_object_p): Check os9k_swap_exec_header_in return value.
1994-04-04 22:41:53 +00:00
Ian Lance Taylor
791a3db4a6 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.  Also:
	* coffcode.h (coff_write_relocs): Change return type to boolean,
	and return errors.
	(coff_write_object_contents): Check coff_write_relocs return
	value.
1994-04-04 22:41:21 +00:00
Ian Lance Taylor
29e626eb97 Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly.  These
	changes are not itemised.  Also:
	* aoutx.h (emit_strtab): Change return type to boolean, and return
	errors.
	(NAME(aout,write_syms)): Check emit_strtab return value.
	(NAME(aout,final_link)): Likewise.
1994-04-04 22:40:09 +00:00
Ian Lance Taylor
f3a14a9ee2 * Makefile.in: Rebuilt dependencies. 1994-04-04 20:04:52 +00:00
Peter Schauer
3e2993b648 * aix386-core.c (aix386_bfd_is_local_label): Correct cast from
asection to asymbol.
	* ptrace-core.c (ptrace_unix_bfd_is_local_label):  Correct cast from
	bfd to asymbol.
	* trad-core.c (trad_unix_bfd_is_local_label):  Correct cast from
	asection to asymbol.
1994-04-04 17:59:36 +00:00
Jeff Law
1f46bba327 * som.c (som_slurp_string_table): Use malloc to allocate space
for the cached copy of the native string table.
        (som_slurp_symbol_table): Likewise for the native symbol table.
        (som_slurp_reloc_table): Likewise for the native and generic
        relocation tables.
        (som_bfd_free_cached_info): Free the cached native strings,
        symbols, and relocations.  Also free the canonical cached relocations.
1994-04-04 01:28:51 +00:00
Ian Lance Taylor
d6d6b18ab2 * aoutx.h (aout_link_write_symbols): If keep_memory is false, make
sure the symbol name is stored in permanent memory before adding
	it to the string table.
1994-04-01 23:01:53 +00:00
Ian Lance Taylor
dfe09c4926 * archive.c (_bfd_write_archive_contents): Once we've found an
object, don't bother to look for more when deciding whether to
	build a map.
	(compute_and_write_armap): After adding the symbols for a BFD,
	call bfd_free_cached_info on it.
1994-04-01 22:12:00 +00:00
Ian Lance Taylor
5c8444f8f8 Add bfd_free_cached_info support to a.out backends.
* aoutx.h (aout_get_external_symbols): Renamed from
	aout_link_get_symbols.  Read strings even if symbols have been
	read.  Store string size in obj_aout_string_size.
	(NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to
	read the symbols.  Allocate the cached symbols with malloc, not
	bfd_alloc.
	(NAME(aout,slurp_reloc_table)): Allocate the cached relocs with
	malloc, not bfd_alloc.
	(NAME(aout,bfd_free_cached_info)): New function; free cached
	symbols and relocs.
	* libaout.h (struct aoutdata): Add external_string_size field.
	(obj_aout_external_string_size): New accessor macro.
	(NAME(aout,close_and_cleanup)): Don't declare.
	(NAME(aout,bfd_free_cached_info)): Declare.
	(aout_32_close_and_cleanup): Don't define.
	(aout_64_close_and_cleanup): Don't define.
	* aout-target.h (MY_bfd_free_cached_info): If not already defined,
	define as NAME(aout,free_cached_info).
	(MY_close_and_cleanup): If not already defined, define as
	MY_bfd_free_cached_info.
	* aout-adobe.c (aout_32_close_and_cleanup): Define.
	(aout_32_bfd_free_cached_info): Don't define.
	* bout.c (aout_32_close_and_cleanup): Define.
	(aout_32_bfd_free_cached_info): Don't define.
	* hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true.
	(MY_close_and_cleanup): Don't define.
	* i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached
	relocs with malloc, not bfd_alloc.
	* i386os9k.c (aout_32_close_and_cleanup): Define.
	(aout_32_bfd_free_cached_info): Don't define.
1994-04-01 22:08:38 +00:00
Ian Lance Taylor
9deaaaf1b3 * targets.c (bfd_target): Add _bfd_free_cached_info field.
* bfd.c (bfd_free_cached_info): Define.
	* bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info.
	* bfd-in2.h: Rebuilt.
	* All backends: Initialize bfd_free_cached_info entry point to
	bfd_true.
1994-04-01 17:55:47 +00:00
Ian Lance Taylor
7ed5e9704b * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type of
first, unused, argument.
	(hppa_elf_is_local_label): Declare instead of
	som_bfd_is_local_label.
1994-04-01 17:51:03 +00:00
Ian Lance Taylor
69a010f69c * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value of
absolute R_IREL reloc.
1994-04-01 17:44:29 +00:00
Ian Lance Taylor
f8ee1ebba0 Added some support for Irix 4 shared libraries.
* ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a
	.lib section.
	(ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if
	STYP_ECOFF_LIB bit is set.
	(ecoff_compute_section_file_positions): Round the contents of a
	.lib section up to the next page boundary.
	(ecoff_set_section_contents): If we see a .lib section, increment
	the vma by one to count the number of shared libraries we have.
	(ecoff_write_object_contents): Don't crash if we see a
	STYP_ECOFF_LIB section, and don't adjust text_start or data_start
	or bss_size either.
1994-03-31 21:38:23 +00:00
Ian Lance Taylor
492d52cc58 * coffcode.h (CALC_ADDEND): Change to fetch original symbol value
from original BFD, rather than using value of current BFD symbol.
	Needed for new linker.
	* coff-sparc.c (CALC_ADDEND): Likewise.
1994-03-31 21:05:21 +00:00
Ian Lance Taylor
1788b1bd01 * ecoff.c (ecoff_write_object_contents): Set the text_start and
data_start entries in the optional header correctly even if a text
	or data section starts at location zero.
1994-03-31 19:44:10 +00:00
Ian Lance Taylor
e9c6595dd4 Added missing ChangeLog entry for Sean's check in, and rebuilt
bfd-in2.h.
1994-03-31 19:08:22 +00:00
Ian Lance Taylor
3af0f479d0 * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbol
name.
	* nlm32-alpha.c (nlm_alpha_read_import): Likewise.
	* nlm32-sparc.c (nlm_sparc_read_import): Likewise.
1994-03-31 19:05:03 +00:00
Sean Eric Fagan
e770a59413 Missing BFD_RELOC_26. 1994-03-31 18:43:42 +00:00
Ian Lance Taylor
bfe8224f3e * coffgen.c (coff_write_symbol): Reindented. Changed to return
boolean, and changed written to unsigned int *.  Check error
	returns from called functions.
	(coff_write_alien_symbol): Likewise.
	(coff_write_native_symbol): Likewise.
	(coff_write_symbols): Likewise.  Reworked checks on whether to
	write symbol name to string table for clarity and to avoid core
	dumping when given a non COFF symbol.
	* libcoff-in.h (coff_write_symbols): Declare as returning boolean.
	* libcoff.h: Rebuilt.
	* coffcode.h (coff_write_object_contents): Check return value of
	coff_write_symbols.
1994-03-31 16:58:23 +00:00
Jeff Law
06e6eb0e53 * som.c (som_begin_writing): New approach at dealing with holes
in executables left by the HP linker.  Does not rely on subspace
        alignments as subspaces are *NOT* guaranteed to be properly
        aligned in an executable (can you believe that!).
1994-03-31 06:50:42 +00:00
Ian Lance Taylor
326e32d7ce Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Changes to let BFD return an error indication from
	get_symtab_upper_bound, bfd_canonicalize_symtab,
	bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc.  They now
	return long instead of unsigned int, and use -1 to indicate an
	error.  Along the way, rename get_symtab_upper_bound to
	bfd_get_symtab_upper_bound.
	* bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on
	errors.
	(bfd_canonicalize_reloc): Likewise.
	* syms.c (bfd_get_symtab_upper_bound): Renamed from
	get_symtab_upper_bound.
	* targets.c (bfd_target): Renamed _get_symtab_upper_bound to
	_bfd_get_symtab_upper_bound, and changed it and
	_bfd_canonicalize_symtab and _get_reloc_upper_bound and
	_bfd_canonicalize_reloc to all return long.
	* aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors.
	(NAME(aout,canonicalize_reloc)): Likewise.
	(NAME(aout,get_reloc_upper_bound)): Likewise.
	(NAME(aout,get_symtab_upper_bound)): Likewise.
	* bout.c (b_out_canonicalize_reloc): Likewise.
	(b_out_get_reloc_upper_bound): Likewise.
	* coffcode.h (coff_canonicalize_reloc): Likewise.
	* coffgen.c (coff_get_symtab_upper_bound): Likewise.
	(coff_get_symtab): Likewise.
	(coff_get_reloc_upper_bound): Likewise.
	* ecoff.c (ecoff_get_symtab_upper_bound): Likewise.
	(ecoff_get_symtab): Likewise.
	(ecoff_canonicalize_reloc): Likewise.
	* elfcode.h (elf_get_symtab_upper_bound): Likewise.
	(elf_get_reloc_upper_bound): Likewise.
	(elf_canonicalize_reloc): Likewise.
	(elf_get_symtab): Likewise.
	* hp300hpux.c (MY(get_symtab)): Likewise.
	(MY(get_symtab_upper_bound)): Likewise.
	(MY(canonicalize_reloc)): Likewise.
	* i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise.
	* ieee.c (ieee_slurp_external_symbols): Change return type to
	boolean.  Check for errors from get_symbol.
	(ieee_slurp_symbol_table): Change return type to boolean.  Check
	for errors from ieee_slurp_external_symbols.
	(ieee_get_symtab_upper_bound): Return long, and -1 on errors.
	(ieee_get_symtab): Likewise.
	(ieee_get_reloc_upper_bound): Likewise.
	(ieee_canonicalize_reloc): Likewise.
	* mipsbsd.c (MY(canonicalize_reloc)): Likewise.
	* nlmcode.h (nlm_get_symtab_upper_bound): Likewise.
	(nlm_get_symtab): Likewise.
	(nlm_get_reloc_upper_bound): Likewise.
	(nlm_canonicalize_reloc): Likewise.
	* oasys.c (oasys_get_symtab_upper_bound): Likewise.
	(oasys_get_symtab): Likewise.
	(oasys_get_reloc_upper_bound): Likewise.
	(oasys_canonicalize_reloc): Likewise.
	* som.c (som_get_symtab_upper_bound): Likewise.
	(som_get_symtab): Likewise.
	(som_get_reloc_upper_bound): Likewise.
	(som_canonicalize_reloc): Likewise.
	* srec.c (srec_get_symtab_upper_bound): Likewise.
	(srec_get_symtab): Likewise.
	(srec_get_reloc_upper_bound): Define as bfd_0l.
	(srec_canonicalize_reloc): Likewise.
	* tekhex.c (tekhex_get_symtab): Return long, and -1 on errors.
	(tekhex_get_symtab_upper_bound): Likewise.
	(tekhex_get_reloc_upper_bound): Define as bfd_0l.
	(tekhex_canonicalize_reloc): Likewise.
	* libaout.h (NAME(aout,get_symtab_upper_bound)): Change
	declaration to return long.
	(NAME(aout,get_symtab)): Likewise.
	(NAME(aout,canonicalize_reloc)): Likewise.
	(NAME(aout,get_reloc_upper_bound)): Likewise.
	* libcoff-in.h (coff_get_symtab_upper_bound): Likewise.
	(coff_get_symtab): Likewise.
	(coff_get_reloc_upper_bound): Likewise.
	* libecoff.h (ecoff_get_symtab_upper_bound): Likewise.
	(ecoff_get_symtab): Likewise.
	(ecoff_canonicalize_reloc): Likewise.
	* libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise.
	(bfd_elf32_get_symtab): Likewise.
	(bfd_elf32_get_reloc_upper_bound): Likewise.
	(bfd_elf32_canonicalize_reloc): Likewise.
	(bfd_elf64_get_symtab_upper_bound): Likewise.
	(bfd_elf64_get_symtab): Likewise.
	(bfd_elf64_get_reloc_upper_bound): Likewise.
	(bfd_elf64_canonicalize_reloc): Likewise.
	* libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise.
	(nlmNAME(get_symtab)): Likewise.
	(nlmNAME(get_reloc_upper_bound)): Likewise.
	(nlmNAME(canonicalize_reloc)): Likewise.
	* archive.c (compute_and_write_armap): Use error_return and
	no_memory_return labels rather than freeing information in various
	places.  Change storage, symcount and src_count to long.  Check
	errors from bfd_get_symtab_upper_bound and
	bfd_canonicalize_symtab.
	* bout.c (b_out_relax_section): Change reloc_size to long.  Check
	for errors from bfd_get_reloc_upper_bound and
	bfd_canonicalize_reloc.
	(b_out_get_relocated_section_contents): Likewise.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
	Likewise.
	* elf32-mips.c: Likewise.
	* elf32-hppa.c (hppa_elf_stub_finish): Likewise.
	(hppa_look_for_stubs_in_section): Check for errors from
	bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and
	bfd_canonicalize_reloc.
	* ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors
	from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab.
	* linker.c (generic_link_read_symbols): Likewise.
	(_bfd_generic_final_link): Check for errors from
	bfd_get_reloc_upper_bound and bfd_canonicalize_reloc.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
	* reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
	(bfd_coff_reloc16_get_relocated_section_contents): Likewise.
	* libbfd.c (bfd_0l): New function.
	* libbfd-in.h (bfd_0l): Declare.
	* aix386-core.c: Change get_symtab_upper_bound, get_symtab,
	get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather
	than bfd_0u.
	* cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise.
	* irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
	* libcoff.h: Rebuilt.

	* nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables
	temp and name.
1994-03-30 22:15:07 +00:00
Jim Kingdon
c2c818bc35 * hosts/dpx2.h: Define POSIX_UTIME. 1994-03-30 16:33:45 +00:00
Peter Schauer
bdf1b51158 * i386dynix.c, config/i386-dynix.mt: New files, handling Dynix
variant of a.out.
	* configure.in, config.bfd:  Use them for Dynix.
	* Makefile.in:  Add dependencies for i386dynix.o.
	* targets.c:  Add definition for i386dynix_vec.
1994-03-30 08:53:45 +00:00
Ian Lance Taylor
9f37f56aac Entry for last check in. 1994-03-28 23:44:43 +00:00
Ian Lance Taylor
6cac89c5c6 * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o. 1994-03-28 23:35:20 +00:00
Ian Lance Taylor
09a2820705 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc like
bfd_arch_rs6000.
1994-03-28 23:20:38 +00:00