Commit graph

1479 commits

Author SHA1 Message Date
Ken Raeburn
7e7fb4a834 updated with alpha changes 1994-01-20 00:07:58 +00:00
Ken Raeburn
693f8191ed (alpha_howto_table): Construct 64-bit negative one values in case of
compilation on a 32-bit machine.  Fix pcrel fields of some reloc types.
(alpha_bfd_reloc_type_lookup): Handle more relocation types.
1994-01-19 23:52:47 +00:00
Ken Raeburn
563eb766b1 (enum bfd_reloc_code_real): Add some Alpha relocation types. Reorganized some
of the existing ones.
1994-01-19 23:51:41 +00:00
Ken Raeburn
5802eb8f93 (sprintf_vma, fprintf_vma): New macros.
(uint64_typeHIGH, uint64_typeLOW): Comment with HOST_64_BIT so they get copied
to bfd.h.
1994-01-19 22:35:48 +00:00
Ken Raeburn
d110544cd0 (uint64_typeHIGH, uint64_typeLOW): Supply default definitions when not defined,
regardless of whether uint64_type is a defined macro or not.

(fprintf_vma, sprintf_vma): Define only if fprintf_vma is not already defined.
1994-01-19 22:32:32 +00:00
Ian Lance Taylor
d7e34f67be * aoutx.h (translate_to_native_sym_flags): Set the type of a
BSF_WARNING symbol to N_WARNING.
1994-01-19 05:05:27 +00:00
Ian Lance Taylor
3a5b50f457 Resolve warning symbols like indirect symbols. 1994-01-19 04:48:37 +00:00
Ian Lance Taylor
53155af199 * aoutx.h (aout_link_add_symbols): Increment sym_hash as well as p
for an indirect or warning symbol.
	(aout_link_write_symbols): Update sym_hash with the target of an
	indirect symbol.  If an indirect symbol is defined, output the
	calculated value and don't output the target symbol.
1994-01-18 21:46:46 +00:00
Ian Lance Taylor
d4366f97ef Comment fix. 1994-01-18 20:51:15 +00:00
David MacKenzie
0c205af2c5 * aoutx.h (translate_from_native_sym_flags): Give warning symbols
an (unused) nonzero section value, needed for check below.
1994-01-18 12:05:32 +00:00
David MacKenzie
964affdcf8 * aoutx.h (translate_from_native_sym_flags,
aout_link_add_symbols): Treat N_SET[ABDT] | N_EXT like
	N_SET[ABDT].
1994-01-17 23:21:07 +00:00
Ian Lance Taylor
38a5f510bc * elfcode.h (elf_object_p): If there is a SHT_DYNAMIC section, set
the DYNAMIC flag for the BFD.
	(NAME(bfd_elf,write_object_contents)): Don't try to write out a
	BFD with the DYNAMIC flag set, since we don't generate the program
	header table correctly.
1994-01-14 22:35:41 +00:00
Ian Lance Taylor
75919b3b2f * ecoff.c (ecoff_link_write_external): An ifd can be -1. 1994-01-14 04:10:44 +00:00
Jeff Law
9558d13f84 * som.c (som_set_reloc_info): Provide a default symbol for
relocations which don't actually have an associated symbol.
1994-01-13 22:53:03 +00:00
Jeff Law
3996115456 * som.c (hppa_som_reloc): Add new "error message" argument. 1994-01-13 20:34:25 +00:00
Peter Schauer
3247659731 Enable gdb to write to core files on more core file readers.
* libbfd.c (bfd_generic_set_section_contents):  Remove range check
	for section size, it is already done in bfd_set_section_contents
	with bfd_get_section_size_now.
	* aix386-core.c, hppabsd-core.c, hpux-core.c, irix-core.c,
	osf-core.c, ptrace-core.c, trad-core.c (*_set_section_contents):
	Use bfd_generic_set_section_contents instead of bfd_false.
