Commit Graph

6531 Commits

Author SHA1 Message Date
Alan Modra afc5b1a784 daily update 2008-01-03 23:00:06 +00:00
Alan Modra 2745d86e69 daily update 2008-01-02 23:00:06 +00:00
H.J. Lu 6c7ac64e17 Move 2007 ChangeLog entries to ChangeLog-2007. 2008-01-02 21:41:02 +00:00
Alan Modra f986c652ba daily update 2008-01-01 23:00:06 +00:00
Alan Modra 672cc33200 daily update 2007-12-31 23:00:05 +00:00
H.J. Lu 992824d50e 2007-12-31 H.J. Lu <hongjiu.lu@intel.com>
PR ld/5530
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Call
	_bfd_elf_find_segment_containing_section with output_bfd,
	instead of input_bfd.
2007-12-31 19:23:07 +00:00
Nick Clifton 281153f387 * elf-m10300.c (mn10300_elf_relax_section): Use _bfd_merged_section_offset
to compute the offset of a symbol in a merged section.
2007-12-31 11:29:31 +00:00
Nick Clifton 2ea37f1c66 * elf.c (_bfd_elf_find_segment_containing_section): New function:
Scan the segment map looking for the segment containing a
  specified function.
* elf-bfd.h: Prototype the new function.
* elf-hppa.h (elf_hppa_osec_to_segment): Delete.
  (elf_hppa_record_segment_addrs): Use new function.
* elf32-bfin.c (_bfdfdpic_osec_to_segment): Use new function.
* elf32-frv.c (_frvfdpic_osec_to_segment): Use new function.
* elf32-hppa.c (hppa_record_segment_addr): Use new function.
* elfxx-ia64.c (elfNN_ia64_relocate_section): Use new function.
2007-12-31 11:01:54 +00:00
Alan Modra b198fbe692 daily update 2007-12-30 23:00:05 +00:00
Alan Modra 3f5ccab567 daily update 2007-12-29 23:00:06 +00:00
Dave Anglin d68aa3e6e8 PR binutils/5146
* elf64-hppa.c: Declare alloca when __GNUC__ is defined.
	* som.c: Likewise.
2007-12-29 01:36:40 +00:00
Dave Anglin 7ae8e4e805 * elf-hppa.h (elf_hppa_osec_to_segment): New function.
(elf_hppa_record_segment_addrs): Use elf_hppa_osec_to_segment.
	Remove ATTRIBUTE_UNUSED from abfd argument.
	* elf32-hppa.c (hppa_record_segment_addr): Likewise.
2007-12-28 23:43:45 +00:00
Alan Modra 7833b9b3df daily update 2007-12-28 23:00:05 +00:00
Nick Clifton 4750aaa464 * elf32-hppa.c (hppa_record_segment_addr): Locate the segment
containing the section using the segment map, rather than guessing
  based upon the section's vma and file position.
2007-12-28 14:45:34 +00:00
Alan Modra a47bc319af daily update 2007-12-27 23:00:05 +00:00
Alan Modra 71983bf851 daily update 2007-12-26 23:00:06 +00:00
Alan Modra dd340c05b0 daily update 2007-12-25 23:00:05 +00:00
Alan Modra a23ab006b5 daily update 2007-12-24 23:00:06 +00:00
H.J. Lu 0efc80c807 bfd/
2007-12-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/5488
	* elf.c (IS_NOTE): New.
	(IS_COREFILE_NOTE): Use IS_NOTE.
	(IS_SECTION_IN_INPUT_SEGMENT): Use IS_NOTE instead of
	IS_COREFILE_NOTE.

ld/testsuite/

2007-12-24  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/5488
	* ld-elf/note-2.d: New.
	* ld-elf/note-2.s: Likewise.
	* ld-elf/note-2.t: Likewise.
2007-12-24 16:58:23 +00:00
H.J. Lu 147d51c232 2007-12-24 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/5449
	* elf.c (rewrite_elf_program_header): Don't adjust p_paddr if
	p_paddr is set to 0.
	(copy_private_bfd_data): Call rewrite_elf_program_header if
	p_paddr is set to 0.

	* elfcode.h (elf_swap_phdr_out): Set p_paddr to 0 if needed.

	* elfxx-ia64.c (ELF_MAXPAGESIZE): Don't redefine it for HPUX.
