Commit Graph

108 Commits

Author SHA1 Message Date
Mark Mitchell 23bc299bd8 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
fields.
	(_bfd_elf_init_reloc_shdr): New function.
	* elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
	bfd_alloc followed by memset.
	(_bfd_elf_init_reloc_shdr): New function, split out from ...
	(elf_fake_sections): Here.
	(assign_section_numbers): Assign section numbers for the second
	relocation section, if required.
	* elflink.h (elf_link_output_relocs): New function.
	(elf_link_size_reloc_section): Likewise.
	(elf_bfd_final_link): Use elf_link_size_reloc_section.
	(elf_link_input_bfd): Use elf_link_output_relocs.
	* elf32-mips.c (_bfd_mips_elf_fake_sections): Use
	_bfd_elf_init_reloc_shdr to initialize rel_hdr2.
1999-07-01 23:20:08 +00:00
Ian Lance Taylor 03ae5f594e * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
field.
1999-06-22 21:25:49 +00:00
Andreas Schwab a9d024b8b0 * elf.c (elf_fake_sections): Undo change of 1999-05-10. 1999-06-04 01:07:38 +00:00
Mark Mitchell bf572ba0b9 * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
may_use_rel_p, may_use_rela_p, default_use_rela_p.
	(bfd_elf_section_data): Add use_rela_p.
	* elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
	(_bfd_elf_new_section_hook): Likewise.
	(elf_fake_sections): Use may_use_rela_p, etc., instead of
	use_rela_p.
	(_bfd_elf_copy_private_section_data): Copy use_rela_p.
	* elfcode.h (write_relocs): Determine whether or not use rela
	relocs based on the relocation section header.
	* elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
	instead of use_rela_p.
	* elfxx-target.h (elf_backend_may_use_relp): New macro.
	(elf_backend_may_use_rela_p): Likewise.
	(elf_backend_default_use_rela_p): Likewise.
	(elfNN_bed): Use them.
1999-06-02 13:01:04 +00:00
Nick Clifton e6c51ed4df Initialise EI_OSABI and EI_ABIVERSION fields of e_ident array.
Add ability for backends to process program and section headers after they
have been created.
1999-05-28 13:24:33 +00:00
Ian Lance Taylor b2ef150dc1 1999-05-28 Martin Dorey <mdorey@madge.com>
* elf32-i960.c: New file.
	* elf.c (prep_headers): Handle bfd_arch_i960.
	* targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
	* config.bfd (i960-*-elf*): New target.
	* configure.in (bfd_elf32_i960_vec): New target vector.
	* Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-i960.c.
	* Makefile.in, aclocal.m4, configure: Rebuild.
1999-05-27 21:42:14 +00:00
Nick Clifton c1f6bc0323 Check for period after .rel{a} when detecting reloc sections. 1999-05-10 08:36:58 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00