1994-01-12 21:40:42 +00:00
Ian Lance Taylor
92f345b9e4 * linker.c (default_indirect_link_order): Don't expect space for
output relocations if there aren't any input relocations.
1994-01-12 20:33:30 +00:00
Ian Lance Taylor
c5481a5e52 * aoutx.h (NAME(aout,final_link)): Set a_entry before computing
file offsets.
1994-01-11 20:58:30 +00:00
Ian Lance Taylor
fed872d325 * elfcode.h (swap_out_syms): A common symbol is STT_OBJECT, not
STT_NOTYPE.
1994-01-11 19:39:28 +00:00
Ian Lance Taylor
cf286547ef * ecofflink.c: Extensive changes to compress and merge debugging
information, and to write some of out directly rather than saving
	it in memory.  Several new functions and structures, and new
	arguments to existing functions.
	* ecoff.c (ecoff_compute_reloc_file_positions): Compute
	sym_filepos as well.
	(ecoff_get_extr): Use ifdmap instead of ifdbase.
	(ecoff_write_object_contents): Don't compute sym_filepos here.
	Only output symbols if outsymbols is not NULL.
	(ecoff_bfd_final_link): Adjust for changes in ecoff_debug_info and
	bfd_ecoff_debug functions.  Write out debugging information here.
	(ecoff_final_link_debug_accumulate): Adjust for changes in
	bfd_ecoff_debug functions.
	(ecoff_link_write_external): Use ifdmap rather than ifdbase.
	* elf32-mips.c (mips_elf_read_ecoff_info): Read external symbols
	first, to put them in the first memory buffer.  Clear fdr field.
	(mips_elf_get_extr): Use pointer to unswapped external symbol.
	(mips_elf_final_link): Adjust for changes in bfd_ecoff functions.
	Preserve .text, .data and .bss even if they are empty.  Save
	pointer to unswapped external symbol rather than copying it.
	Don't free up the external symbols.
	* libelf.h (elf_symbol_type): Change mips_extr to PTR.
	* bfd-in.h (bfd_ecoff_debug_init, bfd_ecoff_debug_free): Declare.
	(bfd_ecoff_debug_accumulate): Update declaration.
	(bfd_ecoff_debug_accumulate_other): Rename declaration from
	bfd_ecoff_debug_link_other and update.
	(bfd_ecoff_write_accumulated_debug): Declare.
	* bfd-in2.h: Rebuilt.
	* Makefile.in: Rebuilt dependencies.
1994-01-11 16:23:41 +00:00
Jim Kingdon
b36b8a6e94 * config.bfd: Use ELF, not COFF for m88*-*-dgux*.
Combine m88k-*-* and m88110-*-* cases into m88*-*-*.
1994-01-11 14:13:55 +00:00
Jim Kingdon
2c96ba79c4 * Makefile.in (install): Remove "@" which follows a backslash. In
this position it just causes errors, not suppresses echoes.
1994-01-11 01:54:37 +00:00
Stan Shebs
e4c7516baa Set lose_these_too correctly 1994-01-11 01:15:02 +00:00
Jeff Law
2304e1e878 * som.c (hppa_som_gen_reloc_type): Fix handling of LT and RT
field selectors.
1994-01-10 17:07:52 +00:00
Ken Raeburn
fb4cf140d6 * config/i386-netbsd.mt (SELECT_VECS): Include i386bsd_vec, for compatibility
with 386bsd and netbsd0.8.
1994-01-09 20:30:00 +00:00
David MacKenzie
5330499f72 * aoutx.h (adjust_z_magic): Don't merge the start of bss with the
end of data if they are not contiguous.
1994-01-07 21:33:00 +00:00
David MacKenzie
d44b2ddb59 * aoutf1.h (sunos4_aout_backend): Comment the fields' meanings. 1994-01-07 20:50:57 +00:00
Ian Lance Taylor
a5a835ffd8 * ecoff.c (ecoff_mkobject_hook): Don't set SEC_SHARED_LIBRARY flag
for .reginfo section here.
	(ecoff_new_section_hook): Set it here instead.
1994-01-07 20:43:55 +00:00
Stan Shebs
fbe3316aba Fri Jan 7 10:34:47 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-make.in: Replace 8-bit chars with their names.
	* coffswap.h (coff_swap_scnhdr_out): Add alternative version with
	partly-expanded macros.
1994-01-07 19:05:23 +00:00
Stan Shebs
442da99575 Fri Jan 7 10:29:27 1994 Stan Shebs (shebs@andros.cygnus.com)
* bfd-in.h: (bfd_boolean): Add workaround for systems that also
	define true and false as enums.
	(ALMOST_STDC): Add as alternative to __STDC__.
	* bfd-in2.h: Rebuilt.
	* syms.c (bfd_print_symbol_vandf): Convert a PTR to FILE*.