2007-12-24 16:55:39 +00:00
Alan Modra ecbe32d016 daily update 2007-12-23 23:00:06 +00:00
Alan Modra 9c1b5f1b84 daily update 2007-12-22 23:00:05 +00:00
Bob Wilson dc96b90a10 * elf32-xtensa.c (relax_section): Update DIFF relocations in the
same way as other relocations.
2007-12-21 23:11:28 +00:00
Alan Modra 2e324ab383 daily update 2007-12-21 23:00:05 +00:00
Alan Modra bef2d42f4e daily update 2007-12-20 23:00:06 +00:00
Alan Modra 7e8909d4c4 daily update 2007-12-19 23:00:05 +00:00
Alan Modra 868b494e1b daily update 2007-12-18 23:00:05 +00:00
Daniel Jacobowitz cb2dde36a0 * section.c (BFD_FAKE_SECTION): Update.
* bfd-in2.h: Regenerate.
2007-12-18 19:48:07 +00:00
Daniel Jacobowitz f1a35370eb * bfd-in2.h: Regenerate. 2007-12-18 19:38:26 +00:00
Alan Modra eda094f09b daily update 2007-12-17 23:00:05 +00:00
Pedro Alves f164edfa5d * config.bfd: Add arm-*-mingw32ce* target. 2007-12-17 01:50:44 +00:00
Alan Modra 86904c2b3a daily update 2007-12-16 23:00:06 +00:00
Alan Modra 5972d0b676 daily update 2007-12-15 23:00:05 +00:00
Richard Sandiford fc802241f3 bfd/
* elf-bfd.h (eh_cie_fde): Replace u.cie.merged with a union of
	a merged field and a sec field.
	(eh_frame_hdr_info): Remove offsets_adjusted.
	* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Update accesses to
	the CIE merged field.
	(_bfd_elf_gc_mark_fdes): Likewise.
	(_bfd_elf_discard_section_eh_frame): Likewise.  Set u.cie.u.sec
	when clearing the removed flag.
	(_bfd_elf_eh_frame_section_offset): Remove offsets_adjusted handling.
	(_bfd_elf_write_section_eh_frame): Likewise.  Apply output_offsets
	where appropriate.
2007-12-15 09:42:02 +00:00
Richard Sandiford 6b2cc1401c bfd/
* elf-bfd.h (eh_cie_fde): Move add_fde_encoding and
	per_encoding_relative to u.cie.  Add commentary.
	* elf-eh-frame.c (cie): Remove make_relative.
	(extra_augmentation_string_bytes): Update use of add_fde_encoding.
	(extra_augmentation_data_bytes): Likewise.  Use an FDE's own
	add_augmentation_size field, rather than referring to the CIE.
	(_bfd_elf_parse_eh_frame): Don't set the struct cie
	make_relative field; set the eh_cie_fde field directly.
	Update setting of add_fde_encoding and per_encoding_relative.
	Copy make_relative and add_augmentation_size from the CIE
	to the FDE.
	(_bfd_elf_discard_section_eh_frame): Use the FDE's own
	make_relative field.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Update accesses to
	add_fde_encoding and per_encoding_relative.  Use the FDE's
	own make_relative and add_augmentation_size fields.
2007-12-15 09:41:15 +00:00
Richard Sandiford 9f4b847e23 bfd/
* elf-bfd.h (eh_cie_fde): Remove need_lsda_relative.
	Move make_lsda_relative to u.cie.
	* elf-eh-frame.c (cie): Rename make_lsda_relative to
	can_make_lsda_relative.
	(_bfd_elf_parse_eh_frame): Don't set the old eh_cie_fde
	make_lsda_relative field.  Update after cie renaming.
	Set u.cie.make_lsda_relative if can_make_lsda_relative
	and if we find a relocation against the LSDA.
	(_bfd_elf_discard_section_eh_frame): Copy make_lsda_relative when
	changing a CIE's group representative.
	(_bfd_elf_eh_frame_section_offset): Don't set need_ldsa_relative here.
	(_bfd_elf_write_section_eh_frame): Check u.cie.make_lsda_relative
	rather than need_lsda_relative.
2007-12-15 09:35:58 +00:00
Richard Sandiford 9d0a14d3f3 bfd/
* elf-bfd.h (eh_cie_fde): Add u.fde.next_for_section and
	u.cie.gc_mark.
	(bfd_elf_section_data): Add fde_list.
	(elf_fde_list): New macro.
	(elf_obj_tdata): Add eh_frame_section.
	(elf_eh_frame_section): New macro.
	(_bfd_elf_gc_mark_reloc): Remove last parameter.
	(_bfd_elf_gc_mark_fdes): Declare.
	* elf-eh-frame.c (_bfd_elf_get_eh_frame_sec_info): Chain the FDEs
	for each input section.
	(mark_entry, _bfd_elf_gc_mark_fdes): New functions.
	* elflink.c (_bfd_elf_gc_mark_reloc): Remove is_eh parameter.
	(_bfd_elf_gc_mark): Update call accordingly.  Mark the relocations
	againts the section's FDEs.  Don't mark the bfd's elf_eh_frame_section.
	(bfd_elf_gc_sections): Parse each input bfd's .eh_frame before
	marking any input sections.  Remove the current EH handling.
	* section.c (bfd_section): Remove gc_mark_from_eh.
	* ecoff.c (bfd_debug_section): Update initializer accordingly.
