Commit Graph

3797 Commits

Author SHA1 Message Date
Nick Clifton bae2276c5b Do not complain when merging m32r binaries into m32rx binaries. 1998-02-11 00:13:05 +00:00
Nick Clifton 9cca77627b Fix PR14909 by reducing the paranoia in locating the assocaueted HI16S reloc
of a LO16 reloc.
1998-02-10 23:40:20 +00:00
Doug Evans 9eb7b67b39 * archures.c (bfd_mach_dvp_{vif,gif}): Renamed from ..._{pke,gpuif}.
(bfd_txvu_arch): Delete.
	* cpu-mips.c (arch_info_struct): dvp:{vif,gif} renamed from
	dvp:{pke,gpuif}.
	* bfd-in2.h: Regenerate.
1998-02-10 21:32:14 +00:00
Ian Lance Taylor 5303c57477 * configure.in: Change -linux* to -linux-gnu*.
* config.bfd, configure.host: Likewise.
	* configure: Rebuild.
1998-02-10 20:04:48 +00:00
Nick Clifton 6aa32b907b (PR14907) Fix HI16S/LO16 relocations when buf[-1] is evaluated. 1998-02-10 03:55:57 +00:00
Ian Lance Taylor 7ee4e307d6 * configure, aclocal.m4: Rebuild with new libtool. 1998-02-07 20:35:04 +00:00
Nick Clifton 8b6dcc1bb9 Do not initialise private data in output BFD if the input BFD is the default
architecture - instead allow future merges to do this.
1998-02-07 01:06:49 +00:00
Nick Clifton 75172c0f50 Do not generate an error message when merging v850 code into v850e/v850ea code. 1998-02-06 22:53:35 +00:00
Jeff Law bb1fd71fc5 Add missing sanitize markers in last ChangeLog entry. 1998-02-06 22:35:05 +00:00
Jeff Law 6f84b00f99 * cpu-mips.c (arch_info_struct): Make r5900 pointer size 32bits. 1998-02-06 22:30:45 +00:00
Jeff Law 9b47bc23b8 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
get the size from bfd_arch_bits_per_address instead of directly
        from the isa.
1998-02-06 18:50:34 +00:00
Ian Lance Taylor 1f2864765c * coff-i386.c (coff_pe_i386_relocate_section): New static function
if COFF_WITH_PE.
	(coff_relocate_section): If COFF_WITH_PE, define as
	coff_pe_i386_relocate_section.
	* coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
	skip empty sections, to match coff_write_object_contents.
1998-02-05 20:25:31 +00:00
Michael Meissner b494ec3e81 Do not allow BFD_ALIGN to wrap 1998-02-05 19:38:28 +00:00
Michael Meissner 29b7118aec Do not allow BFD_ALIGN to wrap 1998-02-05 19:29:29 +00:00
Ian Lance Taylor 4ea6538794 * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
rather than swapping out r_offset twice.  From Luke Deller
 	<luked@cse.unsw.edu.au>.
1998-02-05 16:52:22 +00:00
Ian Lance Taylor 9a8379033e * configure.in: Set libtool_enable_shared rather than
libtool_shared.  Remove diversion hack.
	* configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
	with new libtool.
1998-02-05 00:16:01 +00:00
Ian Lance Taylor 68d864d786 Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
* syms.c (struct stab_cache): Define.
	(struct stab_find_info): Remove cached_offset, cached_stab,
	cached_str, and cached_stroff fields.  Add file_cache,
	function_cache, and line_cache fields.
	(_bfd_stab_section_find_nearest_line): Use extensive caching to
	speed up searches.
1998-02-04 21:18:25 +00:00
Ian Lance Taylor 7f84fa70cf * peicode.h (pe_print_idata): Check for import of ordinal rather
than name.
	(pe_print_edata): If there is no .edata section, look for the
	export data in some other section.
1998-02-04 18:35:46 +00:00
Jason Molenda 229811d190 * configure.in: Change version to 2.8.4.
* configure: Regenerated.