1994-01-07 19:03:10 +00:00
Ian Lance Taylor
90d58284c1 Various entries. 1994-01-07 01:24:33 +00:00
Ian Lance Taylor
fe83b22bf0 Really remove files that are no longer used. 1994-01-07 01:24:07 +00:00
Ian Lance Taylor
130308bf6d * targets.c (target_vector): Added nlm32_alpha_vec inside #ifdef
BFD64.
	* Makefile.in (BFD32_BACKENDS): Remove nlm32-alpha.o.
	(BFD64_BACKENDS): Add nlm32-alpha.o.  It depends on 64 bit
	support, even though it is for an Alpha in 32 bit mode.
	* configure.in (nlm32_alpha_vec): Set target64 to true.

	* nlm32-gen.c, nlm64-gen.c: Removed.  All nlm targets are
	different, so there is no point to providing a generic one.
	* libnlm.h: Don't bother to check for nlm_backend(bfd) being NULL
	in the backend accessor macros; that should no longer be possible.
	* targets.c (target_vector): Removed nlm32_big_generic_vec,
	nlm64_big_generic_vec, nlm64_little_generic_vec.
	* configure.in (nlm32_big_generic_vec, nlm32_little_generic_vec,
	nlm64_big_generic_vec, nlm64_little_generic_vec): Removed.
	* Makefile.in: Rebuilt dependencies, and
	(BFD32_BACKENDS): Removed nlm32-gen.o.
	(BFD64_BACKENDS): Removed nlm64-gen.o.
	(CFILES): Removed nlm32-gen.c and nlm64-gen.c.
1994-01-07 01:21:37 +00:00
David MacKenzie
6f56c941ee * aoutx.h (translate_to_native_sym_flags): Catch the case where
there is no output section.
1994-01-06 22:26:18 +00:00
Ian Lance Taylor
559d5074f7 * hp300hpux.c (ARCH_SIZE): Define before including aoutx.h. 1994-01-06 22:18:59 +00:00
Ian Lance Taylor
2f84ec0d97 Various entries. 1994-01-06 20:05:44 +00:00
Ian Lance Taylor
966e0a16b8 * ecoff.c: First cut at new style of linker backend for
ECOFF--added a bunch of functions.  Also:
	(ecoff_sec_to_styp_flags): Set flags for .pdata and .xdata.
	(ecoff_slurp_symbolic_header): New function.
	(ecoff_slurp_symbolic_info): Call ecoff_slurp_symbolic_header.
	(ecoff_compute_reloc_file_positions): New function.
	(ecoff_set_section_contents): Get out quickly if count is zero.
	Check errors better.
	(ecoff_write_object_contents): Put .xdata section in data segment.
	Call ecoff_compute_reloc_file_positions.  Don't output relocs or
	external symbols if outsymbols is NULL.
	(ecoff_bfd_final_link): Completely rewritten.
	* libecoff.h: Include bfdlink.h.
	(struct ecoff_backend_data): Add relocate_section field.
	(ecoff_data_type): Add sym_hashes and symndx_to_section fields.
	(struct ecoff_link_hash_entry): Define.
	(struct ecoff_link_hash_table): Define.
	(ecoff_bfd_link_add_symbols): Declare as function, not macro.
	(ecoff_bfd_link_hash_table_create): Likewise.
	* ecofflink.c (bfd_ecoff_debug_one_external): New function.
	(bfd_ecoff_debug_externals): Call bfd_ecoff_debug_one_external.
	* bfd-in.h (bfd_ecoff_debug_one_external): Declare.
	* bfd-in2.h: Rebuilt.
	* coff-alpha.c (alpha_howto_table): Mark BRADDR as
	partial_inplace, and set the src_mask to 0x1fffff.
	(alpha_ecoff_get_relocated_section_contents): Remove unused
	variable gp_warned.
	(alpha_convert_external_reloc): New static function.
	(alpha_relocate_section): New static function.
	(alpha_ecoff_backend_data): Initialize relocate_section field.
	* coff-mips.c (mips_relocate_refhi): New static function.
	(mips_relocate_section): New static function.
	(mips_ecoff_backend_data): Initialize relocate_section field.
1994-01-06 20:04:43 +00:00
Ian Lance Taylor
e68de5d56a * aoutx.h (NAME(aout,final_link)): Don't abort when trying to link
a non a.out file, just pass it to _bfd_default_link_order.
	(aout_link_input_section_std): When doing a final PC relative link
	against a section symbol, subtract the VMA of the input section.
	(aout_link_input_section_ext): Likewise.
1994-01-06 20:02:49 +00:00
Ian Lance Taylor
6e07e54f1b * linker.c (_bfd_generic_link_add_one_symbol): Add constructor and
bitsize arguments.  Changed all callers (aoutx.h).
	(default_indirect_link_order): Renamed from
	_bfd_generic_indirect_link_order and made static.
	(_bfd_generic_final_link): Don't switch on link_order type, just
	call _bfd_default_link_order.
	(_bfd_default_link_order): Handle bfd_indirect_link_order type.
	* genlink.h: Removed declaration of
	_bfd_generic_indirect_link_order.
	* elf32-mips.c (mips_elf_final_link): Don't switch on link_order
	type, just call _bfd_default_link_order.
