Commit Graph

3492 Commits

Author SHA1 Message Date
Ian Lance Taylor e76386d24b start-sanitize-m32r
* elf32-m32r.c (m32r_elf_is_local_label_name): Remove.
	(bfd_elf32_bfd_is_local_label): Don't define.

end-sanitize-m32r
1997-03-19 03:01:27 +00:00
Ian Lance Taylor 939b216956 * xcofflink.c (_bfd_xcoff_bfd_final_link): Call bfd_malloc rather
than malloc.
1997-03-18 17:58:48 +00:00
Ian Lance Taylor 724a4c0d46 fix tipo in comment 1997-03-18 16:39:38 +00:00
Ian Lance Taylor 508539ab8b * bfd-in.h: Don't include obstack.h.
(struct bfd_hash_table): Change memory field to PTR.
	* bfd.c (struct _bfd): Change memory field to PTR.
	* bfd-in2.h: Rebuild.
	* libbfd-in.h (bfd_release): Declare as function, don't define as
	macro.
	* libbfd.h: Rebuild.
	* opncls.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(getpagesize): Don't define.
	(_bfd_new_bfd): Don't set _bfd_chunksize.
	(bfd_openr): Free new bfd and objalloc on failure.
	(bfd_fdopenr, bfd_openstreamr, bfd_openw): Likewise.
	(bfd_alloc_size): Remove.
	(bfd_release): New function.
	* hash.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	* ecofflink.c: Include "objalloc.h" rather than "obstack.h".  Use
	objalloc routines rather than obstack routines.
	(obstack_chunk_alloc, obstack_chunk_free): Don't define.
	(struct accumulate): Change memory to struct objalloc *.
	* liboasys.h (oasys_data_type): Remove oasys_obstack field.
	* dep-in.sed: Don't remove obstack.h from dependency list.
	* Makefile.in: Rebuild dependencies.
	(BFD_H_DEPS): Remove obstack.h.
	(install): Don't install obstack.h.
	* Many files: Don't include "obstack.h".
	* VERSION: Bump.
1997-03-18 00:47:04 +00:00
Ian Lance Taylor 0103b44764 * srec.c (srec_scan): Rewrite to not use obstack_1grow. 1997-03-17 20:14:55 +00:00
Ian Lance Taylor 062a1b96e0 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.
* libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare.
	* libbfd.h: Rebuild.
	* ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow.
	* sunos.c (sunos_add_dynamic_symbols): Likewise.
1997-03-17 17:51:20 +00:00
Ian Lance Taylor 50ede03d76 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. Remove
old version of bfd_alloc.
	* libbfd-in.h (bfd_alloc_by_size_t): Don't declare.
	* libbfd.h: Rebuild.
	* Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1997-03-17 16:36:08 +00:00
Ian Lance Taylor 5e67a3c601 * elf32-mips.c (mips_elf_is_local_label_name): Accept the generic
ELF local label syntax as well.
1997-03-15 20:27:16 +00:00
Fred Fish 7305cacd49 * config.bfd (powerpc-*-beos*): New target.
* configure.in (powerpc-*-beos*): Add case that explicitly
	does not set COREFILE for now.  A future BeOS version is
	expected to support core files.
	* configure: Regenerate with autoconf.
1997-03-15 17:27:45 +00:00
Ian Lance Taylor 4813bbed2b * elf32-mips.c (mips_elf_check_relocs): Give an error if CALL16 is
seen with a local symbol, rather than crashing.
1997-03-15 02:16:30 +00:00
Ian Lance Taylor f56d634e29 * elfcode.h (elf_slurp_symbol_table): Don't try to read the
version symbols if there aren't any.
1997-03-14 21:46:39 +00:00
Fred Fish 4507d85857 * coff-tic80.c (coff_rtype_to_howto): Define
(coff_tic80_rtype_to_howto): Clone generic coff version and
	add code to handle the funky TI "internal relocations".
1997-03-13 23:40:30 +00:00
Ian Lance Taylor 37897db02c * elflink.h (elf_link_add_object_symbols): Don't warn about type
or size changes because of a weak symbol.
PR 11827.
1997-03-13 19:24:20 +00:00
Ian Lance Taylor 94ba939aae * cisco-core.c (SIGEMT): Define if not defined. 1997-03-13 19:11:06 +00:00
Ian Lance Taylor e549b1d2a3 * elflink.h (elf_link_add_object_symbols): Use extsymoff when
setting ever.  Sanity check the version number.  Sort out copying
	flags and other information when adding an indirect symbol.
	(NAME(bfd_elf,size_dynamic_sections)): Preserve any dynamic
	symbols added by the backend.  Clear the entire contents of the
	versym section.
	(elf_export_symbol): Ignore indirect symbols.
	(elf_link_output_extsym): Accept a section without an owner in an
	assert.
	* elfcode.h (elf_slurp_symbol_table): Add a sanity check on the
	version count.  Correct the allocation of x_versymp.
1997-03-13 02:41:44 +00:00
Ian Lance Taylor 7d996a75d2 * elf32-mips.c (mips_elf_add_symbol_hook): Don't set the owner of
the magic sections used for SHN_MIPS_TEXT and SHN_MIPS_DATA.
	Don't return bfd_und_section_ptr when info->shared.
	(mips_elf_final_link): Set the alignment of .rtproc to 4, not 12.
	(mips_elf_create_dynamic_sections): Correct type: ^= for &=.
	(mips_elf_check_relocs): Resolve an indirect symbol in
	sym_hashes.
	(mips_elf_finish_dynamic_symbol): Don't change SHN_ABS into
	SHN_MIPS_TEXT or SHN_MIPS_DATA.
1997-03-13 02:41:08 +00:00
Ian Lance Taylor 52c92c7f75 From Eric Youngdale <eric@andante.jic.com>:
* elf-bfd.h (ELF_LINK_FORCED_LOCAL): Define.
	* elf.c (bfd_elf_print_symbol): Correct errors in last change.
	* elflink.h (elf_link_add_object_symbols): Handle cases in which a
	versioned symbol appears in both a regular and a shared object.
	(elf_link_assign_sym_version): Set ELF_LINK_FORCED_LOCAL when
	appropriate.  Improve error message.
	(struct elf_outext_info): Rename from elf_finfo_failed.  Change
	all uses.  Add localsyms field.
	(elf_bfd_final_link): When generating a shared library, call
	elf_link_output_extsym to output all local symbols.
	(elf_link_output_extsym): Handle symbols which were forced to
	become local.
1997-03-11 06:46:46 +00:00
Ian Lance Taylor d6bfcdb505 From Eric Youngdale <eric@andante.jic.com>:
* elf-bfd.h (elf_symbol_type): Add version field.
	* elfcode.h (elf_slurp_symbol_table): Set version field.
	* elflink.h (elf_link_add_object_symbols): When creating an
 	indirect symbol for a default version symbol, set DEF_DYNAMIC if
 	appropriate.  Set up an indirection from the nondefault version of
	the symbol as well.
	(NAME(bfd_elf,size_dynamic_sections)): Call
	elf_link_assign_sym_version before checking whether there are any
	versions.  Always record the version name as a dynamic symbol.
	Initialize counters.
	(elf_link_assign_sym_version): After finding a version, see if a
	symbol should be forced to local scope.  Create a new version
	definition if appropriate.
	(elf_link_output_extsym): Correct indirect symbol handling.
	* elf.c (bfd_elf_print_symbol): Print version information.
	(bfd_section_from_shdr): Turn version sections into BFD sections.
	(elf_fake_sections): Only copy cverdefs and cverrefs into sh_info
	if sh_info is not already set.
	(_bfd_elf_copy_private_section_data): Copy sh_info for version
	sections.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Tell
	_bfd_stringtab_add to copy the name into permanent memory if
	appropriate.
1997-03-10 04:43:42 +00:00
Ian Lance Taylor ccd0e5e29d * coffcode.h (bfd_coff_backend_data): Change
_bfd_coff_compute_section_file_positions to return a boolean
	value.  Change all callers.
	(coff_compute_section_file_positions): Change return type to
	boolean.  If the size of the last section changed, then output a
	zero byte at the end of the file.
	* libcoff.h: Rebuild.
PR 11806.
1997-03-07 17:45:43 +00:00
Ian Lance Taylor 7debe20cf7 Fri Mar 7 11:55:31 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Fully parenthesize.
1997-03-07 16:57:21 +00:00
Ian Lance Taylor e8c4696e1b * xcofflink.c (_bfd_xcoff_bfd_final_link): Always allocate space
for at least 6 output symbols.
	(xcoff_write_global_symbol): When emitting TOC entry relocs, also
	emit a TC csect to represent the space they take up.  For an XO
	symbol, just emit a reference, not a csect.
PR 11793.
1997-03-07 16:50:22 +00:00
Jeff Law a98a3061a6 Update copyrights. 1997-03-07 16:11:48 +00:00
Ian Lance Taylor 5bd7c941e3 x 1997-03-07 15:51:28 +00:00
Ian Lance Taylor 4104dff66f * Makefile.in ($(SHLINK)): Just use ln -s, not ln -sf, since
Solaris doesn't like the combined options, and the -f is
	unnecessary.
1997-03-07 15:50:33 +00:00
Ian Lance Taylor 358bb592ee * elf32-mips.c (mips_elf_relocate_section): Correct R_MIPS16_26
handling when little endian.
1997-03-07 15:38:12 +00:00
Jeff Law 8821be29aa Update copyright dates. 1997-03-07 00:00:09 +00:00
Jeff Law 5847e6dd37 * elf32-mn10300.c (mn10300_elf_final_link_relocate): New function.
(mn10300_elf_relocate_section): Likewise.
        (elf_backend_relocate_section): Define.
New style linker for the mn10300.
1997-03-06 21:17:49 +00:00
Jeff Law 77bf22e653 * elf32-mn10300.c (reloc_type): Remove PCREL{8,16,32}_{1,2}BYTE
relocs.  Replace them with generic PCREL_{8,16,32} relocs.
        (elf32_mn10300_howto_table): Likewise.
        (elf32_mn10300_reloc_map): Likewise.
        (bfd_elf32_mn10300_reloc): Delete unused function.
Simplify the mn10300 port.  Stuff I noticed while working on the mn10200.
1997-03-06 20:55:44 +00:00
Fred Fish 13b58694fb start-sanitize-tic80
* coff-tic80.c (rtype2howto): If passed a relocation type we don't
	understand, just set the howto field to NULL, and the caller will
	print an appropriate error message.
end-sanitize-tic80
	* coffcode.h (coff_slurp_reloc_table): Pull duplicate declarations and
	code fragment out of both legs of #ifdef RELOC_PROCESSING ... #endif
	block.  Use NULL for initializations of "ptr" rather than bare 0.
	* coff-h8300.c: Fix typo in comment.
	* coff-h8500.c: Ditto.
	* coff-w65.c: Ditto
	* coff-z8k.c: Ditto.
1997-03-06 19:53:29 +00:00
David Edelsohn da1714618a * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc): Fix overflow calc.
(m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
	m32r_elf_get_relocated_section_contents): First pass at relax support.
1997-03-05 22:13:46 +00:00
Ulrich Drepper d2f0374f23 (elf_link_add_object_symbols): Use correct sh_size
entry for reading verdef records.
Use correct braces for computing increments of extverdaux and
exteverdef record pointers.
1997-03-03 21:32:39 +00:00
Fred Fish 4b4ac3aec2 * coff-tic80.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Set this to 2
instead of 4.
1997-03-03 05:51:52 +00:00
Jim Wilson a3c5b9a4a1 Correct d10v sanitization errors. 1997-03-03 00:35:40 +00:00
Ian Lance Taylor a48ef404c7 * elflink.h (elf_link_find_version_dependencies): Check that
DEF_REGULAR is not set as well as checking that DEF_DYNAMIC is
	set.
1997-03-03 00:27:52 +00:00
Fred Fish 84fd6e7ed2 * coffcode.h (coff_set_flags): Add case for TIC80_ARCH_MAGIC. 1997-02-28 23:59:26 +00:00
Ian Lance Taylor 73769e1f01 * targets.c (bfd_default_vector): Make non-const.
(find_target): New static function, broken out of
	bfd_find_target.
	(bfd_set_default_target): New function.
	(bfd_find_target): Call find_target.  When defaulting, use
	bfd_default_vector[0] if it is not NULL.
	* libbfd-in.h (bfd_default_vector): Adjust declaration.
	* bfd-in2.h, libbfd.h: Rebuild.
1997-02-28 22:16:45 +00:00
Ian Lance Taylor af4dffffc8 * syms.c (bfd_is_local_label): Return false if the symbol has no
name.
	* coff-i960.c (coff_i960_is_local_label_name): New function.
	(coff_bfd_is_local_label_name): Define.
	* coff-m68k.c (m68k_coff_is_local_label_name): New function.
	(coff_bfd_is_local_label_name): Define.
	* coff-rs6000.c (xcoff_is_local_label_name): New function.
	(coff_bfd_is_local_label_name): Define.
	* elf.c (_bfd_elf_is_local_label_name): Treat symbols beginning
	with .. or _.L_ as local.
	* elf32-i386.c (elf_i386_is_local_label_name): New function.
	(bfd_elf32_bfd_is_local_label_name): Define.
	* evax-alpha.c (evax_bfd_is_local_label_name): Treat symbols
	beginning with $ as local.
