Commit Graph

3797 Commits

Author SHA1 Message Date
Nick Clifton 5639074c60 Fix memory corruption due to generic_add_output_symbol being called after elf_map_symbols. 1998-07-24 20:56:53 +00:00
Jeff Law 8417b6242e * elf-m10300.c (mn10300_elf_relax_section): Fix typo when relaxing
from 24bit operand to an 8bit operand.
1998-07-24 18:24:31 +00:00
Jeff Law 88ac1a5e13 * elf-m10300.c (mn10300_elf_relax_section): Do not relax "dmul",
"dmulu", "dmach", "dmachu" with 32bit operands.
1998-07-24 17:49:08 +00:00
Jeff Law 06992a452a * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
(mn10300_elf_reloc_map): Similarly.
        (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
        (mn10300_elf_relax_section): Support relaxing on the am33.
1998-07-24 17:26:51 +00:00
Ian Lance Taylor e2e8e76bd1 start-sanitize-r5900
The value of R_MIPS15_S3 has changed:
	* elf32-mips.c (elf_mips15_s3_howto): New static variable.
	(mips_reloc_map): Remove BFD_RELOC_MIPS15_S3.
	(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS15_S3
	specially.
	(mips_info_to_howto_rel): Handle R_MIPS15_S3 specially.
	(mips_elf_relocate_section): Check for R_MIPS15_S3.

end-sanitize-r5900
	* elf32-mips.c (elf_mips_howto_table): Add reloc types used on
	Irix 6.
	(bfd_elf32_bfd_reloc_type_lookup): Add default case.
	* elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
	elf_mips_reloc_type defined in elf/mips.h.
1998-07-24 16:51:33 +00:00
Ulrich Drepper 30471c22e3 Remove reloc_type definition completely. It's now in elf/mips.h. 1998-07-24 16:39:19 +00:00
Ulrich Drepper ef8349a149 Remove reloc_type definition completely. It's now in elf/mips.h. 1998-07-24 16:39:08 +00:00
Ian Lance Taylor 6767a3abb7 remove d30v sanitization 1998-07-23 23:50:13 +00:00
Ian Lance Taylor 82f21cea28 rebuild 1998-07-23 23:35:41 +00:00
Doug Evans 650a22721e * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
as they are defined in elf/mips.h now.
1998-07-23 20:37:42 +00:00
Jeff Law 91b9fccdf0 * elf-m10300.c (compute_function_info): Keep track of stack space
needed by am33 movm instruction variant.
1998-07-23 17:41:00 +00:00
Jeff Law d5394da7ec * Re-add lost change:
* elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
        "movm_stack_size".
        (mn10300_elf_relax_section): Include stack space for register saves
        in the imm8 field of a "call" instruction.
        (compute_function_info): Determine how much stack is allocated by
        the movm instruction.  Fix typo.
        (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
1998-07-23 17:30:54 +00:00
Ian Lance Taylor 511068f6c3 * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
* elf64-sparc.c (elf_backend_got_header_size): Define as 8.
1998-07-23 15:40:18 +00:00
Ulrich Drepper 873e2f6aa6 Update. 1998-07-22 23:46:33 +00:00
Nick Clifton 6ff4269b8a Move reloc definitions into headers in include/elf 1998-07-22 23:29:51 +00:00
Ulrich Drepper 043e6949fd Update. 1998-07-22 22:02:02 +00:00
Ulrich Drepper 30483570cf Let ELF header now define the macros to get the enum. 1998-07-22 21:59:00 +00:00
Nick Clifton c13661938a Chnage type from 'unsigned char' to 'unsigned int' to avoid K&R compatability issue. 1998-07-22 20:58:50 +00:00
Ian Lance Taylor 7ae26f2731 * ieee.c (ieee_find_nearest_line): Change filename_ptr and
functionname_ptr to be const.  Change line_ptr to be unsigned.

	* coffcode.h (coff_link_output_has_begun): Simplify handling when
	macro is not defined.  Change second parameter from bfd_link_info
	to coff_final_link_info.  Add prototype.
	(coff_final_link_postscript): Simplify handling when macro is not
	defined.  Add prototype.
1998-07-22 20:44:52 +00:00
Ulrich Drepper 91e32e23ff Before include system specific ELF header define
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
1998-07-22 20:40:28 +00:00
Ulrich Drepper 767af63c2c Before include system specific ELF header define
START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
1998-07-22 20:11:16 +00:00
Ian Lance Taylor 39e4bca406 * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
temporary patch over to elf64-mips.c as well.
1998-07-22 17:47:42 +00:00
Ulrich Drepper 92a7119c1f elf32-mips.c (reloc_type): Temporarily disable definition of standard
relocation since they are now defined in elf/mips.h.
1998-07-22 01:35:34 +00:00
Ulrich Drepper 5e37b2da13 (reloc_type): Temporarily disable definition of standard relocation since
they are now defined in elf/mips.h.
1998-07-22 01:34:44 +00:00
Richard Henderson 965d5a46be * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
* elf32-i386.c (elf_backend_got_header_size): Define.
        (elf_backend_plt_header_size): Define.
        * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
        * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
        * elfxx-target.h: Provide a default of zero.
        * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
        * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.

        * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
        entry from an executable, even if the plt refcount goes to 0.
1998-07-21 01:54:28 +00:00
Ian Lance Taylor 490e0e1339 Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* aoutx.h (NAME(aout,find_nearest_line)): Also remember the
	directory name at the line number.

	* elf.c (_bfd_elf_find_nearest_line): Also consider symbols
	with an unspecified type.
1998-07-20 16:50:34 +00:00
Ian Lance Taylor c3da0ebf3e * sunos.c: Add undef of valid to avoid problem on SunOS. 1998-07-15 15:20:28 +00:00
Richard Henderson c86d82ee47 Strip beos markers. 1998-07-14 23:15:20 +00:00
Ian Lance Taylor be228e0db6 Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf32-m68k.c (elf_m68k_check_relocs): Also reference count
	R_68K_PCxx and R_68K_xx relocations.  Make sure that
	ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
	(elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
	R_68K_xx relocations.
	(elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
	that has no plt entry.
	(elf_m68k_relocate_section): Ignore the plt offset in a static
	link.
	* elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
	an ignored symbol.
	(elf_gc_common_finalize_got_offsets): Set the got offsets also in
	a static link.

	* elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
	types.
	(howto_table, reloc_map): Add entries for them.
	(elf_m68k_check_relocs): Handle them.  Implement reference
	counting for got and plt entries.
	(elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
	(elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
	symbols.
	(rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
	(elf_m68k_relocate_section): Handle the new reloc types.
	(bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
	elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
	* elflink.h (elf_link_add_object_symbols): When creating an
	indirect reference for symbol versioning also copy the plt
	offset.
	(elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
	flag also reset the plt offset.
	(elf_link_assign_sym_version): Likewise.
	(elf_gc_common_finalize_got_offsets): Increment the got offset by
	the size of the entry in bytes.
	(elf_gc_allocate_got_offsets): Likewise.

Tue Jul 14 11:18:14 1998  Ian Lance Taylor  <ian@cygnus.com>

	* elflink.h (elf_gc_sections): Return true rather than falling off
	the bottom.
1998-07-14 15:45:55 +00:00
Ian Lance Taylor bb51198f7a * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
xmalloc.
1998-07-14 15:18:39 +00:00
Nick Clifton 8654629216 Removed leading underscore. 1998-07-13 18:09:20 +00:00
Ian Lance Taylor 6d138e6f4e * ieee.c (ieee_slurp_external_symbols): Handle call optimization
information ATN records.
1998-07-13 17:07:27 +00:00
Ian Lance Taylor 81d195ae16 * ieee.c (ieee_slurp_external_symbols): Select an appropriate
section for an absolute symbol in a fully linked file.  Based on
	patch from Christian Holland <CHolland@de.lucent.com>.
1998-07-10 20:31:44 +00:00
Ian Lance Taylor ab1d35b40c Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
* coff-m88k.c (m88k_special_reloc): Don't lose the information
	that a symbol is undefined.
1998-07-08 15:30:31 +00:00
Jeff Law 3f4444e020 * som.c (som_bfd_gc_sections): Define. 1998-07-08 03:51:25 +00:00
Ian Lance Taylor 41cae8d4ed Update for ChangeLog breakup. Remove gm sanitization; the stuff being
sanitized out was removed long ago.
1998-07-06 22:22:36 +00:00
Ian Lance Taylor 06fdc311e7 Rearrange ChangeLog files by years. 1998-07-06 22:08:05 +00:00
Nick Clifton 384fff9c9b Do not complain about overflows in ARM_26D relocations, since they have already been performed.
Patch submitted by <rjb@dcs.gla.ac.uk>
1998-07-06 18:38:19 +00:00
Ian Lance Taylor 69c3ef085f * coffcode.h (coff_write_object_contents): If we have any long
section names, call coff_write_symbols even if there are no
	symbols.
1998-07-04 16:27:08 +00:00
Ian Lance Taylor 369ee5df3e * elf.c (copy_private_bfd_data): Only set phdr_included oncde for
a PT_LOAD segment, rather than only setting it once for the entire
	file.

	* elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
	rather than ignoring every phdr with a p_paddr of 0, ignore all
	the phdrs if they all have a p_paddr of 0.
1998-07-03 17:45:52 +00:00
Ian Lance Taylor 81db6a9e28 * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
section was discarded from the link.
1998-07-03 17:12:22 +00:00
Joern Rennecke a83a26f74a Brought over from sh4-980527-branch:
Fix for execute/va-arg-5.c -Os -mrelax -m4-single failure:
	* coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
1998-07-03 13:43:16 +00:00
Joern Rennecke 0ea9d7bc70 Brought over from sh4-980527-branch:
Fix for execute/921208-1.c -Os -mrelax -m4-single failure:
	* coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
	floating point operations.
1998-07-03 13:40:08 +00:00
Ian Lance Taylor bf47f02283 * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
function symbols.
1998-07-02 22:40:45 +00:00
Ian Lance Taylor 0dc4c667ac Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
Merge of vax/vms (read-only) support
	* configure.com: Support Vax target.
	* makefile.vms: Support Vax target.
        * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
	* vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
	support.
	* vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
	support.
	* vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
	support.
	* vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
	support.
	* vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
	support.
	* libbfd.c (real_read): Use unbuffered read on VMS/Vax.
	* targets.c (bfd_target_ovax_flavour): New flavour.
	(vms_alpha_vec): Renamed from evax_alpha_vec.
	(vms_vax_vec): New.
	(target_vector): Update accordingly.
	* config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
	evax_alpha_vec.
	(vax*-*-*vms*): New target.
	* Makefile.am: Update for renamed files.  Rebuild dependencies.
	* bfd-in2.h: Rebuild.
	* configure.in, Makefile.in, aclocal.m4: Rebuild.
1998-07-02 18:41:08 +00:00
Nick Clifton 9e7e5d5e5b Add support for changing LMA and VMA of sections/ 1998-07-02 00:06:49 +00:00
Richard Henderson 1ff137652b "propogate" -> "propagate" 1998-07-01 21:53:34 +00:00
Ian Lance Taylor 70f549105f * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
when handling 32 bit immediate relocs.
	* elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
1998-07-01 21:03:27 +00:00
Doug Evans a57fc6b9c0 * reloc.c: New relocs BFD_RELOC_MIPS_DVP_11_S4,
BFD_RELOC_MIPS_DVP_U15_S3.
	* elf32-mips.c: Handle them.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.
1998-07-01 20:14:12 +00:00
Jeff Law 39f5104e63 * section.c (STD_SECTION): Account for recently added gc_mark
field in struct asection.
1998-06-30 17:09:28 +00:00