Commit Graph

5677 Commits

Author SHA1 Message Date
Alan Modra 7f762562fe daily update 2006-11-18 23:00:06 +00:00
Alan Modra 3218c4ac02 daily update 2006-11-17 23:00:08 +00:00
Alan Modra c2370991ed * elflink.c (_bfd_elf_check_kept_section): Test for kept group
section.  Save result of checks in kept_section.
	(_bfd_elf_section_already_linked): Tidy.  Correct comments.
	Ignore all group member sections.  Handle special matching of
	single-member groups against linkonce sections via their group
	section.  When such a match is found, set kept_section to the
	group member section rather than to the group.
2006-11-17 13:55:41 +00:00
Alan Modra 50ad8cbf69 daily update 2006-11-16 23:00:10 +00:00
Alan Modra 90ed2bd7fc daily update 2006-11-15 22:58:48 +00:00
Nick Clifton b9c3a42a93 Add changelog entry for previous delta 2006-11-15 15:18:04 +00:00
Alan Modra 866dcbf333 daily update 2006-11-14 22:58:48 +00:00
Nick Clifton 6c73cbb1d9 * peXXigen.c: Updates for PE/COFF V8.0, and clarification
(dir_names): Added CLR Runtime Header to dir_names[].
  (_bfd_XX_print_private_bfd_data_common): Added EFI_ROM and XBOX subsystem names
  (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out)
  (pe_print_idata, pe_print_edata)
  (_bfd_XX_bfd_copy_private_bfd_data_common)
  (_bfd_XXi_final_link_postscript): Use #DEFINEs for index into DataDirectory.
* pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and IMAGE_SUBSYSTEM_XBOX.
* internal.h: Added defines for PE directory entry types.
  NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in pe.h
2006-11-14 19:03:32 +00:00
Alan Modra 19f567f268 daily update 2006-11-13 22:58:48 +00:00
Daniel Jacobowitz d504ffc851 bfd/
* bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
	prototype.
	(bfd_elf32_arm_set_byteswap_code): New prototype.
	* bfd-in2.h: Regenerate.
	* elf32-arm.c (bfd_elf32_arm_process_before_allocation): Don't take
	byteswap_code as an argument.  Revert 2006-11-01 change.
	(bfd_elf32_arm_set_byteswap_code): New.
	(elf32_arm_size_dynamic_sections): Call
	bfd_elf32_arm_process_before_allocation.
ld/
	* emultempl/armelf.em (arm_elf_before_allocation): Only call
	bfd_elf32_arm_process_before_allocation if no dynamic sections.
2006-11-13 20:39:21 +00:00
Alan Modra 677059afb4 daily update 2006-11-12 22:58:49 +00:00
Alan Modra 0664753622 daily update 2006-11-11 22:58:50 +00:00
Alan Modra 5c1c05aecb daily update 2006-11-10 22:58:51 +00:00
Thiemo Seufer 73ca250004 * config.bfd (mips*el-sde-elf*, mips*-sde-elf*): Drop ECOFF support
for SDE configs.
2006-11-10 14:37:33 +00:00
Nick Clifton 0285182bf2 * config.bfd: Move previously obsoleted targets to the REMOVED list.
Add maxq-*-coff to the obsolete list.
2006-11-10 07:53:33 +00:00
Nick Clifton d66dff9480 * pe-arm-wince.c (LOCAL_LABEL_PREFIX): Define as ".".
* pei-arm-wince.c (LOCAL_LABEL_PREFIX): Likewise.
 * coff-arm.c (LOCAL_LABEL_PREFIX): Only define if not defined before.
 * gas/arm/undefined.d: Run test on Windows CE.
 * gas/arm/undefined_coff.d: Don't run test on Windows CE.
2006-11-10 07:35:20 +00:00
Alan Modra 18abb17182 daily update 2006-11-09 22:58:52 +00:00
Alan Modra cba94f9ccb daily update 2006-11-08 22:58:53 +00:00
Alan Modra 3181e5dc7c daily update 2006-11-07 22:58:54 +00:00
Daniel Jacobowitz f2a9dd69a9 * elf32-arm.c (find_thumb_glue): Add ERROR_MESSAGE argument; set it
on error.
	(find_arm_glue): Likewise.
	(elf32_thumb_to_arm_stub, elf32_arm_create_thumb_stub)
	(elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate): Add
	ERROR_MESSAGE argument and pass it through.
	(elf32_arm_to_thumb_export_stub): Update.
	(elf32_arm_relocate_section): Use ERROR_MESSAGE and reloc_dangerous.