1997-02-28 20:10:49 +00:00
Ian Lance Taylor e316f51498 * aoutx.h (aout_link_write_symbols): Use bfd_is_local_label_name
rather than comparing against info->lprefix.
	* cofflink.c (_bfd_coff_link_input_bfd): Likewise.
	* elflink.h (elf_link_input_bfd): Likewise.
	* linker.c (_bfd_generic_link_output_symbols): Likewise.
	* xcofflink.c (xcoff_link_input_bfd): Likewise.
1997-02-28 04:12:07 +00:00
Ian Lance Taylor a66a61a0a2 * elfxx-target.h (bfd_elfNN_bfd_is_local_label_name): Define as
_bfd_elf_is_local_label_name if not already defined.
	* elf.c (_bfd_elf_is_local_label_name): New function.
	* elf-bfd.h (_bfd_elf_is_local_label_name): Declare.
1997-02-28 04:11:09 +00:00
Ian Lance Taylor 551f302cc8 * coffcode.h (coff_bfd_is_local_label_name): Define as
_bfd_coff_is_local_label_name if not already defined.
	* coffgen.c (_bfd_coff_is_local_label_name): New function.
	* libcoff-in.h (_bfd_coff_is_local_label_name): Declare.
	* libcoff.h: Rebuild.
1997-02-28 04:10:14 +00:00
Ian Lance Taylor 35a3e78edb * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_label
to _bfd_is_local_label_name.
	(bfd_target): Likewise.
	* syms.c (bfd_is_local_label): Define as function, not macro.
	(bfd_is_local_name): Define.
	* libbfd.c (bfd_generic_is_local_label_name): Rename from
	bfd_generic_is_local_label, and take a string rather than a
	symbol.
	* libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define.
	(_bfd_nosymbols_bfd_is_local_label_name): Define.
 	(bfd_generic_is_local_label): Don't declare.
	(bfd_generic_is_local_label_name): Declare.
	* bfd-in2.h, libbfd.h: Rebuild.
	* All backends: Change local_label to local_label_name.
1997-02-28 02:07:54 +00:00
Ian Lance Taylor 85d6f0b476 * elf32-mips.c (struct mips_got_info): Add assigned_gotno field.
(mips_elf_relocate_got_local): Change return type to boolean.
	Don't assume that the first zero entry is unassigned; instead, use
	assigned_gotno.
	(mips_elf_relocate_section): Check return value of
	mips_elf_relocate_got_local.
	(mips_elf_create_got_section): Initialize assigned_gotno field.
1997-02-27 23:38:19 +00:00
Martin Hunt 56819c99a1 Wed Feb 26 15:19:51 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d30v.c (bfd_elf_d30v_reloc): Add code to do 32-bit
	relocations.
1997-02-26 23:22:00 +00:00
Stan Shebs 55ef0d903c * targets.c (bfd_target_vector): Add ecoff_biglittle_vec. 1997-02-26 23:07:19 +00:00
Ian Lance Taylor fa802cb057 * elflink.h (elf_link_input_bfd): Don't skip symbols from sections
that have no contents merely because linker_mark is not set.
1997-02-26 18:35:56 +00:00
Ian Lance Taylor b08f5ac27a * elf.c (elf_fake_sections): Use SHT_NOTE for any section whose
name begins with ".note".
	(map_sections_to_segments): Add a PT_NOTE segment for any loadable
	section whose name begins with ".note".
	(get_program_header_size): Corresponding change.