2007-12-15 09:34:48 +00:00
Richard Sandiford ca92cecbbe bfd/
* elf-bfd.h (eh_cie_fde): Add u.cie.  Document how u.fde.cie_inf
	changes when removed == 0.
	(eh_frame_hdr_info): Add parsed_eh_frames.
	(_bfd_elf_begin_eh_frame_parsing): Declare.
	(_bfd_elf_parse_eh_frame): Declare.
	(_bfd_elf_end_eh_frame_parsing): Declare.
	* elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): New function.
	(_bfd_elf_parse_eh_frame): New function, split out from
	_bfd_elf_discard_section_eh_frame.  Make a first pass through the
	buffer to calculate the number of entries and CIEs.  Allocate memory
	for them before the main loop.  Replace current extended cie
	representation with a pair of pointers, one to the local eh_cie_fde
	and one to the full struct cie.  Allocate a separate array of struct
	cies if not merging.  Merge CIEs during the main loop and set up each
	u.cie.merged field.  Point an FDE's cie_inf field directly at the
	local CIE.  Initially assume that all entries should be removed.
	(_bfd_elf_end_eh_frame_parsing): New function.
	(_bfd_elf_discard_section_eh_frame): Assume that the section has
	already been parsed.  Use a separate pass to mark entries that
	need to be kept.  Use the u.cie.merged field to track a CIE's
	group representative.
	* elflink.c (bfd_elf_discard_info): Call _bfd_elf_parse_eh_frame
	before _bfd_elf_discard_section_eh_frame.  Wrap loop with calls to
	_bfd_elf_begin_eh_frame_parsing and _bfd_elf_end_eh_frame_parsing.
2007-12-15 09:33:51 +00:00
Richard Sandiford 155eaaa031 bfd/
* elf-bfd.h (eh_cie_fde): Put cie_inf in a union.  Add a reloc_index
	field.  Use bitfields for fde_encoding, lsda_encoding and lsda_offset.
	* elf-eh-frame.c (extra_augmentation_data_bytes): Adjust cie_inf
	accesses after the above change.
	(_bfd_elf_eh_frame_section_offset): Likewise.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_discard_section_eh_frame): Likewise.  Set up reloc_index.
2007-12-15 09:32:38 +00:00
Richard Sandiford 5241d85325 bfd/
* elf-bfd.h (_bfd_elf_gc_mark_rsec, _bfd_elf_gc_mark_reloc): Declare.
	(_bfd_elf_gc_mark): Use elf_gc_mark_hook_fn.
	* elflink.c (init_reloc_cookie, fini_reloc_cookie)
	(init_reloc_cookie_rels, fini_reloc_cookie_rels): New functions,
	split out from...
	(bfd_elf_discard_info): ...here.
	(init_reloc_cookie_for_section): New function.
	(fini_reloc_cookie_for_section): Likewise.
	(_bfd_elf_gc_mark_rsec, _bfd_elf_gc_mark_reloc): New functions,
	split out from...
	(_bfd_elf_gc_mark): ...here.  Use init_reloc_cookie_for_section
	and fini_reloc_cookie_for_section.
2007-12-15 09:31:41 +00:00
Alan Modra 8e1638a887 daily update 2007-12-14 23:00:05 +00:00
Alan Modra d5cbb2b614 daily update 2007-12-13 23:00:06 +00:00
Alan Modra de4298c61c daily update 2007-12-12 23:00:05 +00:00
Bob Wilson c46082c8d5 * elf32-xtensa.c (elf_xtensa_do_reloc): Update self_address along with
address.
        (print_action_list): Fix name for ta_convert_longcall.
2007-12-12 21:11:10 +00:00
Alan Modra c32d85ca53 daily update 2007-12-11 23:00:06 +00:00
Catherine Moore 8424d8f538 * bfd/elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if
the symbol's section is the undefined section.
        * gas/testsuite/gas/elf/symtab.s: New test.
        gas/testsuite/gas/elf/symtab.d: New expected output.
        gas/testsuite/gas/elf/elf.exp: Run the new symbtab test.
2007-12-11 13:13:59 +00:00
Alan Modra 58f0869bfe warning messages should contain "warning:" 2007-12-10 23:44:23 +00:00
Alan Modra f2e5b8ee1d daily update 2007-12-10 23:00:05 +00:00
Alan Modra ba0432a568 daily update 2007-12-09 23:00:06 +00:00
Alan Modra 40ddfb41a6 daily update 2007-12-08 23:00:05 +00:00