2006-11-07 14:57:45 +00:00
Alan Modra 7c8fe5c480 * elf64-ppc.c (enum _ppc64_sec_type): New.
(struct _ppc64_elf_section_data): Move "t_symndx" into opd union,
	and rename fields.  Add sec_type and has_14bit_branch.
	(struct ppc_link_hash_table): Remove has_14bit_branch.
	(get_opd_info, get_tls_mask, ppc64_elf_edit_opd): Adjust.
	(ppc64_elf_relocate_section): Likewise.
	(ppc64_elf_check_relocs): Likewise.  Set per-section has_14bit_branch.
	(ppc64_elf_size_stubs): Don't set default group size here.
	(group_sections): Instead do so here, and group sections using
	their individual requirements.
2006-11-07 03:34:52 +00:00
Alan Modra b3fac117e3 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Remove "has_dotsym"
and union.
	(struct ppc_link_hash_entry): Add "next_dot_sym".
	(struct ppc_link_hash_table): Add "dot_syms".
	(link_hash_newfunc): Make list of syms starting with a dot.
	(ppc_get_stub_entry, adjust_opd_syms): Adjust.
	(ppc64_elf_add_symbol_hook): Don't set has_dotsym.
	(struct add_symbol_adjust_data): Delete.
	(add_symbol_adjust): Simplify params and return.
	(ppc64_elf_check_directives): Just process the "dot_syms" lists,
	not all syms.
2006-11-07 03:24:13 +00:00
Alan Modra fd034a2f3f daily update 2006-11-06 22:58:55 +00:00
Alan Modra c996113b94 daily update 2006-11-05 22:58:55 +00:00
Alan Modra 583b392675 daily update 2006-11-04 22:58:57 +00:00
Alan Modra e5bab8fed6 daily update 2006-11-03 22:58:59 +00:00
Daniel Jacobowitz b1e24c0220 bfd/
* libbfd-in.h (_bfd_clear_contents): New prototype.
	* reloc.c (_bfd_clear_contents): New.
	* libbfd.h: Regenerated.

	* elf32-arm.c (elf32_arm_final_link_relocate): Use
	_bfd_clear_contents.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.

	* elfxx-ia64.c (elfNN_ia64_relocate_section): Set value to
	zero for discarded symbols.
	* elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
ld/testsuite/
	* ld-discard/zero-rel.d, ld-discard/zero-rel.s: New files.
2006-11-03 00:58:10 +00:00
Alan Modra 22d55fa78f daily update 2006-11-02 22:59:00 +00:00
Thiemo Seufer b9d58d7191 [ bfd/ChangeLog ]
* elf-bfd.h (local_call_stubs): New member.
	* elfxx-mips.c (FN_STUB_P, CALL_STUB_P, CALL_FP_STUB_P): New macros.
	(mips_elf_calculate_relocation): Handle local mips16 call stubs.
	(mips16_stub_section_p): Rename from mips_elf_stub_section_p, use
	the new stub macros.
	(_bfd_mips_elf_check_relocs): Handle call stubs for code which
	mixes mips16 and mips32 functions. Use mips16_stub_section_p. Mark
	used stubs with SEC_KEEP. Use the new stub macros.

	[ gas/testsuite/ChangeLog ]
	* gas/mips/mips16-intermix.d, gas/mips/mips16-intermix.s: New
	testcase.
	* gas/mips/mips.exp: Run new testcase.

	[ ld/testsuite/ChangeLog ]
	* ld-mips-elf/mips16-intermix-1.s, ld-mips-elf/mips16-intermix-2.s,
	ld-mips-elf/mips16-intermix.d: New testcase.
	* ld-mips-elf/mips-elf.exp (mips16_intermix_test): Run new testcases.
2006-11-02 15:20:31 +00:00
Alan Modra 15d2668a28 daily update 2006-11-01 22:58:59 +00:00
Daniel Jacobowitz 74b08499dd * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct
check for PLT usage.
2006-11-01 20:00:25 +00:00
Daniel Jacobowitz 3110dbc9c3 * elfxx-mips.c (mips_elf_merge_gots): Always use maxcnt. 2006-11-01 16:07:46 +00:00
Alan Modra babcc35ed1 daily update 2006-10-31 22:59:01 +00:00
Alan Modra a39f33461a * elf.c (elfcore_write_note): Pad note descriptor to 4-byte
boundary.  Tidy.  Comment.
2006-10-31 02:36:18 +00:00
H.J. Lu c0f0068602 bfd/
2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3111
	* elf-bfd.h (elf_obj_tdata): Add symbuf.
	(_bfd_elf_section_already_linked): Add struct bfd_link_info *.
	(_bfd_elf_check_kept_section): Likewise.
	(bfd_elf_match_symbols_in_sections): Likewise.

	* elf.c (assign_section_numbers): Updated to add
	struct bfd_link_info *.
	(bfd_elf_match_symbols_in_sections): Updated. Cache symbol
	buffer if info->reduce_memory_overheads is false.

	* elflink.c (match_group_member): Updated to add
	struct bfd_link_info *.
	(_bfd_elf_check_kept_section): Likewise.
	(elf_link_input_bfd): Likewise.
	(_bfd_elf_section_already_linked): Likewise.
	(bfd_elf_final_link): Free symbol buffer if
	info->reduce_memory_overheads is false.

	* libbfd-in.h (_bfd_nolink_section_already_linked): Add
	struct bfd_link_info *.
	(_bfd_generic_section_already_linked): Likewise.
	* libbfd.h: Regenerated.

	* linker.c (bfd_section_already_linked): Add
	struct bfd_link_info *.
	(_bfd_generic_section_already_linked): Likewise.
	* targets.c (bfd_target): Add struct bfd_link_info * to
	_section_already_linked.
	* bfd-in2.h: Regenerated.

