Commit Graph

2035 Commits

Author SHA1 Message Date
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
Ian Lance Taylor eec2f824fb Fri Jun 28 11:17:00 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (struct alpha_elf_link_hash_entry): Add flags
	field.
	(ALPHA_ELF_LINK_HASH_LU_ADDR): Define.
	(ALPHA_ELF_LINK_HASH_LU_MEM): Define.
	(ALPHA_ELF_LINK_HASH_LU_FUNC): Define.
	(elf64_alpha_link_hash_newfunc): Initialize flags field.
	(elf64_alpha_check_relocs): Record types of LITUSE entries that
	are found for LITERAL relocs.
	(elf64_alpha_adjust_dynamic_symbol): If a symbol has its address
	taken, we cannot generate a .plt entry for the symbol.
1996-06-28 15:24:18 +00:00
Ian Lance Taylor 5304aea938 * configure.in: Add AC_ISC_POSIX, and check for setitimer and
sysconf functions (for gprof).
	* configure, config.in: Rebuild.
1996-06-27 15:29:21 +00:00
Ian Lance Taylor f292bbe9cf * ecoff.c (_bfd_ecoff_archive_p): Check the first object file in
an archive if it has a map.  If the object file has the wrong
	xvec, reject it.
PR 9972.
1996-06-27 01:44:49 +00:00
Ian Lance Taylor 566e232559 * coff-alpha.c (alpha_adjust_reloc_in): Set the addend for a
BRADDR, SREL16, SREL32, or SREL64 reloc against an external
	symbol.
	(alpha_relocate_section): Likewise.
1996-06-26 21:27:09 +00:00
Ian Lance Taylor 017047d446 * coffswap.h (coff_swap_reloc_out): Use RELSZ, not sizeof.
(coff_swap_filehdr_out): Use FILHSZ, not sizeof.
	(coff_swap_sym_out): Use SYMESZ, not sizeof.
	(coff_swap_aux_out): Use AUXESZ, not sizeof.
	(coff_swap_lineno_out): Use LINESZ, not sizeof.
	(coff_swap_aouthdr_out): Use AOUTSZ, not sizeof.
	(coff_swap_scnhdr_out): Use SCNHSZ, not sizeof.
	* peicode.h: Corresponding changes.
1996-06-26 20:32:22 +00:00
Michael Meissner cb73f5d786 Comment out code to make GOT pointers negative of the GOT symbol for now 1996-06-25 19:45:17 +00:00
Ian Lance Taylor 297a4f1a3c Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
	increment the .rela.plt size until after we're done creating the
	.plt entry.
	(elf64_alpha_finish_dynamic_symbol): Change .plt entry to load the
	.rela.plt offset directly rather than calculating it.
