Commit Graph

2763 Commits

Author SHA1 Message Date
Richard Sandiford 0a61c8c283 bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
	for all relocation types.  Allow any type of relocation to refer to
	__gnu_local_gp.

ld/testsuite/
	* ld-mips-elf/no-shared-1-o32.s,
	ld-mips-elf/no-shared-1-o32.d,
	ld-mips-elf/no-shared-1-n32.d,
	ld-mips-elf/no-shared-1-n64.s,
	ld-mips-elf/no-shared-1-n64.d,
	ld-mips-elf/no-shared-1.ld: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2008-07-10 19:06:54 +00:00
Danny Smith b92216aa3b *pe-dll.c (autofilter_symbolprefixlist): Excude all symbols
starting with ".".
           Exclude "_IMPORT_DESCRIPTOR_".
           (autofilter_symbolsuffixlist): Exclude "_NULL_THUNK_DATA".
           (autofilter_symbollist_generic): Don't check for ".text".
           Exclude "_NULL_IMPORT_DESCRIPTOR".
           (autofilter_symbollist_i386): Likewise.
2008-07-09 03:18:15 +00:00
Stan Shebs 7b60c20e4c * ld-arm/arm-elf.exp: Use objdump -d for arm-be8 test.
* ld-arm/arm-be8.d: Change to test disassembly.
2008-07-07 19:00:21 +00:00
Alan Modra 9795b468eb * emultempl/armelf.em (elf32_arm_add_stub_section): Use
bfd_make_section_with_flags.
	* emultempl/avrelf.em (avr_elf_create_output_section_statements):
	Likewise.
	* emultempl/hppaelf.em (hppaelf_add_stub_section): Likewise.
	* emultempl/m68hc1xelf.em (m68hc11elf_add_stub_section): Likewise.
	* emultempl/m68kcoff.em (gld${EMULATION_NAME}_after_open): Likewise.
	* emultempl/m68kelf.em (m68k_elf_after_open): Likewise.
	* emultempl/ppc64elf.em (ppc_add_stub_section): Likewise.
	* emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation):
	Likewise.
2008-07-07 00:46:51 +00:00
Nathan Sidwell 4006703d71 * ld.texinfo (File Commands): Document that INCLUDE can be used in
several different places.
	* ldgram.y (statement, memory_spec, section): Allow INCLUDE.
	(memory, memory_spec_list): Simplify BNF
	(memory_spec_list_opt): New rule.
	* ldlex.l (INCLUDE): Recognize in EXPRESSION.
testsuite/
	* ld-scripts/include-1.d: New.
	* ld-scripts/include-1.t: New.
	* ld-scripts/include-data.t: New.
	* ld-scripts/include-mem.t: New.
	* ld-scripts/include-ram.t: New.
	* ld-scripts/include-sections.t: New.
	* ld-scripts/include-subdata.t: New.
	* ld-scripts/include.exp: New.
	* ld-scripts/include.s: New.
2008-07-06 13:38:37 +00:00
Andreas Schwab f57718b4c3 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
addend on _GLOBAL_OFFSET_TABLE_.

ld/testsuite/:
	* ld-m68k/got-1.s: New file.
	* ld-m68k/got-1.d: New dump test.
	* ld-m68k/m68k.exp: Run it.
