Commit Graph

3332 Commits

Author SHA1 Message Date
H.J. Lu fc073cb7bc Fix a typo in ld.texinfo.
2010-02-27  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11330
	* ld.texinfo: Replace explicitely with explicitly.
2010-02-27 23:00:41 +00:00
Jie Zhang 3cff7cc71f * scripttempl/armbpabi.sc: Don't combine .init_array.* or
.fini_array.* when do relocatable linking.
	* scripttempl/elf.sc: Likewise.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elf64hppa.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.

	testsuite/
	* ld-elf/init-fini-arrays.s: New test.
	* ld-elf/init-fini-arrays.d: New test.
2010-02-27 12:34:25 +00:00
Alan Modra 9445af9a0e * scripttempl/elf.sc (.fini_array): Place input .fini_array after
.fini_array.*.
	* scripttempl/armbpabi.sc: Likewise.
	* scripttempl/elf32sh-symbian.sc: Likewise.
	* scripttempl/elf64hppa.sc: Likewise.
	* scripttempl/elfxtensa.sc: Likewise.
2010-02-26 11:36:32 +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
Matthew Gretton-Dann c9ee9c4cb8 * ld/testsuite/ld-arm/group-relocs.s: Mark code sections as executable.
* ld/testsuite/ld-arm/arm-elf.exp (armelftests): Only dump executable sections in
	group-relocs test.
	* ld/testsuite/ld-arm/reloc-boundaries.d: Fix test to work on Linux targets.
2010-02-24 11:15:11 +00:00
Nick Clifton 0c13f7cc02 * ld-elf/orphan4.d: Allow for other sections to be present in the
output.
2010-02-23 16:56:39 +00:00
Alan Modra a431bc2e60 PR ld/11304
* ldlang.c: Revert last patch.
2010-02-23 14:27:16 +00:00
Nick Clifton 1c063135aa Updated Bulgarian translation. 2010-02-23 11:19:35 +00:00
Alan Modra c380a809de PR ld/11304
* ldlang.c (exp_init_os): Delete forward declaration.
	(init_os): Don't check for bfd_section already created and don't
	init addr_tree and load_base expressions here.
	(map_input_to_output_sections): Only map input to output sections
	and set constraints here, and as an exception, create output
	sections which have their address set.  Move all the other code to..
	(create_other_output_sections): ..here.  New function.  Handle init
	of addr_tree and load_base here too.
	(lang_process): Call create_other_output_sections.
2010-02-22 12:09:59 +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 c8c66882e4 * Makefile.am (eelf32_i960.c): Depend on ELF_GEN_DEPS, not ELF_DEPS.
* Makefile.in: Regenerate.
2010-02-19 02:59:06 +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
Matthew Gretton-Dann f421f24f33 * ld-arm/attr-merge-6.attr: Add new test. Missed off last commit. 2010-02-18 17:25:10 +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
Ramana Radhakrishnan d66a7a7bd2 2010-02-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/jump-reloc-veneers-long.d: Correct testcase for
	  arm-none-eabi target.
	* ld-arm/jump-reloc-veneers-short1.d: Likewise
	* ld-arm/jump-reloc-veneers-short2.d: Likewise
2010-02-16 19:02:59 +00:00
Nick Clifton ab7875de80 Updated Vietnamese translation. 2010-02-15 10:09:39 +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
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
Richard Sandiford 45e481d13b ld/
* Makefile.am (CFILES): Add ldlex-wrapper.c.
	(OFILES): Replace ldlex.c with ldlex-wrapper.c.
	(ldlex.o): Replace with...
	(ldlex-wrapper.o): ...this new rule.
	(EXTRA_ld_new_SOURCES): Add ldlex.l.
	(ld_new_SOURCES): Replace ldlex.l with ldlex-wrapper.c.
	* Makefile.in: Regenerate.
	* ldlex.l (sysdep.h): Don't include here.
	* ldlex-wrapper.c: New file.
2010-02-10 19:48:16 +00:00
Nick Clifton a9f844b107 * ld-elfvsb/elfvsb.exp: Fix tests for arm*-*-linux*.
* ld-shared/shared.exp: Likewise.
2010-02-09 10:46:27 +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
Alan Modra 33c0ec9de7 bfd/
* elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
	(has_small_toc_reloc): Define.
	(ppc64_elf_check_relocs): Set the above flags.
	(ppc64_elf_edit_opd): Delete obfd param.
	(ppc64_elf_tls_optimize): Likewise.
	(ppc64_elf_edit_toc): Likewise.
	(ppc64_elf_tls_setup): Likewise.  Add no_multi_toc param.
	* elf64-ppc.h: Update prototypes.
ld/
	* emultempl/ppc64elf.em (ppc_before_allocation): Update for changed
	function parameters.
2010-02-08 13:50:17 +00:00
Nathan Sidwell deddc40bec bfd/
* elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
	apuinfo sections, only scan input sections once and reuse the
	buffer.
ld/testsuite/
	* ld-powerpc/apuinfo-nul.s: New.
	* ld-powerpc/apuinfo.rd: Add it.
	* ld-powerpc/powerpc.exp: Likewise.
2010-02-08 07:09:39 +00:00
Nick Clifton ef3f88bef8 * configure.in (ALL_LIBGUAS): Add bg.
* configure: Regenerate.
        * po/bg.po: New Bulgarian translation.