1996-06-25 15:55:31 +00:00
Jason Molenda 01e58ff6e6 typeo 1996-06-25 12:00:18 +00:00
Jason Molenda dbbfec0782 * Makefile.in, Makefile.in (bindir, libdir, datadir, mandir, infodir,
includedir): Use autoconf-set values.
        * doc/Makefile.in, Makefile.in (bindir, libdir, datadir, mandir,
        infodir, includedir, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Use
        autoconf-set values.
        (docdir): Deleted.
        * configure.in (AC_PREREQ): autoconf v2.5 or higher.
        * configure: Rebuilt.
1996-06-25 11:54:57 +00:00
Jeff Law 50004d8d12 * som.c (som_write_fixups): Fix typo in R_END_TRY for exception
handling code > 1k away.
PA exception handling crud.
1996-06-25 04:50:10 +00:00
Ian Lance Taylor 2e0567eb0d * elf.c (elf_fake_sections): Don't set sh_addr of a non SEC_ALLOC
section to 0 if user_set_vma is set.
	* elflink.h (elf_bfd_final_link): Likewise.
1996-06-24 22:00:22 +00:00
Ian Lance Taylor bff4a49602 Fri Jun 21 17:38:15 1996 Joel Sherrill <joel@merlin.gcs.redstone.army.mil>
* config.bfd: Add support for *-*-rtems* configurations.
1996-06-21 22:02:36 +00:00
Ian Lance Taylor 7ae6550fc5 * elf.c (prep_headers): Add bfd_arch_alpha case. 1996-06-21 19:23:36 +00:00
Ian Lance Taylor e8f4671749 Fri Jun 21 12:35:27 1996 Richard Henderson <rth@tamu.edu>
* elf64-alpha.c: New file.
	* config.bfd (alpha-*-linuxecoff*): New target.
	(alpha-*-linux*, alpha-*-elf*): New targets.
	* configure.in (bfd_elf64_alpha_vec): New vector.
	* configure: Rebuild.
	* targets.c (bfd_elf64_alpha_vec): Declare.
	(bfd_target_vector): Add bfd_elf64_alpha_vec if BFD64.
	* reloc.c (BFD_RELOC_ALPHA_GPDISP): Define.
	* bfd-in2.h, libbfd.h: Rebuild.
	* Makefile.in: Rebuild dependencies.
 	(BFD64_BACKENDS): Add elf64-alpha.o.
	(BFD64_BACKENDS_CFILES): Add elf64-alpha.c.
1996-06-21 16:40:43 +00:00
David Edelsohn b9110a3c4f * coffcode.h (coff_set_alignment_hook): Change COFF_IMAGE_WITH_PE
ifdef to COFF_WITH_PE.
	(coff_compute_section_file_positions): Likewise.
	(coff_write_object_contents): Likewise.  Delete COFF_OBJ_WITH_PE.
	* pe-{arm,i386,ppc}.c (COFF_OBJ_WITH_PE): Delete.
	* peicode.h (pe_bfd_copy_private_bfd_data): Delete ifdef
	COFF_IMAGE_WITH_PE, always include.
1996-06-20 23:59:08 +00:00
Ian Lance Taylor bacecac849 * ecoff.c (ecoff_armap_hash): If hlog is 0, just return 0, rather
than relying on a right shift of 32.
1996-06-20 22:23:22 +00:00
David Edelsohn 9ca108cdd0 * peicode.h (coff_swap_scnhdr_out): ".drectve" doesn't have trailing 0. 1996-06-20 19:36:35 +00:00
Ian Lance Taylor 7fc6a16a7f * elf.c (map_sections_to_segments): Fix up the test for -Ttext to
approximate the correct answer if SIZEOF_HEADERS was not used.
1996-06-19 16:30:27 +00:00
Ian Lance Taylor c2073f05cf * binary.c (binary_set_section_contents): Set section file
position based on LMA rather than VMA.
1996-06-19 15:39:08 +00:00
Ian Lance Taylor 4838929ec7 Wed Jun 19 11:19:25 1996 Manfred Hollstein KS/EIC5 60/3/142 #40283 <manfred@lts.sel.alcatel.de>
* linker.c (_bfd_generic_link_output_symbols): Don't output any
	symbols if info->strip == strip_all.
1996-06-19 15:23:21 +00:00
Ian Lance Taylor c3d8e071bf Tue Jun 18 14:42:58 1996 Klaus Kaempf <kkaempf@progis.de>
Added support for Alpha OpenVMS:
	* evax.h, evax-alpha.c, evax-egsd.c, evax-emh.c: New files.
	* evax-etir.c, evax-misc.c, hosts/alphavms.h: New files.
	* config.h-vms, makefile.vms: New files.
	* config.bfd (alpha-*-*vms*): New target.
	* configure.in (evax_alpha_vec): New target vector.
	* configure: Rebuild.
	* reloc.c (BFD_RELOC_SWREL32, BFD_RELOC_SWREL64): Define.
	(BFD_RELOC_ALPHA_LINKAGE, BFD_RELOC_ALPHA_BASEREG): Define.
	* targets.c (bfd_target_evax_flavour): Define.
	(evax_alpha_vec): Declare.
	(bfd_target_vector): Add ecoffalpha_little_vec and evax_alpha_vec
	if BFD64 is defined.
	* bfd-in2.h, libbfd.h: Rebuild.
	* Makefile.in: Rebuild dependencies.
	(BFD64_BACKENDS): Add evax-alpha.o, evax-egsd.o, evax-etir.o,
	evax-emh.o, and evax-misc.o.
	(BFD64_BACKENDS_CFILES): Add evax-alpha.c, evax-egsd.c,
	evax-etir.c, evax-emh.c, and evax-misc.c.
	(HFILES): Add evax.h.
1996-06-18 19:07:51 +00:00
Ian Lance Taylor 142aa7d93a * coff-h8300.c (h8300_reloc16_extra_cases): Make name a const
pointer.
	(h8300_bfd_link_add_symbols): Likewise.
1996-06-18 17:56:53 +00:00
Jeff Law b658d64d9e * som.h (R_HPPA_BEGIN_TRY, R_HPPA_END_TRY): Define.
* som.c (som_write_fixups): Handle R_BEGIN_TRY and R_END_TRY.
gunk for EH on the PA.
1996-06-17 18:25:09 +00:00
Ian Lance Taylor 2df1e84b65 * elf32-mips.c (mips_elf_relocate_section): Don't create a reloc
for R_MIPS_REL32 and R_MIPS_32 relocs if no dynamic sections were
	created.
	(mips_elf_check_relocs): Only create .rel.dyn for R_MIPS_REL32 and
	R_MIPS_32 relocs if creating a shared library.
1996-06-17 16:54:39 +00:00
Ian Lance Taylor 51bc9642d9 * cofflink.c (_bfd_coff_final_link): Handle long section names.
* coffcode.h (coff_write_object_contents): If there are long
	section names, always set the f_symptr field, even if there are no
	symbols.
	* peicode.h (coff_swap_filehdr_in): Don't clear the f_symptr field
	if there are no symbols.
1996-06-13 18:07:39 +00:00
Ian Lance Taylor 8100e72c95 * coffgen.c (make_a_section_from_file): Check return value of
_bfd_coff_read_string_table.
	(coff_real_object_p): Check return value of
	make_a_section_from_file.
	(_bfd_coff_read_string_table): Check that there are some symbols
	before trying to read the string table size.
1996-06-13 17:40:58 +00:00
Ian Lance Taylor ed675a0409 * xcofflink.c (xcoff_link_add_symbols): When considering whether
to replace a symbol in a dynamic object with a symbol from another
	dynamic object, do the replacement if the existing symbol is
	global linkage code.
PR 9860.
Also fix a couple of comment typos and indentation problems.
1996-06-13 00:16:39 +00:00
Ian Lance Taylor 4914478412 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Check explicitly
for _ptrgl, and treat it as global linkage code.
PR 9860.
1996-06-12 22:05:32 +00:00
Ian Lance Taylor 0e3bd85ee7 * aoutx.h (NAME(aout,find_nearest_line)): Notice if we find a
filename or N_SO symbol past the offset, and use it to indicate
	that there is no line number or function when appropriate.
1996-06-12 18:18:23 +00:00
Ian Lance Taylor a5c7acea2f * xcofflink.c (xcoff_build_ldsyms): Set XCOFF_DEF_REGULAR for a
common symbol defined by the linker.  Don't export function code
	even if export_defineds is set.
PR 9856.
1996-06-11 22:25:55 +00:00
Jeff Law 890f5b7f5a Opps. 1996-06-09 22:40:13 +00:00
Jim Wilson 4906b2a367 Kill r16/rce/acp stuff. 1996-06-08 03:45:18 +00:00
Ian Lance Taylor bbf7c3352c * ieee.c (ieee_write_object_contents): Put a timestamp in the file
to keep the HP emulator database happy.
PR 9493.
1996-06-06 23:57:18 +00:00
Ian Lance Taylor 0593fc16c4 Thu Jun 6 15:24:45 1996 Richard Henderson <rth@tamu.edu>
* ecoff.c (_bfd_ecoff_new_section_hook): Remove the _PDATA
 	alignment hack--we can get the lnnoptr info another way without
 	suddenly increasing the alignment requirements.  Set the flags for
	the _PDATA section.
	(ecoff_compute_section_file_positions): Do so.
1996-06-06 19:51:04 +00:00
Ian Lance Taylor 9b263b79b7 * config.bfd: Recognize powerpc-*-linux* and powerpcle-*-linux*.
From Kevin Buettner <kev@primenet.com>.
1996-06-06 15:30:28 +00:00