1994-01-06 20:01:42 +00:00
David D. Zuhn
0b0dbdfc8a fix comment delimiters 1994-01-05 19:35:44 +00:00
Stan Shebs
6625a2efec Remove ChangeLog entry, since one change was backed out immediately and
the other never committed.
1994-01-04 00:42:09 +00:00
Stan Shebs
a92c59065a Mon Jan 3 10:59:28 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW version of configure.in.
	* mpw-make.in: New file, MPW version of Makefile.in.
	* hosts/mpw.h: New file, MPW host definitions.

Mon Jan  3 13:00:07 1994  Stan Shebs  (shebs@andros.cygnus.com)

	* mpw-xconfig.in: New file, mpw x mips configuration bits.
1994-01-04 00:38:05 +00:00
Stan Shebs
d60e8a540e Mon Jan 3 10:59:28 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW version of configure.in.
	* mpw-make.in: New file, MPW version of Makefile.in.
	* hosts/mpw.h: New file, MPW host definitions.
1994-01-04 00:34:05 +00:00
David MacKenzie
83acd9a218 * aout-target.h (MY(vec)): Add DYNAMIC to mask of object flags.
* aoutf1.h (NAME(aout,sunos4_write_object_contents)):
	If the DYNAMIC flag is set, set it in the exec header.
	* aoutx.h (NAME(aout,some_aout_object_p)): If the object is
	dynamically linked, set the DYNAMIC flag in the BFD.
	* libaout.h (N_SET_DYNAMIC): New macro.
	(N_DYNAMIC): Add missing 0 in mask.
1994-01-04 00:08:53 +00:00
Ian Lance Taylor
85d739444c * bfd-in.h, hash.c: Change bfd_hash_allocate argument from size_t
to unsigned int, because size_t may not be defined in bfd.h.
	* bfd-in2.h: Rebuilt.
1994-01-03 22:42:12 +00:00
Stan Shebs
c91884b377 Mon Jan 3 13:05:08 1994 Stan Shebs (shebs@andros.cygnus.com)
* syms.c (bfd_print_symbol_vandf): Change PTR to FILE *.
	* hosts/irix4.h (exit): Declare properly.
1994-01-03 22:02:48 +00:00
Ian Lance Taylor
8120aa8f45 Entry for making swapping retrieval routines take const argument. 1994-01-03 21:36:02 +00:00
Ian Lance Taylor
1a973af1cf * bfd-in.h (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
be a const pointer.
	* bfd-in2.h: Rebuilt.
	* libbfd.c (bfd_get{b,l}[_signed_]{16,32,64}): Declare argument to
	be a const pointer.
	* targets.c (bfd_target): Change swap function pointers
	accordingly.
	* archive.c (do_slurp_coff_armap): Change swap accordingly.
	* aix386-core.c: Change NO_GET and NO_GETS accordingly.
	* hppabsd-core.c, hpux-core.c, irix-core.c, osf-core.c,
	ptrace-core.c, trad-core.c: Change NO_GET and NO_SIGNED_GET
	accordingly.
1994-01-03 21:28:43 +00:00
Ian Lance Taylor
2af2b7c4f2 Renamed get_elt_at_filepos to _bfd_get_elt_at_filepos, and made it
non-static.
1994-01-03 18:27:24 +00:00
Ian Lance Taylor
b59f0276fa * libbfd-in.h (struct artdata): Added tdata field.
(_bfd_add_bfd_to_archive_cache): Declare.
	(_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
	* libbfd.h: Rebuilt.
	* archive.c: Cleaned up some more.
	(_bfd_generic_mkarchive, bfd_generic_archive_p): Initialize
	pointer elements of artdata.
	(_bfd_add_bfd_to_archive_cache): Renamed from add_bfd_to_cache.
	(_bfd_snarf_ar_hdr): Renamed from snarf_ar_hdr.
	(get_extended_arelt_filename, get_elt_at_filepos,
	bfd_construct_extended_name_table, bfd_ar_hdr_from_filesystem,
	compute_and_write_armap): Made static.
	* ecoff.c: Some comment changes.
	(ecoff_slurp_armap): Handle rename of snarf_ar_hdr.  Set
	ardata->tdata to raw_armap.
	(ecoff_archive_p): Initialize pointer elements of artdata.
	* coff-rs6000.c (rs6000coff_get_elt_at_filepos): Handle rename of
	add_bfd_to_cache.
1994-01-03 18:05:19 +00:00