2010-02-05 14:17:56 +00:00
Nick Clifton f8266dc4fe * emultempl/armelf.em (PARSE_AND_LIST_OPTIONS): Fix help for
--target1-abs and --target1-rel options.
2010-02-05 13:57:47 +00:00
Nick Clifton 4dfe6ac6fe * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
entries for other architectures.
        (struct elf_link_hash_table): Add hash_table_id field.
        (elf_hash_table_id): New accessor macro.
        * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
        parameter.
        * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
        returning cast pointer.
        (elf32_mn10300_link_hash_table_create): Identify new table as
        containing MN10300 extensions.
        (mn10300_elf_relax_section): Check pointer returned by
        elf32_mn10300_hash_table.
        * elf32-arm.c: Likewise, except using ARM extensions.
        * elf32-avr.c: Likewise, except using AVR extensions.
        * elf32-bfin.c: Likewise, except using BFIN extensions.
        * elf32-cris.c: Likewise, except using CRIS extensions.
        * elf32-frv.c: Likewise, except using FRV extensions.
        * elf32-hppa.c: Likewise, except using HPPA32 extensions.
        * elf32-i386.c: Likewise, except using I386 extensions.
        * elf32-lm32.c: Likewise, except using LM32 extensions.
        * elf32-m32r.c: Likewise, except using M32RM extensions.
        * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
        * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
        * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
        * elf32-m68k.c: Likewise, except using M68K extensions.
        * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
        * elf32-ppc.c: Likewise, except using PPC32 extensions.
        * elf32-s390.c: Likewise, except using S390 extensions.
        * elf32-sh.c: Likewise, except using SH extensions.
        * elf32-spu.c: Likewise, except using SPU extensions.
        * elf32-xtensa.c: Likewise, except using XTENSA extensions.
        * elf64-alpha.c: Likewise, except using ALPHA extensions.
        * elf64-hppa.c: Likewise, except using HPPA64 extensions.
        * elf64-ppc.c: Likewise, except using PPC64 extensions.
        * elf64-s390.c: Likewise, except using S390 extensions.
        * elf64-x86-64.c: Likewise, except using X86_64 extensions.
        * elfxx-ia64.c: Likewise, except using IA64 extensions.
        * elfxx-mips.c: Likewise, except using MIPS extensions.
        * elfxx-sparc.c: Likewise, except using SPARC extensions.
        * elfxx-sparc.h: Likewise, except using SPARC extensions.
        * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
        redundant structure.
        (elf32_cr16_hash_table): Delete unused macro.
        (elf32_cr16_link_hash_traverse): Delete unused macro.
        * elf32-score.c: Likewise.
        * elf32-score7.c: Likewise.
        * elf32-vax.c: Likewise.
        * elf64-sh64.c: Likewise.

        * emultempl/alphaelf.em: Update value expected from elf_object_id.
        * emultempl/hppaelf.em: Likewise.
        * emultempl/mipself.em: Likewise.
        * emultempl/ppc32elf.em: Likewise.
        * emultempl/ppc64elf.em: Likewise.