include/

2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3111
	* bfdlink.h (bfd_link_info): Add reduce_memory_overheads.

ld/

2006-10-30  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/3111
	* ld.h (args_type): Remove reduce_memory_overheads.

	* ldlang.c (lang_map): Updated.
	(section_already_linked): Likewise.
	(print_input_section): Likewise.
	* ldmain.c (main): Likewise.
	* lexsup.c (parse_args): Likewise.
2006-10-30 23:25:51 +00:00
Alan Modra 5147198ffd daily update 2006-10-30 22:59:02 +00:00
Alan Modra b52149c8e0 * bfd-in2.h: Regenerate. 2006-10-30 07:44:11 +00:00
Alan Modra ffda70fc2e * bfd.c (bfd_error_type): Add bfd_error_on_input.
(input_bfd, input_error): New static vars.
	(bfd_set_error): Handle bfd_error_on_input.
	(bfd_errmsg): Likewise.
	(bfd_perror): Simplify.
	* archive.c (_bfd_write_archive_contents): Report errors on input.
2006-10-30 07:41:17 +00:00
Alan Modra 017657f056 * elf.c (elfcore_write_note): Pad to 4-byte boundary. 2006-10-29 23:49:37 +00:00
Alan Modra b12e747eaf daily update 2006-10-29 22:59:02 +00:00
Alan Modra e125309b4a daily update 2006-10-28 22:59:03 +00:00
Richard Sandiford 165b93e775 include/elf/
* mips.h (R_MIPS_GLOB_DAT): Define
	(R_MIPS_max): Bump by 1.

bfd/
	* elf32-mips.c (elf_mips_howto_table_rel): Add R_MIPS_GLOB_DAT.
	* elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
	(elf_mips_howto_table_rela): Likewise.
	* elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
	(mips_elf64_howto_table_rela): Likewise.
2006-10-28 10:13:49 +00:00
Alan Modra b2f4b03332 daily update 2006-10-27 23:59:04 +00:00
H.J. Lu d270463e93 2006-10-26 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (_bfd_elf_init_private_section_data): Assert output
	section ELF type instead of check if it is SHT_NULL.  Copy
	OS/PROC specific flags from input section to output section.
2006-10-27 04:15:50 +00:00
Alan Modra a14a5de357 bfd/
* section.c (SEC_KEEP): Update comment.
	* bfd-in2.h: Regenerate.
	* elflink.c (bfd_elf_gc_sections): Ignore SEC_EXCLUDE sections.
	* merge.c (_bfd_merge_sections): Set SEC_KEEP on excluded sections.
	* stabs.c (_bfd_discard_section_stabs): Likewise.
	(_bfd_link_section_stabs): Likewise.  Simplify abs_section check.
ld/
	* ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
	sections have been discarded.
	(lang_do_version_exports_section): Set SEC_KEEP on export section.
	* emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
	sections.
2006-10-27 03:22:09 +00:00
Alan Modra 43501e81c2 daily update 2006-10-26 23:59:04 +00:00
Ben Elliston 49a184f6ad * reloc.c (_bfd_relocate_contents): Remove explicit case 0. 2006-10-26 00:22:52 +00:00
Ben Elliston 761c7f08ff * elf.c (bfd_section_from_shdr): Remove extraneous breaks.
* targets.c (find_target): Remove extraneous break.
2006-10-26 00:14:39 +00:00
Ben Elliston 0b85353719 * coff-maxq.c (coff_maxq20_reloc): Remove unused variable `howto'.
(struct maxq_reloc_map): Unused; remove.
	(maxq_reloc_map): Likewise.
	(maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
2006-10-26 00:10:43 +00:00
Ben Elliston 23fe95776c * elf.c (bfd_elf_set_dyn_lib_class): Change second argument type
from int to enum dynamic_lib_link_class lib_class.
	* bfd-in.h (bfd_elf_set_dyn_lib_class): Likewise.
	* bfd-in2.h: Regenerate.
2006-10-26 00:01:31 +00:00