Commit Graph

8273 Commits

Author SHA1 Message Date
Alan Modra 9d6ded02f6 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
TPREL16_HI and TPREL16_HA insns.
2010-03-31 07:53:40 +00:00
Hans-Peter Nilsson bfbff9eb7d PR ld/11458
* elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
	assert of empty pcrel_relocs_copied on the direct symbol.  Instead
	of moving the list from the indirect symbol to the direct symbol,
	merge into any existing list.
	(cris_elf_check_relocs): Store the original section in the
	pcrel_relocs_copied list, not the relocation section.
	(elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
	the relocation section, for reducing its size.  Change the
	BFD_ASSERT into a check for the section being read-only, and only
	emit warnings and TEXTREL marker when there's an entry for a
	read-only section.
2010-03-31 03:38:26 +00:00
Alan Modra 2422fad9eb daily update 2010-03-30 23:00:04 +00:00
Alan Modra 2aab228b95 daily update 2010-03-29 23:00:04 +00:00
Daniel Jacobowitz 41ed1ee7a6 bfd/
* elf32-arm.c (using_thumb_only): Handle v6-M.

	ld/testsuite/
	* ld-arm/arm-elf.exp (armeabitests): Add v6-M farcall test.
2010-03-29 20:42:55 +00:00
Alan Modra f7b9ed90a2 daily update 2010-03-28 23:00:04 +00:00
Alan Modra f1c67e7b5e daily update 2010-03-27 23:00:06 +00:00
Alan Modra f0d937f331 daily update 2010-03-26 23:00:07 +00:00
Alan Modra ddfd679590 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
* bfd-in.h (elf_discarded_section): Clarify comment.
	* reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
	* bfd-in2.h: Regenerate.
2010-03-26 08:34:24 +00:00
Alan Modra 1352b58a73 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
as unique in the armap.
2010-03-26 01:40:40 +00:00
Alan Modra 6abec6bce3 PR ld/11375
* elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
	possible stub on branches.
2010-03-26 00:35:57 +00:00
Alan Modra 93620fdb76 add pr ref 2010-03-26 00:19:29 +00:00
Alan Modra 208d999c8f daily update 2010-03-25 23:00:05 +00:00
Joseph Myers 40b365969f bfd:
* Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
	(ALL_MACHINES_CFILES): Add cpu-tic6x.c.
	(BFD32_BACKENDS): Add elf32-tic6x.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
	* Makefile.in: Regenerate.
	* archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
	(bfd_archures_list): Update.
	* config.bfd (tic6x-*-elf): New.
	* configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
	New.
	* configure: Regenerate.
	* cpu-tic6x.c, elf32-tic6x.c: New.
	* reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
	BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
	BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
	BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
	BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
	BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
	BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
	BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
	BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
	BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
	BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
	BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
	BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
	* targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
	(_bfd_target_vector): Update.
	* bfd-in2.h, libbfd.h: Regenerate.

binutils:
	* MAINTAINERS: Add self as TI C6X maintainer.
	* NEWS: Add news entry for TI C6X support.
	* readelf.c: Include elf/tic6x.h.
	(guess_is_rela): Handle EM_TI_C6000.
	(dump_relocations): Likewise.
	(get_tic6x_dynamic_type): New.
	(get_dynamic_type): Call it.
	(get_machine_flags): Handle EF_C6000_REL.
	(get_osabi_name): Handle machine-specific values only for relevant
	machines.  Handle C6X values.
	(get_tic6x_segment_type): New.
	(get_segment_type): Call it.
	(get_tic6x_section_type_name): New.
	(get_section_type_name): Call it.
	(is_32bit_abs_reloc, is_16bit_abs_reloc, is_none_reloc): Handle
	EM_TI_C6000.

gas:
	* Makefile.am (TARGET_CPU_CFILES): Add config/tc-tic6x.c.
	(TARGET_CPU_HFILES): Add config/tc-tic6x.h.
	* Makefile.in: Regenerate.
	* NEWS: Add news entry for TI C6X support.
	* app.c (do_scrub_chars): Handle "||^" for TI C6X.  Handle
	TC_PREDICATE_START_CHAR and TC_PREDICATE_END_CHAR.  Keep spaces in
	operands if TC_KEEP_OPERAND_SPACES.
	* configure.tgt (tic6x-*-*): New.
	* config/tc-ia64.h (TC_PREDICATE_START_CHAR,
	TC_PREDICATE_END_CHAR): Define.
	* config/tc-tic6x.c, config/tc-tic6x.h: New.
	* doc/Makefile.am (CPU_DOCS): Add c-tic6x.texi.
	* doc/Makefile.in: Regenerate.
	* doc/all.texi (TIC6X): Define.
	* doc/as.texinfo: Add TI C6X documentation.  Include c-tic6x.texi.
	* doc/c-tic6x.texi: New.

gas/testsuite:
	* gas/tic6x: New directory and testcases.

include:
	* dis-asm.h (print_insn_tic6x): Declare.

include/elf:
	* common.h (ELFOSABI_C6000_ELFABI, ELFOSABI_C6000_LINUX): Define.
	* tic6x.h: New.

include/opcode:
	* tic6x-control-registers.h, tic6x-insn-formats.h,
	tic6x-opcode-table.h, tic6x.h: New.

ld:
	* Makefile.am (ALL_EMULATIONS): Add eelf32_tic6x_be.o and
	eelf32_tic6x_le.o.
	(eelf32_tic6x_be.c, eelf32_tic6x_le.c): New.
	* NEWS: Add news entry for TI C6X support.
	* configure.tgt (tic6x-*-*): New.
	* emulparams/elf32_tic6x_be.sh, emulparams/elf32_tic6x_le.sh: New.

ld/testsuite:
	* ld-elf/flags1.d, ld-elf/merge.d: XFAIL for tic6x-*-*.
	* ld-elf/sec-to-seg.exp: Set B_test_same_seg to 0 for tic6x-*-*.
	* ld-tic6x: New directory and testcases.

opcodes:
	* Makefile.am (TARGET_LIBOPCODES_CFILES): Add tic6x-dis.c.
	* Makefile.in: Regenerate.
	* configure.in (bfd_tic6x_arch): New.
	* configure: Regenerate.
	* disassemble.c (ARCH_tic6x): Define if ARCH_all.
	(disassembler): Handle TI C6X.
	* tic6x-dis.c: New.
2010-03-25 21:12:36 +00:00
Alan Modra 220a3c0cd5 daily update 2010-03-24 23:00:05 +00:00
H.J. Lu 4f608e793d Update copyright year.
2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>

	* aout-target.h: Update copyright year.
	* aout-tic30.c: Likewise.
	* coff-alpha.c: Likewise.
	* coff-rs6000.c: Likewise.
	* coff64-rs6000.c: Likewise.
	* elf64-mips.c: Likewise.
	* ieee.c: Likewise.
	* libecoff.h: Likewise.
	* mach-o-target.c: Likewise.
	* mach-o.c: Likewise.
	* oasys.c: Likewise.
	* targets.c: Likewise.
2010-03-24 15:41:59 +00:00
H.J. Lu 337660d898 Update copyright year on libbfd-in.h.
2010-03-24  H.J. Lu  <hongjiu.lu@intel.com>

	* libbfd-in.h: Update copyright year.
2010-03-24 15:04:29 +00:00
Alan Modra 5d75f67599 daily update 2010-03-23 23:01:48 +00:00
Alan Modra 24f5d24a23 daily update 2010-03-22 23:01:42 +00:00
H.J. Lu ca4a656ba4 Check !executable instead of shared for PIE.
2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11413
	* elflink.c (_bfd_elf_add_default_symbol): Check !executable
	instead of shared.
2010-03-21 23:26:33 +00:00
Alan Modra acaf5de827 daily update 2010-03-21 23:01:36 +00:00
Alan Modra 245211fca2 daily update 2010-03-20 23:01:30 +00:00
Alan Modra 1645c2329d daily update 2010-03-19 23:01:24 +00:00
Jie Zhang 47b2e99cef * elf32-arm.c (struct section_list): Remove.
(section_list): Remove typedef.
	(record_section_with_arm_elf_section_data): Remove.
	(find_arm_elf_section_entry): Remove.
	(get_arm_elf_section_data): Use is_arm_elf.
	(unrecord_section_with_arm_elf_section_data): Remove.
	(elf32_arm_new_section_hook): Don't call
	record_section_with_arm_elf_section_data.
	(elf32_arm_write_section): Set mapcount to -1 when
	the map has been used. Don't call
	unrecord_section_with_arm_elf_section_data.
	(unrecord_section_via_map_over_sections): Remove.
	(elf32_arm_close_and_cleanup): Remove.
	(elf32_arm_bfd_free_cached_info): Remove.
	(bfd_elf32_close_and_cleanup): Don't define.
	(bfd_elf32_bfd_free_cached_info): Don't define.
2010-03-19 17:04:17 +00:00
Alan Modra c723fb871e daily update 2010-03-18 23:01:18 +00:00
H.J. Lu 441f34fa99 Don't add IMAGE_FILE_RELOCS_STRIPPED for PIE.
2010-03-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR binutils/11396
	* libcoff-in.h (pe_tdata): Add dont_strip_reloc.
	* libcoff.h: Regenerated.

	* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
	if dont_strip_reloc is set.
	(_bfd_XX_bfd_copy_private_bfd_data_common): Set
	dont_strip_reloc on output if there is no .reloc and
	IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
2010-03-18 12:27:15 +00:00
Nick Clifton b43420e6cd bfd/
2010-03-15  Wei Guozhi  <carrot@google.com>

       PR gas/11323
       * bfd-in2.h (enum bfd_reloc_code_real): New BFD_RELOC_GOT_PREL type.
       * elf32-arm.c (elf32_arm_reloc_map): BFD_RELOC_GOT_PREL to
       R_ARM_GOT_PREL map.
       * libbfd.h (bfd_reloc_code_real_names): BFD_RELOC_GOT_PREL name.
       * reloc.c (comments): Document the new relocation.

gas/
2010-03-15  Wei Guozhi  <carrot@google.com>

       PR gas/11323
       * config/tc-arm.c (reloc_names): New relocation names.
       (md_apply_fix): New case for BFD_RELOC_ARM_GOT_PREL.
       (tc_gen_reloc): New case for BFD_RELOC_ARM_GOT_PREL.
       * doc/c-arm.texi (ARM-Relocations): Document the new relocation.

gas/testsuite
2010-03-15  Wei Guozhi  <carrot@google.com>

       PR gas/11323
       * gas/arm/got_prel.s: New test case.
       * gas/arm/got_prel.d: Likewise.
2010-03-18 11:22:46 +00:00
Alan Modra 15ca5b1447 daily update 2010-03-17 23:01:13 +00:00
H.J. Lu a1b88b0104 Revert accidental changes.
2010-03-17  H.J. Lu  <hongjiu.lu@intel.com>

	* reloc.c (BFD_RELOC_SPU_PIC18): Removed.
	(BFD_RELOC_SPU_STUB): Likewise.
2010-03-17 23:00:05 +00:00
H.J. Lu 4b0f07110e Avoid overflow.
2010-03-17  Jie Zhang  <jie@codesourcery.com>

	* elf.c (assign_file_positions_for_load_sections): Avoid
	overflow.
2010-03-17 13:46:35 +00:00
Alan Modra f4bacdc042 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
proper type.
2010-03-17 08:50:36 +00:00
Alan Modra 8f73510c49 warning fixes 2010-03-17 07:57:06 +00:00
Alan Modra 9c4b914b73 daily update 2010-03-16 23:01:07 +00:00
Alan Modra 67f0cbdb6a * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
(ppc64_elf_edit_toc): Set it here.
	(ha_reloc_match): New function.
	(ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
2010-03-16 00:40:36 +00:00
Alan Modra f5f4f512c3 daily update 2010-03-15 23:01:00 +00:00
Alan Modra 1bbe090216 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
* elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
2010-03-15 01:59:57 +00:00
Alan Modra 89da9f8a43 daily update 2010-03-14 23:00:54 +00:00
Alan Modra 70cc837dbe bfd/
PR ld/11378
	* elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
	* elf64-ppc.c (call_check_done): Define.
	(ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
	(ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
	(ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
	(toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
	Simplify return logic.  Iterate over all .init and .fini fragments
	by recursion.  Set makes_toc_func_call here..
	(ppc64_elf_next_input_section): ..rather than here.
	(check_pasted_section, ppc64_elf_check_init_fini): New functions.
ld/
	PR ld/11378
	* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): Call
	ppc64_elf_check_init_fini and warn if .init/.fini use different TOCs.
2010-03-14 07:05:36 +00:00
Alan Modra 707d0c5e5f daily update 2010-03-13 23:00:48 +00:00
Alan Modra 3f5c9f9a1d daily update 2010-03-12 23:00:42 +00:00
Alan Modra 7b8f66752f PR ld/11375
* elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
	function descriptor symbol if there is one, not just for plt stubs.
	(ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
2010-03-12 22:31:16 +00:00
Alan Modra 823af86f6f daily update 2010-03-11 23:00:37 +00:00
Alan Modra 866482f770 daily update 2010-03-10 23:00:30 +00:00
Alan Modra 3e27f9aa7d daily update 2010-03-09 23:00:24 +00:00
Alan Modra c99c01b305 daily update 2010-03-08 23:00:18 +00:00
Alan Modra 9359024995 daily update 2010-03-07 23:00:13 +00:00
Alan Modra b63e56f0b3 daily update 2010-03-06 23:29:46 +00:00
Rainer Orth a6cc6b3bc4 ld:
* Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_sol2.o,
	eelf_i386_sol2.o.
	(ALL_64_EMULATIONS): Add eelf_x86_64_sol2.o, eelf64_sparc_sol2.o.
	(eelf32_sparc_sol2.c): New rule.
	(eelf64_sparc_sol2.c): Likewise.
	(eelf_x86_64_sol2.c): Likewise.
	(eelf_i386_sol2.c): Likewise.
	* Makefile.in: Regenerate.
	* configure.tgt (i[3-7]86-*-solaris2*): Change targ_emul to
	elf_i386_sol2.
	Add elf_i386_ldso, elf_x86_64_sol2 to targ_extra_emuls.
	(x86_64-*-solaris2*): Change targ_emul to elf_x86_64_sol2.
	Add elf_x86_64, elf_i386_sol2, elf_i386 to targ_extra_emuls.
	(sparc-*-solaris2.[0-6]*): Change targ_emul to elf32_sparc_sol2.
	Add target_extra_emuls.
	(sparc-*-solaris2*): Change targ_emul to elf32_sparc_sol2.
	Add elf32_sparc, elf64_sparc_sol2 to targ_extra_emuls.
	(sparcv9-*-solaris2*): Change targ_emul to elf64_sparc_sol2.
	Add elf64_sparc, elf32_sparc_sol2 to target_extra_emuls.
	* emulparams/elf32_sparc_sol2.sh: New file.
	* emulparams/elf64_sparc_sol2.sh: New file.
	* emulparams/elf_i386_sol2.sh: New file.
	* emulparams/elf_x86_64_sol2.sh: New file.
	* emultempl/solaris2.em: New file.

	bfd:
	* elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
	version twice.
	Skip it when constructing def.vd_next.

	* elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
	bfd_elf32_i386_sol2_vec.
	(TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
	(elf32_bed): Redefine to elf32_i386_sol2_bed.
	(elf_backend_want_plt_sym): Redefine to 1.

	* elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
	bfd_elf64_x86_64_sol2_vec.
	(TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
	(elf64_bed): Redefine to elf64_x86_64_sol2_bed.
	(elf_backend_want_plt_sym): Redefine to 1.

	* config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
	bfd_elf32_i386_sol2_vec.
	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
	targ64_selvecs.
	(x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
	Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
	targ_selvecs.

	* configure.in: Handle bfd_elf32_i386_sol2_vec,
	bfd_elf64_x86_64_sol2_vec.
	* configure: Regenerate.

	* targets.c (bfd_elf32_i386_sol2_vec): Declare.
	(bfd_elf64_x86_64_sol2_vec): Declare.
	(_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
	bfd_elf64_x86_64_sol2_vec.
2010-03-05 19:49:00 +00:00
Alan Modra 8bec83ee65 daily update 2010-03-04 23:00:07 +00:00
Daniel Jacobowitz f7dd8c7963 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
sections.
2010-03-04 17:16:08 +00:00
Alan Modra 8af6b354b4 PR 11302
* dwarf2.c (read_abbrevs): Return NULL on alloc failures.
	(read_attribute_value, decode_line_info): Likewise.
	(add_line_info, read_rangelist): Return FALSE on alloc failures.
	(arange_add, sort_line_sequences): Likewise.
	(find_abstract_instance_name): Handle failures from called funcs.
	(scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
	(find_line): Realloc to a temp, and handle alloc fail.
2010-03-04 04:01:53 +00:00
Alan Modra 693bd3b926 daily update 2010-03-03 23:00:06 +00:00
Daniel Jacobowitz 501abfe038 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
a mapping symbol to an empty section.
2010-03-03 17:56:24 +00:00
Alan Modra 8b792a0a77 daily update 2010-03-02 23:00:06 +00:00
Matthew Gretton-Dann 5488d830ec * ld/testsuite/ld-arm/arm-merge-incompatible.d: New test.
* ld/testsuite/ld-arm/arm-merge-incompatiblea.s: Likewise.
	* ld/testsuite/ld-arm/arm-merge-incompatibleb.s: Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Run the new test.
	* bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
	return value from the call to _bfd_elf_merge_object_attributes.
2010-03-02 11:40:24 +00:00
Christophe Lyon fe33d2fa46 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
Alan Modra  <amodra@gmail.com>

	bfd/
	* elf32-arm.c (a8_erratum_fix): Add st_type field to record the
	destination mode of the a8 stub.
	(elf32_arm_link_hash_table): Add top_id field.
	(elf32_arm_link_hash_table_create): Initialize top_id.
	(arm_type_of_stub): Update prototype, st_type can now be updated
	by this function. Actual destination address in case of PLT is
	computed here, to help factorizing code.
	(elf32_arm_stub_name): Update prototype, use stub_type additional
	parameter to build stub name.
	(elf32_arm_get_stub_entry): Update prototype, use stub_type
	additional parameter to build stub entry.
	(arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
	put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
	Call elf32_arm_final_link_relocate to process all in-stub
	relocations.
	(elf32_arm_setup_section_lists): Update top_id.
	(cortex_a8_erratum_scan): Record stub destination mode.
	(elf32_arm_size_stubs): Update call to arm_type_of_stub according
	to new prototype.
	(elf32_arm_final_link_relocate): Enable processing of in-stub
	REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
	needed, enabling code factorization.
	(elf32_arm_final_link): Process stub sections.
	(elf32_arm_output_map_sym): Add entry to code/data map.

	ld/testsuite/
	* ld-arm/arm-elf.exp: Change .text start address for
	farcall-thumb-arm tests. Add v4t variant for farcall-mixed-lib
	test.
	* ld-arm/farcall-mixed-lib-v4t.d: New test.
	* ld-arm/farcall-mixed-lib1.s: Don't force armv5t.
	* ld-arm/farcall-mixed-lib2.s: Likewise.
	* ld-arm/arm-call.d: Update expected results.
	* ld-arm/cortex-a8-far.d: Likewise.
	* ld-arm/farcall-group-size2.d: Likewise.
	* ld-arm/farcall-group.d: Likewise.
	* ld-arm/farcall-mix.d: Likewise.
	* ld-arm/farcall-mix2.d: Likewise.
	* ld-arm/farcall-mixed-app-v5.d: Likewise.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/farcall-thumb-arm.d: Likewise.
	* ld-arm/farcall-thumb-arm-blx.d: Likewise.
	* ld-arm/farcall-thumb-arm-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise.
	* ld-arm/farcall-thumb-arm.s: Update test. Add a new call to
	potentially generate different types of stubs.
2010-03-02 08:19:54 +00:00
David S. Miller 679b7c76e5 * elfxx-sparc.c (struct elf_reloc_map): Delete.
(sparc_reloc_map): Delete.
	(_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
	relocation type in switch statements.
2010-03-02 07:42:37 +00:00
David S. Miller b48ca1d492 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
h->def_regular, set h->ref_regular.
	(allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
	and dynamic relocations if h->ref_regular.
2010-03-02 01:46:09 +00:00
Alan Modra 33ecebe92d daily update 2010-03-01 23:00:05 +00:00
Alan Modra 78ca12eaab daily update 2010-02-28 23:00:05 +00:00
Alan Modra 1b8c66571f daily update 2010-02-27 23:00:05 +00:00
Alan Modra 52a47f1b54 daily update 2010-02-26 23:00:04 +00:00
Alan Modra 1e21d0bdd2 daily update 2010-02-25 23:00:05 +00:00
Alan Modra dfa7b0b817 bfd/
PR ld/11304
	* elf.c (_bfd_elf_init_private_section_data): Rename need_group
	to final_link and invert.  For final link allow some flags to
	differ.  Don't specially allow flags to be all zero.
ld/
	* ldlang.c (init_os): Remove isec param.  Don't check for
	bfd_section already set or call bfd_init_private_section_data
	here.
	(exp_init_os): Update init_os call.
	(lang_add_section): Tidy.  Really don't set SEC_LINK_ONCE
	flags.  Call bfd_init_private_section_data here.
	(map_input_to_output_sections): Tidy.  Update init_os calls.
	Use os->sectype to select sec flags for lang_data_statement.
2010-02-25 03:49:15 +00:00
Alan Modra 5a15d8bf2e daily update 2010-02-24 23:00:05 +00:00
Nick Clifton d4a77f3f0c PR binutils/10858
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
        SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
        table.
2010-02-24 14:21:51 +00:00
Alan Modra d6824f19b8 daily update 2010-02-23 23:00:05 +00:00
Nick Clifton 17e5723725 PR 11297: Add support for 8-bit relocations to the AVR toolchain. 2010-02-23 11:38:36 +00:00
Alan Modra 4c7f0517f3 daily update 2010-02-22 23:00:04 +00:00
Alan Modra 9252e88d04 daily update 2010-02-21 23:00:04 +00:00
Alan Modra 263badd715 * reloc.c (bfd_check_overflow): When forming addrmask, shift
fieldmask left by rightshift.
	(_bfd_relocate_contents): Likewise.  Use rightshift addrmask in all
	overflow checks.
2010-02-21 22:24:03 +00:00
Alan Modra 9b2a9090e8 daily update 2010-02-20 23:00:04 +00:00
H.J. Lu c35bdf6ec6 Don't check STT_GNU_IFUNC on large common symbol.
2010-02-20  H.J. Lu  <hongjiu.lu@intel.com>

	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
	STT_GNU_IFUNC on large common symbol.
2010-02-20 15:47:03 +00:00
Alan Modra 79949350e4 daily update 2010-02-19 23:00:04 +00:00
H.J. Lu c16153aed7 Don't set ELFOSABI_LINUX in dynamic ifunc-using executable.
bfd/

2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	* elf32-i386.c (elf_i386_add_symbol_hook): Don't set
	has_ifunc_symbols if the symbol comes from a shared library.
	* elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
	* elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
	* elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.

ld/testsuite/

2010-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-ifunc/ifunc.exp: Expect System V OSABI in dynamic
	ifunc-using executable.
2010-02-19 05:07:50 +00:00
Alan Modra d0bf826b37 bfd/
* elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
	(_bfd_elf_copy_private_header_data): ..here.
	* elflink.c (_bfd_elf_size_group_sections): New function.
	(bfd_elf_size_dynamic_sections): Call it.
	* elf-bfd.h (_bfd_elf_size_group_sections): Declare.
	(_bfd_elf_fixup_group_sections): Declare.
ld/
	* ldlang.c (unique_section_p): Add os param.  Allow group
	sections to match /DISCARD/.  Update all callers.
	* emultempl/genelf.em (gld${EMULATION_NAME}_before_allocation): New.
	(LDEMUL_BEFORE_ALLOCATION): Define.
ld/testsuite/
	* ld-elf/group.ld: Discard .dropme sections.
	* ld-elf/group10.d, * ld-elf/group10.s: New test.
2010-02-19 01:47:16 +00:00
Alan Modra 21e9514afe daily update 2010-02-18 23:00:04 +00:00
Matthew Gretton-Dann cd21e5460f * bfd/elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
merging Tag_DIV_use, Tag_MPextension_use, and
	Tag_MPextension_use_legacy tags.
	* binutils/readelf.c (arm_attr_tag_Advanced_SIMD_arch): Add
	description of newly permitted attribute values.
	(arm_attr_tag_Virtualization_use): Likewise.
	(arm_attr_tag_DIV_use): Add description of new attribute.
	(arm_attr_tag_MPextension_use_legacy): Likewise.
	* gas/config/tc-arm.c (arm_convert_symbolic_attribute):
	Add Tag_DIV_use.
	* gas/doc/c-arm.texi: Likewise.
	* gas/testsuite/gas/arm/attr-order.d: Fix test for new names for
	attribute values.
	* include/elf/arm.h (Tag_MPextension_use): Renumber.
	(Tag_DIV_use): Add.
	(Tag_MPextension_use_legacy): Likewise.
	* ld/testsuite/ld-arm/attr-merge-3.attr: Fix test for new attribute
	values.
	* ld/testsuite/ld-arm/attr-merge-3b.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-unknown-1.d: Fix test now that 42
	is a recognised attribute ID.
	* ld/testsuite/ld-arm/attr-merge-unknown-1.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-6.attr: New test.
	* ld/testsuite/ld-arm/attr-merge-6a.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-6b.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7.attr: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7a.s: Likewise.
	* ld/testsuite/ld-arm/attr-merge-7b.s: Likewise.
	* ld/testsuite/ld-arm/arm-elf.exp: Run the new tests.
2010-02-18 10:56:28 +00:00
Alan Modra 415f38a6d0 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
commit.  Don't write zeros for removed group members.
	(_bfd_elf_copy_private_header_data): Adjust size of group section
	when group members are removed by objcopy.
2010-02-18 00:09:06 +00:00
Alan Modra 51e139990e daily update 2010-02-17 23:00:04 +00:00
Alan Modra f7a1abe637 daily update 2010-02-16 23:00:04 +00:00
Alan Modra ee401f41ee daily update 2010-02-15 23:00:04 +00:00
Dave Korn b946d5d83a bfd/ChangeLog:
PR binutils/11280
	* configure.host (*-*-solaris2.11):  Add host define to select
	valid default code page for windres/windmc on solaris.
2010-02-15 19:25:47 +00:00
Nick Clifton ab7875de80 Updated Vietnamese translation. 2010-02-15 10:09:39 +00:00
Alan Modra 4aa2ebf7a8 daily update 2010-02-14 23:00:05 +00:00
Alan Modra 8c07da9871 daily update 2010-02-13 23:00:04 +00:00
Alan Modra 2481751d58 daily update 2010-02-12 23:00:05 +00:00
Daniel Gutson 3381116249 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
bfd/
	* elf32-arm.c (elf32_arm_output_arch_local_syms): add
	missing mapping symbol to data only sections.

	ld/testsuite/
	* ld-arm/arm-elf.exp (armelftests): New test case added.
	* ld-arm/data-only-map.s: New file.
	* ld-arm/data-only-map.d: New file.
	* ld-arm/data-only-map.ld: New file.
2010-02-12 20:52:52 +00:00
Alan Modra 809e8c5f53 daily update 2010-02-11 23:00:04 +00:00
David S. Miller 00c5099111 bfd/
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
	and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
	symbols.
	(_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
	these relocs on global symbols.
	(gdopoff): New.
	(_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
	local symbol references which are not STT_GNU_IFUNC.  Handle
	relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
	and deal with negative vs. non-negative values properly.

ld/testsuite

	* ld-sparc/gotop32.s: Add local symbol case.
	* ld-sparc/gotop64.s: Likewise.
	* ld-sparc/gotop32.rd: Adjust expected results.
	* ld-sparc/gotop32.td: Likewise.
	* ld-sparc/gotop64.dd: Likewise.
	* ld-sparc/gotop64.rd: Likewise.
	* ld-sparc/gotop64.td: Likewise.
2010-02-11 19:57:40 +00:00
Alan Modra 1677b03c90 daily update 2010-02-10 23:00:05 +00:00
Alan Modra 4d9d59e6a6 daily update 2010-02-09 23:00:05 +00:00
Tristan Gingold 1523fa24f7 2010-02-09 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
	non-external relocation.
2010-02-09 13:39:22 +00:00
Alan Modra 7865406bd6 * elf64-ppc.c (merge_got_entries): Move earlier in file.
(allocate_dynrelocs): Merge got entries here if not doing multi-toc.
	(ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
	(ppc64_elf_layout_multitoc): Don't resize if we have already
	merged got entries.
2010-02-09 12:31:01 +00:00
Martin Schwidefsky d7eeb40064 bfd/
2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
	elfcore_write_s390_prefix): New.
	* elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
	elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
	elfcore_write_s390_prefix): New.
	(elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
	(elfcore_write_register_note): Handle .reg-s390-timer,
	.reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
	.reg-s390-prefix section.

binutils/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* readelf.c (get_note_type): Handle NT_S390_TIMER, NT_S390_TODCMP,
	NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.

include/elf/

2010-02-09  Michael Holzheu  <holzheu@de.ibm.com>

	* common.h (NT_S390_TIMER, NT_S390_TODCMP, NT_S390_TODPREG,
	NT_S390_CTRS and NT_S390_PREFIX): Define.
2010-02-09 12:14:43 +00:00
Alan Modra d77c8a4bbe * elf64-ppc.c (has_small_toc_reloc): Don't define.
(makes_toc_func_call, call_check_in_progress): Shuffle flags.
	(struct ppc64_elf_obj_tdata): Add has_small_toc_reloc.  Update
	code setting the flag.
	(ppc64_elf_next_toc_section): Group big-toc sections in
	0x80008000 chunks.
2010-02-09 12:08:19 +00:00
Alan Modra d0fae19df2 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents. 2010-02-09 11:54:52 +00:00
Alan Modra f961d9dde2 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
unsigned char.  Update variables and code using them throughout file.
	(struct ppc_link_hash_entry): Likewise for tls_mask.
2010-02-09 11:35:37 +00:00
Alan Modra 207d6484b0 daily update 2010-02-08 23:00:04 +00:00
David S. Miller d0c9aeb3fc include/
* elf/sparc.h (R_SPARC_JMP_IREL, R_SPARC_IRELATIVE): Define.

bfd/

	* reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
	(BFD_RELOC_SPARC_IRELATIVE): Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	* elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
	and loc_hash_memory.
	(_bfd_sparc_elf_link_hash_table_free): Declare.
	* elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
	(elf_backend_add_symbol_hook, elf_backend_post_process_headers,
	bfd_elf32_bfd_link_hash_table_free): Define.
	* elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
	has_ifunc_symbols if STT_GNU_IFUNC.
	(bfd_elf64_bfd_link_hash_table_free): Define.
	(elf_backend_post_process_headers): Define always.
	* elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
	(sparc_reloc_map): Add entries for new IFUNC relocs.
	(_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
	(_bfd_sparc_elf_info_to_howto_ptr): Likewise.
	(elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
	elf_sparc_get_local_sym_hash): New.
	(_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
	from here...
	(_bfd_sparc_elf_link_hash_table_create): ... to here.  Allocate
	local hash table.
	(_bfd_sparc_elf_link_hash_table_free): New.
	(create_ifunc_sections): New.
	(_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
	and call create_ifunc_sections().  For local STT_GNU_IFUNC symbols
	cons up a fake local hash table entry for it.  Unconditionally add
	a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular.  Count
	dyn relocs for ifunc.
	(_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
	(allocate_dynrelocs):  Unconditionally emit a PLT entry when STT_GNU_IFUNC
	and h->def_regular.  Count GOT dyn relocs for ifunc.
	(allocate_local_dynrelocs): New function.
	(_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash table.
	Emit dynamic relocs to irelplt when not shared.  Treat iplt like splt.
	(_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
	(_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
	in iplt/irelplt.

ld/testsuite/

	* ld-ifunc/ifunc.exp: Run for sparc.
2010-02-08 20:28:43 +00:00