2010-02-04 09:16:43 +00:00
Alan Modra 927be08ec8 bfd/
* elf64-ppc.c (struct plt_entry): Move earlier in file.
	(struct got_entry): Likewise.  Add is_indirect and got.ent fields.
	(struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
	Update all uses.
	(struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
	Remove no_multi_toc.
	(update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
	when allocating a new struct got_entry.
	(allocate_got): New function, extracted from..
	(allocate_dynrelocs): ..here.  Abort on got entry in non-ppc64 bfd.
	(ppc64_elf_size_dynamic_sections): Track got relocs allocated in
	.reliplt by got_reli_size.  Set owner on ppc64_tlsld_got entries.
	(ppc64_elf_setup_section_lists): Remove output_bfd param and
	no_multi_toc, add add_stub_section and layout_sections_again.  Stash
	new params in htab.  Extract some code to..
	(ppc64_elf_start_multitoc_partition): ..here.  New function.
	(ppc64_elf_next_toc_section): Check for linker script errors.  Handle
	second pass toc scan.
	(merge_got_entries, merge_global_got, reallocate_got): New functions.
	(ppc64_elf_reinit_toc): Rename to..
	(ppc64_elf_finish_multitoc_partition): ..this.
	(ppc64_elf_layout_multitoc): New function.
	(ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
	layout_sections_again params.
	(ppc64_elf_relocate_section): Handle indirect got entries.
	* elf64-ppc.h: Update prototypes.  Declare new functions.
ld/
	* emultempl/ppc64elf.em (build_toc_list): Report errors from
	ppc64_elf_next_toc_section.
	(after_allocation): Update for changed function names and params.
	Run second pass of multitoc partitioning.
2010-02-03 12:03:35 +00:00
Ramana Radhakrishnan 8fac317985 Fix testsuite for Thumb2 jump reloc veneers.
2010-02-01  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

        * ld-arm/jump-reloc-veneers-long.d: New test.
        * ld-arm/jump-reloc-veneers-short1.d: Likewise.
        * ld-arm/jump-reloc-veneers-short2.d: Likewise.
        * ld-arm/jump-reloc-veneers.s: Likewise.
        * ld-arm/arm-elf.exp (armelftests): Run them.
2010-02-01 10:33:16 +00:00
Nick Clifton 70ecb3842d PR 11225
* objdump.c (only): Replace with linked list.
        (only_size, only_used): Replace with only_list.
        (process_section_p): Set seen field on matches sections.
        (add_only): New function.
        (free_only_list): New function.
        (disassemble_section): Check only_list.
        (main): Use add_only and free_only_list.

        * gas/pe/aligncomm-c.d: Dump all sections.

        * ld-sh/refdbg-0-dso.d: Dump all sections.
2010-01-28 15:25:20 +00:00
H.J. Lu 98da7939e1 Properly check undefined symbols when gc_sections is active.
bfd/

2010-01-26  Alan Modra  <amodra@gmail.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11218
	* elflink.c (elf_link_output_extsym): Do not ignore undefined
	symbols with ref_regular set when gc_sections is active.

ld/testsuite/

2010-01-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11218
	* ld-gc/dummy.s: New.
	* ld-gc/pr11218-1.c: Likewise.
	* ld-gc/pr11218-2.c: Likewise.
	* ld-gc/pr11218.d: Likewise.
2010-01-26 13:21:36 +00:00
Richard Sandiford c865e45b1b bfd/
* coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
	(_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
	* coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
	bitsize to 1.
	(xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.

gas/
	* write.h (fix_at_start): Declare.
	* write.c (fix_new_internal): Add at_beginning parameter.
	Use it instead of REVERSE_SORT_RELOCS.  Fix the handling of
	seg_fix_tailP for the at_beginning/REVERSE_SORT_RELOCS case.
	(fix_new, fix_new_exp): Update accordingly.
	(fix_at_start): New function.
	* config/tc-ppc.c (md_pseudo_table): Add .ref to the OBJ_XCOFF section.
	(ppc_ref): New function, for OBJ_XCOFF.
	(md_apply_fix): Handle BFD_RELOC_NONE for OBJ_XCOFF.
	* config/te-i386aix.h (REVERSE_SORT_RELOCS): Remove #undef.

gas/testsuite/
	* gas/ppc/xcoff-ref-1.s, gas/ppc/xcoff-ref-1.l: New test.
	* gas/ppc/aix.exp: Run it.


ld/testsuite/
	* ld-powerpc/aix-ref-1-32.od, ld-powerpc/aix-ref-1-64.od,
	ld-powerpc/aix-ref-1.s: New tests.
	* ld-powerpc/aix52.exp: Run them.
2010-01-23 12:05:33 +00:00
Nick Clifton c4b7819565 PR 4437
* ldfile.c: (ldfile_open_file): Do not stop link upon encountering
        a missing file or library.  Instead mark the entry as missing and
        set the global flag to indicate that missing files were
        encountered.
        * ldlang.c (missing_files): New exported variable.
        (load_symbols): Skip loading if the file is missing.
        (open_input_bfds): Terminate link if any input files were
        missing.
        * ldlang.h (struct lang_input_statement_struct): Add missing_file
        field.
        Add export of missing_file variable.
2010-01-21 10:31:32 +00:00
H.J. Lu 78a1456372 Support 64bit targets.
2010-01-14  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-elf/orphan4.d: Support 64bit targets.
2010-01-14 14:29:51 +00:00
DJ Delorie 009f105539 Wildcard the file offset. 2010-01-14 06:55:46 +00:00
DJ Delorie b5f14a6dff * emultempl/elf32.em (_place_orphan): If an input section doesn't
match an existing output section, but an unused output section
statement does match, use it.
* emultempl/pe.em (_place_orphan): Likewise.
* emultempl/pep.em (_place_orphan): Likewise.

* ld-elf/orphan4.d: New.
* ld-elf/orphan4.ld: New.
* ld-elf/orphan4.s: New.
2010-01-14 04:56:12 +00:00
Chao-ying Fu 1063d8cf71 2010-01-13 Chao-ying Fu <fu@mips.com>
* ld-mips-elf/jr-to-b-1.d, ld-mips-elf/jr-to-b-2.d: New tests.
	* ld-mips-elf/jr-to-b-1.s, ld-mips-elf/jr-to-b-2.s: Source.
	* ld-mips-elf/mips-elf.exp: Run new tests.
2010-01-13 22:34:28 +00:00
Daniel Jacobowitz afa62d5e34 gas/
* config/tc-arm.c (do_t_nop): Correct check for Thumb-2 NOP.

	gas/testsuite/
	* gas/arm/thumb-nop.d, gas/arm/thumb-nop.s: New test.
	* gas/arm/relax_branch_align.d: Expect a default NOP instruction.
	* gas/arm/vfp1_t2.d, gas/arm/vfp1xD_t2.d: Specify a CPU with
	Thumb-2.

	ld/testsuite/
	* ld-arm/arm-elf.exp (armelftests): Assemble Cortex-A8 tests with
	-mcpu=cortex-a8.
2010-01-13 19:01:10 +00:00
Nick Clifton 52b010e442 * config/tc-h8300.c (h8300_elf_section): New function - issue a
warning message if a new section is created without setting any
        attributes for it.
        (md_pseudo_table): Intercept section creation pseudos.
        (md_pcrel_from): Replace abort with an error message.
        * config/obj-elf.c (obj_elf_section_name): Export this function.
        * config/obj-elf.h (obj_elf_section_name): Prototype.

        * gas/elf/section0.d: Skip this test for the h8300.
        * gas/elf/section1.d: Likewise.
        * gas/elf/section6.d: Likewise.
        * gas/elf/elf.exp: Skip section2 and section5 tests when the
        target is the h8300.

        * ld-scrips/sort.exp: Skip these tests when the target is the
        h8300.
2010-01-13 14:08:54 +00:00
H.J. Lu 2c610e4b46 Add --dyn-syms to readelf
binutils/

2010-01-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11146
	* NEWS: Mention --dyn-syms for readelf.

	* readelf.c (do_dyn_syms): New.
	(OPTION_DYN_SYMS): Likewise.
	(options): Add "dyn-syms".
	(usage): Add --dyn-syms.
	(parse_args): Handle OPTION_DYN_SYMS.
	(process_symbol_table): Handle do_dyn_syms.
	(process_object): Likewise.
	(process_archive): Likewise.

	* doc/binutils.texi: Document --dyn-syms for readelf.  Mention
	symbol hash tables for -D.

ld/testsuite/

2010-01-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11146
	* ld-elf/dynsym1.d: New.
2010-01-11 14:45:42 +00:00
Ralf Wildenhues 3725885a65 Sync Libtool from GCC.
/:
	* libtool.m4: Sync from git Libtool.
	* ltmain.sh: Likewise.
	* ltoptions.m4: Likewise.
	* ltversion.m4: Likewise.
	* lt~obsolete.m4: Likewise.

sim/iq2000/:
	* configure: Regenerate.

sim/d10v/:
	* configure: Regenerate.

sim/m32r/:
	* configure: Regenerate.

sim/frv/:
	* configure: Regenerate.

sim/:
	* avr/configure: Regenerate.
	* cris/configure: Regenerate.
	* microblaze/configure: Regenerate.

sim/h8300/:
	* configure: Regenerate.

sim/mn10300/:
	* configure: Regenerate.

sim/erc32/:
	* configure: Regenerate.

sim/arm/:
	* configure: Regenerate.

sim/m68hc11/:
	* configure: Regenerate.

sim/lm32/:
	* configure: Regenerate.

sim/sh64/:
	* configure: Regenerate.

sim/v850/:
	* configure: Regenerate.

sim/cr16/:
	* configure: Regenerate.

sim/moxie/:
	* configure: Regenerate.

sim/m32c/:
	* configure: Regenerate.

sim/mips/:
	* configure: Regenerate.

sim/mcore/:
	* configure: Regenerate.

sim/sh/:
	* configure: Regenerate.

gprof/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

opcodes/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gas/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

ld/:
	* configure: Regenerate.

gdb/testsuite/:
	* gdb.cell/configure: Regenerate.

binutils/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.

bfd/:
	* Makefile.in: Regenerate.
	* configure: Regenerate.

bfd/doc/:
	* Makefile.in: Regenerate.
2010-01-09 21:11:44 +00:00
H.J. Lu 5256a5b03f Change to "Copyright 2010". 2010-01-08 19:40:08 +00:00
H.J. Lu d023c380db Fix PR ld/11138
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11138
	* elflink.c (elf_link_check_versioned_symbol): Don't abort if
	a symbol referenced by DSO is is defined in a non-shared object
	and forced local.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11138
	* ld-elf/pr11138-1.c: New.
	* ld-elf/pr11138-1.map: Likewise.
	* ld-elf/pr11138-2.c: Likewise.
	* ld-elf/pr11138-2.map: Likewise.
	* ld-elf/pr11138.out: Likewise.

	* ld-elf/shared.exp (build_tests): Add libpr11138-1.so and
	libpr11138-2.o.
	(run_tests): Add 2 tests for PR ld/11138.
2010-01-08 03:03:16 +00:00
H.J. Lu bde6f3eb6d Set SEC_KEEP on section XXX for undefined __start_XXX/__stop_XXX
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
	undefined __start_XXX/__stop_XXX in all input files and set
	SEC_KEEP.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11133
	* ld-gc/gc.exp: Run start.

	* ld-gc/start.d: New.
	* ld-gc/start.s: Likewise.
2010-01-08 01:43:23 +00:00
Alan Modra b903363e43 PR 11107
* emultempl/vxworks.em: Expand tr arguments to suit non-GNU tr.
2010-01-08 01:41:11 +00:00
H.J. Lu 16583161e1 Always keep SHT_NOTE sections
bfd/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11143
	* elflink.c (elf_gc_sweep): Keep SHT_NOTE section.

ld/testsuite/

2010-01-07  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11143
	* ld-gc/gc.exp: Run abi-note.

	* ld-gc/abi-note.d: New.
	* ld-gc/abi-note.s: Likewise.
2010-01-07 13:44:37 +00:00
H.J. Lu 43ecc30f09 Move 2009 binutils ChangeLog to ChangeLog-2009. 2010-01-01 18:06:10 +00:00
Daniel Gutson 4e67d4ca2a bfd/
* elf32-arm.c (elf32_arm_final_link_relocate): limits
        fixed.

        ld/testsuite/
        * ld-arm/arm-elf.exp (armelftests): New test case added.
        * ld-arm/reloc-boundaries.s: New file.
        * ld-arm/reloc-boundaries.d: New file.
2009-12-28 18:55:16 +00:00
Daniel Gutson 2598a05c7b 2009-12-28 Daniel Gutson <dgutson@codesourcery.com>
* ld-arm/arm-elf.exp: Run missing test
        from a previous commit (callweak-2).
2009-12-28 18:44:55 +00:00
Dave Korn 9dda37c1b4 * pe-dll.c (generate_reloc): Take account of wrapper options when
testing if a weak symbol is defined or not, and when it is not,
	consider whether the default value requires a base reloc anyway.
2009-12-17 19:51:35 +00:00
Dave Korn b41d91a7bc * deffilep.y (def_file_free): Add missing shadow parameter renaming.
(def_file_print): Likewise.
	(def_stash_module): Likewise.
	(def_file_add_import): Likewise.
2009-12-17 19:33:59 +00:00
Nick Clifton 91d6fa6a03 Add -Wshadow to the gcc command line options used when compiling the binutils.
Fix up all warnings generated by the addition of this switch.
2009-12-11 13:42:17 +00:00
Maciej W. Rozycki e7e2196da3 bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Correct handling
	of undefined symbols.

	ld/testsuite/
	* ld-mips-elf/undefined.d: New test.
	* ld-mips-elf/undefined.s: Source for the new test.
	* ld-mips-elf/mips-elf.exp: Run the new test.
2009-12-10 14:20:04 +00:00
Daniel Jacobowitz a747059210 bfd/
* elf32-arm.c (elf32_arm_next_input_section): Skip sections without
	SEC_CODE.

	ld/testsuite/
	* ld-arm/arm-elf.exp (armeabitests): Add farcall-data.
	* ld-arm/farcall-data.d, ld-arm/farcall-data.s: New.
	* lib/ld-lib.exp (run_ld_link_tests, run_cc_link_tests): Correct
	regular expression for archives.
2009-12-09 21:42:00 +00:00
Alan Modra 829da89821 PR ld/11012
* emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Move .rela.opd ..
	(INITIAL_RELOC_SECTIONS): .. to here.  New define.
	* scripttempl/elf.sc: Expand INITIAL_RELOC_SECTIONS.
2009-12-09 01:26:03 +00:00
Jie Zhang 90f5d9d961 * ld.texinfo: Make it clear that --nmagic disables linking
against shared libraries.
2009-12-04 07:28:13 +00:00
Joseph Myers 3388710e18 config:
* largefile.m4 (ACX_LARGEFILE): Require AC_CANONICAL_HOST and
	AC_CANONICAL_TARGET.

bfd:
	* configure: Regenerate.

binutils:
	* configure: Regenerate.

gas:
	* configure: Regenerate.

gdb:
	* configure: Regenerate.

gprof:
	* configure: Regenerate.

ld:
	* configure: Regenerate.
2009-11-30 16:46:47 +00:00
Nick Clifton 88f1a8b254 Fix typo: "Dimitry" should be "Dmitry" 2009-11-30 10:14:56 +00:00
Alan Modra 20f3d0d667 PR ld/11006
* lexsup.c (parse_args): Allow nested --start-group, --end-group.
2009-11-30 00:27:45 +00:00
Tristan Gingold d0069cab2d 2009-11-27 Tristan Gingold <gingold@adacore.com>
* pe-dll.c (pe_implied_import_dll): Return early if there is no
	export entries.
2009-11-27 09:00:36 +00:00
Nick Clifton 28d5f67740 PR ld/10956
* ld.h (struct args_type): Rename 'relax' field to
        'disable_target_specific_optimizations' and turn it into a
        tri-state variable.
        (RELAXATION_DISABLED_BY_DEFAULT): New macro.
        (RELAXATION_DISABLED_BY_USER): New macro.
        (RELAXATION_ENABLED): New macro.
        (DISABLE_RELAXATION): New macro.
        (ENABLE_RELAXATION): New macro.
        * lexsup (enum option_values): Add OPTION_NO_RELAX.
        (struct ld_options): Add --no-relax.
        (parse_args): Handle OPTION_NO_RELAX.  Use DISABLE_RELAXATION and
        ENABLE_RELAXATION macros.
        * ldlang.c (lang_relax_sections): Use RELAXATION_ENABLED macro.
        (lang_process): Likewise.
        * ldmain.c (main): Initialise
        disable_target_specific_optimizations field.
        (multiple_definition): Use RELAXATION_ENABLED macro.
        * ld.texinfo: Document new command line option.
        * emultempl/alphaelf.em: Remove --no-relax option.
        (before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
        Use ENABLE_RELAXATION macro.
        * emultempl/avrelf.em: (after_allocation): Test RELAXATION_ENABLED
        macro.
        * emultempl/cr16elf.em: Remove --no-relax option.
        (before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
        Use ENABLE_RELAXATION macro.
        * emultempl/crxelf.em: Remove --no-relax option.
        (before_allocation): Test RELAXATION_DISABLED_BY_USER macro.
        Use ENABLE_RELAXATION macro.
        * emultempl/mmix-elfnmmo.em: (before_allocation): Use
        ENABLE_RELAXATION macro.
        * emultempl/needrelax.em: (before_allocation): Use
        ENABLE_RELAXATION macro.
        * emultempl/ppc32elf.em: (before_allocation): Test
        RELAXATION_DISABLED_BY_DEFAULT macro. Use
        ENABLE_RELAXATION macro.
        * emultempl/sh64elf.em: (before_allocation): Test
        RELAXATION_ENABLED macro. Use DISABLE_RELAXATION macro.
        * emultempl/xtensaelf.em: Remove --no-relax option.
        (before_allocation): Test RELAXATION_ENABLED macro.
        Use ENABLE_RELAXATION macro.
2009-11-26 13:45:25 +00:00
Kai Tietz fecc36fdd1 2009-11-25 Kai Tietz <kai.tietz@onevision.com>
* scripttempl/pe.sc: (.note.GNU-stack): Mark as discardable.
        (.gnu.lto_*): Likewise.
        * scripttempl/pep.sc: (.note.GNU-stack): Mark as discardable.
        (.gnu.lto_*): Likewise.
2009-11-25 06:59:01 +00:00
Paul Brook 1338dd10ef 2009-11-23 Paul Brook <paul@codesourcery.com>
ld/
	* ldexp.c: Copy symbol type for simple assignments.

	bfd/
	* libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add
	prototype.
	* elf-bfd.h (_bfd_elf_copy_link_hash_symbol_type): Add prototype.
	* linker.c (_bfd_generic_copy_link_hash_symbol_type): New function.
	* elflink.c (_bfd_elf_copy_link_hash_symbol_type): New function.
	* targets.c (BFD_JUMP_TABLE_LINK, struct bfd_target): Add
	_copy_link_hash_symbol_type.
	* bfd/coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Add
	_bfd_generic_copy_link_hash_symbol_type.
	* bfd/coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add
	_bfd_generic_copy_link_hash_symbol_type.
	* aout-adobe.c (aout_32_bfd_copy_link_hash_symbol_type): Define.
	* aout-target.h (MY_bfd_copy_link_hash_symbol_type): Define.
	* aout-tic30.c (MY_bfd_copy_link_hash_symbol_type): Define.
	* binary.c (binary_bfd_copy_link_hash_symbol_type): Define.
	* bout.c (b_out_bfd_copy_link_hash_symbol_type): Define.
	* coffcode.h (coff_bfd_copy_link_hash_symbol_type): Define.
	* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define.
	* i386msdos.c (msdos_bfd_copy_link_hash_symbol_type): Define.
	* i386os9k.c (os9k_bfd_copy_link_hash_symbol_type): Define.
	* ieee.c (ieee_bfd_copy_link_hash_symbol_type): Define.
	* ihex.c (ihex_bfd_copy_link_hash_symbol_type): Define.
	* libecoff.h (_bfd_ecoff_bfd_copy_link_hash_symbol_type): Define.
	* mach-o.c (bfd_mach_o_bfd_copy_link_hash_symbol_type): Define.
	* mmo.c (mmo_bfd_copy_link_hash_symbol_type): Define.
	* nlm-target.h (nlm_bfd_copy_link_hash_symbol_type): Define.
	* oasys.c (oasys_bfd_copy_link_hash_symbol_type): Define.
	* pef.c (bfd_pef_bfd_copy_link_hash_symbol_type): Define.
	* ppcboot.c (ppcboot_bfd_copy_link_hash_symbol_type): Define.
	* som.c (som_bfd_copy_link_hash_symbol_type): Define.
	* srec.c (srec_bfd_copy_link_hash_symbol_type): Define.
	* tekhex.c (tekhex_bfd_copy_link_hash_symbol_type): Define.
	* versados.c (versados_bfd_copy_link_hash_symbol_type): Define.
	* vms.c (vms_bfd_copy_link_hash_symbol_type): Define.
	* xsym.c (bfd_sym_bfd_copy_link_hash_symbol_type): Define.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

	ld/testsuite
	* ld-arm/script-type.sym: New test.
	* ld-arm/script-type.s: New test.
	* ld-arm/script-type.s: New test.
2009-11-23 14:41:33 +00:00
Thomas Schwinge ce5181b407 ld/
2009-11-20  Thomas Schwinge  <thomas@codesourcery.com>

	* emulparams/armelf.sh (OTHER_READONLY_SECTIONS)
	<__exidx_start, __exidx_end>: Use PROVIDE_HIDDEN.
	* emulparams/armelf_linux_eabi.sh (OTHER_READONLY_SECTIONS)
	<__exidx_start, __exidx_end>: Likewise.
	* emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS)
	<.ARM.exidx$$Base, __exidx_start, __exidx_end, .ARM.exidx$$Limit>:
	Likewise.

ld/testsuite/
2009-11-20  Thomas Schwinge  <thomas@codesourcery.com>

	* ld-arm/arm-dyn.ld: Adapt to main linker script changes.
	* ld-arm/arm-lib.ld: Likewise.
	* ld-arm/armthumb-lib.sym: : Adjust expected results.
	* ld-arm/farcall-mixed-app-v5.d: Likewise.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-app.sym: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/mixed-app-v5.d: Likewise.
	* ld-arm/mixed-app.d: Likewise.
	* ld-arm/mixed-app.sym: Likewise.
	* ld-arm/mixed-lib.sym: Likewise.
	* ld-arm/preempt-app.sym: Likewise.
	* ld-arm/tls-app.d: Likewise.
2009-11-20 15:04:51 +00:00
Alan Modra 7984f34977 PR ld/9863
* emulparams/armelf_linux.sh (DATA_START_SYMBOLS): Use PROVIDE
	with __data_start.
2009-11-19 07:01:40 +00:00
Ben Elliston cfdf38f2b4 binutils/
* arlex.l: Enable noinput, nounput flex options.
	* syslex.l: Likewise.
ld/
	* ldlex.l: Enable nounput flex option.
2009-11-19 05:06:35 +00:00
Nick Clifton fad84867f9 * ld-elf/extract-symbol-1sec.d: Expect to fail for the RX target.
* ld-scripts/overlay-size.d: Likewise.
        * ld-scripts/rgn-at1.d: Likewise.
        * ld-scripts/rgn-at2.d: Likewise.
        * ld-scripts/rgn-at3.d: Likewise.
        * ld-scripts/rgn-at4.d: Likewise.
        * ld-scripts/rgn-over8-ok.d: Likewise.
2009-11-18 16:37:56 +00:00
Kai Tietz 8a9eab9b5e 2009-11-15 Kai Tietz <kai.tietz@onevision.com>
* pe-dll.c (pe_undef_alias_cdecl_match): New function.
	(pe_find_cdecl_alias_match): New function.
	(pe_process_import_defs): Add matching for import symbols
	declared as cdecl for fastcall/stdcall.
	* emultempl/pe.em (pe_undef_cdecl_match): Treat fastcall
	symbols, too.
	(pe_fixup_stdcalls): Likewise.
	(gld_XXX_after_open): Redo scanning for imported
	fastcall/stdcall symbols as cdecl one.
	* emultempl/pep.em (pep_undef_cdecl_match): Treat fastcall
	symbols, too.
	(pep_fixup_stdcalls): Likewise.
	(gld_XXX_after_open): Redo scanning for imported
	fastcall/stdcall symbols as cdecl one.

2009-11-15  Kai Tietz  <kai.tietz@onevision.com>

	* ld-pe/direct2_client.c: New file.
	* ld-pe/direct2_dll.c: Likewise.
	* ld-pe/direct2_dll.def: Likewise.
	* ld-pe/pe-run2.exp: Likewise.
2009-11-15 07:52:45 +00:00
H.J. Lu f16cd0d502 Rewrite prefix processing.
gas/testsuite/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/i386/i386.exp: Run long-1, long-1-intel, x86-64-long-1,
	and x86-64-long-1-intel.

	* gas/i386/long-1-intel.d: New.
	* gas/i386/long-1.d: Likewise.
	* gas/i386/long-1.s: Likewise.
	* gas/i386/x86-64-long-1-intel.d: Likewise.
	* gas/i386/x86-64-long-1.d: Likewise.
	* gas/i386/x86-64-long-1.s: Likewise.

	* gas/i386/jump16.d: Updated for prefix processing.
	* gas/i386/naked.d: Likewise.
	* gas/i386/nops-1-core2.d: Likewise.
	* gas/i386/nops-1-i686.d: Likewise.
	* gas/i386/nops-3-i686.d: Likewise.
	* gas/i386/nops-4-i686.d: Likewise.
	* gas/i386/nops-5-i686.d: Likewise.
	* gas/i386/nops-5.d: Likewise.
	* gas/i386/prefix.d: Likewise.
	* gas/i386/rep.d: Likewise.
	* gas/i386/string-ok.d: Likewise.
	* gas/i386/x86-64-addr32-intel.d: Likewise.
	* gas/i386/x86-64-addr32.d: Likewise.
	* gas/i386/x86-64-cbw-intel.d: Likewise.
	* gas/i386/x86-64-cbw.d: Likewise.
	* gas/i386/x86-64-io-intel.d: Likewise.
	* gas/i386/x86-64-io-suffix.d: Likewise.
	* gas/i386/x86-64-io.d: Likewise.
	* gas/i386/x86-64-lwp.d: Likewise.
	* gas/i386/x86-64-nops-1-core2.d: Likewise.
	* gas/i386/x86-64-nops-1-nocona.d: Likewise.
	* gas/i386/x86-64-nops-1.d: Likewise.
	* gas/i386/x86-64-nops-2.d: Likewise.
	* gas/i386/x86-64-nops-3.d: Likewise.
	* gas/i386/x86-64-nops-4-core2.d: Likewise.
	* gas/i386/x86-64-nops-4.d: Likewise.
	* gas/i386/x86-64-nops-5-k8.d: Likewise.
	* gas/i386/x86-64-nops-5.d: Likewise.
	* gas/i386/x86-64-rep.d: Likewise.
	* gas/i386/x86-64-stack-intel.d: Likewise.
	* gas/i386/x86-64-stack-suffix.d: Likewise.
	* gas/i386/x86-64-stack.d: Likewise.

ld/testsuite/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-x86-64/tlsbin.dd: Updated for prefix processing.
	* ld-x86-64/tlsgdesc.dd: Likewise.
	* ld-x86-64/tlsld1.dd: Likewise.
	* ld-x86-64/tlspic.dd: Likewise.

opcodes/

2009-11-13  H.J. Lu  <hongjiu.lu@intel.com>

	* i386-dis.c (ckprefix): Updated to return 0 if number of
	prefixes > 14 and record the last position for each prefix.
	(lock_prefix): Removed.
	(data_prefix): Likewise.
	(addr_prefix): Likewise.
	(repz_prefix): Likewise.
	(repnz_prefix): Likewise.
	(last_lock_prefix): New.
	(last_repz_prefix): Likewise.
	(last_repnz_prefix): Likewise.
	(last_data_prefix): Likewise.
	(last_addr_prefix): Likewise.
	(last_rex_prefix): Likewise.
	(last_seg_prefix): Likewise.
	(MAX_CODE_LENGTH): Likewise.
	(ADDR16_PREFIX): Likewise.
	(ADDR32_PREFIX): Likewise.
	(DATA16_PREFIX): Likewise.
	(DATA32_PREFIX): Likewise.
	(REP_PREFIX): Likewise.
	(seg_prefix): Likewise.
	(all_prefixes): Change size to MAX_CODE_LENGTH - 1.
	(prefix_name): Handle ADDR16_PREFIX, ADDR32_PREFIX,
	DATA16_PREFIX, DATA32_PREFIX and REP_PREFIX.
	(get_valid_dis386): Updated.
	(OP_C): Likewise.
	(OP_Monitor): Likewise.
	(REP_Fixup): Likewise.
	(print_insn): Display all prefixes.
	(putop): Set PREFIX_DATA on used_prefixes only if it is used.
	(intel_operand_size): Likewise.
	(OP_E_register): Likewise.
	(OP_G): Likewise.
	(OP_REG): Likewise.
	(OP_IMREG): Likewise.
	(OP_I): Likewise.
	(OP_I64): Likewise.
	(OP_sI): Likewise.
	(CRC32_Fixup): Likewise.
	(MOVBE_Fixup): Likewise.
	(OP_E_memory): Set REFIX_DATA on used_prefixes when it is used
	in 16bit mode.
	(OP_J): Set REX_W used if it is used. Set PREFIX_DATA on
	used_prefixes only if it is used.
2009-11-13 20:42:10 +00:00
Nick Clifton 41327c9d6d Updated Indonesian translation. 2009-11-11 09:36:08 +00:00
Jan Kratochvil da2f07f1aa bfd/
* configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
	AC_SYS_LARGEFILE and checking the Solaris largefile exception.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

binutils/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
	AC_SYS_LARGEFILE and checking the Solaris largefile exception.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gas/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gdb/
	* configure.ac: Call ACX_LARGEFILE.
	* aclocal.m4: Call m4_include for ../config/largefile.m4 and
	../config/plugins.m4.
	* configure: Regenerate.
	* config.in: Regenerate.

gprof/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

ld/
	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_SYS_LARGEFILE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2009-11-11 04:42:42 +00:00
Nick Clifton 3ab904c416 PR ld/10864
* ld.texinfo (Entry Point): Mention that the default entry symbol
        is not 'start' on some targets.
2009-11-10 16:34:53 +00:00
H.J. Lu 57ca8ac797 Don't return on STT_GNU_IFUNC symbol when stripping.
bfd/

2009-11-09  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/10911
	* elflink.c (elf_link_output_extsym): Don't return on
	STT_GNU_IFUNC symbol when stripping.

ld/testsuite/

2009-11-09  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/10911
	* ld-ifunc/ifunc-4a-x86.d: New.
2009-11-09 14:37:16 +00:00
H.J. Lu df856bcc4d 2009-11-06 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10912
	* ldmain.c (add_DT_NEEDED_for_dynamic): Default to TRUE.
2009-11-06 16:50:59 +00:00
Kai Tietz e468a04693 2009-11-06 Kai Tietz <kai.tietz@onevision.com>
* pe.em (DEFAULT_PSEUDO_RELOC_VERSION): New macro.
        (gld_XXX_before_parse): Set pseudo-relocation default
        version to DEFAULT_PSEUDO_RELOC_VERSION.
        (gldXXX_handle_option): Likewise.
2009-11-06 15:50:56 +00:00
Nick Clifton ddbb8a31d5 * lexsup.c: Rename --add-needed to --copy-dt-needed-entries.
* ldlang.h (struct lang_input_statement_struct): Rename add_needed
        to add_DT_NEEDED_for_dynamic.  Rename as_needed to
        add_DT_NEEDED_for_regular.
        * ldlang.c: Likewise.
        * ldlang.h: Likewise.
        * ldlang.c: Use the new variable names.
        * ldgram.y: Likewise.
        * emultempl/elf32.em: Likewise.
        * ld.texinfo: Document the renamed option.  Also mention its
        affect on the resolution of dynamic symbols.
        * NEWS: Mention the changed option name.
2009-11-05 15:35:50 +00:00
Kai Tietz decfa41eac 2009-11-04 Kai Tietz <kai.tietz@onevision.com>
* emulparams/arm_epoc_pe.sh: Remove ENTRY.
        * emulparams/arm_wince_pe.sh: Likewise.
        * emulparams/i386pe.sh: Likewise.
        * emulparams/i386pe_posix.sh: Likewise.
        * emulparams/mcorepe.sh: Likewise.
        * emulparams/mipspe.sh: Likewise.
        * emulparams/ppcpe.sh: Likewise.
        * emulparams/armpe.sh: Likewise.
        * emulparams/i386pep.sh: Likewise.
        * emulparams/shpe.sh: Likewise.
        Additionally cleaned up double-defined
        variables SUBSYSTEM and INITIAL_SYMBOL_CHAR.
        * emultempl/pe.em: Remove use of ENTRY.
        (pe_subsystem): New local variable.
        (gld_XXX_before_parse): Don't set default
        entry point here.
        (set_entry_point): New function to set entry
        point.
        (set_pe_subsystem): Remove code for entry point.
        (gld_XXX_after_parse): Use set_entry_point here.
        * emultempl/pep.em: Likewise.
2009-11-04 18:13:05 +00:00
Paul Brook 62f3b8c867 2009-11-02 Paul Brook <paul@codesourcery.com>
ld/testsuite/
	* ld-arm/arm-elf.exp: Add new attr-merge-vfp tests.
	* ld-arm/attr-merge-vfp-1.d: New test.
	* ld-arm/attr-merge-vfp-1r.d: New test.
	* ld-arm/attr-merge-vfp-2.d: New test.
	* ld-arm/attr-merge-vfp-2r.d: New test.
	* ld-arm/attr-merge-vfp-3.d: New test.
	* ld-arm/attr-merge-vfp-3r.d: New test.
	* ld-arm/attr-merge-vfp-4.d: New test.
	* ld-arm/attr-merge-vfp-4r.d: New test.
	* ld-arm/attr-merge-vfp-5.d: New test.
	* ld-arm/attr-merge-vfp-5r.d: New test.
	* ld-arm/attr-merge-vfp-2.s: New test.
	* ld-arm/attr-merge-vfp-3.s: New test.
	* ld-arm/attr-merge-vfp-3-d16.s: New test.
	* ld-arm/attr-merge-vfp-4.s: New test.
	* ld-arm/attr-merge-vfp-4-d16.s: New test.

	gas/
	* doc/c-arm.texi: Document new -mfpu options.
	* config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma,
	fpu_vfp_ext_fma): New.
	(NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms.
	(do_vfp_nsyn_fma_fms, do_neon_fmac): New functions.
	(insns): Move double precision load/store.  Split out double
	precision VFPv3 instrucitons.  Add VFPv4 instructions.
	(arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants.
	(aeabi_set_public_attributes): Set VFPv4 variants

	gas/testsuite/
	* gas/arm/attr-mfpu-vfpv4.d: New test.
	* gas/arm/attr-mfpu-vfpv4-d16.d: New test.
	* gas/arm/neon-fma-cov.d: New test.
	* gas/arm/neon-fma-cov.s: New test.
	* gas/arm/vfp-fma-inc.s: New test.
	* gas/arm/vfp-fma-arm.d: New test.
	* gas/arm/vfp-fma-arm.s: New test.
	* gas/arm/vfp-fma-thumb.d: New test.
	* gas/arm/vfp-fma-thumb.s: New test.
	* gas/arm/vfma1.d: New test.
	* gas/arm/vfma1.s: New test.
	* gas/arm/vfpv3xd.d: New test.
	* gas/arm/vfpv3xd.s: New test.

	include/opcode/
	* arm.h (FPU_VFP_EXT_V3xD, FPU_VFP_EXT_FP16, FPU_NEON_EXT_FMA,
	FPU_VFP_EXT_FMA, FPU_VFP_V3xD, FPU_VFP_V4D16, FPU_VFP_V4): Define.
	(FPU_ARCH_VFP_V3D16_FP16, FPU_ARCH_VFP_V3_FP16, FPU_ARCH_VFP_V3xD,
	FPU_ARCH_VFP_V3xD_FP16, FPU_ARCH_VFP_V4, FPU_ARCH_VFP_V4D16,
	FPU_ARCH_NEON_VFP_V4): Define.

	binutils/
	* readelf.c (arm_attr_tag_VFP_arch): Add VFPv4 and VFPv4-D16.

	bfd/
	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
	attributes.

	opcodes/
	* arm-dis.c (coprocessor_opcodes): Update to use new feature flags.
	Add VFPv4 instructions.
2009-11-02 13:44:05 +00:00
Alan Modra 4879cf1683 * ld-scripts/phdrs3.exp (LDFLAGS): Add "--local-store 0:0" for SPU. 2009-11-02 03:44:20 +00:00
Nathan Sidwell 698be22afe * ld-elfcomm/elfcomm.exp: Compile with -fcommon. 2009-10-30 10:46:00 +00:00
Nathan Sidwell 64c1b14eac * emulparams/vxworks.sh (OTHER_READONLY_SECTIONS): Move into ...
(OTHER_READWRITE_SECTIONS): ... here.
2009-10-29 16:43:56 +00:00
Hans-Peter Nilsson 1e22530edf * ld-cris/dso12-pltdis.d: New test. 2009-10-29 11:50:57 +00:00
Kai Tietz 7aee19a1c4 2009-10-28 Kai Tietz <kai.tietz@onevision.com>
* emultempl/pep.em (U): Define underscore macro.
        (init): Use for __ImageBase U macro.
2009-10-28 17:34:14 +00:00
Kai Tietz 7fcab87103 2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* deffile.h (def_file_export): New member its_name.
	(def_file_import): Likewise.
	(def_file_add_export): Add argument its_name.
	(def_file_add_import): Likewise.
	* deffilep.y (def_exports): Add argument its_name.
	(def_import): Likewise.
	(EQUAL): Add new token for '=='.
	(opt_equalequal_name): New rule.
	(expline): Add rule opt_equalequal_name.
	(impline): Likewise.
	(def_file_free): Free for exports and imports
	the optional member its_name.
	(def_lex): Add scan of '==' as EQUAL.
	* pe-dll.c (pe_export_sort): Sort for its_name too.
	(process_def_file_and_drectve): Adjust calls to
	def_file_add_export.
	(generate_edata): Take its_name in account.
	(make_one): Likewise.
	(pe_process_import_defs): Likewise.
	(pe_dll_generate_def_file): Add print of new '==' option.
	* ld.texinfo: Extend documentation about .def file syntax.
	* NEWS: Mention new feature.
2009-10-23 11:40:17 +00:00
Kai Tietz 424908eba6 2009-10-23 Kai Tietz <kai.tietz@onevision.com>
* deffilep.y (def_lex): Allow '<' and '>' characters in identifier
	strings.
2009-10-23 11:33:44 +00:00
Alan Modra 07f1e47a64 PR ld/10489
* emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Handle
	drive specifiers for DOS based filesystems in rpath-link strings.
2009-10-23 01:21:12 +00:00
Hans-Peter Nilsson 3ee29d56ee * ld-cris/tls-e-20.d, ld-cris/tls-e-20a.d, ld-cris/tls-e-22.d,
ld-cris/tls-e-80.d, ld-cris/tls-e-dtpoffd1.d,
	ld-cris/tls-e-dtpoffd3.d, ld-cris/tls-ldgde-14.d,
	ld-cris/tls-ldgde-15.d, ld-cris/tls-ldgdex-14.d,
	ld-cris/tls-ldgdex-15.d: Adjust for change in non-shared
	R_CRIS_32_DTPREL and R_CRIS_16_DTPREL relocations.
2009-10-19 16:34:31 +00:00
Nick Clifton 764ed107e9 * Makefile.am: Remove spurious sanitization marker.
* Makefile.in: Regenerate.
2009-10-19 10:32:12 +00:00
Arnold Metselaar 6c293e26a3 * coff-z80.c (z80coff_vec): Allow sections to be of type SEC_CODE or SEC_DATA
* ld-scripts/align.exp: Remove xfails for z80-*-coff
2009-10-17 17:18:28 +00:00
Nick Clifton 2927aacaee * emultempl/pe.em (OPTION_EXCLUDE_ALL_SYMBOLS): New macro.
(gld${EMULATION_NAME}_add_options): Add new --exclude-all-symbols option
        to exclude all symbols from automatic export.
        (gld_${EMULATION_NAME}_list_options): Describe it.
        (gld${EMULATION_NAME}_handle_option): Handle it.
        * emultempl/pep.em: Likewise to all the above.
        * pe-dll.c (pe_dll_exclude_all_symbols): New variable.
        (process_def_file_and_drectve): Use it.
        * pe-dll.h (pe_dll_exclude_all_symbols): Declare.
        * pep-dll.c (pep_dll_exclude_all_symbols): Define pep_ alias.
        * pep-dll.h (pe_dll_exclude_all_symbols): Declare.
        * NEWS: Mention the new feature.
        * ld.texinfo: Document the new command line switch.
2009-10-16 15:15:39 +00:00
Nick Clifton ed94852035 * bootstrap.exp: Detect if plugins are enabled. Skip the static
link test and add -ldl to the remaining tests if they are.
2009-10-16 10:32:51 +00:00
Joseph Myers 0aa3b0e6e6 * ld-scripts/phdrs3.d: Allow colon in name of linker binary. 2009-10-14 23:12:16 +00:00
Andreas Schwab d05c651b27 * ldlex.l (yy_input): Remove second argument and return the value
instead.
(YY_INPUT): Adjust.
2009-10-14 10:54:27 +00:00
Alan Modra 7dff202796 * ld-elf/pr349-1.s, * ld-elf/pr349-2.s, * ld-elf/pr349.d: New. 2009-10-14 10:52:54 +00:00
Alan Modra f88dc410a7 include/
* bfdlink.h (enum bfd_link_common_skip_ar_symbols): Rename from
	bfd_link_common_skip_ar_aymbols.
	(struct bfd_link_info): Here too.
bfd/
	* aoutx.h (aout_link_check_ar_symbols): Typo fix.
ld/
	* emultempl/netbsd.em (gldnetbsd_before_parse): Typo fix.
2009-10-14 05:54:29 +00:00
Alan Modra fc1ed73727 * ldlang.c (load_symbols): Set whole_archive from entry when
parsing a linker script.
2009-10-14 01:48:53 +00:00
Alan Modra ec2d9b2927 Revert 2009-09-28 changes. 2009-10-10 04:34:39 +00:00
H.J. Lu 0e6b97bb76 2009-10-09 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10749
	* ld-elf/relocatable.d: New.
	* ld-elf/relocatable.t: Likewise.
	* ld-elf/simple.s: Likewise.
2009-10-09 13:32:50 +00:00
Alan Modra fd68d03d92 PR ld/10749
* ldlang.c (lang_size_sections_1): Zero section vmas only for COFF.
2009-10-09 05:19:37 +00:00
H.J. Lu b9ed7c0818 2009-10-07 H.J. Lu <hongjiu.lu@intel.com>
PR ld/10744
	* ld-scripts/phdrs3.exp: Run phdrs3a.

	* ld-scripts/phdrs3a.d: New.
	* ld-scripts/phdrs3a.t: Likewise.
2009-10-08 02:38:26 +00:00
Alan Modra 09a1697895 PR ld/10744
* ld-scripts/phdrs3.d: Update.
2009-10-08 01:11:56 +00:00