aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2011-03-12Support TLS x32 GD->IE, GD->LE and LD->LE transitions.H.J. Lu12-0/+139
bfd/ 2011-03-12 H.J. Lu <hongjiu.lu@intel.com> * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS x32 GD->IE and GD->LE transitions. (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE and LD->LE transitions. ld/testsuite/ 2011-03-12 H.J. Lu <hongjiu.lu@intel.com> * ld-x86-64/tlsgd4.dd: New. * ld-x86-64/tlsgd4.s: Likewise. * ld-x86-64/tlsgd5.dd: Likewise. * ld-x86-64/tlsgd5a.s: Likewise. * ld-x86-64/tlsgd5b.s: Likewise. * ld-x86-64/tlsgd6.dd: Likewise. * ld-x86-64/tlsgd6a.s: Likewise. * ld-x86-64/tlsgd6b.s: Likewise. * ld-x86-64/tlsld2.dd: Likewise. * ld-x86-64/tlsld2.s: Likewise. * ld-x86-64/x86-64.exp (x86_64tests): Add tlsgd4, libtlsgd5.so, tlsgd5, libtlsgd6.so, tlsgd6 and tlsld2.
2011-03-10[PATCH] Respect symbol wrappers when computing symbol resolutions.Dave Korn2-3/+10
ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * plugin.c (get_symbols): Use wrapped lookup for undefined symbols.
2011-03-10[PATCH] Fix issue from GCC PR47527: no ELF flags, EABI attribs, etc. in ↵Dave Korn2-0/+9
dummy IR BFD. ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * ldlang.c (lang_check): Don't run checks on dummy IR BFDs.
2011-03-10[PATCH] Revise linker plugin API to better preserve link order.Dave Korn4-9/+140
ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * ldlang.h (lang_input_statement_type): Add new 'claim_archive' flag, wrapping both it and 'claim' flag in #ifdef ENABLE_PLUGINS. * ldmain.c (add_archive_element): Set it if the member is claimed. * ldlang.c (new_afile): Initialise claim_archive and claimed members. (find_replacements_insert_point): New helper function. (lang_process): After adding and opening replacement files passed from plugin, splice them into correct place in statement list and file chains to preserve critical link order. (lang_list_insert_after): New helper function. (lang_list_remove_tail): Likewise.
2011-03-10[PATCH] Do not use dummy bfd suffix for recognition, make it human-readable ↵Dave Korn2-14/+18
instead. ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * plugin.c (IRONLY_SUFFIX): Revise to nicely human-readable form. (IRONLY_SUFFIX_LEN): Delete. (plugin_get_ir_dummy_bfd): Don't append IRONLY_SUFFIX. (is_ir_dummy_bfd): Don't look for suffix; check claimed flag of enclosing lang input statement instead.
2011-03-10[PATCH] Fix PE-COFF bug in orphan section alignment handling.Dave Korn3-2/+23
ld/ChangeLog: 2011-03-10 Dave Korn <dave.korn.cygwin@gmail.com> * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Preserve alignment of input sections when creating orphan output sections during relocatable link. * emultempl/pep.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
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