GDB 4.17 is going to use BFD-2.8.3, so bump to 2.8.4 to avoid conflicts.
1998-02-03 04:09:26 +00:00
Ian Lance Taylor e8f2efef4d * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
make to reexamine the file timestamp.
	($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.

Mon Feb  2 17:39:39 1998  Steve Haworth  <steve@pm.cse.rmit.EDU.AU>

	Add tms320c30 support:
	* cpu-tic30.c: New file.
	* aout-tic30.c: New file.
	* coff-tic30.c: New file.
	* archures.c (bfd_arch_tic30): Define.
	(bfd_tic30_arch): Declare.
	(bfd_archures_list): Add bfd_tic30_arch.
	* targets.c (bfd_target_vector): Add tic30_aout_vec and
	tic30_coff_vec.
	* reloc.c (BFD_RELOC_TIC30_LDP): Define.
	* coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
	(coff_set_flags): Likewise.
	* config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
	* configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
	* Makefile.am: Rebuild dependencies.
	(ALL_MACHINES): Add cpu-tic30.lo.
	(ALL_MACHINES_CFILES): Add cpu-tic30.c.
	(BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
	(BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
	* configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
1998-02-02 22:49:54 +00:00
Nick Clifton 581d7269d0 Allow HI16_S reloc to lag behind LO16 reloc by a couple of instructions. 1998-02-02 20:37:53 +00:00
Ian Lance Taylor 1a58a2d805 * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
0x100000.
1998-02-02 19:15:33 +00:00
Doug Evans c44b38d742 * elf32-mips.c (elf_mips_dvp_11_pcrel_howto): Set pcrel_offset=true
and partial_inplace=false.
	(mips_elf_relocate_section): Recognize R_MIPS_DVP_11_PCREL.
1998-01-31 00:11:35 +00:00
Doug Evans c62a82b5a0 * elf32-mips.c (elf_mips_dvp_11_pcrel_howto): Set pcrel_offset=true.
(mips_elf_relocate_section): Recognize R_MIPS_DVP_11_PCREL.
1998-01-31 00:11:34 +00:00
Ian Lance Taylor 8a5863beeb Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
	to create .dynsbss and .rela.sbss sections.
	(ppc_elf_adjust_dynamic_symbol): Put space for small data to be
	copied from dynamic objects into .sbss.
	(ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
	use it.  Correct typo of .rela.sdata2.
	(ppc_elf_finish_dynamic_symbol): Generate reloc to where we
	put the data, which may now be in .sbss.
	(ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
	(elf_backend_create_dynamic_sections): Define as
	ppc_elf_create_dynamic_sections.
	* elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
	against _GLOBAL_OFFSET_TABLE_.
 	(ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
	shared libraries which refer to local symbols.  Make sure that the
	test for allocating space for a reloc in a shared object is the
	same as the test for emitting a reloc.
1998-01-31 00:11:33 +00:00
Doug Evans 4ae438d7db Fix date in one entry. 1998-01-30 13:47:05 +00:00
Doug Evans 3134a2bdac * elf32-mips.c: Add dvp support. 1998-01-29 20:58:50 +00:00
Ian Lance Taylor 847b962945 Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
* config.bfd (i[3456]-*-mingw32*): New target.
	* acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
	* aclocal.m4, configure: Rebuild.
1998-01-29 20:58:49 +00:00
Doug Evans a25897a9e5 remove sky stuff from elf32-mips.c 1998-01-29 17:17:15 +00:00
Doug Evans 7948d172e0 txvu support moved into mips [as dvp] 1998-01-29 10:19:35 +00:00
Doug Evans 36df40e0bf * config.bfd, configure.in: Add dvp support.
* configure: Regenerate.
	* aclocal.m4: Regenerate.
	* archures.c, reloc.c, cpu-mips.c: Add dvp support.
	* bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
plus delete old txvu stuff, dvp generates mips files now
1998-01-28 18:42:55 +00:00
Ian Lance Taylor e6e3d4bdf4 * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
have a bfd_object.
1998-01-28 18:42:54 +00:00
Doug Evans cf6f47e20f remove txvu stuff, now using only mips elf files 1998-01-28 10:44:28 +00:00
Richard Henderson 16ce62054b Sparc v9 ABI compliant PLT:
* elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
(plt_templates, sparc64_elf_build_plt_entry): Delete.
(LARGE_PLT_THRESHOLD): New define.
(GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
(sparc64_elf_build_plt): New function.
(sparc64_elf_plt_entry_offset): Likewise.
(sparc64_elf_plt_ptr_offset): Likewise.
(sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
contain the index for convenience.  Skip the initial entries
in .rela.plt.
(sparc64_elf_size_dynamic_sections): Zero the allocated contents
memory for the benefit of .rela.plt.
(sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
(sparc64_elf_finish_dynamic_symbol): Kill template stuff.  Use
sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
(sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
Call sparc64_elf_build_plt.
(elf_backend_want_got_plt): No.
(elf_backend_plt_readonly): No.
(elf_backend_plt_alignment): 8.
* elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
* elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
* elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
to be called.
1998-01-28 05:48:34 +00:00
Jeff Law 29410c45ae * archures.c (bfd_mach_mips*): Add definitions for various MIPS
processors.
        * cpu-mips.c (arch_info_struct): Add mips variants.
        * bfd-in2.h: Rebuilt.
1998-01-28 04:45:04 +00:00
Nick Clifton ba6ea759c9 Fix PR 14752 by preserving t2a3_b_insn 1998-01-27 23:15:16 +00:00
Ian Lance Taylor a3e62cc05b Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
* config.bfd (i[3456]86-sco3.2v5*) ELF now the default.
	(i[3456]86sco3.2v5*coff) New target.
1998-01-27 17:48:57 +00:00
Ian Lance Taylor f1dc7bb282 * bfd-in2.h: Rebuild with changes to chew--tab expansion. 1998-01-26 20:43:50 +00:00
Richard Henderson f3da143925 * bfd.c (bfd_get_error_handler): Add orthogonal function.
* bfd-in2.h: Regenerate.
1998-01-23 05:27:42 +00:00
Richard Henderson 31af3ca9f6 * tekhex.c (tekhex_write_object_contents): Check for no symbols.
PR 14422
1998-01-23 05:14:12 +00:00
Ian Lance Taylor f5e23c73d7 * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
adjust addend for an output common symbol (from Jimmy Blair
 	<jimmyb@wrs.com>).  If COFF_WITH_PE, adjust addend for PC relative
 	defined symbol to counteract adjustment made in generic relocation
 	code.
1998-01-22 04:58:01 +00:00
Ian Lance Taylor f66ce2ff1a comment fix 1998-01-22 03:18:51 +00:00
Ian Lance Taylor d73400505b * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h. 1998-01-22 02:19:35 +00:00
Ian Lance Taylor bc01e4a2eb * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
(GET_SCNDHR_NLNNO): Likewise.
1998-01-22 02:17:53 +00:00
Doug Evans 0820c2f8f9 checkpoint 1998-01-21 01:43:40 +00:00
Doug Evans d707219dc9 * reloc.c (BFD_RELOC_TXVU_11_PCREL): New reloc.
* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
	* elf32-txvu.c (txvu_elf_howto_table): Add entry for it.
	(txvu_reloc_map): Likewise.
1998-01-20 23:14:05 +00:00
Ian Lance Taylor e79e79cf37 * cpu-sh.c (arch_info_struct): Correct next field of sh3e. 1998-01-19 17:50:41 +00:00
Nick Clifton cc662e8676 Add macros to handle NOP insertion. 1998-01-15 01:26:02 +00:00
Richard Henderson 16b7d65d5a * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
(xcoff_mark): Likewise.
        (xcoff_build_ldsyms): Mark absolute symbols.
PR 14000
1998-01-15 00:17:55 +00:00
Richard Henderson 52dcb248fb * bout.c (b_out_write_object_contents): Sort symbols before output
to keep {CALL,BAL}NAME symbols adjacent.
        (b_out_symbol_cmp): New function.
1998-01-15 00:01:17 +00:00
Ian Lance Taylor 47d9c13912 * elf32-sparc.c (elf32_sparc_check_relocs): If -Bsymbolic, don't
allocate space for a PC relative reloc against a symbol which is
	defined in a regular file.
	(elf32_sparc_relocate_section): If -Bsymbolic, don't copy a PC
	relative reloc against a symbol which is defined in a regular
	file.
1997-12-30 09:48:42 +00:00
Ian Lance Taylor 14bf95ea71 From Jonathan Stone <jonathan@DSG.Stanford.EDU>:
* config.bfd (mips-dec-netbsd*): Add ECOFF vectors to
	targ_selvecs.
	(mips*el-*-netbsd*): Like mips-dec-netbsd*.
	(mips*-*-netbsd*): New target.
1997-12-29 15:04:55 +00:00
Ian Lance Taylor 7e3d76b7a4 * elflink.h (elf_link_assign_sym_version): Change error message
from "undefined version name" to "undefined versioned symbol
	name".
1997-12-29 14:16:59 +00:00
Nick Clifton 0f3003ef0b Fixed typo from my previous delta. 1997-12-29 11:45:12 +00:00
Ian Lance Taylor 5a08c6a17e fix sky sanitization 1997-12-29 08:38:52 +00:00
Ian Lance Taylor 77e4176e43 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.
* libbfd.h: Rebuild.
1997-12-23 14:14:03 +00:00
Ian Lance Taylor 9ae77ebee2 * peicode.h (coff_swap_scnhdr_out): Set .reloc section to be
shared.  Set stab* sections to be shared and read.  Set .rsrc
	section to be read and shared.
1997-12-23 14:02:39 +00:00
Doug Evans 20b2c808b8 * Makefile.am (ALL_MACHINES,BFD32_BACKENDS): Add txvu support.
(cpu-txvu.lo,elf32-txvu.lo): Add rules for.
	* Makefile.in: Rebuild.
	* config.bfd, configure.in: Add txvu support.
	* configure: Regenerate.
	* archures.c, elf.c, targets.c: Add txvu support.
	* bfd-in2.h: Regenerate.
	* cpu-txvu.c, elf32-txvu.c: New files.
1997-12-22 16:47:21 +00:00
Ian Lance Taylor d92329a97c * Makefile.am: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add dwarf2.lo.
	(ALL_MACHINES_CFILES): Add dwarf2.c.
	* Makefile.in: Rebuild.
1997-12-22 10:51:42 +00:00
Ian Lance Taylor 8e2eebc8c8 * coff-arm.c: Don't include obstack.h. 1997-12-22 10:50:06 +00:00
Ian Lance Taylor 372b296c81 rebuild with devo autoconf 1997-12-22 10:24:37 +00:00
Ian Lance Taylor 3ce77f61f3 rebuild 1997-12-22 10:23:57 +00:00
Ian Lance Taylor 0b3fcc1c53 Mon Dec 22 13:04:33 1997 Joel Sherrill <joel@oarcorp.com>
* config.bfd (i[3456]86*-go32-rtems*): Fix to be the same as
	i[3456]86-go32.
1997-12-22 10:05:34 +00:00
Nick Clifton 6124cd1e59 Fixed segmentation violation detected by LD testsuite. 1997-12-17 12:51:37 +00:00
Nick Clifton 0f9d6eeb60 Fail if there is not enough room for program headers. 1997-12-17 09:47:59 +00:00
Gavin Romig-Koch 6ac2511d20 add dwarf2.c 1997-12-17 08:17:03 +00:00
Brendan Kehoe f07263913a note that the fix for --enable-shared is not the real way it needs to
be done; libtool.m4 needs a change of some sort instead
1997-12-16 16:16:41 +00:00
Nick Clifton 085e370b46 Fixed m32rx sanitization 1997-12-16 16:04:57 +00:00
Nick Clifton a3240f6857 Added m32rx sanitization. 1997-12-16 14:38:21 +00:00
Gavin Romig-Koch eae435160e Add _bfd_dwarf2_find_nearest_line. 1997-12-16 05:14:30 +00:00
Nick Clifton 2e0a5c1051 improve support for m32rx processor. 1997-12-16 00:12:39 +00:00
Fred Fish f60c3b7080 * coffcode.h (ALIGN_SECTIONS_IN_FILE): Define if I960 not defined.
(coff_compute_section_file_positions): Use ALIGN_SECTIONS_IN_FILE
	to decide when to align the file sections for paging.
	* coffcode.h (ALIGN_SECTIONS_IN_FILE): Undefine for TIC80COFF.
PR 13814
1997-12-15 23:16:12 +00:00
Nick Clifton a5fdb81613 Add support for m32rx processor. 1997-12-15 23:10:11 +00:00
Brendan Kehoe 3607f666e6 * configure: Only build libbfd shared if --enable-shared's value
was `yes', or was set to `*bfd*'.
        * aclocal.m4: Likewise.

so `--enable-shared=libstdc++' doesn't result in building a shared libbfd.
1997-12-15 19:52:32 +00:00
Nick Clifton cd66558c07 Renamed v850eq -> v850ea 1997-12-12 19:05:07 +00:00
Richard Henderson 5b3a74e8b8 * linker.c (generic_link_add_symbol_list): Always init udata.p so
that the generic relaxation code can function when input and output
        file formats are mismatched.
1997-12-12 01:48:58 +00:00
Ian Lance Taylor a3f1e78a6c * coff-sh.c (bfd_coff_small_swap_table): Initialize new fields. 1997-12-11 06:08:05 +00:00
Ian Lance Taylor c63729b518 * elf.c (assign_file_positions_for_segments): For a loadable
section, make sure that the load address is correct relative to
	the load address of the segment plus the size of the segment so
	far.
1997-12-11 06:07:10 +00:00
Ian Lance Taylor 86274b9b5c * coffcode.h (_coff_link_output_has_begun): Make static.
(_coff_final_link_postscript): Likewise.
1997-12-11 06:04:39 +00:00
Ian Lance Taylor 5ee8d9327b * elflink.h (elf_link_input_bfd): Handle a relocateable link in
which a relocation refers to an indirect or warning symbol.
1997-12-11 04:38:44 +00:00
Nick Clifton 5b6f4b31fc Fixed overflow from a LO16 reloc into a HI16_S reloc. 1997-12-10 19:20:31 +00:00
Michael Meissner de7483285a Switch to using RELA relocations for the d30v. 1997-12-10 19:08:51 +00:00
Andrew Cagney c02ed6a8a3 For bfd, add vr5400 and vr5000 mips machine variants to list of machines.
For sim/mips, enable multi-sim support when mips64vr5400-elf is target.
For sim/igen, allow specification of a default machine (will need
more work later).
1997-12-09 04:01:06 +00:00
Nick Clifton 0a5875fc63 Fix HI16 and HI16_S relocations for PR14258 1997-12-06 00:57:20 +00:00
Nick Clifton 22a9f052de Fix PR14180 and 14181 (patch from branch) 1997-12-05 19:37:35 +00:00
Nick Clifton 09888f155f Add support for Thumb target
Restore underscore at the start of user labels.
1997-12-02 18:30:35 +00:00
Joern Rennecke 6fdb746d44 bfd:
* coff-sh.c (sh_coff_howtos): Add R_SH_SWITCH8 entry.
        (get_symbol_value): Handle R_SH_SWITCH8.
        (sh_relax_delete_bytes): Likewise.

include:
        * coff/sh.h (R_SH_SWITCH8): New.

gas:
        * config/tc-sh.c (SWITCH_TABLE_CONS): Handle (fix)->fx_size == 1.
        (SWITCH_TABLE): Handle BFD_RELOC_8.
        (md_apply_fix): #ifndef BFD_ASSEMBLER code: Handle fixP->fx_size == 1.
        (coff_reloc_map): Add BFD_RELOC_8_PCREL entry.
        (sh_coff_reloc_mangle): SWITCH_TABLE case: Handle BFD_RELOC_8.
PR 14155
1997-12-01 20:45:03 +00:00
Nick Clifton f5ddda0fc7 Removed leading underscore..... 1997-11-27 01:44:10 +00:00
Nick Clifton 0fa555ea62 Add C_THUMBEXT etc. 1997-11-26 22:14:52 +00:00
Andrew Cagney 4ccd975a92 FreeBSD has (at least for the i386) a little-endian magic number. 1997-11-26 21:34:05 +00:00
Nick Clifton 803fea795a Do no set private flags if building a PE port. 1997-11-26 17:31:53 +00:00
Nick Clifton 4936eb9abe Do not complain when trying to merge private data from different formats. 1997-11-25 18:57:03 +00:00
Ian Lance Taylor 90d74939df * Makefile.am (BFD32_BACKENDS): Remove tekhex.lo.
(BFD32_BACKENDS_CFILES): Remove tekhex.c.
	* Makefile.in: Rebuild.
	* aclocal.m4, configure, src/Makefile.in: Rebuild with current
	automake and autoconf.
1997-11-25 17:14:09 +00:00
Ian Lance Taylor cc37e39a14 * coff-arm.c (arm_allocate_interworking_sections): Fix typo
(COFF_WITH_PR to COFF_WITH_PE).
1997-11-25 16:27:55 +00:00
Nick Clifton 33d5d35156 Cut out unused code for PE build. 1997-11-25 02:09:19 +00:00
Nick Clifton f76d3101e8 Fix for PE build 1997-11-24 23:51:15 +00:00
Nick Clifton e1aeb28538 Add support for PIC and APCS-FLOAT type binaries. 1997-11-22 23:17:39 +00:00
Ian Lance Taylor be462f88b4 * sunos.c (sunos_add_one_symbol): When overriding a defined
symbol, set it to undefined, not new.
1997-11-22 22:08:43 +00:00
Ian Lance Taylor f3fb08f6c5 Sat Nov 22 16:06:56 1997 Klaus Kaempf <kkaempf@progis.de>
* evax-emh.c (_bfd_evax_write_emh): Use alloca instead of strdup.
1997-11-22 21:08:09 +00:00
Ian Lance Taylor 107dfe1267 fix comment 1997-11-22 21:05:48 +00:00
Ian Lance Taylor fbf760a8ab * elf32-sh.c (sh_elf_relax_delete_bytes): Don't kill LABEL
relocs.
1997-11-22 17:31:57 +00:00
Richard Henderson d627a67430 * coff-sh.c (sh_relax_section): Force sign extention of USES r_offset.
(sh_relax_delete_bytes): Don't kill LABEL relocs.

Second bit for PR 14069.
1997-11-21 22:18:09 +00:00
Jeff Law bf39c4900e * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
(mn10300_elf_relax_section): Likewise.
1997-11-17 22:06:48 +00:00
Fred Fish 469e5960b1 * peicode.h (coff_swap_aouthdr_in): Cast second arg of
bfd_h_get_* calls to "bfd_byte *".
1997-11-17 00:26:46 +00:00
Ian Lance Taylor 9793236cc3 Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
	a version dependency could not be found.
1997-11-10 19:33:59 +00:00
Ian Lance Taylor d481c877e4 Tue Nov 4 12:05:56 1997 Klaus K"ampf <kkaempf@progis.de>
* configure.com: Get version info from configure.in
1997-11-04 17:06:49 +00:00
Richard Henderson aa9aa96fac * elf32-sparc.c (elf32_sparc_relocate_section): Give a helpful error
message instead of merely aborting.
        * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.

        * elf64-sparc.c (sparc64_elf_check_relocs): Use SEC_ALLOC to control
        whether we output dynamic relocs instead of SEC_DEBUGGING.
        (sparc64_elf_relocate_section): Likewise.
1997-10-31 23:53:51 +00:00
Richard Henderson ccbab31db1 Fri Oct 24 11:15:58 1997 Jakub Jelinek <jj@sunsite.mff.cuni.cz>
* elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
        New function. Avoid mixing US1 and HAL R1 code.
        Set resulting memory ordering to the strongest one used.
        (sparc64_elf_object_p): Set bfd_mach correctly.
1997-10-24 18:14:52 +00:00
Ian Lance Taylor ae295afea4 add sparclinux.h 1997-10-24 16:03:57 +00:00
Richard Henderson d87ad0dc2f * elf64-sparc.c (sparc64_elf_howto_table): Add UA64 & UA16.
(sparc64_elf_check_relocs): Handle them.
        (sparc64_elf_relocate_section): Likewise.  Before emitting a dyn reloc,
        check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
1997-10-23 21:16:43 +00:00
Richard Henderson 5e0c6aada0 * configure.in (sparc*-*-linux*): Use trad-core and ...
* hosts/sparclinux.h: New file.
1997-10-23 07:51:48 +00:00
Richard Henderson 65c2dd6ec7 * config.bfd (sparc64-*-linux*): New target.
* elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
        * elflink.c (_bfd_elf_create_got_section): Set .got alignment based
        on arch_size.
        (_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
        Set .plt alignment from new plt_alignment.
        * elflink.h (elf_link_create_dynamic_sections): Set version section
        alignment to LOG_FILE_ALIGN.
        * elfxx-target.h (elf_backend_plt_alignment): Provide default.
        (elfXX_bed): Init plt_alignment.

        * elf64-sparc.c (sparc64_elf_check_relocs,
        sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
        sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
        sparc64_elf_finish_dynamic_sections): New functions.
        (sparc64_elf_howto_table): Fix a few name strings.
        (ELF_DYNAMIC_INTERPRETER): New definition.
        (sparc64_elf_relocate_section): Handle shared libraries.

        * elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
        sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
        PLT definitions sparc64-linux originally choose.  These will go
        away soon in favour of the official abi definitions.
1997-10-23 07:37:25 +00:00
Ian Lance Taylor 18ed85fd7a * coff-sh.c (coff_small_object_p): New static function.
(coff_small_new_section_hook): New static function.
	(bfd_coff_small_swap_table): New static const structure.
	(coff_small_close_and_cleanup): Define.
	(coff_small_bfd_free_cached_info): Define.
	(coff_small_get_section_contents): Define.
	(coff_small_get_section_contents_in_window): Define.
	(shcoff_small_vec): New static structure.
	(shlcoff_small_vec): New static structure.
	* targets.c (bfd_target_vector): Add shcoff_small_vec and
	shlcoff_small_vec.
	* config.bfd (sh-*-elf*): Add shcoff_small_vec and
	shlcoff_small_vec to targ_selvecs.
	(sh-*-*): Likewise.
	* configure.in: Add shcoff_small_vec and shlcoff_small_vec cases.
	* configure: Rebuild.
PR 13580.
1997-10-22 20:12:02 +00:00
Ian Lance Taylor 412222d910 various evax patches 1997-10-20 19:23:09 +00:00
Ian Lance Taylor d5241511db Mon Oct 20 15:01:27 1997 Klaus K"ampf <kkaempf@progis.de>
* evax-egsd.c: make section flags dec c compatible
1997-10-20 19:08:15 +00:00
Jeff Law 5efcd35925 * som.c (normalize): Delete function.
(som_bfd_ar_write_symbol_stuff): New parameter elength.  All callers
        changed.  Use passed in elength to determine size of the extended
        name table instead of computing it again.
1997-10-20 15:37:44 +00:00
Ian Lance Taylor 263378e763 fix ChangeLog entry 1997-10-20 14:56:55 +00:00
Ian Lance Taylor e232f1aaf3 * peicode.h (coff_swap_scnhdr_out): Don't clobber other flag
settings when setting IMAGE_SCN_MEM_READ.  From Jim Wilson
	<wilson@cygnus.com>.
1997-10-20 14:55:58 +00:00
Jeff Law 27637913f0 * som.c (som_bfd_ar_write_symbol_stuff): Account for trailing
'/' in the extended name table.
1997-10-20 03:01:55 +00:00
Richard Henderson bccab6306f * elflink.h (elf_link_assign_sym_version): For explicitly versioned
symbols, check globals list before matching on locals.
1997-10-17 07:04:28 +00:00
Michael Meissner 3cd99cc646 fix typo 1997-10-16 12:22:05 +00:00
Michael Meissner 04e4681226 Fix mangled patch 1997-10-16 12:19:16 +00:00
Ian Lance Taylor fc1213aa0b * peicode.h (pe_mkobject_hook): Set DLL flag.
(pe_bfd_copy_private_bfd_data): Copy DLL flag.
1997-10-15 20:34:26 +00:00
Ian Lance Taylor c086885a66 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_DISCARDABLE
for .stab* sections.  Replace strlen of constant strings with
	number.
1997-10-15 18:17:40 +00:00
Richard Henderson d980a81fbd * elf64-alpha.c (elf64_alpha_merge_ind_symbols): New function to
merge got and reloc entries from ind syms to their target.
        (elf64_alpha_always_size_sections): Call it.
        (elf64_alpha_check_relocs): Operate on the target of indirect symbols.
        (elf64_alpha_can_merge_gots): Likewise.
        (elf64_alpha_merge_gots): Likewise.

        * elf64-alpha.c (elf64_alpha_relocate_section): Back out HJ's change,
        as it is insufficient to handle the relocation changes as well.
1997-10-14 22:46:33 +00:00
Richard Henderson 6a587c4aae * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Allow for RELATIVE
relocs for symbols in shlibs that have been forced local.
        (elf64_alpha_relocate_section): Output RELATIVEs in .got for same.
1997-10-14 06:12:50 +00:00
Richard Henderson 3a13dd8f03 * bfd/elf64-alpha.c (elf64_alpha_relocate_section): Use the
got_enties of the default symbol for the default versioned
        symbol.  Patch from hjl@gnu.ai.mit.edu, modified not to use
        alloca in the loop.
1997-10-14 04:24:59 +00:00
Nick Clifton c7eece073a RELOC_22_PCREL only uses bottom 24 bits of PC. 1997-10-14 00:34:46 +00:00
Nick Clifton 676d3f022c Fixed bugs exposed by compiling NEC sample sources. 1997-10-10 23:01:17 +00:00
David Edelsohn 70e818d423 * elf64-sparc.c (sparc_elf_{hix22,lox10}_reloc): New functions.
(sparc64_elf_howto_table): Use them for HIX22,LOX10 relocs.
1997-10-09 23:46:24 +00:00
Richard Henderson b0632d61e0 * elfcore.h (bfd_prstatus): Pedanticly, alignment_power should
be LOG_FILE_ALIGN.
1997-10-08 18:41:19 +00:00
Richard Henderson ba2934ce9b * config.bfd: Missed one alpha* change. 1997-10-08 18:39:23 +00:00
Ian Lance Taylor 758b6765b8 * som.c (som_construct_extended_name_table): Remove static
function, and define as macro instead.
1997-10-07 15:41:40 +00:00
Stan Shebs 6d11ae7b63 Remove sanitized-out Magic Cap support, will never be released 1997-10-06 23:57:21 +00:00
Richard Henderson 6b5f5d6107 * config.bfd: Change alpha-*-* to alpha*-*-*; config.guess now
recognizes alphaev5 etc.
        * configure.host: Likewise.
1997-10-03 21:06:27 +00:00
Ian Lance Taylor 927e3a3094 Make ld -s work on AIX:
* xcofflink.c (xcoff_link_add_symbols): Don't create the .debug
	section if we are stripping.
	(bfd_xcoff_size_dynamic_sections): Don't set the .debug section
	size if we are stripping.
	(_bfd_xcoff_bfd_final_link): Don't set SEC_RELOC or rel_filepos,
	and don't write out relocs, if we are stripping.
	(xcoff_link_input_bfd): Don't set up reloc if we are stripping.
	(xcoff_write_global_symbol): Don't write out symbol or reloc if we
	are stripping.
1997-10-03 18:22:35 +00:00
Ian Lance Taylor d9eff006a5 * configure.in: Don't include elf.lo again for ELF targets; it's
always in the library anyhow.
	* configure: Rebuild.
1997-10-03 16:53:51 +00:00
Ian Lance Taylor 9b5ec8b1e0 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Cast to bfd_byte *, not
char *, when calling bfd_get_32 and bfd_put_32.
	* sunos.c (sunos_scan_dynamic_symbol): Cast contents to char *
	when calling strcpy.
1997-10-03 15:25:10 +00:00
David Edelsohn 22b23d7deb * reloc.c (bfd_check_overflow): New function.
(bfd_perform_relocation, bfd_install_relocation): Use it.
	(BFD_RELOC_SPARC_{DISP64,PLT64}): New relocs.
	(BFD_RELOC_SPARC_{HIX22,LOX10,H44,M44,L44,REGISTER}): New relocs.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
1997-10-02 23:55:22 +00:00
David Edelsohn a446b86dec * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
	renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
1997-10-02 20:51:12 +00:00
Ian Lance Taylor 2fb4c89fb4 * peicode.h (coff_swap_scnhdr_out): Set IMAGE_SCN_MEM_READ for an
unrecognized section.  From Jon Thackray <jont@harlequin.co.uk>.
1997-10-02 17:22:35 +00:00
Ian Lance Taylor 9347808dd9 * Makefile.am ($(BFD_H)): Change stmp-bfd.h to stmp-bfd-h.
(stmp-bfd-h): Rename from stmp-bfd.h.
 	(BFD_H_FILES, LIBBFD_H_FILES, LIBCOFF_H_FILES): New variables.
	($(srcdir)/bfd-in2.h): Just depend upon stmp-bin2-h.
	(stmp-bin2-h): New target.
	($(srcdir)/libbfd.h): Just depend upon stmp-lbfd-h.
	(stmp-lbfd-h): New target.
	($(srcdir)/libcoff.h): Just depend upon stmp-lcoff-h.
	(stmp-lcoff-h): New target.
	(CLEANFILES): Change stmp-bfd.h to stmp-bfd-h.  Add stmp-bin2.h,
	stmp-lbfd-h, and stmp-lcoff-h.
	* Makefile.in: Rebuild.
1997-10-01 18:45:44 +00:00
Ian Lance Taylor 7810074c29 * configure.in: Use a diversion to set enable_shared before the
arguments are parsed.
	* configure: Rebuild.
1997-10-01 18:05:52 +00:00
David Edelsohn 3869b11f87 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP
	renamed to R_SPARC_UNUSED_42.
	(sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry.
	* reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete.
	* bfd-in2.h: Regenerated.
	* libbfd.h: Regenerated.
1997-09-30 21:33:19 +00:00
Ian Lance Taylor 3359a0bcec * elflink.h (elf_merge_symbol): Don't check the hash creator until
after we have set *sym_hash.
1997-09-25 16:16:11 +00:00
Ian Lance Taylor 780a00c9f3 Wed Sep 24 16:52:28 1997 Joel Sherrill <joel@oarcorp.com>
* config.bfd (sh*-*-rtems*): New target, like sh-*-*elf*.
1997-09-24 20:53:25 +00:00
Ian Lance Taylor 0035c8a009 * Makefile.am (libbfd_a_SOURCES): Define.
* Makefile.in: Rebuild.
1997-09-24 16:22:13 +00:00
Ian Lance Taylor 805c3d70bd * configure.in: Call AC_CHECK_TOOL before AM_PROG_LIBTOOL.
* aclocal.m4: Rebuild with new libtool.
	* configure: Rebuild.
1997-09-24 15:30:03 +00:00
Ian Lance Taylor 3099ef787a * elf.c (map_sections_to_segments): Even if we are not demand
paged, don't put a loadable section after a nonloadable section.
	(assign_file_positions_for_segments): Increment the file offset
	for a section with contents, even if it is not loadable.
PR 13139.
1997-09-23 23:04:37 +00:00
Nick Clifton 15d82b260c Removed v850eq sanitization.
Changed mismatch architecture message to a warning.
1997-09-20 23:59:31 +00:00
Nick Clifton 55e6f0bf32 Improved error message to include symbol's name. 1997-09-18 22:02:06 +00:00
Felix Lee e1625ed217 v850 files that weren't being removed if !keep-v850 1997-09-18 01:33:24 +00:00
Nick Clifton 9420c20ac4 Added support for the call table relocations. 1997-09-17 23:50:21 +00:00
Nick Clifton db1fa6ab26 Catch relocations against non-existant symbols. 1997-09-17 16:52:23 +00:00
Nick Clifton 5bb2876408 Add support for a 16 bit reloc against the TDA pointer! 1997-09-16 21:21:30 +00:00
Ken Raeburn 2199f848c0 merge from d30v-970225-branch 1997-09-15 16:43:43 +00:00
Andrew Cagney f2dbbf9543 Fix sanitization. 1997-09-15 08:21:04 +00:00
Nick Clifton 43898c918f Removed spurious error return. 1997-09-10 22:15:31 +00:00
Andrew Cagney eaa9c2e7ac New function: bfd_arch_list cf bfd_target_list.
Make bfd_default_scan (arch) more flexable in its match of name to arch,
remove some of the dead code.
1997-09-10 05:55:15 +00:00
Nick Clifton 5ddf2a9e6c Do not complain if an R_V850_LO16 reloc has bit 15 set. 1997-09-09 23:52:39 +00:00
Nick Clifton 98ab32a58a Fixed buglet displaying machine architecture. 1997-09-09 17:20:41 +00:00
Richard Henderson 60b570d17a Sun Sep 7 12:25:22 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* bfd/elf64-alpha.c (reloc_howto_type): Fix the howto table.
1997-09-07 21:34:32 +00:00
Ian Lance Taylor 1732b93b48 * Makefile.am: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add cpu-v850.c.
	(ALL_MACHINES_CFILES): Add elf32-v850.c.
	* Makefile.in: Rebuild.
1997-09-04 18:02:56 +00:00
Ian Lance Taylor 4878fa5b57 * reloc.c: Remove extraneous commas from relocation entries.
Remove BFD_RELOC_V850_16_PCREL.
	* bfd-in2.h: Rebuild.
1997-09-04 17:51:12 +00:00
Ian Lance Taylor 7dac939c43 fix sanitizations and copyright 1997-09-04 17:34:50 +00:00
Ian Lance Taylor 679bf0a2a4 * xcofflink.c (xcoff_link_add_symbols): Put XTY_CM/XMC_TD symbols
in sections named .tocbss rather than .bss.
For AIX 4.2 support (PR 12597).
1997-09-04 16:44:52 +00:00
Nick Clifton 2cf9a0d043 Removed v850 sanitization.
Fixed v850e sanitization.
1997-09-03 22:50:06 +00:00
Nick Clifton 93f1885739 Removed BFD_RELOC_V850_PCREL. 1997-09-03 18:22:00 +00:00
Fred Fish c2d708261f * cofflink.c (coff_link_check_ar_symbols): Handle C_SYSTEM syms
the same as C_EXT syms.
        (coff_link_add_symbols): Ditto.
        (_bfd_coff_link_input_bfd): Ditto.
        (_bfd_coff_write_task_globals): Add save_global_to_static.  Use
        it to preserve and restore state of global_to_static flag.
PR 13202
1997-09-03 04:14:29 +00:00
Nick Clifton 8bef8c3071 Set machine number based in bits in e_flags field rather than magic number. 1997-09-03 00:44:56 +00:00
David Edelsohn 1c0e698e2f * cpu-arc.c (arc_get_mach): Properly scan defined mach entries. 1997-09-03 00:36:19 +00:00
Jeff Law a9d67a8857 * elf-m10200.c (mn10200_elf_final_link_relocate): PC relative
instructions are relative to the next instruction, not the
        current instruction.
        (mn10200_elf_relax_section): Similarly.

pr13171
1997-09-03 00:31:34 +00:00
Nick Clifton def31039ac Switched over to using new reloc types. 1997-09-02 22:53:31 +00:00
Andrew Cagney f40d28bfc0 Add sh3 et.al. to SH arch table.
Improve machine name parsing for v850 and SH.
1997-08-28 10:01:33 +00:00
Andrew Cagney 2f88c3244e * archures.c (bfd_archures_list): Always NULL terminate the list. 1997-08-27 07:40:23 +00:00
Ian Lance Taylor 099ddbf117 * Makefile.am: Rebuild dependencies.
(ALL_MACHINES_CFILES): Add cpu-arc.c.
	(ALL_MACHINES_CFILES): Add elf32-arc.c.
	(elf32-arc.lo): Remove explicit dependency.
	* Makefile.in: Rebuild.
1997-08-26 22:26:20 +00:00
Ian Lance Taylor aa7bd5a5a2 fix v850 machine number stuff 1997-08-26 22:23:58 +00:00
Ian Lance Taylor 2c66160cfb * acinclude.m4 (BFD_CC_FOR_BUILD): Set EXEEXT_FOR_BUILD.
* doc/Makefile.am (MKDOC): Use EXEEXT_FOR_BUILD, not EXEEXT.
	* aclocal.m4, configure, Makefile.in, doc/Makefile.in: Rebuild.
1997-08-26 21:30:19 +00:00
Chris Provenzano 70e8e5854f Rebuild with latest devo autoconf for NT support 1997-08-25 23:16:51 +00:00
Nick Clifton 04f295b648 Fixed minor buglet in compatible. 1997-08-25 23:08:49 +00:00
Nick Clifton 8988d935a3 Switched over to using machine numbers to distinguish v850 architecture variants. 1997-08-25 23:00:29 +00:00
Ian Lance Taylor 591ebe4255 * syms.c (_bfd_stab_section_find_nearest_line): Clear the
cached_stab field if the offset prevents us from using the cache.
1997-08-25 18:10:15 +00:00
Nick Clifton 845c40d529 Added rules to build cpu-v850e.lo and cpu-v850eq.lo object files. 1997-08-25 17:04:46 +00:00
Ian Lance Taylor a068267798 * aout-target.h (MY(vec)): Add SEC_CODE and SEC_DATA to section
flags.
	* aout-arm.c (aout_arm_little_vec): Likewise.
	(aout_arm_big_vec): Likewise.
	* bout.c (b_out_vec_big_host): Likewise.
	(b_out_vec_little_host): Likewise.
	* mipsbsd.c (aout_mips_little_vec): Likewise.
	(aout_mips_big_vec): Likewise.
1997-08-25 16:10:56 +00:00
Nick Clifton c429dba96d oops - fixed bugs in new v850e/q rules. 1997-08-19 17:07:05 +00:00
Fred Fish c4188c2a6a * coff-i960.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
(GET_SCNHDR_ALIGN, PUT_SCNHDR_ALIGN): Define.
	* coff-m88k.c (GET_SCNHDR_NRELOC, GET_SCNHDR_NLNNO): Define.
	* coffcode.h (coff_set_alignment_hook): Conditionally compile in if
	COFF_ALIGN_IN_SECTION_HEADER is defined.  Convert alignment to power
	of two for I960 only.
	* coffswap.h (GET_SCNHDR_NRELOC, PUT_SCNHDR_NRELOC, GET_SCNDHR_NLNNO,
	PUT_SCNHDR_NLNNO, GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Provide
	default definitions.
	(coff_swap_scnhdr_in): Use GET_SCNHDR_FLAGS, GET_SCNHDR_NRELOC,
	GET_SCNHDR_NLNNO, and GET_SCNHDR_ALIGN.
	(coff_swap_scnhdr_out): Use PUT_SCNHDR_FLAGS, PUT_SCNHDR_ALIGN.
start-sanitize-tic80
	* Makefile.in (coff-tic80.o): Depends upon coffswap.h.
	* coff-tic80.c (COFF_ALIGN_IN_SECTION_HEADER): Define to 1.
	(GET_SCNHDR_FLAGS, PUT_SCNHDR_FLAGS): Define
	*coffcode.h (coff_write_object_contents): Set alignment field in
 	section header for TIC80COFF files.
end-sanitize-tic80
PR 12215 and PR 13061
1997-08-19 16:44:00 +00:00
Nick Clifton def47b537e Add support for v850e and v850eq targets.
Add support for BFD_RELOC_V850_PCREL relocation.
1997-08-18 18:42:35 +00:00
Ian Lance Taylor 00c7247bce * coffgen.c (coff_find_nearest_line): Correctly handle the offset
argument as section relative, rather than an absolute address.
	From Jan Hoogenraad <hoogenrd@natlab.research.philips.com>.
1997-08-15 16:02:53 +00:00
David Edelsohn 76af94b9a4 Remove ARC sanitization. 1997-08-15 12:08:52 +00:00
Ian Lance Taylor 6ccdc203e6 * aoutx.h (NAME(aout,final_link)): Don't emit the string table if
there are no symbols.
1997-08-11 16:46:40 +00:00
Ian Lance Taylor 2af5a7e491 * coff-stgo32.c: Rename from coff-stubgo32.c to avoid old System V
file system 14 character limit.
	* Makefile.am, configure.in: Corresponding changes.
	* Makefile.in, configure: Rebuild.
1997-08-10 18:47:36 +00:00
Ian Lance Taylor c40331ba92 * Makefile.am (docdir): Define.
* Makefile.in: Rebuild.
1997-08-06 22:57:44 +00:00
Ian Lance Taylor 097fd78abe * configure: Rebuild with autoconf 2.12.1. 1997-08-06 03:05:32 +00:00
Peter Schauer e6071dc57f * rs6000-core.c (make_bfd_asection): New function to add a section
to the core file bfd.
	(rs6000coff_core_p):  Use make_bfd_asection to add the core file
	sections.
	Use BFD routines to seek, read and stat the core file.
	Handle .data sections from loaded objects and anonymously mmapped
	regions, these are available in AIX 4 core files.
1997-08-03 15:16:37 +00:00
Ian Lance Taylor aa13d30d81 * configure.in: Set enable_shared before AM_PROG_LIBTOOL.
* acinclude.m4: Move acmacros.m4 in here.  Remove AM_PROG_LIBTOOL
	copy; use a patches libtool instead.
	* acmacros.m4: Remove.
	* Makefile.in, aclocal.m4, configure: Rebuild.
1997-08-01 17:01:36 +00:00
Ian Lance Taylor a3d2e13be9 sanitize Makefile.am 1997-08-01 15:56:29 +00:00
Ian Lance Taylor 5e377ed2f2 tweaks 1997-08-01 01:43:21 +00:00
Ian Lance Taylor 9df51f4f39 * VERSION: Remove. 1997-08-01 00:46:56 +00:00
Ian Lance Taylor c073470881 * Makefile.am: New file, based on old Makefile.in.
* acinclude.m4: New file, copied from old aclocal.m4.
	* configure.in: Define and call AM_PROG_LIBTOOL and friends.
	Remove shared library handling; now handled by libtool.  Replace
	AC_CONFIG_HEADER with AM_CONFIG_HEADER.  Call AM_MAINTAINER_MODE,
	AM_CYGWIN32, and AM_EXEEXT.  Change all .o files to .lo.  Remove
	stamp-h handling in AC_OUTPUT.
	* acconfig.h: Mention PACKAGE and VERSION.
	* stamp-h.in: New file.
	* dep-in.sed: Change .o to .lo.
	* Makefile.in: Now built with automake.
	* aclocal.m4: Now built with aclocal.
	* config.in, configure: Rebuild.
1997-08-01 00:04:48 +00:00
Ian Lance Taylor bc6b39f5f5 * Makefile.am: New file, based on old Makefile.in.
* Makefile.in: Now built with automake.
1997-08-01 00:04:05 +00:00
Ian Lance Taylor 3745ac6db2 Thu Jul 31 12:09:20 1997 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Don't set TEXTREL
 	if there is only a relocation to a read-only but not allocatable
 	section (like .stab).
	* elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
	* elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
	* elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
	* elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
	* elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.

	* elf32-ppc.c (ppc_elf_howto_raw): Correct various comments.
	(ppc_elf_create_linker_section): These sections are not
	created by the linker (that is, they are created by the user
	putting data in them). In particular, they can be the source
	and target of relocations.
	(ppc_elf_adjust_dynamic_symbol): Check postcondition of
 	bfd_elf32_link_record_dynamic_symbol.  Align 16-byte common
 	objects (for instance, 'long double') to 16-byte boundaries.
	(ppc_elf_size_dynamic_sections): Make the code that generates
	section symbols exactly the same as for sparc, reducing the
	number of section symbols output.
	(ppc_elf_check_relocs): Check postcondition of
	bfd_elf32_link_record_dynamic_symbol.  Make default case the
	same as corresponding code for sparc, fixing bug involving
	.rela.stabs.
	(ppc_elf_finish_dynamic_symbol): Fix case involving GOT symbols
 	forced to be local because of versioning (by replicating
 	corresponding change in sparc).  Treat R_PPC_RELATIVE RELA relocs
 	as usual in ELF, not as pseudo-REL relocs (as the sparc linker
 	does).
	(ppc_elf_relocate_section): Add handy debugging code for when
 	assertion fails.  Add some more 'symbol made local because of
 	versioning' cases.

	* elf32-ppc.c (ppc_elf_relocate_section): Cope with addend when
	processing a GOT relocation as required by ABI.
1997-07-31 16:15:02 +00:00
Ian Lance Taylor 13eb6306e7 Wed Jul 30 21:30:35 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (NAME(bfd_elf,record_link_assignment)): Remove any
	version info if this symbol came from a dynamic object.
	(elf_link_add_object_symbols): Set the version info of a symbol
	only if the object actually contains version definitions and
	defines this symbol.
1997-07-31 01:35:46 +00:00
Rob Savoye b1ee3d6a87 * aclocal.m4: Add CYGWIN and EXEEXT autoconf macros.
* configure.in: Use CYGWIN and EXEEXT autoconf macro to look for
        win32 dependencies.
        * configure: Regenerated with autoconf 2.12.
        * doc/Makefile.in: Add $(EXEEXT) to chew executable.
1997-07-29 00:37:04 +00:00
Felix Lee 8dbbb8be9b * coffswap.h (coff_swap_aux_in): add semicolon to make MSVC happy. 1997-07-28 21:59:14 +00:00
Peter Schauer f366291b4f * rs6000-core.c (rs6000coff_core_p): If CORE_TRUNC is set, print
a warning rather than returning an error.
1997-07-28 09:52:23 +00:00
Felix Lee 3e94ea70e6 * cisco-core.c: define signals for wingdb. 1997-07-25 21:58:27 +00:00
Ian Lance Taylor fbd550db30 * ecofflink.c (bfd_ecoff_debug_accumulate): Only merge files with
the same number of aux entries.
PR 12962.
1997-07-25 20:27:50 +00:00
Jeff Law 491501de77 * som.c (hppa_som_gen_reloc_type): Use R_DATA_EXPR for the
difference of two symbols if the relocation size is 32 bits.
        (som_write_fixups): Handle R_DATA_EXPR.
Useful stuff from one of the aborted attempts to fix 12912.
1997-07-25 14:20:12 +00:00
Ian Lance Taylor 1868acf81d * coff-i386.c (coff_i386_reloc): Don't offset a common symbol by
its value if COFF_WITH_PE is defined.
1997-07-23 20:08:37 +00:00
Ian Lance Taylor 88a25e44d3 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* config.bfd (i[3456]86-*-msdosdjgpp*): New target.
	(i[3456]86-*-go32*): Change to be like new msdosdjgpp*.
1997-07-22 22:33:02 +00:00
Ian Lance Taylor 179ce6e10b Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* coff-stubgo32.c: New file.
	* go32stub.h: New file.
	* coff-i386.c: If COFF_GO32_EXE, include coff/go32exe.h.
	* targets.c (go32stubbedcoff_vec): Declare.
	(bfd_target_vector): Add go32stubbedcoff_vec.
	* configure.in (go32coff_vec): New target vector.
	(go32stubbedcoff_vec): Likewise.
	* Makefile.in: Rebuild dependencies.
 	(BFD32_BACKENDS): Add coff-stubgo32.o.
	(BFD32_BACKENDS_CFILES): Add coff-stubgo32.c.
	(HFILES): Add go32stub.h.
1997-07-22 22:29:11 +00:00
Ian Lance Taylor e8640d5e09 Tue Jul 22 17:19:45 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* coffswap.h (coff_swap_filehdr_in): Invoke
	COFF_ADJUST_FILEHDR_IN_PRE and COFF_ADJUST_FILEHDR_IN_POST if they
	are defined.
	(coff_swap_filehdr_out): Invoke COFF_ADJUST_FILEHDR_OUT_PRE and
	COFF_ADJUST_FILEHDR_OUT_POST if they are defined.
	(coff_swap_aux_in): Invoke COFF_ADJUST_AUX_IN_PRE and
	COFF_ADJUST_AUX_IN_POST if they are defined.
	(coff_swap_aux_out): Invoke COFF_ADJUST_AUX_OUT_PRE and
	COFF_ADJUST_AUX_OUT_POST if they are defined.
	(coff_swap_scnhdr_in): Invoke COFF_ADJUST_SCNHDR_IN_PRE and
	COFF_ADJUST_SCNHDR_IN_POST if they are defined.
	(coff_swap_scnhdr_out): Invoke COFF_ADJUST_SCNHDR_OUT_PRE and
	COFF_ADJUST_SCNHDR_OUT_POST if they are defined.
1997-07-22 21:20:46 +00:00
Ian Lance Taylor 60f1ad85ac * configure.in: Check for fdopen.
* configure, config.in: Rebuild.
	* opncls.c (bfd_fdopenr): Check HAVE_FDOPEN rather than VMS or
	__GO32__.  Reindent a bit.
1997-07-22 19:11:04 +00:00
Ian Lance Taylor 25496d0ca1 Tue Jul 22 14:44:00 1997 Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
* Makefile.in: Change stamp-* files to s-* files.  Use bfdt.texi
	rather than bfd.texi.
 	(DOCFILES): Change bfd.texi to bfdt.texi.
	* bfd.texinfo: Include bfdt.texi, not bfd.texi.
1997-07-22 18:47:27 +00:00
Ian Lance Taylor f1c88b48db * sunos.c (sunos_create_dynamic_sections): Set SEC_LINKER_CREATED
flag for newly created sections.
	(sunos_add_dynamic_symbols): Don't discard newly created sections
	if shared library is dynobj.
1997-07-21 03:06:42 +00:00
Ian Lance Taylor 3fc2c14638 * elf.c (map_sections_to_segments): When checking whether
including a section in a segment would force us to skip a page,
	align the address of the next segment to avoid wraparound
	problems.
PR 12828.
1997-07-14 22:35:27 +00:00
Fred Fish 67bc13a478 Add coffswap.h to file list for TIc80 sanitization. 1997-07-09 00:34:22 +00:00
Fred Fish 7f2e68542b * coffcode.h (coff_write_object_contents): Initialize
target id field to TIC80_TARGET_ID.
      * coffswap.h (coff_swap_filehdr_out): Swap out target id field
      if used.
      (coff_swap_filehdr_in): Swap in target id field if used.
1997-07-09 00:19:41 +00:00
Ian Lance Taylor 4049609622 * coff-i386.c (coff_i386_is_local_label_name): New static function
if TARGET_UNDERSCORE.
	(coff_bfd_is_local_label_name): Define if TARGET_UNDERSCORE.
	(i386coff_vec): Add SEC_CODE and SEC_DATA to section_flags.
1997-07-07 20:42:48 +00:00
Ian Lance Taylor 01da2d5213 * elf32-m68k.c (howto_table): Use complain_overflow_bitfield, not
complain_overflow_signed, for 32 bit PC relative relocations.
1997-06-30 18:30:55 +00:00
Ian Lance Taylor 677525e961 * elflink.h (elf_link_add_object_symbols): When a version
indirection symbol is overridden, make the original symbol point
	at the real overriding symbol.
1997-06-26 16:06:03 +00:00
Ian Lance Taylor 20db24950c * elf.c (bfd_elf_string_from_elf_section): Check for an invalid
string index.
1997-06-26 15:40:41 +00:00
Ian Lance Taylor 8211c92986 * elflink.h (elf_link_output_extsym): Use the right section for a
common symbol.
	* elf32-mips.c (mips_elf_link_output_symbol_hook): If a common
	symbol was in .scommon, mark it as SHN_MIPS_SCOMMON.
PR 12697.
1997-06-26 05:27:56 +00:00
Ian Lance Taylor e9982ee534 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elflink.h (elf_merge_symbols): Resolve indirect and warning
	symbols before checking for new symbols.
1997-06-25 16:45:12 +00:00
Ian Lance Taylor 0ac96a37f6 Wed Jun 25 12:43:10 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elfcore.h (elf_corefile_note): Move out of HAVE_SYS_PROCFS_H.
1997-06-25 16:43:48 +00:00
Ian Lance Taylor a90f6864be * coffgen.c (coff_object_p): Read the f_opthdr bytes from the
file, not aoutsz bytes (they are different in XCOFF .o files).
1997-06-24 15:22:35 +00:00
Ian Lance Taylor 862eaedc1a comment fix 1997-06-24 14:34:47 +00:00
Ian Lance Taylor 541a4b5425 * elflink.h (elf_merge_symbol): In the case of a new defined
symbol overriding an old defined symbol, return the hash table
	entry which we modify, even if it is the target of an
	indirection.
	(elf_link_add_object_symbols): If the real name of the symbol gets
	overridden, convert the versioned symbol into an indirect symbol
	to the real symbol.
1997-06-24 02:28:03 +00:00
Ian Lance Taylor 044d7d4944 * elflink.h (elf_merge_symbol): New static function, broken out of
elf_link_add_object_symbols.
	(elf_link_add_object_symbols): Call it.
1997-06-23 22:06:29 +00:00
Ian Lance Taylor 3ce6d9410c * coff-i386.c (i3coff_object_p): If COFF_IMAGE_WITH_PE, hack to
handle case where COFF filehdr does not immediately follow PE
	header.
	* coffgen.c (coff_object_p): Remove useless seek to current
	location.
1997-06-22 23:41:55 +00:00
Ian Lance Taylor ba0e3b78dc * linker.c (link_action): Change COMMON_ROW/indr to from CREF to
REFC.
1997-06-18 23:04:29 +00:00
Ian Lance Taylor c4badc83ec revert last patch 1997-06-18 23:02:58 +00:00
Ian Lance Taylor c68867051c * elflink.h (elf_link_add_object_symbols): Don't let a common
symbol in a regular object override a common symbol in a shared
	object if the latter was found via an indirect symbol.
1997-06-18 15:36:33 +00:00
Ian Lance Taylor ac44b2b9c7 * cofflink.c (_bfd_coff_link_input_bfd): If stripping debugging
symbols, skip N_ABS symbols with debugging storage classes.
PR 12630.
Also a couple of warning and formatting fixes.
1997-06-17 15:56:09 +00:00
Ian Lance Taylor c1292d9ba9 whitespace tweaks 1997-06-16 23:33:49 +00:00
Ian Lance Taylor b6eb341bf8 Mon Jun 16 18:56:27 1997 Geoff Keating <geoffk@ozemail.com.au>
* elf32-ppc.c (ppc_elf_relocate_section): Don't emit R_PPC_REL*
 	relocs in shared libraries which refer to local symbols.  Cope
 	with addend when processing a GOT relocation.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Only create symbols
	for sections that the linker didn't create.
	(ppc_elf_finish_dynamic_sections): Only try to write out a section
 	symbol if it was created in ppc_elf_size_dynamic_sections.
	(ppc_elf_relocate_section): Complain if we have to generate a reloc
	relative to a section for which we didn't output a symbol.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Clean up.  PLT
 	relocs are 'rela' relocs, like everything else.  .rela.plt is not
 	a read-only section, so we don't have to special-case it.

	* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Entries in the
	.rela.bss section are (of course) 'rela' relocs not 'rel' relocs.

	* elf32-ppc.c (ppc_elf_check_relocs): Initialise srelgot.
	(ppc_elf_relocate_section): @got offsets are 4 from start of the
	actual .got section.
	* elflink.c (_bfd_elf_create_got_section): The three reserved
	words start from the symbol '_GLOBAL_OFFSET_TABLE_'.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): '.rela' is 5
	characters, not 4.

	* elf32-ppc.c (ppc_elf_check_relocs): Use
	_bfd_elf_create_got_section to create the GOT rather than
	ppc_elf_create_linker_section. Create the '.rela.got' section
	ourselves.
	(ppc_elf_finish_dynamic_symbol): Set up GOT relocations when a
	symbol has a GOT entry.
	(ppc_elf_relocate_section): Record when a symbol is used through
	the GOT, and allocate space in the GOT for each such symbol.
	(ppc_elf_adjust_dynamic_symbol): Delete unused .got.plt stuff.
	(ppc_elf_create_linker_section): Delete unused LINKER_SECTION_GOT
	stuff.

	* elf32-ppc.c (ppc_elf_howto_raw): GOT16_HA relocs should be
	treated in a similar way to ADDR16_HA relocs.
	(ppc_elf_relocate_section): PLTREL24 relocs do not get copied into
	shared objects; the linker must deal with them.
	(ppc_elf_create_linker_section): Stop setting
	_GLOBAL_OFFSET_TABLE_ to the wrong value; delete unused
	LINKER_SECTION_PLT stuff.
	(ppc_elf_check_relocs): Delete unused LINKER_SECTION_PLT stuff.
	(ppc_elf_finish_dynamic_sections): Use BFD calls to get GOT
	section, not ELF-specific calls.
	(elf_backend_plt_not_loaded): Set to 1.
	(elf_backend_got_symbol_offset): Set to 4.
	* elf-bfd.h (elf_backend_data): Add 'plt_not_loaded' member
	for when ld.so fills in the PLT; and 'got_symbol_offset' member.
	* elflink.c (_bfd_elf_create_dynamic_sections): Apply
	plt_not_loaded member.
	(_bfd_elf_create_got_section): Apply got_symbol_offset.
	* elfxx-target.h (elf_backend_plt_not_loaded): Set default to
	'loaded'.
	(elf_backend_G_O_T_offset): Set default to 0.
	(elfNN_bed): Set added fields.

	* elf32-ppc.c (ppc_elf_size_dynamic_sections): Was setting
	DT_RELENT in shared objects; should be DT_RELAENT.

	* elf32-ppc.c (ppc_elf_relocate_section): Propagate
	R_PPC_ADDR16_HA relocs to shared objects. Cope with case where
	such a reloc (in a non-shared object) refers to a symbol that's
	not defined.
1997-06-16 23:05:27 +00:00
Ian Lance Taylor a86bf27a92 credit 1997-06-16 19:34:28 +00:00
Ian Lance Taylor 44edf9165f * Makefile.in (CC, CFLAGS): Substitute from configure script. 1997-06-16 19:34:04 +00:00
Ian Lance Taylor 90d7b9b9dd * elf32-i386.c (elf_i386_relocate_section): When generating a
shared library, do the relocation if the input section is not
	allocated in memory.
1997-06-16 19:24:23 +00:00
Ian Lance Taylor fdc944a7fb Mon Jun 16 14:42:14 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* elfcode.h (put_signed_word): Define.
	(get_signed_word): Define.
	(elf_swap_reloca_in): Use get_signed_word for the r_addend field.
	(elf_swap_reloca_out): Use put_signed_word for the r_addend
	field.
	* elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Use
	bfd_get_signed_32 to set the r_addend field.
	* elf64-mips.c (mips_elf64_swap_reloca_in): Use
	bfd_h_get_signed_64 to set the r_addend field.
1997-06-16 18:45:30 +00:00
Ian Lance Taylor c19fbe0f57 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Call
elf_link_assign_sym_version before elf_adjust_dynamic_symbol.
	(elf_fix_symbol_flags): New static function, broken out of
	elf_adjust_dynamic_symbol.
	(elf_adjust_dynamic_symbol): Call elf_fix_symbol_flags.
	(elf_link_assign_sym_version): Likewise.  Permit a symbol to be
	forced local even if NEEDS_PLT is set.  When forcing a symbol to
	be local, clear NEEDS_PLT.
	(elf_link_output_extsym): Remove unused local bed.
1997-06-16 18:41:19 +00:00
Jeff Law bb2a6cfbfd * elf32-mn10300.c (elf32_mn10300_link_hash_entry): New structure
for derived elf linker hash table entries.  References to
        elf_link_hash_entry changed appropriately.
        (elf32_mn10300_link_hash_table): New structure for derived elf
        linker hash table.
        (elf32_mn10300_hash_table): Define.
        (elf32_mn10300_link_hash_traverse): Likewise.
        (elf32_mn10300_link_hash_newfunc): New function.
        (elf32_mn10300_link_hash_table_create): Likewise.
        (elf32_mn10300_finish_hash_table_entry): Likewise.
        (mn10300_elf_relax_section): Handle "call" -> "calls", removal
        of prologue code, and call:32->call:16 relaxing.
        (compute_function_info: New function.
        (bfd_elf32_bfd_ilink_hash_table_create): Define.
1997-06-12 04:50:18 +00:00
Fred Fish 79a682fd3e Back out last change, there are too many more to fix them all. 1997-06-12 04:26:37 +00:00
Fred Fish f5d3fb7587 * coffgen.c (_bfd_coff_is_local_label_name): Return proper boolean
(enum) type.
1997-06-12 03:22:46 +00:00
Ian Lance Taylor 8519ea2120 * elflink.h (elf_link_output_extsym): Call finish_dynamic_symbol
for a symbol which is being forced to be local.
	* elf32-i386.c (elf_i386_relocate_section): Write out the
 	relocation value for a GOT reloc for a symbol which is turning
 	into a local symbol.
	(elf_i386_finish_dynamic_symbol): If a symbol is turning into a
	local symbol, write out a RELATIVE reloc rather than a GLOB_DAT
	reloc.
	* elf32-m68k.c, elf32-sparc.c: Corresponding changes.
1997-06-11 16:59:00 +00:00
Ian Lance Taylor 6a1878c997 * elf32-i386.c (elf_i386_relocate_section): Get the relocation
value if the symbol is turning into a local symbol.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1997-06-11 04:01:48 +00:00
Ulrich Drepper 601acd6158 (elf_link_add_object_symbols): Also read verneed
information by calling `_bfd_elf_slurp_version_tables'.
(elf_link_add_object_symbols): For undefined symbols look for
version informaiton in the verneed records.
(elf_link_add_object_symbols): Use soname of shared object
for verneed record if it is available.
1997-06-10 21:46:23 +00:00
Ian Lance Taylor ba383e02de Tue Jun 10 11:13:03 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
* cpu-arm.c: Add prototypes for compatible and scan.
	* cofflink.c: Add prototype for mark_relocs.

	* archive.c (bfd_special_undocumented_glue): Change filename to
	const pointer.  Add prototype.
1997-06-10 15:16:17 +00:00
Ian Lance Taylor 94e05b00bd Mon Jun 9 12:34:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elflink.h (elf_link_add_object_symbols): Ignore relocations of
	sections that will be discarded.
1997-06-09 16:36:08 +00:00
Ulrich Drepper cf2cd4cf5d (elf_link_find_version_dependencies): When searching
for known version symbol skip non-matching verdef records, not
matching records.
1997-06-06 21:19:41 +00:00