2008-06-29 12:56:41 +00:00
Daniel Jacobowitz 7413f23fb4 * elf32-arm.c (STUB_ENTRY_NAME): Define.
(arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
	(arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
	R_ARM_ABS32.
	(struct elf32_arm_stub_hash_entry): Add output_name.
	(arm_build_one_stub): Move offsets into the offset argument
	of _bfd_final_link_relocate.  Correct offset for
	arm_thumb_arm_v4t_stub_long_branch.
	(elf32_arm_size_stubs): Set stub_entry->output_name.
	(elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
	Update all callers.
	(elf32_arm_output_stub_sym): New.
	(arm_map_one_stub): Correct formatting.  Use elf32_arm_output_stub_sym.

	* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
	ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
	ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
	ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
	ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
	ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
	ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm.d,
	ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
	ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
	ld-arm/thumb2-bl-as-thumb1-bad.d, ld-arm/thumb2-bl-bad.d: Update for
	stub symbols and stub corrections.
2008-06-25 14:28:48 +00:00
Alan Modra b129575789 update 2008-06-19 16:15:17 +00:00
Alan Modra 9f1a3ddfb4 * emultempl/spuelf.em (gld${EMULATION_NAME}_finish): Make "can not
build overlay stubs" a fatal error.
2008-06-19 16:14:53 +00:00
Ralf Wildenhues 7a283e077b * configure: Regenerate.
config/
	* override.m4: Use m4_version_prereq throughout.
	(_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git
	Autoconf: output pwd along with fatal errors, so the right
	config.log file is hinted at more prominently.
	(PARSE_ARGS): Push setting of ac_pwd in this diversion.
	(_GCC_AUTOCONF_VERSION): New, define to 2.59 if not defined.
	(_GCC_AUTOCONF_VERSION_CHECK): New macro, require use of Autoconf
	version _GCC_AUTOCONF_VERSION throughout the tree.
	(m4_wrap): New override, fix for Posix semantics of m4wrap.

binutils/
	* configure: Regenerate.

opcodes/
	* configure: Regenerate.

bfd/
	* configure: Regenerate.

gas/
	* configure: Regenerate.

gprof/
	* configure: Regenerate.

ld/
	* config.in: Regenerate.
	* configure: Regenerate.
2008-06-17 23:14:44 +00:00
Alan Modra 99302af9a2 bfd/
* elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
	(spu_elf_check_vma): Add extra_stack_space param, copy to htab.
	(spu_elf_auto_overlay): Use it.
	(RECURSE_UNMARK): Define as 0.
	(unmark_overlay_section): Heed RECURSE_UNMARK.
	* elf32-spu.h (spu_elf_check_vma): Update prototype.
ld/
	* emultempl/spuelf.em (extra_stack_space): New variable.
	(gld${EMULATION_NAME}_finish): Pass it to spu_elf_check_vma.
	(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS,
	PARSE_AND_LIST_ARGS_CASES): Handle --extra-stack-space.
	* emultempl/spu_ovl.S: Mask interrupts during dma and update of
	overlay manager structures.
	* emultempl/spu_ovl.o: Regenerate.
2008-06-16 16:16:31 +00:00
Hans-Peter Nilsson 7a2de473a3 * ld.texinfo (@node MMIX): For the __.MMIX.start. prefix, only
mention it as being special for global symbols.
2008-06-16 15:10:13 +00:00
Hans-Peter Nilsson 465e2c43ad PR gas/6607
* ld-mmix/loc10.d, ld-mmix/loc10.s, ld-mmix/loc10m.d, ld-mmix/loc8.d,
	ld-mmix/loc8.s, ld-mmix/loc8m.d, ld-mmix/loc9.d, ld-mmix/loc9.s,
	ld-mmix/loc9m.d: New tests.
2008-06-16 15:07:01 +00:00
Nick Clifton 5590fba953 * ldlang.c (print_output_section_statement): If the output section
statement has an update_dot_tree expression, apply it to
        print_dot.
        (print_input_section): Do not update print_dot if it would move
        print_dot backwards.
        (lang_do_assignments_1): If the output section statement has an
        update_dot_tree expression apply it to dot.

  * ld-scripts/overlay-size.t (end_of_bss_overlays): Define.
  (end_of_text_overlays): Define.
  (end_of_data_overlays): Define.
  * ld-scripts/overlay-size-map.d: Add expected values for
  end_of_bss_overlays, end_of_text_overlays and
  end_of_data_overlays.
2008-06-12 11:27:38 +00:00
Kaz Kojima 27a1ada688 * ld-sh/arch/arch_expected.txt: Regenerate. 2008-06-09 22:22:05 +00:00
Daniel Jacobowitz 817a14a335 * ld-arm/mixed-lib.d: Loosen pattern. 2008-06-09 14:55:04 +00:00
Daniel Jacobowitz f4ac848464 2008-06-03 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (arm_stub_is_thumb): Define.
	(elf32_arm_final_link_relocate): Handle near mode switching stubs.

	ld/testsuite/
	* ld-arm/farcall-thumb-thumb-m.d: Fix branch type.
	* ld-arm/farcall-thumb-arm.d: Likewise.
2008-06-09 14:53:13 +00:00
Alan Modra 967928e916 * NEWS: Mention archive:path patterns.
* ld.texinfo: Likewise.
	* ldlang.c: Formatting throughout.
	(archive_path): Only assume "[A-Za-z]:" is a dos drive.
	(input_statement_is_archive_path): New function, extracted from..
	(walk_wild): ..here.
	(walk_wild_consider_section): Match archive:path here too.
	(init_map_userdata, sort_def_symbol): Convert to ISO C.
	* ldmain.c (main): Set link_info.path_separator.
	* emultempl/spuelf.em (choose_target): Don't set it here.
2008-06-07 11:35:46 +00:00
Alan Modra 97407faf3d include/
* bfdlink.h (struct bfd_link_info): Add "path_separator".
bfd/
	* elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
	file names be unique.  Specify archive:path in overlay script.
ld/
	* ldlang.c (name_match): New function.
	(unique_section_p, walk_wild_consider_section): Use it here.
	(walk_wild_section_general): And here.
	(archive_path): New function.
	(walk_wild): Match archive:path filespecs.
	(open_input_bfds): Don't load archive:path files.
	* emultempl/spuelf.em (choose_target): Set path_separator.
	* emulparams/elf32_spu.sh: Add ._ea.* sections to ._ea output.
2008-06-06 06:02:00 +00:00
Nick Clifton a61ca861bc * ld.texinfo (Orphan Sections): Fix texi typo. 2008-06-04 10:07:22 +00:00
Nick Clifton 0fe58ccd2b * lexsup.c (option_values): Add OPTION_NO_WARN_FATAL.
(ld_options): Add entry for --no-fatal-warnings.
        (parse_args): Handle OPTION_NO_WARN_FATAL.
        * ld.texinfo (Options): Document new command line switch.
2008-06-04 09:45:05 +00:00
Alan Modra d77ec87195 * emultempl/spuelf.em (spu_elf_relink): Correct --no-auto-overlay arg. 2008-06-04 07:08:01 +00:00
Nick Clifton 476d8a222c * ldlang.c (closest_target_match): Skip generic big and little
endian ELF targets.

(The patch itself was actually checked in by mistake with a previous delta)
2008-06-02 06:49:58 +00:00
Nick Clifton de7dd2bdee PR ld/6430
* testsuite/ld-elfcomm/elfcomm.exp (test_sort_common): Test the
            ascending/descending argument to the --sort-common command line
            option.
            * testsuite/ld-elfcomm/sort-common.s: New file.
            * ld.h (enum sort_order): New.
            * ldlang.c (lang_check: Fix comment.
            (lang_common): Sort commons in ascending or descending order.
            (lang_one_common): Likewise.
            * lexsup.c (ld_options): Have --sort-common take an option
            argument.
            (parse_args): Handle argument to --sort-common.
            * ld.texinfo (--sort-common): Document new optional argument.
            * NEWS: Mention new feature.
2008-05-31 16:35:56 +00:00
Nick Clifton c7eb6be45e Ooops, omitted from previous delta 2008-05-31 16:04:57 +00:00
Nick Clifton 1a51c1a48d ld/testsuite/
* ld-arm/arm-elf.exp: Skip farcalls tests for non-ARM-EABI
        targets.
        * ld-arm/thumb2-bl-as-thumb1-bad-noeabi.d: New file.
        * ld-arm/thumb2-bl-bad-noeabi.d: Likewise.

        ld/
        * ld.texinfo: State that farcalls stubs are supported for ARM-EABI
        only.
2008-05-28 15:38:36 +00:00
Kai Tietz 6ca0987add 2008-05-27 Kai Tietz <kai.tietz@onevision.com>
* pe-dll.c (fill_edata): Make sure we calculate vma's in
        type bfd_vma.
        (generate_reloc): Likewise.
        (pe_implied_import_dll): Likewise.
2008-05-27 08:34:26 +00:00
Nick Clifton 133d72e995 Add more farcall tests 2008-05-23 14:16:16 +00:00
Nick Clifton da5938a216 bfd/
* elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
        (elf32_arm_stub_add_mapping_symbol): Remove.
        (elf32_arm_add_stub): Don't generate mapping symbols. Change
        prototype.
        (elf32_arm_size_stubs): Use new elf32_arm_add_stub
        prototype. Don't generate thumb to arm glue for calls.
        (arm_map_one_stub): Define.
        (elf32_arm_output_arch_local_syms): Generate mapping symbols for
        long calls stubs.

        ld/testsuite/
        * ld-arm/farcall-arm-arm.s: Force function type on 'bar'.
        * ld-arm/farcall-thumb-arm.s: Likewise.
        * ld-arm/farcall-thumb-arm-blx.d: Fix encoding.
        * ld-arm/farcall-thumb-arm.d: Likewise.
        * ld-arm/farcall-thumb-arm-blx-pic-veneer.d: Likewise.
        * ld-arm/arm-elf.exp (armelftests): Add farcall-mix, farcall-mix2,
        farcall-group-default, farcall-group-size2, farcall-section Ignore
        gas warnings in farcall-thumb-arm, farcall-thumb-arm-blx,
        farcall-thumb-arm-blx-pic-veneer.
2008-05-23 13:53:27 +00:00
Nick Clifton 45f111cc65 PR ld/6519
* ld.texinfo (Orphan Sections): Mention that the linker will
        provide start and stop symbols for orphaned sections if their
        names are valid C identifiers.
        * NEWS: Add an addendum to the description of the linker feature
        for providing orphan section start and end symbols.
2008-05-21 12:16:22 +00:00
Nick Clifton 7fb9f789e3 Multi-GOT support for m68k.
bfd/

        * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
        glist): New fields.
        (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
        struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
        struct elf_m68k_multi_got): New data structures.
        (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
        allow_multigot_p, multi_got_): New fields.
        (elf_m68k_multi_got): New macro.
        (elf_m68k_link_hash_newfunc): Initialize new fields of
        struct elf_m68k_link_hash_entry.
        (elf_m68k_link_hash_table_create): Initialize new fields of
        struct elf_m68k_link_hash_table.
        (elf_m68k_link_hash_table_free): New static function implementing hook.
        (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
        static functions for struct elf_m68k_got.
        (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
        elf_m68k_got_entry_eq): New static functions for
        struct elf_m68k_got_entry.
        (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
        ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
        (enum elf_m68k_get_entry_howto): New enum.
        (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
        elf_m68k_remove_got_entry_type): New static functions for
        struct elf_m68k_got_entry.
        (elf_m68k_add_entry_to_got): New static function.
        (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
        elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
        functions for struct elf_m68k_bfd2got_entry.
        (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
        elf_m68k_can_merge_gots): New traversal.
        (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
        elf_m68k_merge_gots): Ditto.
        (struct elf_m68k_finalize_got_offsets_arg,
        elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
        (struct elf_m68k_partition_multi_got_arg,
        elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
        elf_m68k_partition_multi_got): Ditto.
        (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
        functions.
        (elf_m68k_copy_indirect_symbol): New static function implementing
        a hook.
        (elf_m68k_check_relocs): Update to add entries to multi-GOT.
        (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
        (elf_m68k_always_size_sections): Assign BFDs to GOTs.
        (elf_m68k_relocate_section): Update to properly handle GOT relocations.
        (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
        of a global symbol.
        (bfd_elf_m68k_set_target_options): New function.
        (bfd_elf32_bfd_link_hash_table_free): Define hook.
        (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
        to skip generic calculation of GOT offsets.
        (elf_backend_copy_indirect_symbol): Define hook.

        * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
        * bfd-in2.h: Regenerate.

        ld/

        * configure.in (--enable-got): New option.  Handle it.
        * configure: Regenerate.
        * config.in: Regenerate.

        * emultempl/m68kelf.em: (got_handling_target_default): New shell
        variable.
        (GOT_HANDLING_TARGET_DEFAULT): New macro.
        (GOT_HANDLING_DEFAULT): New macro.  Initialize it from configure
        option if one was given.
        (got_handling): New static variable.
        (elf_m68k_create_output_section_statements): New static function
        implementing hook.
        (PARSE_AND_LIST_PROLOGUE): Define shell variable.
        (OPTION_GOT): New macro.
        (PARSE_AND_LIST_LONGOPTS): Define shell variable.  Specify
        --got option.
        (got): New linker option.
        (PARSE_AND_LIST_OPTIONS): Define shell variable.  Print help string
        for --got option.
        (PARSE_AND_LIST_ARGS_CASES): Define shell variable.  Handle --got
        option.

        * ld.texinfo: Document --got=<type> option.
        * gen-doc.texi: Add M68K.
        * NEWS: Mention the new feature.

        ld/testsuite/

        * ld-m68k/got-12.s: New file.
        * ld-m68k/got-13.s: New file.
        * ld-m68k/got-14.s: New file.
        * ld-m68k/got-15.s: New file.
        * ld-m68k/got-34.s: New file.
        * ld-m68k/got-35.s: New file.
        * ld-m68k/got-single-12-ok.d: New dump test.
        * ld-m68k/got-single-13-er.d: New dump test.
        * ld-m68k/got-negative-14-ok.d: New dump test.
        * ld-m68k/got-negative-15-er.d: New dump test.
        * ld-m68k/got-negative-12-13-14-34-ok.d: New dump test.
        * ld-m68k/got-negative-12-13-14-35-er.d: New dump test.
        * ld-m68k/got-multigot-14-ok.d: New dump test.
        * ld-m68k/got-multigot-15-er.d: New dump test.
        * ld-m68k/got-multigot-12-13-14-34-35-ok.d: New dump test.
        * ld-m68k/xgot-15.s: New source.
        * ld-m68k/got-xgot-15-ok.d: New test.
        * ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: New test.
        * ld-m68k/m68k.exp: Run new tests.
2008-05-21 12:01:37 +00:00
Nick Clifton 41911f6852 PR ld/6430
* ld.texinfo (--sort-common): Correct documentation to indicate
   that sorting is performed by alignment, not size, biggest
   alignment first.
2008-05-21 10:59:12 +00:00
Nick Clifton 726150b77a * ld.texinfo (ARM): Document --stub-group-size=N option.
Move description of --pic-veneer option into the ARM section.
        * NEWS: Mention the support for long function calls.
2008-05-21 08:09:38 +00:00
Nick Clifton 906e58cab5 bfd/
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
        (THM2_MAX_BWD_BRANCH_OFFSET): Define.
        (ARM_MAX_FWD_BRANCH_OFFSET): Define.
        (ARM_MAX_BWD_BRANCH_OFFSET): Define.
        (THM_MAX_FWD_BRANCH_OFFSET): Define.
        (THM_MAX_BWD_BRANCH_OFFSET): Define.
        (arm_long_branch_stub): Define.
        (arm_pic_long_branch_stub): Define.
        (arm_thumb_v4t_long_branch_stub): Define.
        (arm_thumb_thumb_long_branch_stub): Define.
        (arm_thumb_arm_v4t_long_branch_stub): Define.
        (STUB_SUFFIX): Define.
        (elf32_arm_stub_type): Define.
        (elf32_arm_stub_hash_entry): Define.
        (elf32_arm_link_hash_entry): Add stub_cache field.
        (arm_stub_hash_lookup): Define.
        (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
        add_stub_section, layout_sections_again, stub_group, bfd_count,
        top_index, input_list fields.
        (elf32_arm_link_hash_newfunc): Init new field.
        (stub_hash_newfunc): New function.
        (elf32_arm_link_hash_table_create): Init stub_hash_table.
        (elf32_arm_hash_table_free): New function.
        (arm_type_of_stub): New function.
        (elf32_arm_stub_name): New function.
        (elf32_arm_get_stub_entry): New function.
        (elf32_arm_stub_add_mapping_symbol): New function.
        (elf32_arm_add_stub): New function.
        (arm_build_one_stub): New function.
        (arm_size_one_stub): New function.
        (elf32_arm_setup_section_lists): New function.
        (elf32_arm_next_input_section): New function.
        (group_sections): New function.
        (elf32_arm_size_stubs): New function.
        (elf32_arm_build_stubs): New function.
        (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
        (bfd_elf32_arm_process_before_allocation): No longer handle
        R_ARM_CALL and R_ARM_THM_CALL.
        (using_thumb_only): New function.
        (elf32_arm_final_link_relocate): Redirect calls to stub if range
        exceeds encoding capabilities.
        (bfd_elf32_bfd_link_hash_table_free): Define.
        * bfd-in.h (R_ARM_max): Fix value to 130.
        (elf32_arm_setup_section_lists): Protype.
        (elf32_arm_next_input_section): Protype.
        (elf32_arm_size_stubs): Protype.
        (elf32_arm_build_stubs): Protype.

        ld/
        * emultempl/armelf.em (build_section_lists): New function.
        (stub_file): Define.
        (need_laying_out): Define.
        (group_size): Define.
        (hook_stub_info): Define.
        (hook_in_stub): New function.
        (elf32_arm_add_stub_section): New function.
        (gldarm_layout_sections_again): New function.
        (gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
        stubs for long calls if needed.
        (arm_elf_create_output_section_statements): create stub_file bfd.
        (arm_for_each_input_file_wrapper): New function.
        (arm_lang_for_each_input_file): New function.
        (lang_for_each_input_file): Define.
        (PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
        (PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
        (PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
        (PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
        (LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
        * ld/lang.c (print_input_statement): Skip if bfd has
        BFD_LINKER_CREATED.

        ld/testsuite
        * ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm,
        farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb,
        farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer,
        farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb,
        farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx,
        farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer,
        farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm,
        farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx,
        farcall-thumb-arm-blx-pic-veneer.
        Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad.
        * ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub
        generation.
        * ld-arm/thumb2-bl-bad.d: Likewise.
        * ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments.
        * ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-15 17:00:15 +00:00
Alan Modra 8944f3c277 update dependencies 2008-05-14 06:45:42 +00:00
Kai Tietz 0ead4f8d3f 2008-05-09 Kai Tietz <kai.tietz@onevision.com>
ld/PR6502
	* emultempl/pep.em (compute_dll_image_base): Use bfd_vma instead of long
	and change return type to bfd_vma.
	(definfo): Change type of address from long to bfd_vma.
	(set_pep_value): Replace strtoul to strtoull.
	(gld_${EMULATION_NAME}_set_symbols): use bfd_vma instead of long..
	* pe-dll.c (pe_dll_generate_def_file): Use fprintf_vma to print ImageBase.
	(quick_reloc): Change argument address from int to bfd_size_type.
2008-05-09 11:56:31 +00:00
Tom Tromey e7fc76dd0f * ld.texinfo (PowerPC64 ELF64): Fix typo. 2008-05-08 17:34:36 +00:00
Alan Modra 8374f9d4b5 bfd/
* elf32-spu.c (spu_elf_special_sections): Add "._ea".
	(spu_elf_relocate_section): Handle relocations against symbols
	defined in ._ea specially.
binutils/
	* embedspu.sh: Take note of R_SPU_PPU32/64 relocs without a symbol,
	and if present, put image in ".data.speelf".  Put program handle
	in ".data.spehandle".
ld/emulparams/
	* elf32_spu.sh (OTHER_SECTIONS): Add "._ea".
	* elf32ppc.sh: If building with spu support, put ".data.spehandle"
	sections at the start of ".data" and provide a symbol to locate
	the directory of embedded spe programs.
ld/testsuite/
	* ld-spu/ear.s: Align various sections.
	* ld-spu/embed.rd: Update.
2008-05-07 14:46:44 +00:00
Alan Modra 8c0848b509 * ldexp.c (exp_print_token): Add ABSOLUTE, MIN_K, ASSERT_K. Correct
MAX_K.
	(fold_binary <SEGMENT_START>): Set expld.result.section to
	current section.  Expand comment.  Formatting.
	(fold_name <DEFINED>): Set expld.result.section to current section.
2008-05-07 14:30:41 +00:00
Alan Modra b26238c07d missed from last commit 2008-05-07 04:52:35 +00:00
Alan Modra 6766b6945a PR 6473
* ld-elf/lma.s, ld-elf/lma.lnk: New test.
	* ld-elf/binutils.exp: Run it.
2008-05-05 01:43:55 +00:00
Mike Frysinger 9cbdce76ab 2008-05-03 Mike Frysinger <vapier@gentoo.org>
* ld-scripts/defined.s: Use .set syntax rather than =.
2008-05-03 06:19:19 +00:00
H.J. Lu e76b98d759 2008-05-02 H.J. Lu <hongjiu.lu@intel.com>
PR ld/6475
	* ld-scripts/rgn-over8-ok.d: Accept any alignment.
2008-05-02 15:11:49 +00:00
Daniel Jacobowitz 266b05cf76 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
(_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
	even if they are not loaded.
	* elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
	first.

	* ld-arm/symbian-seg1.s, ld-arm/symbian-seg1.d: New files.
	* ld-arm/arm-elf.exp: Run symbian-seg1.
2008-04-29 11:53:45 +00:00
Nathan Sidwell ed1831c09d * ld-scripts/rgn-over8.s: Tweak. 2008-04-28 14:08:15 +00:00
Nathan Sidwell a2cab75396 ld/
* ldlang.c (lang_size_sections_1): Don't check LMA overflow on
	non-load sections.
ld/testsuite/
	* ld-scripts/rgn-over.exp: Allow -ok file names to pass.
	* ld-scripts/rgn-over8.s: New.
	* ld-scripts/rgn-over8.t: New.
	* ld-scripts/rgn-over8-ok.d: New.
2008-04-28 12:45:34 +00:00
Mike Frysinger bec9537ec1 2008-04-25 Michael Frysinger <vapier@gentoo.org>
* configure.tgt (bfin-*-linux-uclibc*): Set targ_emul to elf32bfinfd
	and targ_extra_emuls to elf32bfin.
2008-04-26 01:10:55 +00:00
H.J. Lu 6194aaaba7 bfd/
2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

binutils/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gas/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gold/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gprof/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

ld/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.

opcodes/

2008-04-23  Paolo Bonzini  <bonzini@gnu.org>

	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2008-04-23 16:11:47 +00:00
Nathan Sidwell 131eb6b75e bfd/
* elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
	set the value of undefined symbols in shared objects.
	(_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
	undefined symbols unless pointer equality is needed.
ld/testsuite/
	* ld-vxworks/plt-mips1.s: New.
	* ld-vxworks/plt-mips1.d: New.
2008-04-21 17:54:25 +00:00
Kai Tietz da6fa31a22 [patch]: ctor/dtor section must start at alignment of 8 for x86_64-pc-mingw32.
* scripttempl/pep.sc: Align start of symbol __CTOR_LIST__.
2008-04-18 09:06:22 +00:00