1997-02-25 21:07:13 +00:00
Ian Lance Taylor 7b4be6688c * elf32-mips.c (mips_elf_relocate_section): Check for misaligned
jal and for jal overflow.
1997-02-25 05:33:28 +00:00
Ian Lance Taylor d044b40a40 From Eric Youngdale <eric@andante.jic.com>:
* elflink.h (elf_link_add_archive_symbols): If a default symbol is
	not found, try looking it up again without the version name.
	(elf_link_add_object_symbols): Always link against the dynamic
	symbol table of a dynamic object.  When linking against a dynamic
	object, include version strings in symbol names, and set up
	version information.  Add indirect symbols for default versions.
	(elf_link_create_dynamic_sections): Add special version sections.
	(struct elf_assign_sym_version_info): Define.
	(struct elf_find_verdep_info): Define.
	(NAME(bfd_elf,size_dynamic_sections)): Add verdefs parameter.  Set
	up version sections.
	(elf_adjust_dynamic_symbol): Ignore indirect symbols.
	(elf_link_find_version_dependencies): New static function.
	(elf_link_assign_sym_version): New static function.
	(elf_link_renumber_dynsyms): New static function.
	(struct elf_final_link_info): Add symver_sec field.
	(elf_bfd_final_link): Initialize finfo.symver_sec.  Don't count
	local symbols of a dynamic object.  Handle DT_VER* constants.
	(elf_link_output_extsym): Simplify BFD_ASSERT checking for a
	dynamic object.  Skip indirect symbols from ELF objects.  Remove
	the version name before choosing a hash bucket.  Write out the
	version information if appropriate.
	(elf_link_input_bfd): Check for DYNAMIC, not ET_DYN.
	* bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
	(bfd_elf64_size_dynamic_sections): Likewise.
	* bfd-in2.h: Rebuild.
	* elf-bfd.h (struct elf_link_hash_entry): Add verinfo field.
	Change elf_link_hash_flags to unsigned short.
	(ELF_LINK_HIDDEN): Define.
	(struct elf_obj_tdata): Add fields dynversym_hdr, dynverref_hdr,
	dynverdef_hdr, dynversym_section, dynverdef_section,
	dynverref_section, cverdefs, cverrefs, verdef, verref.
	(elf_dynversym, elf_dynverdef, elf_dynverref): Define.
	(_bfd_elf_swap_verdef_in, _bfd_elf_swap_verdef_out): Declare.
	(_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Declare.
	(_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Declare.
	(_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Declare.
	(_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Declare.
	(_bfd_elf_slurp_version_tables): Declare.
	* elf.c (_bfd_elf_swap_verdef_in): New function.
	(_bfd_elf_swap_verdef_out): Likewise.
	(_bfd_elf_swap_verdaux_in, _bfd_elf_swap_verdaux_out): Likewise.
	(_bfd_elf_swap_verneed_in, _bfd_elf_swap_verneed_out): Likewise.
	(_bfd_elf_swap_vernaux_in, _bfd_elf_swap_vernaux_out): Likewise.
	(_bfd_elf_swap_versym_in, _bfd_elf_swap_versym_out): Likewise.
	(_bfd_elf_print_private_bfd_data): Add DT_VER* constants.  Print
	version information if there is any.
	(_bfd_elf_link_hash_newfunc): Initialize verinfo field.
	(bfd_section_from_shdr): Handle SHT_GNU_ver* section types.
	(elf_fake_sections): Handle .gnu.version* section names.
	(assign_section_numbers): Handle SHT_GNU_ver* section types.
	(_bfd_elf_slurp_version_tables): New function.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't include
	version name in string entered in dynamic hash table.
	* elfcode.h: Include fnmatch.h.
	* elf32-i386.c (elf_i386_relocate_section): Handle a dynamic
	symbol which was forced to become local.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1997-02-24 23:13:07 +00:00
Jeff Law af2903b4f0 Update some comments to reflect current reality. 1997-02-24 18:13:23 +00:00
Jeff Law 7b951eed4d * elf32-mn10200.c (mn10200_elf_final_link_relocate): Simplify
somewhat.
        (mn10200_elf_relax_section): Correctly compute a symbol's value
        when the symbol is local, but not in the same section as we are
        relaxing.  Implement abs24 -> abs16, imm24 -> imm16 and d24 -> d16
        relaxing.
Another 1.3% size reduction for hello world.  Only relaxing left todo is
imm16 -> imm8 and d16 -> d8 where applicable.
1997-02-21 23:19:34 +00:00
David Edelsohn 77dd1a25d8 * elf32-m32r.c: Rewrite to use ELF backend linker.
Store lower 16 bits of addend in R_M32R_HI16_[SU]LO insns.
	Add small data area support (R_M32R_SDA16).
	* reloc.c: Document BFD_RELOC_M32R_SDA16.
	* bfd-in2.h,libbfd.h: Regenerated.
1997-02-21 22:09:40 +00:00
Jeff Law 7c49f021ca Twiddle some comments to more accurately reflect reality. 1997-02-21 07:21:32 +00:00
Jeff Law c17db7cfb4 Remove debugging printf. 1997-02-21 07:18:35 +00:00
Jeff Law fd39566111 * elf32-mn10200.c (mn10200_elf_relax_section): New function.
(mn10200_elf_relax_delete_bytes): Likewise.
        (mn10200_elf_symbol_address_p): Likewise.
        (mn10200_elf_get_relocated_section_contents): Likewise.
        (bfd_elf32_bfd_relax_section): Define.
        (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
First cut at relaxing linker for the mn10200:

	jsr:24 -> jsr:16
	jmp:24 -> jmp:16
	jmp:16 -> bra:8
	bCC .+4;bra:8 -> bCC':8


Reduces code size by about 2.5% for hello world.
1997-02-21 07:14:30 +00:00
Ian Lance Taylor db986c6049 fix with make headers 1997-02-20 22:49:40 +00:00
Jeff Law 64af667971 * elf32-mn10200.c (mn10200_elf_final_link_relocate): New function.
(mn10200_elf_relocate_section): Likewise.
        (elf_backend_relocate_section): Define.
New style linker for the mn10200.
1997-02-20 20:54:28 +00:00
Michael Meissner c6c7035cfb Since d10v is public now, remove all sanitization statements 1997-02-20 16:05:18 +00:00
Martin Hunt fd8d7c31c0 Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
* Makefile.in, archures.c, config.bfd, configure.in, elf.c,
	reloc.c, targets.c: New target, elf-*-D30V.

	* bfd-in2.h, configure, libbfd.h: Rebuilt.

	* cpu-d30v.c, elf32-d30v.c: New files.
1997-02-19 01:29:29 +00:00
Fred Fish 92a956e87d * reloc.c (struct reloc_howto_struct): Fix typo in comment.
* bfd-in2.h: Regenerated.
start-sanitize-tic80
	* coff-tic80.c (RTYPE2HOWTO): Replace abort with real function.
	(rtype2howto): Add function.
	(tic80_howto_table): Add.
end-sanitize-tic80
1997-02-18 23:01:02 +00:00
Jeff Law 8d1ba96ecc * elf32-v850.c (v850_elf_relocate_section): Make sure r_symndx
is initialized before it is used.
Something Doug noticed.
1997-02-18 17:06:20 +00:00
Ian Lance Taylor 8ceca98345 * hp300hpux.c (convert_sym_type): Don't convert a secondary common
symbol into a weak undefined symbol; leave it as a common symbol.
1997-02-17 16:29:21 +00:00
Ian Lance Taylor 54626f1aa4 * elflink.h (elf_link_add_object_symbols): Don't issue a warning
about a symbol defined in a dynamic object if it has already been
	defined in a regular object.
1997-02-15 00:12:47 +00:00
Ian Lance Taylor 8696b2db70 Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
* reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
	openVMS/Alpha.
	* evax.h (ALPHA_R_CODEADDR): New relocation.
	* evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
	openVMS/Alpha.
	* evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
	relocation.
	* bfd-in2.h, libbfd.h: Rebuild.

	Restrict symbol length to 64 bytes, case preserving:
	* evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
	* evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
	(_bfd_evax_length_hash_symbol): Added.
	* evax-etir.c (_bfd_evax_write_etir): Call
	_bfd_evax_length_hash_symbol before output of symbol.
	* evax-egsd.c (_bfd_evax_write_egsd): Likewise.
	* evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.

	* evax-emh.c: Output filename to object file without path.

	* evax-egsd.c: New sections for local and global commons.

	* evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
	evax-misc.c, evax.h: Remove 8 bit characters from copyright
	notices.  Replace AXP with Alpha.
1997-02-14 02:13:19 +00:00
Ian Lance Taylor 236969ac80 Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
* makefile.vms: Add gcc flags to allow compiling with current gcc
	snapshot
	(targmatch.h): New dependency.
1997-02-14 01:54:51 +00:00
Ian Lance Taylor 3a8dddb286 Thu Feb 13 20:50:02 1997 Klaus Kaempf (kkaempf@progis.de)
* makefile.vms: New file.
1997-02-14 01:50:50 +00:00
Ian Lance Taylor 62332d05fd * sunos.c (sunos_create_dynamic_sections): We need the dynamic
sections if we are creating a shared library.
1997-02-12 23:14:36 +00:00
David Edelsohn 3883007ed1 * configure.host (i386-windows): Don't set host64=true. 1997-02-11 23:46:10 +00:00
Ian Lance Taylor a4183ba5c9 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.
(elf_mips16_gprel_howto): New static variable.
	(mips16_gprel_reloc): New static function.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL.
	(mips_info_to_howto_rel): Handle R_MIPS16_GPREL.
	(mips_elf_relocate_section): Handle R_MIPS16_GPREL.
	* reloc.c (BFD_RELOC_MIPS16_GPREL): Define.
	* bfd-in2.h, libbfd.h: Rebuild.
1997-02-11 20:30:12 +00:00
David Edelsohn b9c5ee689d * elf32-m32r.c (elf_m32r_howto_table): Change partial_inplace to true
for R_M32R_{16,32,24,HI16_ULO,HI16_SLO,LO16}.
1997-02-11 19:45:51 +00:00
Gavin Romig-Koch 276c2d7dc8 Add r5900 1997-02-11 13:26:34 +00:00
Ian Lance Taylor ba4a45946c * elflink.h (elf_link_input_bfd): If we've discarded a section,
the output section will be the absolute section; don't print an
	assertion message for that case when doing a relocateable link.
PR 11647.
1997-02-07 17:40:24 +00:00
Ian Lance Taylor e900e695a2 * elf32-mips.c (FN_STUB, CALL_STUB, CALL_FP_STUB): Define.
(struct mips_elf_link_hash_entry): Add new fields fn_stub,
	need_fn_sub, call_stub, and call_fp_stub.
	(struct mips_elf_link_hash_table): Add field mips16_stubs_seen.
	(mips_elf_link_hash_newfunc): Initialize new fields.
	(mips_elf_link_hash_table_create): Likewise.
	(mips_elf_relocate_section): Redirect relocations to use mips16
	stubs when appropriate.
	(mips_elf_check_relocs): Attach stub sections to the appropriate
	symbol.  Set need_fn_stub when appropriate.
	(mips_elf_always_size_sections): New static function.
	(mips_elf_check_mips16_stubs): New static function.
	(elf_backend_always_size_sections): Define.
	* elf-bfd.h (struct elf_obj_tdata): Add local_stubs field.
1997-02-06 22:15:37 +00:00
Ian Lance Taylor 258b1f5d18 * elflink.h (elf_link_input_bfd): Discard local symbols that are
attached to sections which are not being included in the link.
1997-02-06 22:02:51 +00:00
Ian Lance Taylor 5b61a02aae * cofflink.c (_bfd_coff_generic_relocate_section): Ignore the
symbol value when computing the addend for a pc_relative
	pcrel_offset reloc.
1997-02-05 18:21:08 +00:00
Ian Lance Taylor 5a50eec623 * cofflink.c (_bfd_coff_generic_relocate_section): If doing a
relocateable link, just skip pc_relative pcrel_offset relocs.
	* coff-arm.c (coff_arm_rtype_to_howto): Return a different howto
	structure for an ARM26 reloc which can be resolved.
	(coff_arm_adjust_symndx): Only convert ARM26 to ARM26D if the
	reloc can be resolved.
PR 11599.
1997-02-03 20:31:39 +00:00
Ian Lance Taylor bcb686ca09 * coff-h8300.c (h8300_reloc16_extra_cases): Correct off by one
error in overflow check for R_RELBYTE.
PR 11591.
1997-02-03 16:54:36 +00:00
Ian Lance Taylor e9797c8ae5 comment fix 1997-01-31 23:15:42 +00:00
Ian Lance Taylor 6c58561e7a * ieee.c (ieee_slurp_section_data): Pick up the start address.
From Mark Rasin <mark.rasin@telrad.co.il>.
1997-01-31 19:15:40 +00:00
Ian Lance Taylor 167dc907f2 * aoutx.h (aout_link_write_symbols): Don't apply discard_l to
debugging symbols.
Mentioned in PR 11540.
1997-01-31 19:08:31 +00:00
Jeff Law 1a2faf1f1e * elf32-mn10200.c (reloc_type): Add 16bit pc-relative reloc.
(elf_mn10200_howto_table): Likewise.
        (mn10200_reloc_map): Likewise.
How did I miss the 16bit pc-relative relocs?!?
1997-01-29 07:02:22 +00:00
David Edelsohn 1d5c6cfdf0 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.
* bfd-in2.h, libbfd.h: Regenerated.
	* elf32-m32r.c: Add support for them.
1997-01-27 20:35:24 +00:00
Ian Lance Taylor 54aa1deab3 * aout-arm.c (MY_swap_std_reloc_in): Remove unused r_length.
* elf32-ppc.c (ppc_elf_check_relocs): Remove unused plt.
start-sanitize-v850
	* elf32-v850.c (v850_elf_final_link_relocate): Remove used
	r_format and r_pcrel.  Always return a value.
end-sanitize-v850
	* riscix.c (MY_final_link_callback): Define to dummy value.
1997-01-27 18:22:54 +00:00
Ian Lance Taylor 9950f925f7 * elf32-i386.c (elf_i386_size_dynamic_sections): When checking for
relocations against the text segment, look up the output name of
	the reloc section.
	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
	* elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
1997-01-27 18:13:01 +00:00
Fred Fish 8c00b01dee * coff-tic80.c (tic80coff_vec): Use correct data put/get
routines for little endian data.
	* coffcode.h (coff_write_object_contents): Set magic to
 	TIC80_ARCH_MAGIC for TIc80.
1997-01-23 03:09:05 +00:00
Fred Fish 0716c2e910 * coff-tic80.c (tic80coff_vec): Change to little endian data
as the default.
1997-01-21 20:15:46 +00:00
Ian Lance Taylor db109ca2d8 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Change type of
auxiliary_filters parameter to be const char * const *.  Accept a
	NULL terminated array.
	* bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
	(bfd_elf32_size_dynamic_sections): Update declaration.
	* bfd-in2.h: Rebuild.
1997-01-16 22:48:57 +00:00
Ian Lance Taylor c7f8d0a524 update copyright 1997-01-16 22:48:24 +00:00
David Edelsohn e1616e16d8 * libaout.h (machine_type): Reserve several values for sparclet. 1997-01-14 16:47:40 +00:00
Michael Meissner 91eb4378ee Fix sanitize string 1997-01-14 03:45:40 +00:00
Michael Meissner 4af93ad0dc Allow tic80-*-*, not just tic80-*-coff 1997-01-14 03:45:03 +00:00
Michael Meissner 0ce71ebd3d Cleanup; fix some aborts 1997-01-14 00:41:55 +00:00
Jeff Law 09a7bde377 Fix typo. 1997-01-06 22:23:08 +00:00
Jeff Law 4013169286 * elf32-mn10200.c (elf_mn10200_howto): Don't ever set partial-inplace.
Use bfd_elf_generic_reloc as special function for all relocs.
        (bfd_elf32_mn10200_reloc): Remove unnecessary function.
Working on relocs for the mn10200.
1997-01-06 22:20:38 +00:00
Jeff Law 483e1b9161 * elf32-mn10200.c (elf_mn10200_howto): Set partial_inplace for
24bit pc-relative reloc.
1997-01-06 20:33:53 +00:00
Fred Fish 28eb95aa33 * Makefile.in (coff-tic80.o): Add coffcode.h to dependency list.
* coff-tic80.c (tic80coff_vec): Data byte order is big endian and
	header byte order is little endian.  Use correct bfd_get and
	bfd_put routines for little endian headers.
	* coffcode.h (coff_set_arch_mach_hook): Set arch to
	bfd_arch_tic80 for TIC80_ARCH_MAGIC number.
1997-01-04 01:24:50 +00:00
Jeff Law b3ef389468 * reloc.c: Add BFD_RELOC_24.
* elf32-mn10200.c (enum reloc_type): Add 24bit and pcrel relocs.
        (elf_mn10200_howto, mn10200_reloc_map): Corresponding changes.
        * bfd-in2.h, libbfd.h: Rebuilt.
Starting on relocs for the mn10200.
1997-01-04 00:02:12 +00:00
Ian Lance Taylor 56f3b62cf5 fix copyrights 1997-01-03 22:17:57 +00:00
Ian Lance Taylor ff12f30335 Fri Jan 3 16:58:31 1997 Richard Henderson <rth@tamu.edu>
elf64-alpha multiple .got rewrite:

	* elf-bfd.h (struct elf_backend_data): Add always_size_sections entry.
	(bfd_elf*_mkobject): Don't define here ...
	* elfxx-target.h: ... but rather here.  Default always_size_sections
	hook to NULL.
	* elf.c (elf_mkobject): Rename to bfd_elf_mkobject, since that was
	what the #defines in elf-bfd.h transmuted it to anyway.

	* section.c: Add SEC_LINKER_CREATED flag.
	* bfd-in2.h: Rebuild.
	* elf32-i386.c (elf_i386_check_relocs): Add SEC_LINKER_CREATED to
	relocation section flags.
	(elf_i386_size_dynamic_sections): Use SEC_LINKER_CREATED instead of
	SEC_IN_MEMORY to recognize generated bits.
	* elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_size_dynamic_sections):
	Likewise.
	* elf32-mips.c (mips_elf_final_link, mips_elf_create_dynamic_sections,
	mips_elf_create_compact_rel_section, mips_elf_create_got_section,
	mips_elf_check_relocs, mips_elf_size_dynamic_sections): Likewise.
	* elf32-ppc.c (ppc_elf_create_linker_section,
	ppc_elf_size_dynamic_sections): Likewise.
	* elf32-sparc.c (elf32_sparc_check_relocs,
	elf32_sparc_size_dynamic_sections): Likewise.
	* elflink.c (_bfd_elf_create_got_section): Add SEC_LINKER_CREATED to
	section flags.
	(_bfd_elf_create_dynamic_sections): Likewise.
	(_bfd_elf_make_linker_section_rela): Likewise.
	* elflink.h (elf_link_create_dynamic_sections): Likewise.
	(bfd_elf,size_dynamic_sections): Call the always_size_sections hook.
	(elf_bfd_final_link): Use SEC_LINKER_CREATED instead of SEC_IN_MEMORY
	to identify generated bits.
	(elf_link_input_bfd): Likewise.

	* elf64-alpha.c: Rewrite everything touching relocations.
1997-01-03 22:09:40 +00:00
Michael Meissner de224d6a49 Put common variables into the appropriate section, based on relocation types 1997-01-03 16:55:34 +00:00
Ian Lance Taylor 7c342fc5b0 * config.bfd (mips*el-*-linux*): New target.
(mips*-*-linux*): New target.
1996-12-31 21:27:05 +00:00
Ian Lance Taylor 99f1722b7c * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Clean up.
Return a useful value.
1996-12-31 21:26:27 +00:00
Ian Lance Taylor 6ded661565 * Makefile.in (ALL_CFLAGS): Add -D_GNU_SOURCE. 1996-12-31 20:43:28 +00:00
Ian Lance Taylor ab98712ad0 * configure.host: Use ac_cv_func_mmap_fixed_mapped instead of
ac_cv_func_mmap in bfd/configure.host.
1996-12-31 20:30:36 +00:00
Michael Meissner afaed5e906 Fix some spacing 1996-12-31 20:17:33 +00:00
Ian Lance Taylor dda7af9f14 * configure.in: Check ac_cv_func_mmap_fixed_mapped, not
ac_cv_func_mmap.
	* configure: Rebuild.
1996-12-31 19:56:49 +00:00
Ian Lance Taylor 148437ec14 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
filter_shlib and auxiliary_filter_shlib parameters.
	* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
	DT_FILTER.
	* bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
	(bfd_elf64_size_dynamic_sections): Likewise.
	* bfd-in2.h: Rebuild.
1996-12-31 19:46:37 +00:00
Ian Lance Taylor 1eeccb2271 * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
symbols, don't export a symbol which is defined by an object in an
	archive which contains shared objects.
PR 11379.
1996-12-30 23:50:56 +00:00
Fred Fish fc46a9ec7a * archures.c (enum bfd_architecture): Add bfd_arch_tic80
for TI TMS320c80 (MVP).
	(bfd_archures_list): Add bfd_tic80_arch.
	* bfd-in2.h: Regenerate by running "make headers".
1996-12-30 23:25:26 +00:00
Fred Fish 60b2671252 * cpu-tic80.c (bfd_tic80_arch): Add struct.
* configure.in (case $vec): Correct typo, "tb" not "tp".
	Also add cofflink.o for tic80coff_vec.
	* configure: Regenerate with autoconf.
1996-12-30 22:09:39 +00:00
Ian Lance Taylor 412f8c9336 * libbfd.c: Patch up the mmap code so that it is only built if BFD
is configured with --with-mmap.
1996-12-30 16:56:05 +00:00
Fred Fish 5a608f5bf1 * Makefile.in (BFD32_BACKENDS): Add coff-tic80.o
(ALL_MACHINES): Add cpu-tic80.o
	(cpu-tic80.o, coff-tic80.o): Add dependencies.
	* coff-tic80.c: Add skeleton, cloned from another coff config.
	* coffcode.h (coff_write_object_contents): Set magic to TIC80MAGIC
 	for TIc80.
1996-12-29 17:56:24 +00:00
Fred Fish 2a0a42d300 Add TIc80 stuff keep/lose stuff. 1996-12-28 04:16:24 +00:00
Fred Fish cd6213ffae (Lay some groundwork for TIc80 port that will be filled in incrementally.)
* TODO: Correct a misspelling.
start-sanitize-tic80
	* coff-tic80.c: New file for TI TMS320C80 (MVP).
	* cpu-tic80.c: New file for TI TMS320C80 (MVP).
	* configure.in (case $vec): Add tic80coff_vec entry.
	* configure: Regenerate with autoconf.
	* archures.c (bfd_tic80_arch): Declare.
	* bfd-in2.h (enum bfd_architecture): Add bfd_arch_tic80.
	* config.bfd (case ${targ}): Add tic80*-*-coff* target.
	* targets.c (tic80coff_vec): Add decl as extern bfd_target.
	(bfd_target_vector): Add tic80coff_vec entry.
end-sanitize-tic80
1996-12-28 04:09:34 +00:00
Ian Lance Taylor 2503987b96 fix typoo in comment 1996-12-27 17:24:12 +00:00
Ian Lance Taylor 6b8ec6f321 * elflink.h (elf_buckets): Add some more values for larger
binaries.
1996-12-27 16:51:27 +00:00
Ian Lance Taylor 78650abdef * Makefile.in (install): Move subdir_do out of conditional. From
Fred Fish <fnf@cygnus.com>.
1996-12-26 23:37:43 +00:00
Jeff Law 8d16fe5cdb * elf32-mn10200.c (enum reloc_type): Enable basic 8, 16, and
32 bit relocs.
        (elf_mn10200_howto_table): Likewise.
        (mn10200_reloc_map): Likewise.
To keep the assembler quiet.
1996-12-18 17:09:59 +00:00
Ian Lance Taylor e4f4813f9c * elf32-mips.c (mips_elf_add_symbol_hook): Add 1 to the value of a
mips16 symbol during the link.
	(mips_elf_finish_dynamic_symbol): Subtract 1 from the value of a
	mips16 symbol.
	(mips_elf_link_output_symbol_hook): New static function.
	(elf_backend_link_output_symbol_hook): Define.
1996-12-17 18:58:59 +00:00
Ian Lance Taylor 69e2ff181d * elf.c (bfd_elf_print_symbol): Print the st_other field if it is
not zero.
1996-12-17 16:12:58 +00:00
Ian Lance Taylor e85f2fbd15 * elf.c (bfd_section_from_shdr): Don't check for reloc sections
against SEC_DEBUGGING sections here (revert patch of December 5).
	* elfcode.h (elf_object_p): Check for them here, instead.
1996-12-16 19:39:39 +00:00
Ian Lance Taylor e35765a9a2 * elfcode.h (elf_slurp_reloc_table): Add dynamic parameter.
* elf.c (_bfd_elf_canonicalize_reloc): Pass new argument to
	slurp_reloc_table.
	(_bfd_elf_get_dynamic_reloc_upper_bound): New function.
	(_bfd_elf_canonicalize_dynamic_reloc): New function.
	* elf-bfd.h (struct elf_size_info): Update declaration of
	slurp_reloc_table.
	(_bfd_elf_get_dynamic_reloc_upper_bound): Declare.
	(_bfd_elf_canonicalize_dynamic_reloc): Declare.
	* elfxx-target.h: Use new dynamic reloc routines by default.
	* elf64-mips.c (mips_elf64_slurp_reloc_table): Add dynamic
	parameter.
1996-12-15 19:59:18 +00:00
David Edelsohn 21e45f8225 * libaout.h (enum machine_type): Change M_SPARCLET from 142 to 131.
At the request of matra.
1996-12-13 19:17:46 +00:00
Ian Lance Taylor 6270adfb59 Fri Dec 13 13:18:49 1996 Dan Wilder <dan@gasboy.com>
* coffcode.h (coff_set_flags): Use MC68KBCSMAGIC for bfd_arch_m68k
	if NAMES_HAVE_UNDERSCORE is defined.
1996-12-13 18:21:03 +00:00
Ian Lance Taylor 440f391466 * elflink.h (elf_link_add_object_symbols): Only add a weak
symbol if the real definition is in the dynamic symbol table.
	After finding the real definition, then, if it is dynamic, add the
	weak symbol to the dynamic symbol table.
PR 11244.
1996-12-13 02:29:37 +00:00
Ian Lance Taylor e5c3708d54 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Make static.
PR 11253.
1996-12-12 20:27:49 +00:00
Michael Meissner e7bab9df0f Support R_PPC_PLTREL24 1996-12-12 20:08:54 +00:00
Ian Lance Taylor a5147005bb * ppcboot.c (ppcboot_set_arch_mach): Don't define; it's a
function.
	(ppcboot_bfd_print_private_bfd_data): Don't take the address of an
	array.
PR 11256.
1996-12-12 19:57:22 +00:00
Jeff Law e14af8fc41 * elf32-mn10300.c (reloc_type): Remove big endian mn10300 reloc
variants.
        (elf32_mn10300_howto_table, mn10300_reloc_map): Likewise.
        (bfd_elf32_mn10300_reloc): Write data in little endian format.
        * reloc.c: Remove mn10300 big endian relocs.
        * bfd-in2.h, libbfd.h: Rebuilt.

        * elf32-mn10200.c: Update from elf32-mn10300.c.
1996-12-11 06:31:23 +00:00
Jeff Law 31cffd2ee6 * elf32-mn10300.c (elf_symbol_leading_char): Define. 1996-12-06 22:51:44 +00:00
Jeff Law 207e944c81 * elf32-mn10300.c: Add some comments.
Still cleaning up.
1996-12-06 22:23:37 +00:00
Ian Lance Taylor 6dcf1ef5de * ihex.c (ihex_scan): Always initialize buf before jumping to
error_return.
	(ihex_read_section): Likewise.
1996-12-06 22:20:24 +00:00
Jeff Law d28f058e54 * elf32-mn10300.c (elf_mn10300_howto_table): Don't set partial-
inplace for most relocs.
1996-12-06 05:35:00 +00:00
Ian Lance Taylor 80be821d2e * elflink.h (elf_link_add_object_symbols): Calling check_relocs
even if SEC_ALLOC is not set.
	* elf32-i386.c (elf_i386_check_relocs): Don't check SEC_ALLOC
	when deciding whether to copy a reloc into a shared object.
	(elf_i386_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
	(elf32_sparc_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_check_relocs): Don't set SEC_ALLOC in a
	reloc section if it is not set in the source section.
	* elf32-sparc.c (elf32_sparc_check_relocs): Likewise.
	* elf.c (bfd_section_from_shdr): Mark a reloc section associated
	with a SEC_DEBUGGING section as SEC_DEBUGGING.
PR 11174.
1996-12-05 18:47:03 +00:00
Michael Meissner e5c4495c9e #if 0 some code that is not used yet 1996-12-04 19:19:15 +00:00
Ian Lance Taylor 5dda64611e * cofflink.c (_bfd_coff_generic_relocate_section): Print an error
message for bfd_reloc_outofrange, rather than aborting.  From
	Philippe De Muyter <phdm@info.ucl.ac.be>.
1996-12-02 18:18:33 +00:00
Ian Lance Taylor 179b58d949 * cofflink.c (_bfd_coff_final_link): If there aren't any relocs in
a relocateable link, don't try to process them.  From Heinz Wrobel
	<wrobel@lpr.e-technik.tu-muenchen.de>.
1996-12-02 17:15:05 +00:00
Jeff Law 943686fa04 * elf32-mn10300.c (mn10300_info_howto): Renamed from
mn10300-Info_howto_rel.  Tweak reloc argument to be an
        Elf32_Internal_Rela.
        (USE_RELA): Define instead of USE_REL.
        (elf_info_to_howto, elf_info_howto_rel): Corresponding changes.
1996-12-02 07:44:50 +00:00
Peter Schauer 0e0f410619 * configure.in, configure: Handle mips*-sgi-irix6*.
* irix-core.c (irix_core_core_file_p):  Accept CORE_MAGICN32
	core files.
1996-12-01 08:31:05 +00:00
Ian Lance Taylor 15aafe49cc * elf32-i386.c (elf_i386_relocate_section): Warn about a
relocation against a symbol defined in a section with no output
	section.
PR 11174.
1996-11-27 17:11:05 +00:00
Ian Lance Taylor dfc7020d17 * aclocal.m4 (BFD_CC_FOR_BUILD): Don't require AC_C_CROSS.
* configure, config.in: Rebuild with autoconf 2.12.
1996-11-26 21:53:58 +00:00
Ian Lance Taylor 6c02f1a02c * elf-bfd.h (struct elf_link_hash_entry): Add other field.
* elf.c (_bfd_elf_link_hash_newfunc): Initialize other field.
	(swap_out_syms): Set st_other from existing st_other field.
	* elflink.h (elf_link_add_object_symbols): Store st_other in hash
	table other field.
	(elf_link_output_extsym): Set the other field from the global hash
	table entry.
	* elf32-mips.c (enum reloc_type): Add R_MIPS16_26.
	(elf_mips16_jump_howto): New static variable.
	(mips16_jump_reloc): New static function.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP.
	(mips_info_to_howto_rel): Handle R_MIPS16_26.
	(mips_elf_relocate_section): Handle R_MIPS16_26.  Handle R_MIPS_26
	to a mips16 symbol.
	* reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs.
	* bfd-in2.h, libbfd.h: Rebuild.
	* cpu-mips.c (arch_info_struct): Add mips:16 entry.
1996-11-26 16:43:03 +00:00
Ian Lance Taylor f082b5eaea * configure.host: Use long long for mips-sgi-irix6*. 1996-11-26 02:38:33 +00:00
Jeff Law 12fdaaf821 * elf32-mn10300.c (bfd_elf32_mn10300_reloc): New function.
(enum reloc_type): Add more reloc types.
        (elf32_mn10300_howto_table): Update for new reloc types.
        (elf32_mn10300_reloc_map): Update for new reloc types.
        * reloc.c: Add some new relocs for the mn10300 series.
        * bfd-in2.h, libbfd.h: Rebuilt.
Last week's reloc work.
1996-11-25 15:59:07 +00:00
Jeff Law 23def2765b * som.c (setup_sections): Don't lose for a space which has
no data, but some symbols.
binutils/11140
1996-11-23 20:30:54 +00:00
Ian Lance Taylor a600a89e4f * sunos.c (struct sunos_link_hash_table): Add got_needed field.
(sunos_link_hash_table_create): Initialize got_needed.
	(sunos_create_dynamic_sections): Only set .got section size if it
	is not already set.  Set got_needed.
	(bfd_sunos_size_dynamic_sections): Check got_needed.  Only set
	sdynptr, and only handle dynamic sections, if dynamic sections are
	needed.
	(sunos_scan_std_relocs): Pass false to create_dynamic_sections.
	Initialize .got section.
	(sunos_scan_ext_relocs): Likewise.
	(sunos_write_dynamic_symbol): Set up PLT entry even if this is not
	a dynamic symbol.
	(sunos_finish_dynamic_link): Check got_needed.  Only set up
	dynamic linking information if needed.
PR 11074.
1996-11-22 16:39:17 +00:00
Rob Savoye aa09d6b2fb * config.bfd: Added VersaDOS format to the Ericsson configuration. 1996-11-21 19:04:56 +00:00
Jeff Law c3239e6693 * elf32-mn10300.c: Rough cut at relocs for the mn10300. 1996-11-20 23:31:13 +00:00
Dawn Perchik cf13e3fc30 * filemode.c: Include sysdep.h.
* ihex.c: Add casts to eliminate compiler warnings.
    * sunos.c: Add casts to eliminate compiler warnings.
1996-11-12 23:28:49 +00:00
Michael Meissner 9e23db7616 Add more support for V.4 shared libs 1996-11-11 15:40:04 +00:00
David Edelsohn affcfcf9af * elf32-m32r.c (elf_m32r_howto_table, R_M32R_24): Use
complain_overflow_unsigned.
1996-10-29 23:09:51 +00:00
Ian Lance Taylor c0e8bfc01c add missing end-sanitize-v850 1996-10-29 22:04:56 +00:00
Martin Hunt 421a2956fe Tue Oct 29 12:53:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Don't complain on
	overflows for R_D10V_16 and R_D10V_18.
1996-10-29 20:55:52 +00:00
Ian Lance Taylor 061cc10b03 * ieee.c (ieee_write_section_part): Use LMA rather than VMA.
(do_with_relocs): Likewise.
	(do_as_repeat): Likewise.
	(copy_expression): Likewise.
PR 10946.
1996-10-29 18:26:11 +00:00
Stu Grossman 27c7e9077d * aclocal.m4, configure: Set USE_BINARY_FOPEN for *-*-windows. 1996-10-24 16:10:11 +00:00
Jeff Law 90ffe48b18 * elf32-v850.c: Add comments about assumptions about
char, short & long sizes.
        (elf32_v850_bfd_final_link_relocate): Fix sign extension
        problems for several relocs.
Still fixing sda/tda/zda stuff.
1996-10-23 21:10:55 +00:00
Ian Lance Taylor 84be2a8fa2 * xcofflink.c (bfd_xcoff_import_symbol): Don't allocate ldsym.
Store import file index in ldindx.
	(xcoff_build_ldsyms): Assume that ldsym was not previously
	allocated.  For an imported symbol, copy ldindx into l_ifile.
1996-10-23 04:22:34 +00:00
Jeff Law c322f1b523 * elf32-v850.c (elf_v850_howto_table): Fix ordering of
R_V850_ZDAOFFSET and R_V850_TDAOFFSET.  Fix various
        fields in R_V850_TDAOFFSET.
        (elf32_v850_bfd_final_link_relocate): Tweak pc-relative
        relocs to work more like other relocs.  Handle R_V850_TDAOFF
        relocations.
v850 tda, sda & zda stuff.
1996-10-23 04:10:41 +00:00
Jeff Law 725b96f599 * elf32-v850.c: Include bfdlink.h.
(bfd_elf32_v850_reloc): Return an error if we get a reloc
        we can't handle.
        (elf32_v850_bfd_final_link_relocate): New function.
        (v850_elf_relocation_section): Likewise.
        (elf_backend_relocate_section): Define.
New-style linker for the v850 (necessary to handle zda, sda & tda).
sda & tda relocs seem to be working.  No tda reloc support yet.
1996-10-23 01:24:24 +00:00
Ian Lance Taylor 40c0ea5ad6 * binary.c (binary_set_section_contents): Ignore sections which
don't have SEC_LOAD and SEC_ALLOC set.
PR 10914.
1996-10-22 21:23:50 +00:00
Ian Lance Taylor 68553b6361 * elf32-mips.c (elf_mips_howto_table): Describe R_MIPS_64.
(mips32_64bit_reloc): New static function.
	(mips_reloc_map): Add entry for BFD_RELOC_64.
	(mips_elf_relocate_section): Handle R_MIPS_64.
1996-10-21 23:56:13 +00:00
Jeff Law 9c52f4b2f7 * linker.c (_bfd_generic_final_link): Avoid losing static
symbols in the .bss section.
Something Stu noticed.
1996-10-21 18:15:24 +00:00
Ian Lance Taylor bd4dd3d011 * linker.c (default_indirect_link_order): Print an error message
when attempting to do a relocateable link with different object
	file formats, rather than calling abort.
1996-10-21 14:56:17 +00:00
David Edelsohn 5691054491 * reloc.c (m32r relocs): Rename them.
* bfd-in2.h, libbfd.h: Regenerated.
	* elf32-m32r.c: Update.
	(m32r_elf_10_pcrel_reloc): New function.
	(elf_m32r_howto_table, R_M32R_10_PCREL entry): Use it.
	(elf_m32r_howto_table, R_M32R_24 entry): Fix {src,dst}_masks.
1996-10-17 17:46:53 +00:00
Jeff Law b6d08fce22 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,
R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET.
        (elf_v850_howto_table): Corresponding changes.
        (elf_v850_reloc_map): Corresponding changes.
        * reloc.c: Add additional V850 relocations.
        * bfd-in2.h, libbfd.h: Rebuilt.
1996-10-17 04:45:29 +00:00
Jeff Law 4948949ea2 * linker.c (_bfd_generic_final_link): Set "linker_mark" for
all sections that will be included in the output file.
        (_bfd_generic_link_output_symbols): Discard symbols in sections
        which are being discarded.
Fixes 4 failures in the g++ testsuite on the v850.
1996-10-16 20:27:18 +00:00
Jeff Law e1d98a0a65 * elf32-v850.c (bfd_elf32_v850_reloc): Mask out bits we
no longer want in pc-relative relocs.
Fixing some g++ testsuite failures.
1996-10-16 17:26:50 +00:00
Jeff Law 05f1baaa20 * elf32-v850.c (bfd_elf32_v850_reloc): Don't silently
accept a reloc against an undefined sybmol!
jeez.  I'm going to go sit in the corner and hide.
1996-10-16 04:18:51 +00:00
Stu Grossman 1336da39bd * elf32-v850.c: Define elf_symbol_leading_char to be '_'. 1996-10-15 23:19:29 +00:00
Ian Lance Taylor ede836b9aa * VERSION: Bump for new relocation. 1996-10-15 20:58:52 +00:00
Ian Lance Taylor c24453fece * hosts/i386bsd.h: If NBPG is not defined, define it as
PAGE_SIZE, for recent versions of FreeBSD.
1996-10-15 16:41:38 +00:00
Ian Lance Taylor e7a5045867 * configure.host: Use `long long' as the 64 bit type on a Solaris
host, since both gcc and the SunPRO compilers support it.
1996-10-14 16:38:13 +00:00
Ian Lance Taylor 6b31fd3af3 Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>
* reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL.  It was a
	mistake to have reused the ECOFF LITERAL for ELF since they have
	different semantics.
	* elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL.
	* bfd-in2.h, libbfd.h: Rebuild.

	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got
	section overflow.

	* elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a
	dynamic relocation for an undefweak symbol when we are building
	a static executable.
1996-10-14 15:21:54 +00:00
Stan Shebs f20f247499 * mpw-make.sed (config.bfd, targmatch.sed): Edit references to
point explicitly to srcdir.
	(targmatch.h): Edit references to point explicitly to objdir.
1996-10-10 18:21:37 +00:00
Ian Lance Taylor 3e222a5a5b * config.bfd: When setting targ_cpu, don't get confused by
linux-gnu.
1996-10-10 18:15:23 +00:00
Ian Lance Taylor 1c4794f58f * elflink.h (elf_link_add_object_symbols): If a symbol is a weak
definition in a dynamic object, add it to the dynamic symbol table
	if any dynamic object mentions it.  Reverts part of last patch.
PR 10827.
1996-10-08 18:50:59 +00:00
Ian Lance Taylor 9d81de1984 * sunos.c (struct sunos_link_hash_table): Add got_base field.
(sunos_link_hash_table_create): Initialize got_base.
	(bfd_sunos_size_dynamic_sections): If the .got section is more
	than 0x1000 bytes, set __GLOBAL_OFFSET_TABLE_ and got_base to
	0x1000.
	(sunos_check_dynamic_reloc): Subtract got_base from a base
	relative relocation.
PR 10684.
1996-10-08 16:02:35 +00:00
Stu Grossman 8150179797 * configure.host: Add support for windows host (a build done
under the Microsoft build environment).
1996-10-08 15:54:19 +00:00
Ian Lance Taylor fe4ff51570 * elf32-mips.c (elf_mips_isa): New static function.
(_bfd_mips_elf_merge_private_bfd_data): Don't warn about linking
	-mips1 and -mips2 code together, or -mips3 and -mips4 code.
1996-10-08 15:41:08 +00:00
Ian Lance Taylor 1233f74bc4 * archive.c (do_slurp_coff_armap): Only treat archive as little
endian for i960 COFF.
1996-10-07 15:45:44 +00:00
Ian Lance Taylor 65f56a5863 * coffcode.h (coff_compute_section_file_positions): Adjust sofar
by the change in size of the section when EXEC_P is not set.
1996-10-04 22:52:58 +00:00
Ian Lance Taylor a9dd34a919 * coff-m68k.c (coff_rtype_to_howto): Define if not defined.
(m68kcoff_rtype_to_howto): New static function.
	* cf-m68klynx.c (coff_m68k_lynx_rtype_to_howto): Add the section
	VMA to the addend for a PC relative reloc.
1996-10-04 22:40:55 +00:00
Ian Lance Taylor 05a68c24cb * dep-in.sed: Rework backslash loop a bit to avoid bug in sed on
HP/UX 10.20.
	* Makefile.in: Rebuild dependencies.
1996-10-04 20:24:34 +00:00
Ian Lance Taylor a3d5a7062d * dep-in.sed: Remove ../bfd/sysdep.h, since it will appear when
som.h is included.
1996-10-04 17:50:47 +00:00
Jeff Law c00ae065d4 * Makefile.in: Remove explicit dependencies for mn10200 and
mn10300 files.
        (ALL_MACHINE_CFILES): Add cpu-mn10200.c and cpu-mn10300.c.
        (BFD32_BACKENDS_CFILES): Add elf32-mn10200.c and elf32-mn10300.c
        (dependencies): Rebuilt.
1996-10-04 17:44:55 +00:00
Ian Lance Taylor 1d871eb78f * cofflink.c (coff_link_add_symbols): Set obj_coff_keep_syms
during this function.
1996-10-03 23:17:36 +00:00
Ian Lance Taylor 6b5af55cea * elflink.c (_bfd_elf_create_linker_section): Only use an existing
section if the flags are compatible.
1996-10-03 22:48:20 +00:00
Ian Lance Taylor dee9979493 * configure.in: Add havevecs, and put it in tdefaults.
* mpw-config.in: Likewise.
	* configure: Rebuild.
	* targmatch.sed: New file; a sed script to build targmatch.h from
	config.bfd.
	* config.bfd: Add #if, #endif, and comments for targmatch.h.
	* targets.c: Include "fnmatch.h".
	(struct targmatch): Define.
	(bfd_target_match): Define by including targmatch.h.
	(bfd_find_target): If the target is not found by name, search for
	it as a configuration triplet.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add aout-arm.o, aout-sparcle.o, hp300bsd.o,
	i386dynix.o, m68k4knetbsd.o, and riscix.o.
	(BFD32_BACKENDS_CFILES): Add aout-arm.c, aout-sparcle.c,
	hp300bsd.c, i386dynix.c, m68k4knetbsd.c, and riscix.c.
	(HFILES): Add targmatch.h.  Also, alphabetize and reindent.
	(CFILES): Remove i386dynix.c and hp300bsd.c.
	(targmatch.h): New target.
	(do_clean): Remove targmatch.h.

	* configure.in: Add BFD_NEED_DECLARATION(getenv).
	* acconfig.h: Add NEED_DECLARATION_GETENV.
	* configure, config.in: Rebuild.
	* sysdep.h: If NEED_DECLARATION_GETENV, declare getenv.
	* aout-adobe.c (aout_adobe_object_p): Don't declare getenv.
1996-10-03 21:36:08 +00:00
Jeff Law ae1b99e42d Grrr. The mn10200 and mn10300 are _not_ similar enough to easily support
with a single generic configuration.  So break them up into two different
configurations.  See the individual ChangeLogs for additional detail.
1996-10-03 16:42:22 +00:00
Jason Molenda 4c7f3fdef5 * Makefile.in (do_clean): Move config.log to do_distclean. 1996-10-03 06:37:32 +00:00
Jeff Law efc2b06463 * cpu-mn10x00.c, elf32-mn10x00.c: New files.
* Makefile.in (ALL_MACHINES): Add cpu-mn10x00.o.
        (BFD32_BACKENDS): Similarly for elf32-mn10x00.o.
        (elf32-mn10x00.o): Add dependencies.
        * archures.c (enum bfd_architecture): Add bfd_arch_mn10x00.
        (bfd_mn10x00_arch): Declare.
        (bfd_archures_list): Add bfd_mn10x00_arch.
        * config.bfd: Add mn10x00-*-*.
        * configure.in: Add bfd_elf32_mn10x00_vec.
        * elf.c (prep_headers): Handle bfd_arch_mn10x00.
        * targets.c (bfd_elf32_mn10x00_vec): Declare.
        (bfd_target_vector): Add bfd_elf32_mn10x00_vec.
        * bfd-in2.h, configure: Rebuilt.
Stubbing out Matsushita support.
1996-10-03 03:56:20 +00:00
Ian Lance Taylor a0fe6c2dc6 * freebsd.h (N_GET_MAGIC_NET): Don't use ntohl.
(N_GETMID_NET, N_GETFLAG_NET): Likewise.
	(NO_SWAP_MAGIC): Don't define.
	(SWAP_MAGIC): Define.
1996-10-02 20:41:36 +00:00
Ian Lance Taylor bf53bd9faa Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
openVMS/Alpha: Provide filename and case_hack flags via
	symbol table from gas.
	Add case_hack code for symbol output from vax/vms.
	* evax-alpha.c (evax_initialize): Remove filename handling,
	filename is provided via symbol table.
	(evax_get_symtab): Use local symbol count when setting up table.
	* evax-egsd.c (_bfd_evax_slurp_egsd): Print correct name when
	debugging.
	(_bfd_evax_write_egsd): Skip file name symbol.
	* evax-emh.c (get_vms_time_string): Local function now.
	(_bfd_evax_write_emh): Extract source filename and case_hack flags
	from symbol table.
	* evax_write_etir (_bfd_evax_write_etir): Pass all symbol names
	through _bfd_evax_case_hack_symbol.
	* evax-misc.c (hash_string, _bfd_evax_case_hack_symbol): New
	functions.
	(_bfd_evax_basename): Removed.
	(_bfd_get_vms_time_string): Moved to evax-emh.c.
	* evax.h (evax_private_data_struct): Remove filename.
	(flag_hash_long_names, flag_show_after_trunc,
	flag_no_hash_mixed_case, vms_name_mapping): New flags for
	vms_case_hack.
1996-10-02 19:49:01 +00:00
Ian Lance Taylor 263d4a626b * cofflink.c (_bfd_coff_link_input_bfd): Don't crash if there is
no hash table entry for a global symbol.
1996-10-02 16:02:56 +00:00
Ian Lance Taylor 8dd53b5cc8 * cofflink.c (coff_link_add_symbols): Don't override a meaningful
symbol type with T_NULL.  Warn if symbol type changes.  Based on
	patch from Philippe De Muyter <phdm@labauto1.ulb.ac.be>.
1996-10-01 21:57:47 +00:00
Ian Lance Taylor 161ac690ee Tue Oct 1 16:14:22 1996 Joel Sherrill <joel@oarcorp.com>
* config.bfd (mips*-*-rtems*): New target, like mips*-*-elf*.
1996-10-01 20:15:48 +00:00
Ian Lance Taylor 0db6249c77 * elflink.h (elf_link_add_object_symbols): Only put a symbol from
a dynamic object in the dynamic symbol table if it is referenced
	or defined by a regular object.
PR 10711.
1996-10-01 16:33:01 +00:00
David Edelsohn 80675684b7 * reloc.c: Rename m32r relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
	* elf32-m32r.c: Update.
1996-09-23 16:24:46 +00:00
Ian Lance Taylor e12ab364d2 * aoutx.h (aout_link_input_section_ext): When doing a relocateable
link, adjust the symbol index of a base relative reloc.  Don't
	change the addend of a PC relative reloc if pcrel_offset is set.
	* sunos.c (bfd_sunos_size_dynamic_sections): Don't do anything for
	a relocateable link.
PR 10692.
1996-09-20 16:33:44 +00:00
Ian Lance Taylor a5a43df165 * reloc.c (bfd_perform_relocation): Apply the relocation even if
it is zero, in case src_mask matters.
	(bfd_install_relocation): Likewise.
PR 10685.
1996-09-20 15:44:49 +00:00
Ian Lance Taylor e425358ff1 * xcofflink.c (xcoff_link_add_symbols): Always initialize
keep_syms.
 	(_bfd_xcoff_bfd_final_link): Don't set target_index
	to an uninitialized value.
1996-09-19 15:08:58 +00:00
Ian Lance Taylor 8d784abe56 * coff-sh.c (sh_relocate_section): Check for an illegal symbol
index.
1996-09-17 20:10:59 +00:00
Ian Lance Taylor 7f21c97c44 * coffcode.h (coff_slurp_line_table): Warn about illegal symbol
indices, rather than crashing.
	(coff_slurp_reloc_table): Likewise.  Check whether the howto field
	is NULL.
1996-09-17 18:20:06 +00:00
Ian Lance Taylor 1153e84b7b * coff-arm.c (aoutarm_std_reloc_howto): Change dst_mask for ARM26D
reloc to 0.
	(coff_arm_adjust_symndx): New static function.
	(coff_adjust_symndx): Define.
Fix ld -r.
1996-09-16 22:31:16 +00:00
Ian Lance Taylor 9859bc3192 * srec.c (srec_scan): Accept multiple symbols on a single line.
From Pascal Martin <pmartin@alsys.com>.
1996-09-16 17:05:12 +00:00
Ian Lance Taylor b876014567 * README: New file. 1996-09-16 16:40:13 +00:00
David Edelsohn f8b82e49d2 * aoutf1.h (MY_bfd_merge_private_bfd_data): Define.
(sunos_merge_private_bfd_data): New function.
1996-09-13 22:18:58 +00:00
Ian Lance Taylor 76d30c3f49 * bfd.c (bfd_copy_private_bfd_data): Switch on output BFD rather
than input BFD.
	(bfd_merge_private_bfd_data): Likewise.
	* section.c (bfd_copy_private_section_data): Likewise.
	* syms.c (bfd_copy_private_symbol_data): Likewise.
	* bfd-in2.h: Rebuild.
	* aout-target.h (MY_bfd_copy_private_section_data): Check that
	both BFD's are the right flavour.
	* ecoff.c (_bfd_ecoff_bfd_copy_private_bfd_data): Likewise.
	* elf.c (_bfd_elf_copy_private_symbol_data): Likewise.
	* elf32-mips.c (_bfd_mips_elf_copy_private_bfd_data): Likewise.
	(_bfd_mips_elf_merge_private_bfd_data): Likewise.
	* elf32-ppc.c (ppc_elf_copy_private_bfd_data): Likewise.
	(ppc_elf_merge_private_bfd_data): Likewise.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Likewise.
	* peicode.h (pe_bfd_copy_private_section_data): Likewise.
1996-09-13 21:01:43 +00:00
Ian Lance Taylor 0a7b87358f * elf32-hppa.c (elf_hppa_howto_table): Fill in some fields for
R_PARISC_DIR32, so that _bfd_stab_section_find_nearest_line passes
	its sanity check.
1996-09-13 19:52:14 +00:00
David Edelsohn 6cb9c90330 * cpu-m32r.c,elf32-m32r.c: New files. 1996-09-12 18:58:36 +00:00
David Edelsohn 3ebefb0701 * reloc.c: Add m32r relocs.
* bfd-in2.h, libbfd.h: Rebuilt.
1996-09-12 18:56:14 +00:00
Ian Lance Taylor cacfb845c8 * ieee.c (ieee_vec): Set symbol_leading_char field to '_'. 1996-09-12 15:15:06 +00:00
Ian Lance Taylor e461da9b65 * tekhex.c (first_phase): Change type parameter from char to int.
(out): Likewise.
	(pass_over): Change func to expect int, not char.
1996-09-11 21:08:33 +00:00
Ian Lance Taylor d7775b4355 * elf.c (assign_file_positions_for_segments): Test SEC_ALLOC
rather than SEC_LOAD when aligning the file offset for the first
	section in a segment.
Fixes the case in which . is set just before the .bss section in a
linker script.
1996-09-11 15:59:34 +00:00
Fred Fish ea3f058549 * syms.c (coff_section_type): Make arg const.
* irix-core.c (irix_core_core_file_p): Remove extraneous extra arg
	to make_bfd_asection().
	* elf-bfd.h (bfd_section_from_phdr): Add prototype.
	* elfcode.h (bfd_section_from_phdr): Remove prototype.
	(_bfd_elf_stringtab_init): Remove prototype.

	* netbsd-core.c (swap_abort): Add prototype.
	* aix386-core.c (swap_abort): Ditto & make static
	* hpux-core.c (swap_abort): Ditto & make static.
	* irix-core.c (swap_abort): Ditto & make static.
	* ptrace-core.c (swap_abort): Ditto & make static.
	* trad-core.c (swap_abort): Ditto & make static.
	* coffswap.h (coff_swap_reloc_in): Ditto.
	(coff_swap_reloc_out): Ditto.
	(coff_swap_filehdr_in): Ditto.
	(coff_swap_filehdr_out): Ditto.
	(coff_swap_sym_in): Ditto.
	(coff_swap_sym_out): Ditto.
	(coff_swap_aux_in): Ditto.
	(coff_swap_aux_out): Ditto.
	(coff_swap_lineno_in): Ditto.
	(coff_swap_lineno_out): Ditto.
	(coff_swap_aouthdr_in): Ditto.
	(coff_swap_aouthdr_out): Ditto.
	(coff_swap_scnhdr_in): Ditto.
	(coff_swap_scnhdr_out): Ditto.
	* ihex.c (ihex_sizeof_headers): Ditto.
	* tekhex.c (getsym): Ditto.
	(find_chunk): Ditto & make static.
	(insert_byte): Ditto.
	(first_phase): Ditto.
	(pass_over): Ditto.
	(tekhex_get_symtab): Ditto & make static.
	(tekhex_get_symtab_upper_bound): Ditto & make static.
	(tekhex_mkobject): Ditto.
	(tekhex_object_p): Ditto.
	(move_section_contents): Ditto.
	(tekhex_get_section_contents): Ditto.
	(tekhex_set_arch_mach): Ditto & make static.
	(tekhex_set_section_contents): Ditto.
	(writevalue): Ditto.
	(writesym): Ditto.
	(out): Ditto.
	(tekhex_write_object_contents): Ditto.
	(tekhex_sizeof_headers): Ditto.
	(tekhex_make_empty_symbol): Ditto.
	(tekhex_get_symbol_info): Ditto.
	(tekhex_print_symbol): Ditto.
	* irix-core.c (make_bfd_asection): Ditto.
	(irix_core_core_file_p): Ditto.
	(irix_core_core_file_failing_command): Ditto.
	(irix_core_core_file_failing_signal): Ditto.
	(irix_core_core_file_matches_executable_p): Ditto.
	(irix_core_make_empty_symbol): Ditto.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Ditto.
	* srec.c (srec_new_symbol): Ditto.
	(srec_get_section_contents): Ditto.
	(srec_set_arch_mach): Ditto.
	(srec_set_section_contents): Ditto.
	(internal_srec_write_object_contents): Ditto.
	(srec_write_object_contents): Ditto.
	(symbolsrec_write_object_contents): Ditto.
	(srec_sizeof_headers): Ditto.
	(srec_make_empty_symbol): Ditto.
	(srec_get_symtab_upper_bound): Ditto.
	(srec_get_symtab): Ditto.
	(srec_print_symbol): Ditto and make static.
	* elf.c (elf_read): Ditto
	(assign_section_numbers): Ditto.
	(elf_fake_sections): Ditto.
	(sym_is_global): Ditto.
	(elf_map_symbols): Ditto.
	(get_program_header_size): Ditto.
	* coffgen.c (make_a_section_from_file): Ditto.
	(coff_real_object_p): Ditto.
	(fixup_symbol_value): Ditto.
	(build_debug_section): Ditto.
	(copy_name): Ditto.
	* syms.c (coff_section_type): Ditto.
1996-09-11 04:25:57 +00:00
Jeff Law 00d7a64b5f * bfd-in2.h: Rebuilt after m32r changes. 1996-09-10 04:35:48 +00:00
David Edelsohn f0c12b7340 * config.bfd,configure.in,configure: Add m32r support.
* Makefile.in,archures.c,elf.c,targets.c: Likewise.
1996-09-09 22:59:40 +00:00
David Edelsohn 66e4c22978 * config.bfd,configure.in,configure: Add m32r support. 1996-09-09 19:37:47 +00:00
David Edelsohn 71d7d44f19 * config.bfd: Keep target list alphabetically sorted. 1996-09-09 19:32:40 +00:00
Jeff Law 629f776abf * elf32-v850.c (bfd_elf32_v850_reloc, case R_V850_HI16): Don't forget
to add in the constant part found in the instruction itself.
        (case R_V850_HI16_S): Likewise.
Fixes plumhall/lang.exp failures.
1996-09-09 17:49:30 +00:00
Martin Hunt 9c85b19ddf Fri Sep 6 17:04:39 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Modify the size of R_D10V_16
	and R_D10V_18 to be 1 (word).
1996-09-07 00:06:53 +00:00
Ian Lance Taylor 4be2140e68 * stabs.c (_bfd_link_section_stabs): If the output_section field
of either section is bfd_abs_section, then the linker is
	discarding the section and we should not optimize it.
PR 10555.
1996-09-05 19:24:08 +00:00
Jeff Law e73b6ae634 * elf32-v850.c (bfd_elf32_v850_reloc): Fix handling of
low order sign bit propogationfor R_V850_HI16_S.
Fixes c-torture execute/950221-1.c, maybe others.
1996-09-04 03:03:53 +00:00
David Edelsohn 0cd98b92ab * Makefile.in (aout-sparcle.o): New target.
* aoutf1.h (TARGET_IS_BIG_ENDIAN_P): Don't define if little endian.
	* config.bfd (sparclet-*-aout*): Add case.
	* configure.in (sparcle_aout_vec): Add case.
	* configure: Regenerated.
	* libaout.h (machine_type): Add M_SPARCLET_LE.
	* targets.c (sparcle_aout_vec): Declare.
	(bfd_target_vector): Add sparcle_aout_vec.
	* aout-sparcle.c: New file.
1996-09-03 19:52:15 +00:00
Jeff Law 7b0af209eb * elf32-v850.c (bfd_elf3_v850_reloc): New function for
handling V850 specific relocs.
        (elf_v850_howto_table): Use the new function for some
        relocations.  Twiddle masks & shifts for some relocs.
        Set partial_inplace where needed.
Fixing more stuff.
1996-09-03 08:14:53 +00:00
Mark Alexander 71bcbd25c8 Remove reloc.c from v850_files. 1996-09-02 23:23:11 +00:00
Mark Alexander b5ef63c4fc * .Sanitize: Remove reloc.c from v850_files. 1996-09-01 22:25:50 +00:00
Ian Lance Taylor bde9d87544 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
Rewrite to use BFD file read routines and to avoid using a fixed
	length for the file name.
1996-09-01 19:44:40 +00:00
Jeff Law 237b5c4c9a * elf32-v850.c (enum reloc_type): Add R_V850_{32,16,8}.
(elf_v850_howto_table): Add support for R_V850_{32,16,8}.
        (v850_reloc_map): Add translation from BFD_RELOC_{32,16,8}
        to R_V850_{32,16,8}.
So we don't get "reloc XXX not supported" messages anymore.
1996-08-31 16:24:18 +00:00
J.T. Conklin 01b49cb35b * elf32-v850.c (reloc_type): Add R_V850_HI16_S.
(elf_v850_howto_table): Add info for HI16_S reloc.
(v850_reloc_map): Add HI_16_S reloc.
* reloc.c: Define BFD_RELOC_V850_* relocs.
1996-08-31 01:32:13 +00:00
Ian Lance Taylor c86158e591 Add SH ELF support.
* elf32-sh.c: New file.
	* elf.c (prep_headers): Handle bfd_arch_sh.
	* elfcode.h (write_relocs): Handle absolute symbol.
	* elf-bfd.h (_bfd_elf32_link_read_relocs): Declare.
	(_bfd_elf64_link_read_relocs): Declare.
	* elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from
	elf_link_read_relocs.  Make globally visible.  Change all
	callers.
	(elf_link_input_bfd): Get external symbols from cache in
	symtab_hdr->contents.  Get contents from cache in
	elf_section_data.
	* elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not
	already defined.
	* reloc.c: Define BFD_RELOC_SH_* relocs.
	* libbfd-in.h (_bfd_sh_align_load_span): Declare.
	* coff-sh.c (sh_insns_conflict): Fix a return value.
	(_bfd_sh_align_load_span): New globally visible function, broken
	out of sh_align_load.
	(sh_align_load): Call _bfd_sh_align_load_span.
	(sh_swap_insns): Change relocs parameter to PTR.
	* bfd-in2.h, libbfd.h: Rebuild.
	* targets.c (bfd_elf32_sh_vec): Declare.
	(bfd_elf32_shl_vec): Declare.
	* config.bfd (sh-*-elf*): New target.
	* configure.in (bfd_elf32_sh_vec): New target vector.
	(bfd_elf32_shl_vec): New target vector.
	* configure: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add elf32-sh.o.
	(BFD32_BACKENDS_CFILES): Add elf32-sh.c.

	* elf.c (map_sections_to_segments): Check that LMA does not skip a
	page before checking D_PAGED.
1996-08-30 22:09:51 +00:00
Ian Lance Taylor 492cfc71b8 * ihex.c (ihex_scan): Removed unnecessary extbase variable.
(ihex_write_object_contents): Remove extbase; always use segbase
	instead.
1996-08-30 15:52:40 +00:00
Michael Meissner f7954d868f Recognize i686-*-* for pentium pro 1996-08-29 21:16:27 +00:00
Ian Lance Taylor 4da624ddb3 * elf32-mips.c (mips_elf_check_relocs): Set dynobj if needed for
R_MIPS_32 and R_MIPS_REL32.  Set sgot and g as soon as possible.
	(mips_elf_size_dynamic_sections): Don't require .got to exist.
	(mips_elf_finish_dynamic_sections): Likewise.
1996-08-27 04:14:13 +00:00
Ian Lance Taylor 1c952df609 * configure.host (HLDENV): New variable to set. Set it for
*-*-sysv4*, since those linkers may not support -R but they always
	support LD_RUN_PATH.
1996-08-23 00:07:59 +00:00
Ian Lance Taylor 9461513b04 * libieee.h (NSECTIONS): Don't define.
(ieee_data_struct): Change section_table to asection **.  Add
	section_table_size.
	* ieee.c (get_section_entry): If the table isn't big enough, make
	it bigger.
	(ieee_slurp_sections): Remove assertion about number of sections.
	(ieee_object_p): Adjust initialization of ieee to match changes to
	the structure.
PR 10377.
1996-08-23 00:02:55 +00:00
J.T. Conklin 0c1d95c791 * Makefile.in (ALL_MACHINES): Add cpu-v850.o.
(BFD32_BACKENDS) Add elf32-v850.o.
* archures.c: Add bfd_v850_arch.
* bfd-in2.h: Add bfd_v850_arch.
* config.bfd (v850-*-*): New target.
* configure: (bfd_elf32_v850_vec) New vector.
* configure.in: (bfd_elf32_v850_vec) New vector.
* cpu-v850.c: New file.
* elf.c (prep_headers): Added case bfd_arch_v850.
* elf32-v850.c: New file.
* targets.c (bfd_elf32_v850_vec): New vector.
1996-08-20 22:09:25 +00:00
Stan Shebs 22edd54732 * mpw-config.in: Update editing of autoconf vars to reflect
Jul 18 configure.in change.
	* mpw-make.sed: Update editing of include pathnames to be
	more general, add @DASH_C_FLAG@ to explicit compile rule edit.
1996-08-15 19:41:17 +00:00
Jackie Smith Cashion 53ef6e6076 Thu Aug 15 16:40:30 1996 James G. Smith <jsmith@cygnus.co.uk>
* reloc.c: (BFD_RELOC_ARM_THUMB_ADD, BFD_RELOC_ARM_THUMB_IMM,
	BFD_RELOC_ARM_THUMB_SHIFT, BFD_RELOC_ARM_THUMB_OFFSET):
 	Added, for internal use by the ARM gas.
	* libbfd.h: Rebuilt
	* bfd-in2.h: Rebuilt
1996-08-15 15:58:35 +00:00
Ian Lance Taylor 37d7888d03 Wed Aug 14 17:02:09 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Correct typo
	in section dynidx start.
1996-08-15 00:03:50 +00:00
Ian Lance Taylor e38d6d362f * elf.c (_bfd_elf_make_section_from_shdr): Treat sections whose
name begins with .gnu.linkonce as SEC_LINK_ONCE.  This is an
	optimization for g++.
1996-08-13 21:39:37 +00:00
Michael Meissner ae20860e9d If one module has -mrelocatable-lib and the other doesn't, clear the -mrelocatable-lib bit 1996-08-13 21:09:06 +00:00
Ian Lance Taylor 4596421b67 * elflink.h (elf_link_add_object_symbols): Do not resolve a common
symbol against a STT_FUNC symbol in a shared library.
1996-08-11 03:39:46 +00:00
Ian Lance Taylor 410bc61d0c * xcofflink.c (xcoff_link_add_dynamic_symbols): If a descriptor
symbol is found, automatically define the corresponding function
 	code.
PR 10299.
1996-08-10 00:15:30 +00:00
Ian Lance Taylor d92099f198 * cofflink.c (coff_link_add_symbols): Only set (*sym_hash)->numaux
if sym.n_numaux is not zero.
	(_bfd_coff_link_input_bfd): Permit the symbol and the hash table
	entry to disagree about the number of aux entries if the symbol
	has zero.
1996-08-09 18:46:54 +00:00
Ian Lance Taylor f11e3f6278 * elf32-mips.c (mips_elf_check_relocs): Create the .rel.dyn
section if it might be needed, not just if info->shared.
	(mips_elf_adjust_dynamic_symbol): Make room for a null element at
	the start of .rel.dyn if we are going to use it.
	(mips_elf_finish_dynamic_sections): Only clear the first element
	of .rel.dyn if the size is greater than zero.
Fix this case from c-torture:
extern int abort();
typedef int (*frob)();
frob f[] = {abort};
main()
{
  exit(0);
}
1996-08-09 16:47:15 +00:00
Ian Lance Taylor b2a05baf21 * xcofflink.c (xcoff_link_input_bfd): If we already called the
undefined_symbol callback for a symbol, then don't issue any more
	warnings about loader relocs.
	(_bfd_ppc_xcoff_relocate_section): Don't do any further processing
	after calling the undefined_symbol callback.
1996-08-08 21:15:32 +00:00
Ian Lance Taylor fbc4ed7ded * xcofflink.c (XCOFF_MULTIPLY_DEFINED): Define.
(xcoff_link_add_symbols): Permit multiple definitions of a symbol
	as the AIX linker seems to do.
PR 10304.
1996-08-08 20:33:39 +00:00
Ian Lance Taylor 8612a388f7 Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
* evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
	(evax_initialize): Remove evax_reloc_table.
	(evax_close_and_cleanup): Ditto.
	(reloc_nil): Ditto.
	(alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
	entries.
	(evax_bfd_reloc_type_lookup): Ditto.
	* evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
	cooked_size == raw_size.
	* evax-emh.c (_bfd_evax_register_filename): Remove.
	* evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
	* evax-misc.c (add_new_contents): Malloc section at full size.
	(_bfd_save_evax_section): Memcpy section contents directly.
	* evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
	(evax_reloc_table): Remove.

	* hosts/alphavms.h (O_ACCMODE): Define if needed.

	* makefile.vms: Add better support for DEC C compilation
	Add evax.h dependencies

	* reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
	(BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
	(BFD_RELOC_ALPHA_BASEREG): Remove.
	* bfd-in2.h, libbfd.h: Rebuild.
1996-08-08 16:27:21 +00:00
Stu Grossman 320a5c6b18 * archive.c (bsd_write_armap): Ifdef around calls to getuid and
getgid if _WIN32 is defined.
	* opncls.c (bfd_fdopenr):  Remove unnecessary WINGDB ifdef.
1996-08-08 15:23:01 +00:00
Stu Grossman 2055bf857d * aoutx.h bfd-in.h bfd-in2.h opncls.c riscix.c som.c targets.c:
Change NO_FLAGS to BFD_NO_FLAGS to avoid conflict with an HPUX
	include file.
	* libbfd.c:  Create dummy getpagesize() macro if HAVE_GETPAGESIZE
	isn't defined.
1996-08-08 06:27:01 +00:00
Ian Lance Taylor cc425b5558 * cpu-i386.c (i8086_arch): Architecture info for the i8086. 1996-08-07 20:10:14 +00:00
Ian Lance Taylor 85fe9d3e46 Wed Aug 7 14:11:44 1996 Philippe De Muyter <phdm@info.ucl.ac.be>
* configure.in: Call BFD_NEEDED_DECLARATION on strstr and
	realloc.
	* acconfig.h (NEED_DECLARATION_STRSTR): New macro.
	(NEED_DECLARATION_REALLOC): New macro.
	* configure, config.in: Rebuild.
	* sysdep.h (strstr): Declare if NEED_DECLARATION_STRSTR.
	(realloc): Declare if NEED_DECLARATION_REALLOC.
1996-08-07 18:17:22 +00:00
Ian Lance Taylor 9b3307b0a0 Based on patches from Eric Valette <valette@crf.canon.fr>:
* elf32-i386.c (enum reloc_type): Add FIRST_INVALID_RELOC,
	LAST_INVALID_RELOC, R_386_16, R_386_PC16, R_386_8, R_386_PC8.
	(elf_howto_table): Add entries for new relocs.
	(elf_i386_reloc_type_lookup): Handle new relocs.
	(elf_i386_info_to_howto): Just call abort.
	(elf_i386_info_to_howto_rel): Check that the reloc type is valid.
	(elf_i386_relocate_section): Likewise.
1996-08-07 16:14:09 +00:00
Martin Hunt 75e3a45a0d Tue Aug 6 12:54:56 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* elf32-d10v.c (elf_d10v_howto_table): Added R_D10V_32.
1996-08-06 19:56:21 +00:00
Ian Lance Taylor b944e7e855 * elf.c (_bfd_elf_make_section_from_shdr): For a loadable section,
only get the LMA from the phdr if they are in the same part of the
	file.
1996-08-05 20:45:55 +00:00
Ian Lance Taylor 191d910cb9 * elf.c (map_sections_to_segments): Rewrite tests for starting a
new segment to make them more comprehensible.  If the relationship
	between the LMA and the VMA changed, start a new segment.  Don't
	check dynsec when deciding whether to start a new segment for a
	writeable section; -N will now handle this.
1996-08-05 17:45:58 +00:00
Jeff Law e751d5068f * libhppa.h: Remove "esel" changes. Not the right approach.
* som.c: Corresponding changes.
        (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols
        which don't have a SOM symbol type associated with them.
        Reverses a 1994 change.
More PA EH tweakage (to get exception handling tables properly relocated
in shared libraries).
1996-08-02 04:50:08 +00:00
Ian Lance Taylor cdb88e8764 Make ld -N more reasonable for ELF:
* elf.c (map_sections_to_segments): If D_PAGED is not set, set
	phdr_in_section to false, and always use a single load segment.
	(elf_sort_sections): Sort sections by LMA after VMA.
	(assign_file_positions_for_segments): If D_PAGED is not set, don't
	align to maxpagesize.
	(assign_file_positions_except_relocs): Likewise.
	* elfcode.h (elf_object_p): If a section is loaded but not page
	aligned, clear D_PAGED.
1996-07-31 19:58:05 +00:00
Jackie Smith Cashion d1b40d8eeb Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>
* reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL):
 	Added, for internal use by the ARM gas.
	* libbfd.h: Rebuilt
	* bfd-in2.h: Rebuilt
1996-07-31 14:34:21 +00:00
Jeff Law ad240a8289 * libhppa.h (R_HPPA_ESEL): New field selector.
(e_esel): Similarly.
        * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel,
        then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream.
        (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR.
Making another stab at EH support on the PA.
1996-07-30 20:16:27 +00:00
Ian Lance Taylor fb4dc1eb5f * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Do the regular
archive search before looking for stripped dynamic objects.
PR 10187.
1996-07-30 17:39:33 +00:00
Ian Lance Taylor b223f95038 * xcofflink.c (xcoff_build_ldsyms): Make exporting an undefined
symbol a warning rather than an error.
PR 10208.
1996-07-26 21:53:08 +00:00
Ian Lance Taylor a4e07bb49e tipo 1996-07-24 23:11:13 +00:00
Ian Lance Taylor 64f808f92b * elf.c (assign_file_positions_for_segments): Track the virtual
memory position separately from the file position, and use it to
	compute the alignment adjustment.
PR 10039.
1996-07-24 16:05:32 +00:00
Martin Hunt 11609502f0 start-sanitize-d10v
Tue Jul 23 10:43:31 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>

	* elf32-d10v.c (elf_d10v_howto_table): Changed all relocs to "long"
 	and fixed mask on R_D10V_10_PCREL_L.

end-sanitize-d10v
1996-07-23 17:54:21 +00:00
Ian Lance Taylor bf9884d41d * elf64-mips.c: Include "aout/ar.h".
(mips_elf64_slurp_armap): New static function.
	(mips_elf64_write_armap): New static function.
	(bfd_elf64_archive_*): Define.
	* elfxx-target.h (bfd_elfNN_archive_p): Define if not defined.
	Use instead of bfd_generic_archive_p.
	(bfd_elfNN_write_archive_contents): Define if not defined.  Use
	instead of _bfd_write_archive_contents.
	(bfd_elfNN_mkdarchive): Define if not defined.  Use instead of
	_bfd_generic_mkarchive.
	(TARGET_BIG_SYM): If bfd_elfNN_archive_functions is defined, use
	bfd_elfNN_archive in BFD_JUMP_TABLE_ARCHIVE rather than
	_bfd_archive_coff.
	(TARGET_LITTLE_SYM): Likewise.
	* archive.c (bfd_slurp_armap): Check for and reject an archive map
	name of /SYM64/.
	* Makefile.in: Rebuild dependencies.
1996-07-22 23:02:35 +00:00
Ian Lance Taylor 1cfe12f298 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Handle
SHT_MIPS_LIBLIST, SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and
	SHT_MIPS_EVENTS sections.
	(_bfd_mips_elf_section_from_shdr): Handle SHT_MIPS_IFACE,
	SHT_MIPS_CONTENT, SHT_MIPS_SYMBOL_LIB, and SHT_MIPS_EVENTS
	sections.
	(_bfd_mips_elf_fake_sections): Likewise.
1996-07-22 23:02:02 +00:00
Ian Lance Taylor 9bd65136af * libecoff.h (ecoff_data_type): Add rdata_in_text field.
* ecoff.c (ecoff_compute_section_file_positions): Copy
	rdata_in_text from backend info to tdata.  Clear it if any data
	section comes before .rdata.
	(_bfd_ecoff_write_object_contents): Use rdata_in_text field in
	tdata rather than backend info.
1996-07-22 19:38:23 +00:00
Ian Lance Taylor 194141a9b8 * configure.in: Fix test for whether a compiler has a 64 bit
type.  From Jim Wilson <wilson@cygnus.com>.
VS: ----------------------------------------------------------------------
1996-07-19 22:16:50 +00:00
Ian Lance Taylor f4e14cb901 * configure.in: Set and substitute VERSION, BFD_HOST_64BIT_LONG
(replacing HOST_64BITLONG), BFD_HOST_64_BIT_DEFINED,
	BFD_HOST_64_BIT, and BFD_HOST_U_64_BIT.  Add bfd-in2.h:bfd-in2.h
	to AC_OUTPUT call.
	* configure: Rebuild.
	* bfd-in.h (BFD_ARCH_SIZE): Define as @wordsize@, not @WORDSIZE@.
	(BFD_HOST_64_BIT): Define conditionally.
	(BFD_HOST_U_64_BIT): Define when BFD_HOST_64_BIT is defined.
	(bfd_vma): Typedef as BFD_HOST_U_64_BIT.
	(symvalue, bfd_size_type): Likewise.
	* bfd-in2.h: Rebuild.
	* Makefile.in (do_clean): Remove bfd-tmp.h.
	(do_distclean): Remove bfd-in3.h.
	(stmp-bfd.h): Just do copy-if-change bfd-in3.h bfd.h.
	(bfd-in3.h): New target.
1996-07-19 00:48:20 +00:00
Ian Lance Taylor 0f61272947 rebuild 1996-07-19 00:46:50 +00:00
Ian Lance Taylor 74556b94ff * config.bfd (sparc-*-sysv4*): Don't build sunos_big_vec. From
Andrew Gierth <ANDREWG@microlise.co.uk>.
1996-07-18 21:36:21 +00:00
Ian Lance Taylor ab659fd6de * configure.host: Set INSTALL_SHLIB.
* configure.in: Call AC_SUBST (INSTALL_SHLIB).
	* configure: Rebuild.
	* Makefile.in (install): Use @INSTALL_SHLIB@.
1996-07-18 21:19:11 +00:00
Ian Lance Taylor e8c249cb2c * config.bfd (mips*-*-irix6*): New target.
* configure.host: Handle Irix 6 shared library like Irix 5.
1996-07-18 20:33:22 +00:00
Ian Lance Taylor a8a3d83af0 * xcofflink.c (xcoff_link_add_symbols): Don't check an XMC_TD
symbol for a magic name.
	(xcoff_link_input_bfd): Don't change the reloc symbol for an
	XMC_TD symbol.
	(_bfd_ppc_xcoff_relocate_section): Don't get the TOC offset for an
	XMC_TD symbol.
1996-07-18 19:41:35 +00:00
Stan Shebs b576c7b3d2 * mpw-config.in: Add ELF support to mips config, create the
elf32-target.h file in the object dir.
	* mpw-make.sed: Edit elfXX-target.h refs at beginnings of lines.
1996-07-18 18:42:06 +00:00
Kim Knuttila 2ba0d82d52 Removed debug, fixed diagnostics, etc 1996-07-18 01:04:14 +00:00
Martin Hunt 50bd50d48f start-sanitize-d10v
Wed Jul 17 14:51:52 1996  Martin M. Hunt  <hunt@pizza.cygnus.com>
        * Makefile.in (ALL_MACHINES): Add cpu-d10v.o
        (BFD32_BACKENDS) Add elf32-d10v.o
        * archures.c: Add bfd_d10v_arch.
        * bfd-in2.h: Add bfd_d10v_arch.
        * config.bfd (d10v-*-*): New target.
        * configure: (bfd_elf32_d10v_vec) New vector.
        * configure.in: (bfd_elf32_d10v_vec) New vector.
        * cpu-d10v.c: New file.
        * elf.c (prep_headers): Added case bfd_arch_d10v.
        * elf32-d10v.c: New file.
        * libbfd.h: Rebuild.
        * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L, BFD_RELOC_D10V_18,
          BFD_RELOC_D10V_18_PCREL): Define.
        * targets.c (bfd_elf32_d10v_vec): New vector.
end-sanitize-d10v
1996-07-18 00:47:05 +00:00
Kim Knuttila 2ce9802e14 Removed bogus printf 1996-07-17 18:10:20 +00:00
Ian Lance Taylor 4b2ef5d8bf remove sanitization accidentally inserted in last commit 1996-07-17 13:28:31 +00:00
Stu Grossman 9676e4461a * archures.c bfd-in2.h: Add bfd_mach_i386_i386 and
bfd_mach_i386_i8086 machine types.
1996-07-17 06:51:21 +00:00
Stu Grossman 3cc21bf602 * bfd-in2.h: Add bfd_mach_i386_i386 and bfd_mach_i386_i8086
machine types.
1996-07-15 23:41:21 +00:00
Ian Lance Taylor f71719789e * ecoff.c (_bfd_ecoff_new_section_hook): Set SEC_CODE for _INIT
and _FINI sections.
1996-07-10 16:44:45 +00:00
Ian Lance Taylor 74e2ab383c Wed Jul 10 11:18:21 1996 Richard Henderson <rth@tamu.edu>
* coffcode.h (coff_set_section_contents): A/UX does not require
	special handling of the _LIB section.
1996-07-10 15:26:50 +00:00
Jeff Law 01cfaa6bf2 * coff-h8300.c (h8300_reloc16_extra_cases): Use the correct
value for R_RELBYTE.
Something -Wall caught.

        * reloc16.c (bfd_coff_reloc16_relax_section): Only "shrinks"
        array if one was allocated.
Something I ran into today.
1996-07-09 21:53:47 +00:00
Ian Lance Taylor eb52b9dc1d From Kazumoto Kojima <kkojima@kk.info.kanagawa-u.ac.jp>:
* elf32-mips.c (struct mips_elf_link_hash_table): Add new fields
	use_rld_obj_head and rld_value.
	(mips_elf_link_hash_table_create): Initialize new fields.
	(mips_elf_add_symbol_hook): Mark __rld_obj_head symbol as
	dynamic.
	(mips_elf_create_dynamic_sections): Create .rld_map section.  If
	__rld_obj_head symbol not seen, create an __rld_map symbol.
	(mips_elf_size_dynamic_sections): Make space in .rld_map section.
	Create a DT_MIPS_RLD_MAP entry rather than a DT_DEBUG entry.
	(mips_elf_finish_dynamic_symbol): Save value of __rld_map or
	__rld_obj_head symbol.
	(mips_elf_finish_dynamic_sections): Handle DT_MIPS_RLD_MAP.
1996-07-09 16:28:04 +00:00
Ian Lance Taylor 9b292d4c0e * elf32-mips.c (mips_reloc_map): Remove BFD_RELOC_32_PCREL entry. 1996-07-08 23:29:26 +00:00
Ian Lance Taylor dab4573409 * elf32-ppc.c (ppc_elf_howto_raw): For R_PPC_ADDR16_HA, use
ppc_elf_addr16_ha_reloc.
	(ppc_elf_addr16_ha_reloc): New static function.
PR 10036.
1996-07-08 21:38:59 +00:00
Ian Lance Taylor 56b4cbaac3 * coff-mips.c (struct mips_hi): Define.
(mips_refhi_list): New static variable.
 	(mips_refhi_addr, mips_refhi_addend): Remove.
	(mips_refhi_reloc): Maintain a list of unmatched REFHI relocs.
	(mips_reflo_reloc): Process mips_refhi_list.
	(mips_relhi_list): New static variable.
	(mips_relhi_addr, mips_relhi_addend): Remove.
	(mips_relhi_reloc): Maintain a list of unmatched RELHI relocs.
	(mips_rello_reloc): Process mips_relhi_list.
	(mips_relocate_section): Permit an arbitrary number of REFHI or
	RELHI relocs before the associated REFLO or RELLO reloc.
PR 10050.
1996-07-08 20:25:54 +00:00
Ian Lance Taylor b777c6a733 * aout-target.h (MY(callback)): Set reloc_count fields. 1996-07-05 23:30:05 +00:00
Jeff Law 34255b708c No longer need to sanitize away h8/s stuff. 1996-07-05 18:30:03 +00:00
Ian Lance Taylor 48f3aaf3ed * sunos.c (sunos_add_dynamic_symbols): Don't create dynamic
sections unless this is a SunOS link.
PR 10039.
1996-07-04 22:25:50 +00:00
Ian Lance Taylor 100b65dd23 * VERSION: Set to 2.7.1. 1996-07-04 19:35:51 +00:00
Ian Lance Taylor 4d3daf4fae * i386aout.c: Include "aout/aout64.h".
(i386aout_write_object_contents): New static function.
	(MY_write_object_contents): Define.
1996-07-03 20:50:56 +00:00
Ian Lance Taylor a31e14f44c * netbsd.h (MY(write_object_contents)): Make sure that
adjust_sizes_and_vmas is called before fiddling with the magic
	number.
1996-07-03 19:01:14 +00:00
Ian Lance Taylor d2d04f7a28 * stabs.c (_bfd_link_section_stabs): Fix casts of psinfo. 1996-07-03 03:32:48 +00:00
Ian Lance Taylor 4f6ee760ca * libbfd-in.h (itos, stoi): Don't define.
* libbfd.h: Rebuild.
	* i386lynx.c (KEEPIT): Define as udata.i.
	(NAME(lynx,swap_std_reloc_out)): Don't use stoi.
	(NAME(lynx,swap_ext_reloc_out)): Likewise.
	* riscix.c (riscix_swap_std_reloc_out): Use udata.i rather than
	flags.  Don't use stoi.
1996-06-30 17:42:02 +00:00
Kim Knuttila dfb89b82d4 Fixed the ppc/nt strip bug. Missing D_PAGED. 1996-06-29 23:25:23 +00:00
Ian Lance Taylor f93fb27543 * xcofflink.c (xcoff_link_check_ar_symbols): An undefined symbol
with XCOFF_DEF_DYNAMIC set is really defined.
	(xcoff_link_check_dynamic_ar_symbols): Likewise.
The above is for PR 9997.
	(xcoff_link_add_symbols): Only create special sections if using an
	XCOFF hash table.
1996-06-28 22:19:46 +00:00
Ian Lance Taylor 8e80606fab * reloc.c (bfd_perform_relocation): Handle xcoff-powermac like
aixcoff-rs6000.
	(bfd_install_relocation): Likewise.
1996-06-28 17:50:36 +00:00