aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2011-03-04Report plugin symbols for --verbose=N.H.J. Lu5-13/+46
2011-03-04 H.J. Lu <hongjiu.lu@intel.com> * ld.texinfo: Document --verbose[=NUMBER]. * lexsup.c (ld_options): Update --verbose. (parse_args): Set report_plugin_symbols. * plugin.c (report_plugin_symbols): New. (get_symbols): Report plugin symbols if report_plugin_symbols is TRUE. * plugin.h (report_plugin_symbols): New.
2011-03-03Supprt TLS x32 IE->LE transition.H.J. Lu4-0/+44
bfd/ 2011-03-03 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS x32 IE->LE transition. (elf_x86_64_relocate_section): Likewise. ld/testsuite/ 2011-03-03 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsie4.dd: New. * ld-x86-64/tlsie4.s: Likewise. * ld-x86-64/x86-64.exp (x86_64tests): Add tlsie4.
2011-03-01Don't use filename_cmp in plugin test DSO.H.J. Lu2-2/+7
2011-03-01 H.J. Lu <hongjiu.lu@intel.com> PR ld/12529 * testplug.c: Don't include "filenames.h". (onclaim_file): Don't use filename_cmp.
2011-02-282011-02-28 Kai Tietz <kai.tietz@onevision.com>Kai Tietz10-39/+70
* emultempl/beos.em (sort_by_file_name): Use filename_(n)cmp. * emultempl/elf32.em (gld${EMULATION_NAME}_vercheck): Likewise. (gld${EMULATION_NAME}_stat_needed): Likewise. (gld${EMULATION_NAME}_check_needed): Likewise. * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Likewise. (gld_${EMULATION_NAME}_unrecognized_file): Likewise. * emultempl/pep.em (gld_${EMULATION_NAME}_after_open): Likewise. (gld_${EMULATION_NAME}_unrecognized_file): Likewise. * ldfile.c (ldfile_open_file): Likewise. * ldlang.c (wild_sort): Likewise. (lookup_name): Likewise. (check_excluded_libs): Likewise. * ldmisc.c (vfinfo): Likewise. * pe-dll.c (libnamencmp): Likewise. (auto_export): Likewise. (pe_dll_generate_implib): Likewise. * testplug.c (onclaim_file): Likewise.
2011-02-26Add entry_symbol chain into non_ironly_hash.H.J. Lu2-2/+16
2011-02-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/12507 * plugin.c (get_symbols): Don't check entry symbol here. (init_non_ironly_hash): Add entry_symbol chain into non_ironly_hash.
2011-02-25Add a testcase for PR ld/12516.H.J. Lu4-0/+27
2011-02-25 H.J. Lu <hongjiu.lu@intel.com> PR ld/12516 * ld-elf/dynamic1.d: New. * ld-elf/dynamic1.ld: Likewise. * ld-elf/dynamic1.s: Likewise.
2011-02-25 PR gas/12519Alan Modra3-2/+7
* config/obj-elf.c (elf_frob_symbol): Properly handle size expression. * ld-mn10300/i135409-3.s: Correct .size label reference. * ld-sh/sh64/stolib.s: Likewise.
2011-02-24Don't mark entry symbol IR only.H.J. Lu2-2/+9
2011-02-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/12507 * plugin.c (get_symbols): Don't mark entry symbol IR only.
2011-02-23Don't include <exception_defines.h>H.J. Lu2-1/+4
2011-02-23 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/new.cc: Don't include <exception_defines.h>.
2011-02-18 PR ld/12376Dave Anglin2-0/+8
emulparams/hppalinux.sh (DATA_ADDR): Define. (SHLIB_DATA_ADDR): Likewise.
2011-02-16Change x32 LIBPATH_SUFFIX to x32.H.J. Lu2-1/+6
2011-02-16 H.J. Lu <hongjiu.lu@intel.com> * emulparams/elf32_x86_64.sh (LIBPATH_SUFFIX): Changed to x32 for x32.
2011-02-152011-02-15 Kai Tietz <kai.tietz@onevision.com>Kai Tietz2-2/+6
* pe-dll.c (process_def_file_and_drectve): Don't strip leading underscore from symbol by calling bfd_find_version_for_sym.
2011-02-14bfd/ld: handle ABI prefixes in version scriptsMike Frysinger2-5/+24
The default language in version scripts is supposed to be C, but no symbol demangling is performed on the symbols by default. This makes targets with a symbol prefix to fail with most version scripts out there. So strip away this prefix by default. This fixes many tests (real world and ld's testsuite) for Blackfin targets and doesn't seem to cause regressions for x86_64. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-14 * ldmain.c (remove_output): Rename to..Alan Modra4-16/+22
(ld_cleanup): ..this. Call bfd_cache_close_all and plugin_call_cleanup. (main): Adjust. * plugin.c (plugin_call_cleanup): Make global. (plugin_load_plugins): Don't register plugin_call_cleanup with xatexit. * plugin.h (plugin_call_cleanup): Declare.
2011-02-13Remove freebsd1 from libtool.m4 macros and config.rpath.Ralf Wildenhues2-14/+6
/: Import from Libtool and gnulib: 2011-01-27 Gerald Pfeifer <gerald@pfeifer.com> Prepare for supporting FreeBSD 10. * config.rpath: Remove handling of freebsd1* which soon would match FreeBSD 10.0. 2011-01-20 Gerald Pfeifer <gerald@pfeifer.com> (tiny change) Remove support for FreeBSD 1.x. * libtool.m4 (_LT_LINKER_SHLIBS) (_LT_SYS_DYNAMIC_LINKER): Remove handling of freebsd1* which soon would incorrectly match FreeBSD 10.0. bfd/: * configure: Regenerate. gas/: * configure: Regenerate. ld/: * configure: Regenerate. opcodes/: * configure: Regenerate. binutils/: * configure: Regenerate. gprof/: * configure: Regenerate.
2011-02-10remove accidental SANE_EXPR changeAlan Modra1-1/+0
2011-02-10 * scripttempl/armbpabi.sc: Revert 2010-11-02 H.J. Lu.Alan Modra23-304/+317
* scripttempl/avr.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf32msp430_3.sc: Likewise. * scripttempl/elf32sh-symbian.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfi370.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/mmo.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/elf.sc: Revert 2010-10-29 H.J. Lu.
2011-02-10 * ld-scripts/defined.exp: Don't run defined5 for AOUT.Alan Modra4-3/+9
* ld-scripts/defined5.s: Use .text for "defined" section. * ld-scripts/defined5.t: Adjust.
2011-02-10 * ld-gc/start.d: Exclude frv-*-linux*.Alan Modra3-1/+7
* ld-misc/defsym1.d: Likewise.
2011-02-09 * ld-elfvsb/elfvsb.exp: Don't run any non-PIC tests on powerpc*-linux.Alan Modra4-2/+28
* ld-gc/gc.exp: Ensure powerpc64 test continues to fail. * ld-srec/srec.exp: Don't edit toc on powerpc64.
2011-01-23 * ld-scripts/sane1.d, * ld-scripts/sane1.t: New test.Alan Modra4-0/+75
* ld-scripts/expr.exp: Run it.
2011-01-22Add AC_PROG_CXX.H.J. Lu5-7/+3834
2011-01-22 H.J. Lu <hongjiu.lu@intel.com> * Makefile.am (CXX): Removed. * configure.in: Add AC_PROG_CXX. * Makefile.in: Regenerated. * configure: Likewise.
2011-01-22bfd/Richard Sandiford2-0/+7
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore common sections too. ld/ * plugin.c (plugin_get_ir_dummy_bfd): Copy across the bfd's private data and GP size.
2011-01-21 * ldexp.c (fold_binary): Set result section for arithmetic andAlan Modra3-19/+61
logical operations to NULL when both operands are in same section. * ld.texinfo (Expression Section): Describe this.
2011-01-18Undo Solaris damages in elf64-x86-64.c.H.J. Lu2-2/+6
bfd/ 2011-01-18 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_backend_static_tls_alignment): Undefine after Solaris target. (elf_backend_want_plt_sym): Redefine to 0 after Solaris target. ld/testsuite/ 2011-01-18 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-4.d: Updated.
2011-01-17bfd/Richard Sandiford4-0/+28
* elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than h->needs_plt when deciding whether to record a possible dynamic reloc. ld/testsuite/ * ld-arm/arm-rel32.s, ld-arm/arm-rel32.d: New testcase. * ld-arm/arm-elf.exp: Run it.
2011-01-17bfd/Richard Sandiford5-0/+31
* elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered dynamic relocs for the removed section. ld/testsuite/ * ld-arm/gc-thumb-lib.s, ld-arm/gc-thumb.s, ld-arm/gc-thumb.d: New test. * ld-arm/arm-elf.exp: Run it.
2011-01-15Replace n32 with x32.H.J. Lu3-5/+7
2011-01-14Rename --n32 to --x32.H.J. Lu7-10/+19
gas/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * config/tc-i386.c (OPTION_N32): Renamed to ... (OPTION_X32): This. (md_longopts): Replace n32 with x32. (md_parse_option): Updated. (md_show_usage): Likewise. * doc/c-i386.texi: Replace n32 with x32. gas/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/ilp32/cfi/ilp32.exp: Replace --n32 with --x32. * gas/i386/ilp32/elf/ilp32.exp: Likewise. * gas/i386/ilp32/ilp32.exp: Likewise. * gas/i386/ilp32/lns/ilp32.exp: Likewise. ld/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-1.d: Replace --n32 with --x32. * ld-x86-64/ilp32-2.d: Likewise. * ld-x86-64/ilp32-3.d: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/ilp32-5.d: Likewise. * ld-x86-64/x86-64.exp: Likewise.
2011-01-14Handle R_X86_64_32 like R_X86_64_64 for ILP32.H.J. Lu4-0/+24
bfd/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type. (elf_x86_64_link_hash_table_create): Set pointer_r_type. (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8, R_X86_64_16, R_X86_64_32 and R_X86_64_32S. (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64 for ILP32. ld/testsuite/ 2011-01-14 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-5.d: New. * ld-x86-64/ilp32-5.s: Likewise. * ld-x86-64/x86-64.exp: Run ilp32-5.
2011-01-14 * ldmain.c (main): Flush stdout before and stderr after printingAlan Modra10-27/+31
message. * ldmisc.c (einfo): Similarly. * plugin.c (message): Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/xtensaelf.em: Likewise. * emulparams/elf32mcore.sh: Use einfo rather than printf. * emultempl/beos.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise.
2011-01-14Fix x86-64 ILP32 shared library.H.J. Lu3-0/+43
bfd/ 2011-01-13 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove swap_reloca_out. (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out. (elf_x86_64_check_relocs): Align relocation section to 4 byte for 32bit. (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with ELF_ST_TYPE. (elf_x86_64_finish_dynamic_symbol): Updated. (elf_x86_64_finish_dynamic_sections): Don't use Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor bfd_elf64_swap_dyn_out. ld/testsuite/ 2011-01-13 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/ilp32-4.d: New. * ld-x86-64/x86-64.exp: Run ilp32-4.
2011-01-14 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don'tAlan Modra2-13/+8
attempt to put non-alloc orphans before debug sections, just place them after .comment.
2011-01-14 PR ld/12339Alan Modra2-0/+8
* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
2011-01-14 * Makefile.am: Sort emulation rules.Alan Modra3-1032/+1057
(eelf32am33lin.c): Delete. (ALL_EMULATION_SOURCES): Sort, add missing entries. (ALL_64_EMULATION_SOURCES): Likewise. * Makefile.in: Regenerate.
2011-01-13Add a testcase for PR ld/12356.H.J. Lu5-0/+32
2011-01-13 H.J. Lu <hongjiu.lu@intel.com> PR ld/12356 * ld-scripts/defined.exp: Run defined5. * ld-scripts/defined5.d: New. * ld-scripts/defined5.s: Likewise. * ld-scripts/defined5.t: Likewise.
2011-01-13Add xfail and notarget.H.J. Lu3-0/+12
2011-01-13 H.J. Lu <hongjiu.lu@intel.com> * ld-scripts/defined4.d: Xfail rs6000-*-aix*. Skip mips*-*-* and mmix-*-*. * ld-scripts/expr2.d: Xfail rs6000-*-aix* and arm-*-*aout.
2011-01-13Update copyright dates.Alan Modra5-6/+6
2011-01-13 PR ld/12356Alan Modra10-26/+77
* ld.texinfo (Miscellaneous Commands): Describe LD_FEATURE. (Expression Section): Update. * ld.h (ld_config_type): Add sane_expr. * ldgram.y (ifile_p1): Add LD_FEATURE. * ldlex.l (LD_FEATYRE): New. * ldemul.c (after_parse_default): Delete code handling ld_compatibility. * ldexp.h (struct ldexp_control): Delete uses_defined. * ldexp.c: Remove all uses of uses_defined. (fold_name): Test config.sane_expr rather than ld_compatibility. (exp_fold_tree_1): Likewise. Adjust handling of assignments during first phase. * ldlang.h (ld_compatibility): Delete. (lang_ld_feature): Declare. * ldlang.c (ld_compatibility): Delete. (open_input_bfds): Only handle assignments for --defsym. (lang_ld_feature): New function.
2011-01-13 PR ld/12356Alan Modra12-57/+81
* ldexp.h (exp_assop): Delete. (exp_assign, exp_defsym): Declare. * ldexp.c (exp_assop): Make static, handle all assignment variations. (exp_assign, exp_defsym): New functions. (exp_provide): Use exp_assop. * ldgram.y (defsym_expr): Use exp_defsym. * ldctor.c, * ldgram.y, * ldlang.c, * mri.c, * emultempl/beos.em, * emultempl/pe.em, * emultempl/pep.em, * emultempl/spuelf.em, * emultempl/xtensaelf.em: Update exp_assop -> exp_assign.
2011-01-12 PR ld/12380Alan Modra4-38/+69
* ldexp.h (enum phase_enum): Comment. Add exp_dataseg_done. * ldexp.c (fold_unary <DATA_SEGMENT_END>): Rearrange code. Test for exp_dataseg_done rather than expld.phase == lang_final_phase_enum to detect when we've finished sizing sections. (fold_binary <DATA_SEGMENT_ALIGN>): Likewise. (fold_binary <DATA_SEGMENT_RELRO_END>): Likewise. Also test that we are not inside an output section statement. * ldlang.c (lang_size_sections): Set exp_dataseg_done on exit if not exp_dataseg_relro_adjust or exp_dataseg_adjust. Don't set lang_final_phase_enum here. (lang_process): Set lang_final_phase_enum here.
2011-01-10Remove the extra `.'.H.J. Lu1-1/+1
2011-01-10Add a test for linker ASSERT.H.J. Lu4-0/+13
2011-01-10 H.J. Lu <hongjiu.lu@intel.com> * ld-scripts/assert.exp: Run assert2. * ld-scripts/assert2.d: New. * ld-scripts/assert2.t: Likewise.
2011-01-10 * po/da.po: Updated Danish translation.Nick Clifton2-515/+1196
2011-01-10Remove startup_file from ldlang.c.H.J. Lu2-4/+6
2011-01-10 H.J. Lu <hongjiu.lu@intel.com> * ldlang.c (startup_file): Removed. (lang_startup): Updated.
2011-01-10 bfd/Nathan Sidwell37-0/+2157
* reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL, BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ, BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New relocations. * libbfd.h: Rebuilt. * bfd-in2.h: Rebuilt. * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations. (elf32_arm_reloc_map): Likewise. (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates. (elf32_arm_stub_long_branch_any_tls_pic, elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates. (DEF_STUBS): Add new stubs. (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field. (elf32_arm_local_tlsdesc_gotent): New. (GOT_TLS_GDESC): New mask. (GOT_TLS_GD_ANY): Define. (struct elf32_arm_link_hash_entry): Add tlsdesc_got field. (elf32_arm_compute_jump_table_size): New. (struct elf32_arm_link_hash_table): Add next_tls_desc_index, num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline, sgotplt_jump_table_size fields. (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field. (elf32_arm_link_hash_table_create): Initialize new fields. (arm_type_of_stub): Check TLS desc relocs too. (elf32_arm_stub_name): TLS desc relocs can be shared. (elf32_arm_tls_transition): Determine relaxation. (arm_stub_required_alignment): Add tls stubs. (elf32_arm_size_stubs): Likewise. (elf32_arm_tls_relax): Perform TLS relaxing. (elf32_arm_final_link_relocate): Process TLS DESC relocations. (IS_ARM_TLS_GNU_RELOC): New. (IS_ARM_TLS_RELOC): Use it. (elf32_arm_relocate_section): Perform TLS relaxing. (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls desc relocations. (allocate_dynrelocs): Allocate tls desc relcoations. (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping symbols. (elf32_arm_size_dynamic_sections): Allocate tls trampolines and got slots. (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE symbol. (elf32_arm_finish_dynamic_symbol): Adjust. (arm_put_trampoline): New. (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls trampolines. (elf_backend_always_size_sections): Define. include/elf/ * arm.h (R_ARM_TLS_DESC, R_ARM_TLS_GOTDESC, R_ARM_TLS_CALL, R_ARM_TLS_DESCSEQ, T_ARM_THM_TLS_CALL, R_ARM_THM_TLS_DESCSEQ): New relocations. gas/ * doc/c-arm.texi: Document TLSDESC and TLSCALL relocations, and .tlsdescseq directive. * config/tc-arm.c (arm_typed_reg_parse): Check for potential reloc following a symbol. (s_arm_tls_descseq): New directive. (md_pseudo_table): Add it. (encode_branch): Allow TLS_CALL relocs too. (do_t_blx, do_t_branch23): Use encode_branch. (reloc_names): Add tlsdesc and tlscall. (md_apply_fix): Process tls desc relocations. (tc_gen_reloc): Likewise. (arm_fix_adjustable): Likewise. gas/testsuite/ * gas/arm/tls.s: Add tlsdesc tests. * gas/arm/tls.d: Adjust. ld/testsuite/ * ld-arm/arm-elf.exp: Added tests for new TLS handling relocations. * ld-arm/tls-descrelax-be32.d: New. * ld-arm/tls-descrelax-be32.s: New. * ld-arm/tls-descrelax-be8.d: New. * ld-arm/tls-descrelax-be8.s: New. * ld-arm/tls-descrelax-v7.d: New. * ld-arm/tls-descrelax-v7.s: New. * ld-arm/tls-descrelax.d: New. * ld-arm/tls-descrelax.s: New. * ld-arm/tls-descseq.d: New. * ld-arm/tls-descseq.r: New. * ld-arm/tls-descseq.s: New. * ld-arm/tls-gdesc-got.d: New. * ld-arm/tls-gdesc-got.s: New. * ld-arm/tls-gdesc-nlazy.g: New. * ld-arm/tls-gdesc-nlazy.s: New. * ld-arm/tls-gdesc.d: New. * ld-arm/tls-gdesc.r: New. * ld-arm/tls-gdesc.s: New. * ld-arm/tls-gdierelax.d: New. * ld-arm/tls-gdierelax.s: New. * ld-arm/tls-gdierelax2.d: New. * ld-arm/tls-gdierelax2.s: New. * ld-arm/tls-gdlerelax.d: New. * ld-arm/tls-gdlerelax.s: New. * ld-arm/tls-lib-loc.d: New. * ld-arm/tls-lib-loc.r: New. * ld-arm/tls-lib-loc.s: New. * ld-arm/tls-longplt-lib.d: New. * ld-arm/tls-longplt-lib.s: New. * ld-arm/tls-longplt.d: New. * ld-arm/tls-longplt.s: New. * ld-arm/tls-mixed.r: New. * ld-arm/tls-mixed.s: New. * ld-arm/tls-thumb1.d: New. * ld-arm/tls-thumb1.s: New. * ld-arm/arm-elf.exp: New.
2011-01-08 * ld-misc/defsym1.d: Add a -e linker command line option.Nick Clifton3-2/+7
* ld-misc/dummy.s: Remove text.
2011-01-08correct PR citation in previous deltaNick Clifton1-2/+2
2011-01-08 PR ld/13258Nick Clifton3-2/+9
PR ld/13259 * ld-elf/textaddr2.d: Fix regexp to work with hppa64 targets. * ld-elf/textaddr6.d: Fix regexp to work with hppa64 targets.
2011-01-06Correct year.H.J. Lu1-1/+1