aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
2013-11-27[ld/testsuite/]Kyrylo Tkachov3-5/+10
2013-11-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * ld-plugin/lto.exp: Add -ffat-lto-objects. * lib/ld-lib.exp (check_lto_available): Likewise.
2013-11-27binutils/testsuite/Richard Sandiford2-2/+9
2013-11-27 Matthew Fortune <matthew.fortune@imgtec.com> * binutils-all/objcopy.exp: Consider mips-mti-elf the same as mips-sde-elf * binutils-all/readelf.exp: Likewise gas/testsuite/ 2013-11-27 Matthew Fortune <matthew.fortune@imgtec.com> * gas/mips/mips.exp: Consider mips-mti-elf the same as mips-sde-elf ld/testsuite/ 2013-11-27 Matthew Fortune <matthew.fortune@imgtec.com> * ld-mips-elf/mips-elf.exp: Consider mips-mti-elf the same as mips-sde-elf
2013-11-26Fix a typoH.J. Lu1-1/+1
2013-11-26Add HOSTING_SLIBS and use it for -pieH.J. Lu9-5/+34
ld/ PR ld/16259 * Makefile.am (HOSTING_SLIBS): New. * configure.host (HOSTING_SLIBS): New. Used for PIE. * configure.in (HOSTING_SLIBS): New AC_SUBST. * Makefile.in: Regenerated. * configure: Likewise. ld/testsuite/ PR ld/16259 * config/default.exp (get_target_emul): Also set HOSTING_SLIBS. * lib/ld-lib.exp (default_ld_link): Use HOSTING_SLIBS for -pie.
2013-11-26bfd/elfnn-aarch64.c: Handle static links with ifunc correctly.Will Newton4-0/+32
The code for handling GOT references to ifunc symbols in static links was missing. bfd/ChangeLog: 2013-11-26 Will Newton <will.newton@linaro.org> * elfnn-aarch64.c (elfNN_aarch64_finish_dynamic_symbol): Handle STT_GNU_IFUNC symbols correctly in static links. ld/testsuite/ChangeLog: 2013-11-26 Will Newton <will.newton@linaro.org> * ld-aarch64/aarch64-elf.exp: Add ifunc-22. * ld-aarch64/ifunc-22.d: New file. * ld-aarch64/ifunc-22.s: Likewise.
2013-11-26bfd/elfnn-aarch64.c: Fix miscalculation of GOTPLT offset for ifunc syms.Will Newton4-0/+51
The .got.plt header size was not being correctly taken into account when calculating the offset for relocations against ifunc symbols. bfd/ChangeLog: 2013-11-26 Will Newton <will.newton@linaro.org> * elfnn-aarch64.c (elfNN_aarch64_final_link_relocate): Ensure PLT_INDEX is calculated using correct header size. ld/testsuite/ChangeLog: 2013-11-26 Will Newton <will.newton@linaro.org> * ld-aarch64/aarch64-elf.exp: Add ifunc-21 test. * ld-aarch64/ifunc-21.d: New file. * ld-aarch64/ifunc-21.s: Likewise.
2013-11-22 * windres.c (define_resource): Use zero for timestamp, makingCory Fields5-13/+41
output deterministic. time.h include is no longer needed. * resres.c (res_append_resource): Likewise. * pe-dll.c (fill_edata): Only use a real timestamp if --insert-timestamp was used. * emultempl/pe.em: Add the --insert-timestamp option. * emultempl/pep.em: Likewise for 64bit. * ld.texinfo: Document the --insert-timestamp option. * libcoff-in.h: Add insert_timestamp flag to the pe_data struct. * libcoff.h: Regenerate. * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Only use a real timestamp if --insert-timestamp was used.
2013-11-22 * scripttempl/avr.sc: Set .data section's LMA to next availableSenthil Kumar Selvaraj2-2/+7
address in text region.
2013-11-21ld/ChangeLog:Andrew Pinski7-3/+88
* Makefile.am (ALL_64_EMULATION_SOURCES): Add eaarch64linux32.c and eaarch64linux32b.c (eaarch64linux32.c): New target. (eaarch64linux32b.c): Likewise. * Makefile.in: Regenerate. * configure.tgt (aarch64_be-*-linux*): Add aarch64linux32 and aarch64linux32b to targ_extra_libpath. (aarch64-*-linux*): Likewise. * emulparams/aarch64elf32.sh (SEPARATE_GOTPLT): Change to 12 (3 words). * emulparams/aarch64linux32.sh: New file. * emulparams/aarch64linux32b.sh: New file.
2013-11-21ld/ChangeLog:Andrew Pinski2-2/+10
* configure.tgt (aarch64_be-*-linux*): Split out the linux targets into targ_extra_libpath. (aarch64-*-linux*): Likewise.
2013-11-21 PR ld/16192Nick Clifton2-3/+8
* pe-dll.c (pe_create_runtime_relocator_reference): Zero the newly allocated idata5 block.
2013-11-21Add bnd-branch-1 testusers/hjl/mpx/masterH.J. Lu4-0/+36
* ld-x86-64/mpx.exp: Run bnd-branch-1. * ld-x86-64/bnd-branch-1.d: New file. * ld-x86-64/bnd-branch-1.s: Likewise.
2013-11-20Add mpx1static, mpx2 and mpx2static testsH.J. Lu8-0/+62
* ld-x86-64/mpx.exp (build_tests): Add libmpx2a.a, libmpx2b.a and libmpx2c.a. (run_tests): Add mpx1static, mpx2 and mpx2static. * ld-x86-64/mpx2.out: Likewise. * ld-x86-64/mpx2a.c: Likewise. * ld-x86-64/mpx2a.rd: Likewise. * ld-x86-64/mpx2b.c: Likewise. * ld-x86-64/mpx2c.c: Likewise. * ld-x86-64/mpx2c.rd: Likewise.
2013-11-20 * scripttempl/elf32msp430.sc (.data): Set the based on the nextNick Clifton3-5/+14
free location in the text memory region, not a computation based upon the size of the text section. Orphaned sections or other linker scripts might insert new sections between the .text section and the .data section. * scripttempl/elf32msp430_3.sc (.data): Likewise.
2013-11-19Fix references to __ehdr_start when it cannot be definedRoland McGrath10-5/+86
ld/ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Don't use bfd_elf_record_link_assignment to mark __ehdr_start hidden. Instead, just do it directly here, and only if it was referenced but not defined. ld/testsuite/ * ld-elf/ehdr_start-userdef.t: New file. * ld-elf/ehdr_start-userdef.d: New file. * ld-elf/ehdr_start-strongref.s: New file. * ld-elf/ehdr_start-missing.t: New file. * ld-elf/ehdr_start-missing.d: New file. * ld-elf/ehdr_start-weak.d: New file. * ld-mips-elf/ehdr_start-2.nd: Expect __ehdr_start to be global.
2013-11-18Separate emulations for nios2-elf and nios2-linux.Chung-Lin Tang5-0/+34
2013-11-18 Chung-Lin Tang <cltang@codesourcery.com> * emulparams/nios2linux.sh: New emulation file. * configure.tgt: Add nios2*-*-linux* emulation case. * Makefile.am (enios2linux.c): New emulation entry. * Makefile.in: Regenerate.
2013-11-17Add R_X86_64_PC32_BND and R_X86_64_PLT32_BNDH.J. Lu8-0/+102
bfd/ * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND. (R_X86_64_standard): Replace R_X86_64_RELATIVE64 with R_X86_64_PLT32_BND. (IS_X86_64_PCREL_TYPE): Add R_X86_64_PLT32_BND. (x86_64_reloc_map): Add BFD_RELOC_X86_64_PC32_BND and BFD_RELOC_X86_64_PLT32_BND. (elf_x86_64_check_relocs): Handle R_X86_64_PC32_BND and R_X86_64_PLT32_BND. (elf_x86_64_gc_sweep_hook): Likewise. (elf_x86_64_relocate_section): Likewise. * reloc.c (bfd_reloc_code_real): Add BFD_RELOC_X86_64_PC32_BND and BFD_RELOC_X86_64_PLT32_BND. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. gas/ * config/tc-i386.c (reloc): Add an argument, bnd_prefix, to indicate if instruction has the BND prefix. Return BFD_RELOC_X86_64_PC32_BND instead of BFD_RELOC_32_PCREL if bnd_prefix isn't zero. (output_branch): Pass BFD_RELOC_X86_64_PC32_BND to frag_var if needed. (output_jump): Update reloc call. (output_interseg_jump): Likewise. (output_disp): Likewise. (output_imm): Likewise. (x86_cons_fix_new): Likewise. (lex_got): Add an argument, bnd_prefix, to indicate if instruction has the BND prefix. Use BFD_RELOC_X86_64_PLT32_BND if needed. (x86_cons): Update lex_got call. (i386_immediate): Likewise. (i386_displacement): Likewise. (md_apply_fix): Handle BFD_RELOC_X86_64_PC32_BND and BFD_RELOC_X86_64_PLT32_BND. (tc_gen_reloc): Likewise. * config/tc-i386-intel.c (i386_operator): Update lex_got call. gas/testsuite/ * gas/i386/i386.exp: Run x86-64-mpx-branch-1 and x86-64-mpx-branch-2 on 64-bit ELF targets. * gas/i386/x86-64-mpx-branch-1.d: New file. * gas/i386/x86-64-mpx-branch-1.s: Likewise. * gas/i386/x86-64-mpx-branch-2.d: Likewise. * gas/i386/x86-64-mpx-branch-2.s: Likewise. include/elf/ * x86-64.h: Add R_X86_64_PC32_BND and R_X86_64_PLT32_BND. ld/testsuite/ * ld-x86-64/mpx.exp: New file. * ld-x86-64/mpx1.out: Likewise. * ld-x86-64/mpx1a.c: Likewise. * ld-x86-64/mpx1a.rd: Likewise. * ld-x86-64/mpx1b.c: Likewise. * ld-x86-64/mpx1c.c: Likewise. * ld-x86-64/mpx1c.rd: Likewise.
2013-11-14ld/ARM: Fix script-type testsuite failure.Will Newton2-1/+4
Commit 34a79995c4cc34f6f41e2a4b2df477db31b31f0c changed how STT_FILE symbols were emitted but this testcase got missed in the cleanup. ld/testsuite/ChangeLog: 2013-11-14 Will Newton <will.newton@linaro.org> * ld-arm/script-type.sym: Remove redundant STT_FILE symbol.
2013-11-07Set CPU type in BFD backend for x86_64-nacl* and i?86-nacl* targetsRoland McGrath6-6/+15
bfd/ * archures.c (bfd_mach_i386_nacl): Fix definition so it doesn't collide with bfd_mach_l1om. * bfd-in2.h: Regenerate. * elf32-i386.c (elf32_i386_nacl_elf_object_p): New function. (elf_backend_object_p): Use that in elf32-i386-nacl definition. * elf64-x86-64.c (elf64_x86_64_nacl_elf_object_p): New function. (elf_backend_object_p): Use that in elf64-x86-64-nacl definition. (elf32_x86_64_nacl_elf_object_p): New function. (elf_backend_object_p): Use that in elf32-x86-64-nacl definition. binutils/ * objdump.c (dump_dwarf): Grok bfd_mach_x86_64_nacl and bfd_mach_x64_32_nacl as equivalent to bfd_mach_x86_64. ld/testsuite/ * ld-x86-64/x86-64.exp (mixed1, mixed2): Loosen error string match so it accepts "i386:nacl" in place of "i386". * ld-x86-64/ilp32-2.d: Likewise. * ld-x86-64/ilp32-3.d: Likewise. * ld-x86-64/lp64-2.d: Likewise. * ld-x86-64/lp64-3.d: Likewise.
2013-11-05Pass ignored unresolved relocations to ld backendH.J. Lu5-0/+59
bfd/ PR ld/4409 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add an argument for error ignored. * elf-m10200.c (mn10200_elf_relocate_section): Updated. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.c (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-bfin.c (bfinfdpic_relocate_section): Likewise. (bfin_relocate_section): Likewise. * elf32-cr16.c (elf32_cr16_relocate_section): Likewise. * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-crx.c (elf32_crx_relocate_section): Likewise. * elf32-d10v.c (elf32_d10v_relocate_section): Likewise. * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i386.c (elf_i386_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise. * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise. * elf32-lm32.c (lm32_elf_relocate_section): Likewise. * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-metag.c (elf_metag_relocate_section): Likewise. * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-mep.c (mep_elf_relocate_section): Likewise. * elf32-moxie.c (moxie_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-mt.c (mt_elf_relocate_section): Likewise. * elf32-nios2.c (nios2_elf32_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-rl78.c (rl78_elf_relocate_section): Likewise. * elf32-rx.c (rx_elf_relocate_section): Likewise. * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise. * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-ia64-vms.c (elf64_ia64_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise. * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise. * elfnn-aarch64.c (elfNN_aarch64_relocate_section): Likewise. * elfnn-ia64.c (elfNN_ia64_relocate_section): Skip if error from RELOC_FOR_GLOBAL_SYMBOL in executable is ignored. ld/testsuite/ PR ld/4409 * ld-ia64/error1.d: New file. * ld-ia64/error1.s: Likewise. * ld-ia64/error2.d: Likewise. * ld-ia64/error3.d: Likewise.
2013-11-04Edit ELFv2 global entry prologue to non-PICAlan Modra2-2/+6
Changing addis r2,r12,..; addi r2,r2,.. to lis r2,..; addi r2,r2.. in non-PIC executables has the benefit of removing a dependency on r12. bfd/ * elf64-ppc.c (ppc64_elf_relocate_section): Edit global entry prologue to non-PIC in non-PIC executables. ld/testsuite/ * ld-powerpc/elfv2exe.d: Adjust for non-PIC global entry.
2013-11-04Allow for extra st_other readelf output in ld testsuiteAlan Modra3-3/+10
On PowerPC64 ELFv2 readelf emits [<localentry>: 8] describing extra symbol st_other bits. * ld-elfvers/vers24.rd: Allow extra readelf output after symbol visibility. * ld-ifunc/ifunc.exp: Likewise.
2013-11-04ld crossref test fixAlan Modra2-2/+16
* ld-scripts/crossref.exp: Don't allow changes made to CFLAGS for this test to bleed into following tests. Don't set -mcall-aixdesc for powerpc64le.
2013-11-02Assorted x86 testsuite fixes.Alan Modra2-3/+7
I think HJ has already fixed the binutils and ld tests with his 2013-09-27 readelf change, but this allows them to pass with wider address output as per Nick's 2013-09-12 readelf change. binutils/testsuite/ * binutils-all/x86-64/compressed-1a.d: Allow wide display of addresses. gas/testsuite/ * gas/cfi/cfi-x86_64.d: Match when lacking end of section padding. ld/testsuite/ * ld-pe/cfi.d: Allow wide display of addresses.
2013-11-01x86_64-*-nacl*: Adjust test cases for PLT nop fix.Roland McGrath3-3/+8
ld/testsuite/ * ld-x86-64/plt-nacl.pd: Update expected disassembly for PLT nop fix. * ld-x86-64/tlsdesc-nacl.pd: Likewise.
2013-10-30Add PowerPC64 ELFv2 tests.Alan Modra5-0/+163
* ld-powerpc/elfv2.s, * ld-powerpc/elfv2so.d, * ld-powerpc/elfv2exe.d: New tests. * ld-powerpc/powerpc.exp: Run them.
2013-10-30Change plt stubs to have destination in r12.Alan Modra20-181/+229
This change is to support the new ELFv2 ABI, which uses the value in r12 on function entry to calculate the got/toc pointer. bfd/ * elf64-ppc.c (build_plt_stub): Switch stubs to use r11 as base reg and r12 as destination. (ppc_build_one_stub): Likewise. (ppc64_elf_build_stubs): Likewise for glink. ld/testsuite/ * ld-powerpc/tls.s: Add proper .opd entry for _start. * ld-powerpc/tlstoc.s: Likewise. * ld-powerpc/relbrlt.d: Update for changed stubs. * ld-powerpc/tls.d: Update for changed stubs and _start .opd entry. * ld-powerpc/tls.g: Likewise. * ld-powerpc/tlsexe.d: Likewise. * ld-powerpc/tlsexe.g: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexetoc.d: Likewise. * ld-powerpc/tlsexetoc.g: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso.d: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlstoc.d: Likewise. * ld-powerpc/tlstoc.g: Likewise. * ld-powerpc/tlstocso.d: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-powerpc/tlstocso.r: Likewise.
2013-10-29ld/ELF: refine fake STT_FILE symbol emissionJan Beulich26-25/+29
There's no real need to emit these always: They're needed only if we indeed want to emit a localized symbol. Hence defer emission until we at least did the basic early checks that would lead to no such symbol getting emitted. This in particular avoids emitting such a symbol in the majority of (if not all) "ld -r" cases. I hope my set of cross build tests caught all the test cases needing adjustment - please forgive if I missed a few. bfd/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * elflink.c (struct elf_outext_info): Add field file_sym_done. (bfd_elf_final_link): Initialize new field. Move fake STT_FILE symbol emission from here ... (elf_link_output_extsym): ... to here. gas/testsuite/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * gas/microblaze/relax_size.elf: Drop expectation of no longer present STT_FILE symbol. * gas/microblaze/relax_size2.elf: Likewise. ld/testsuite/ 2013-10-29 Jan Beulich <jbeulich@suse.com> * ld-cris/tls-e-tpoffcomm1.d: Drop expectation of no longer present STT_FILE symbol. * ld-mmix/bpo-18.d: Likewise. * ld-mmix/bpo-22.d: Likewise. * ld-mmix/greg-6.d: Likewise. * ld-mmix/greg-7.d: Likewise. * ld-mmix/loc4.d: Likewise. * ld-mmix/local1.d: Likewise. * ld-mmix/local3.d: Likewise. * ld-mmix/local5.d: Likewise. * ld-mmix/local7.d: Likewise. * ld-mmix/loct-1.d: Likewise. * ld-sh/sh64/abi32.xd: Likewise. * ld-sh/sh64/abi64.xd: Likewise. * ld-sh/sh64/cmpct1.xd: Likewise. * ld-sh/sh64/crange1.rd: Likewise. * ld-sh/sh64/crange2.rd: Likewise. * ld-sh/sh64/crange3-cmpct.rd: Likewise. * ld-sh/sh64/crange3-media.rd: Likewise. * ld-sh/sh64/crange3.rd: Likewise. * ld-sh/sh64/crangerel1.rd: Likewise. * ld-sh/sh64/crangerel2.rd: Likewise. * ld-sh/sh64/mix1.xd: Likewise. * ld-sh/sh64/mix2.xd: Likewise. * ld-sh/sh64/shdl32.xd: Likewise. * ld-sh/sh64/shdl64.xd: Likewise.
2013-10-18 * ld-cris/asneed1.d: New test.Hans-Peter Nilsson2-0/+29
2013-10-142013-10-14 Chao-ying Fu <Chao-ying.Fu@imgtec.com>Chao-ying Fu14-0/+94
* ld-mips-elf/attr-gnu-8-0.s, ld-mips-elf/attr-gnu-8-1.s, ld-mips-elf/attr-gnu-8-2.s, ld-mips-elf/attr-gnu-8-00.d, ld-mips-elf/attr-gnu-8-01.d, ld-mips-elf/attr-gnu-8-02.d, ld-mips-elf/attr-gnu-8-10.d, ld-mips-elf/attr-gnu-8-11.d, ld-mips-elf/attr-gnu-8-12.d, ld-mips-elf/attr-gnu-8-20.d, ld-mips-elf/attr-gnu-8-21.d, ld-mips-elf/attr-gnu-8-22.d: New. * ld-mips-elf/mips-elf.exp: Run new tests.
2013-10-14 * gen-aout.c (main): Fix formatting. Close file.Nick Clifton2-3/+8
* emultempl/aix.em (_read_file): Close file at end of function. * gas/all/itbl-test.c (main): Close fas. * read.c (add_include_dir): Use xrealloc. * config/tc-score.c (do_macro_bcmp): Initialise inst_main. * config/tc-tic6x.c (tic6x_parse_operand): Initialise second_reg. * readelf.c (decode_arm_unwind): Initialise addr structure. (process_symbol_table): Free lengths. * srcconv.c (wr_sc): Free info. * chew.c (perform): Free next.
2013-10-13ld/testsuite/Richard Sandiford33-1/+6287
* lib/ld-lib.exp (default_ld_compile): Add a -I option for the source directory. * ld-mips-elf/compressed-plt-1.ld, ld-mips-elf/compressed-plt-1.s, ld-mips-elf/compressed-plt-1-dyn.s, ld-mips-elf/compressed-plt-1a.s, ld-mips-elf/compressed-plt-1b.s, ld-mips-elf/compressed-plt-1c.s, ld-mips-elf/compressed-plt-1d.s, ld-mips-elf/compressed-plt-1e.s, ld-mips-elf/compressed-plt-1-o32-se.rd, ld-mips-elf/compressed-plt-1-o32-se.od, ld-mips-elf/compressed-plt-1-o32-mips16-only.rd, ld-mips-elf/compressed-plt-1-o32-mips16-only.od, ld-mips-elf/compressed-plt-1-o32-umips-only.rd, ld-mips-elf/compressed-plt-1-o32-umips-only.od, ld-mips-elf/compressed-plt-1-o32-mips16.rd, ld-mips-elf/compressed-plt-1-o32-mips16.od, ld-mips-elf/compressed-plt-1-o32-mips16-got.rd, ld-mips-elf/compressed-plt-1-o32-mips16-got.od, ld-mips-elf/compressed-plt-1-o32-mips16-word.rd, ld-mips-elf/compressed-plt-1-o32-mips16-word.od, ld-mips-elf/compressed-plt-1-o32-umips.rd, ld-mips-elf/compressed-plt-1-o32-umips.od, ld-mips-elf/compressed-plt-1-o32-umips-got.rd, ld-mips-elf/compressed-plt-1-o32-umips-got.od, ld-mips-elf/compressed-plt-1-o32-umips-word.rd, ld-mips-elf/compressed-plt-1-o32-umips-word.od, ld-mips-elf/compressed-plt-1-n32-mips16.rd, ld-mips-elf/compressed-plt-1-n32-mips16.od, ld-mips-elf/compressed-plt-1-n32-umips.rd, ld-mips-elf/compressed-plt-1-n32-umips.od: New tests. * ld-mips-elf/mips-elf.exp: Run them.
2013-10-13bfd/Richard Sandiford16-109/+206
* elfxx-mips.c (mips_use_local_got_p): New function. (mips_elf_count_got_symbols, mips_elf_calculate_relocation): Use it. (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for GOT and absolute references. ld/testsuite/ * ld-mips-elf/pic-and-nonpic-6-n32.ad, ld-mips-elf/pic-and-nonpic-6-n32.dd, ld-mips-elf/pic-and-nonpic-6-n32.gd, ld-mips-elf/pic-and-nonpic-6-n32.nd, ld-mips-elf/pic-and-nonpic-6-n32.rd, ld-mips-elf/pic-and-nonpic-6-n64.ad, ld-mips-elf/pic-and-nonpic-6-n64.dd, ld-mips-elf/pic-and-nonpic-6-n64.gd, ld-mips-elf/pic-and-nonpic-6-n64.nd, ld-mips-elf/pic-and-nonpic-6-n64.rd, ld-mips-elf/pic-and-nonpic-6-o32.ad, ld-mips-elf/pic-and-nonpic-6-o32.dd, ld-mips-elf/pic-and-nonpic-6-o32.gd, ld-mips-elf/pic-and-nonpic-6-o32.nd, ld-mips-elf/pic-and-nonpic-6-o32.rd: Fix symbol value of extf4. No longer expect extf3, extf4 and extd2 to be in the global GOT.
2013-10-10ld/Roland McGrath2-2/+7
* ldmisc.c (vfinfo): Use Boolean ? "" : ":" in place of ":" + Boolean. It silences some compilers' warnings and is much less bizarre to read.
2013-10-09ld/Roland McGrath3-9/+11
* emultempl/elf32.em (id_note_section_size): Use ATTRIBUTE_UNUSED rather than a dummy assignment for unused parameter. * plugin.c (get_input_file, release_input_file): Likewise.
2013-10-09 PR ld/16028Nick Clifton2-0/+6
* ldmain.c (add_keepsyms_file): Close file at end of function.
2013-10-03aarch64: Add support for GNU indirect functions.Will Newton75-1/+926
Add support for STT_GNU_IFUNC symbols to the AArch64 bfd backend. The tests are ported from the ld-ifunc tests but are enabled for cross builds so can be run easily without hardware or a simulator. bfd/ChangeLog: 2013-10-03 Will Newton <will.newton@linaro.org> * configure: Regenerate. * configure.in: Build elf-ifunc.o for AArch64. * elfnn-aarch64.c: Include objalloc.h. (elfNN_aarch64_local_htab_hash): New function. (elfNN_aarch64_local_htab_eq): New function. (elfNN_aarch64_get_local_sym_hash): New function. (elfNN_aarch64_link_hash_table_create): Initialize local STT_GNU_IFUNC symbol hash. (elfNN_aarch64_hash_table_free): Free local STT_GNU_IFUNC symbol hash. (elfNN_aarch64_final_link_relocate): Add sym argument. Add support for handling STT_GNU_IFUNC symbols. (elfNN_aarch64_gc_sweep_hook): Add support for garbage collecting references to STT_GNU_IFUNC symbols. (elfNN_aarch64_adjust_dynamic_symbol): Add support for handling STT_GNU_IFUNC symbols. (elfNN_aarch64_check_relocs): Add support for handling STT_GNU_IFUNC symbols. Ensure we don't increase plt.refcount from -1 to 0. (elfNN_aarch64_post_process_headers): Call _bfd_elf_set_osabi. (elfNN_aarch64_is_function_type): Remove function. (elfNN_aarch64_allocate_dynrelocs): Handle STT_GNU_IFUNC symbols. (elfNN_aarch64_allocate_ifunc_dynrelocs): New function. (elfNN_aarch64_allocate_local_dynrelocs): New function. (elfNN_aarch64_allocate_local_ifunc_dynrelocs): New function. (elfNN_aarch64_size_dynamic_sections): Call elfNN_aarch64_allocate_local_dynrelocs. (elfNN_aarch64_create_small_pltn_entry): Add info argument. Add support for creating .iplt entries for STT_GNU_IFUNC symbols. (elfNN_aarch64_finish_dynamic_symbol): Add support for handling STT_GNU_IFUNC symbols and .iplt. (elfNN_aarch64_finish_local_dynamic_symbol): New function. (elfNN_aarch64_finish_dynamic_sections): Call elfNN_aarch64_finish_local_dynamic_symbol. ld/ChangeLog: 2013-10-03 Will Newton <will.newton@linaro.org> * emulparams/aarch64elf.sh: Add IREL_IN_PLT. * emulparams/aarch64elf32.sh: Likewise. ld/testsuite/ChangeLog: 2013-10-03 Will Newton <will.newton@linaro.org> * ld-ifunc/ifunc.exp: Enable ifunc tests for AArch64. * ld-aarch64/aarch64-elf.exp: Run ifunc tests. * ld-aarch64/ifunc-1-local.d: New file. * ld-aarch64/ifunc-1-local.s: Likewise. * ld-aarch64/ifunc-1.d: Likewise. * ld-aarch64/ifunc-1.s: Likewise. * ld-aarch64/ifunc-10.d: Likewise. * ld-aarch64/ifunc-10.s: Likewise. * ld-aarch64/ifunc-11.d: Likewise. * ld-aarch64/ifunc-11.s: Likewise. * ld-aarch64/ifunc-12.d: Likewise. * ld-aarch64/ifunc-12.s: Likewise. * ld-aarch64/ifunc-13.d: Likewise. * ld-aarch64/ifunc-13a.s: Likewise. * ld-aarch64/ifunc-13b.s: Likewise. * ld-aarch64/ifunc-14a.d: Likewise. * ld-aarch64/ifunc-14a.s: Likewise. * ld-aarch64/ifunc-14b.d: Likewise. * ld-aarch64/ifunc-14b.s: Likewise. * ld-aarch64/ifunc-14c.d: Likewise. * ld-aarch64/ifunc-14c.s: Likewise. * ld-aarch64/ifunc-14d.d: Likewise. * ld-aarch64/ifunc-14e.d: Likewise. * ld-aarch64/ifunc-14f.d: Likewise. * ld-aarch64/ifunc-15.d: Likewise. * ld-aarch64/ifunc-15.s: Likewise. * ld-aarch64/ifunc-16.d: Likewise. * ld-aarch64/ifunc-16.s: Likewise. * ld-aarch64/ifunc-17a.d: Likewise. * ld-aarch64/ifunc-17a.s: Likewise. * ld-aarch64/ifunc-17b.d: Likewise. * ld-aarch64/ifunc-17b.s: Likewise. * ld-aarch64/ifunc-18a.d: Likewise. * ld-aarch64/ifunc-18a.s: Likewise. * ld-aarch64/ifunc-18b.d: Likewise. * ld-aarch64/ifunc-18b.s: Likewise. * ld-aarch64/ifunc-19a.d: Likewise. * ld-aarch64/ifunc-19a.s: Likewise. * ld-aarch64/ifunc-19b.d: Likewise. * ld-aarch64/ifunc-19b.s: Likewise. * ld-aarch64/ifunc-2-local.d: Likewise. * ld-aarch64/ifunc-2-local.s: Likewise. * ld-aarch64/ifunc-2.d: Likewise. * ld-aarch64/ifunc-2.s: Likewise. * ld-aarch64/ifunc-20.d: Likewise. * ld-aarch64/ifunc-20.s: Likewise. * ld-aarch64/ifunc-3.s: Likewise. * ld-aarch64/ifunc-3a.d: Likewise. * ld-aarch64/ifunc-3b.d: Likewise. * ld-aarch64/ifunc-4.d: Likewise. * ld-aarch64/ifunc-4.s: Likewise. * ld-aarch64/ifunc-4a.d: Likewise. * ld-aarch64/ifunc-5-local.s: Likewise. * ld-aarch64/ifunc-5.s: Likewise. * ld-aarch64/ifunc-5a-local.d: Likewise. * ld-aarch64/ifunc-5a.d: Likewise. * ld-aarch64/ifunc-5b-local.d: Likewise. * ld-aarch64/ifunc-5b.d: Likewise. * ld-aarch64/ifunc-5r-local.d: Likewise. * ld-aarch64/ifunc-6.s: Likewise. * ld-aarch64/ifunc-6a.d: Likewise. * ld-aarch64/ifunc-6b.d: Likewise. * ld-aarch64/ifunc-7.s: Likewise. * ld-aarch64/ifunc-7a.d: Likewise. * ld-aarch64/ifunc-7b.d: Likewise. * ld-aarch64/ifunc-7c.d: Likewise. * ld-aarch64/ifunc-8.d: Likewise. * ld-aarch64/ifunc-8a.s: Likewise. * ld-aarch64/ifunc-8b.s: Likewise. * ld-aarch64/ifunc-9.d: Likewise. * ld-aarch64/ifunc-9.s: Likewise.
2013-09-30 * emulparams/msp430all.sh: Update ARCH names.Nick Clifton2-50/+54
* cpu-msp430.c: Use printable names that match the values displayed by readelf.
2013-09-24bfd/Richard Sandiford39-114/+139
2013-09-24 Gregory Fong <gregory.0xf0@gmail.com> * elfxx-mips.c (mips_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_. ld/testsuite/ 2013-09-24 Gregory Fong <gregory.0xf0@gmail.com> * ld-mips-elf/eh-frame5.d, ld-mips-elf/jalx-2.dd, ld-mips-elf/mips-elf.exp, ld-mips-elf/mips16-pic-2.ad, ld-mips-elf/mips16-pic-2.nd, ld-mips-elf/pic-and-nonpic-3a.dd, ld-mips-elf/pic-and-nonpic-3b.ad, ld-mips-elf/pic-and-nonpic-3b.dd, ld-mips-elf/pic-and-nonpic-3b.nd, ld-mips-elf/pic-and-nonpic-4b.ad, ld-mips-elf/pic-and-nonpic-4b.nd, ld-mips-elf/pic-and-nonpic-4b.rd, ld-mips-elf/pic-and-nonpic-5b.ad, ld-mips-elf/pic-and-nonpic-5b.nd, ld-mips-elf/pic-and-nonpic-6-n32.ad, ld-mips-elf/pic-and-nonpic-6-n32.dd, ld-mips-elf/pic-and-nonpic-6-n32.nd, ld-mips-elf/pic-and-nonpic-6-n64.ad, ld-mips-elf/pic-and-nonpic-6-n64.dd, ld-mips-elf/pic-and-nonpic-6-n64.nd, ld-mips-elf/pic-and-nonpic-6-o32.ad, ld-mips-elf/pic-and-nonpic-6-o32.dd, ld-mips-elf/pic-and-nonpic-6-o32.nd, ld-mips-elf/rel32-n32.d, ld-mips-elf/rel32-o32.d, ld-mips-elf/rel64.d, ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1.r, ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-1.got, ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.got, ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-3.got, ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got, ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib-o32.got: Update for removal of _GLOBAL_OFFSET_TABLE_ from .dynsym.
2013-09-24 * emulparams/elf32ppccommon.sh (LIBPATH_SUFFIX): Provide 32-bitAlan Modra3-26/+26
and cross-endian values. * emulparams/elf64ppc.sh: Source elf32ppccomon.sh. Delete duplicate, and unset unwanted variables.
2013-09-24 * genscripts.sh (LIB_PATH): Don't exclude libdir or tooldir whenAlan Modra2-87/+78
sysrooted. Also, don't always add tooldir when non-sysrooted. Instead add both when native and tooldir also when TOOL_DIR is defined. Always prepend '=' to paths when sysrooted. Always put paths with LIBPATH_SUFFIX first in search order.
2013-09-202013-09-20 Chung-Lin Tang <cltang@codesourcery.com>Chung-Lin Tang3-2/+7
* Makefile.am (enios2elf.c): Change tdir_nios2 to tdir_nios2elf. * Makefile.in: Regenerate.
2013-09-20 * libtool.m4 (_LT_ENABLE_LOCK <ld -m flags>): Remove non-canonicalAlan Modra2-5/+15
ppc host match. Support little-endian powerpc linux hosts. Regenerate binutils configure files.
2013-09-182013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>Kyrylo Tkachov2-4/+9
* ld-aarch64/eh-frame.d: Update expected output to allow for 64-bit addresses.
2013-09-18binutils/Tristan Gingold2-0/+6
2013-09-18 Tristan Gingold <gingold@adacore.com> * NEWS: Add marker for 2.24. gas/ 2013-09-18 Tristan Gingold <gingold@adacore.com> * NEWS: Add marker for 2.24. ld/ 2013-09-18 Tristan Gingold <gingold@adacore.com> * NEWS: Add marker for 2.24.
2013-09-17 PR ld/15957Nick Clifton2-6/+19
* deffilep.y (def_file_add_directive): Avoid readin past end of buffer.
2013-09-12 * dwarf.c (dwarf_vmatoa): Rename to dwarf_vmatoa_1 and add aNick Clifton10-262/+275
precision parameter. (dwarf_vmatoa): New wrapper for dwarf_vmatoa_1. (print_dwarf_vma): Use dwarf_vmatoa_1. (SAFE_BYTE_GET): Add check that VAL is big enough to contain AMOUNT bytes. (process_debug_info): Use an unsigned int for the offset size. (process_debug_pubnames): Likewise. (display_debug_aranges): Likewise. (struct Frame_Chunk): Use dwarf_vma type for pc_begin and pc_range fields. (frame_display_row): Use print_dwarf_vma to display dwarf_vma values. (display_debug_frames): Likewise. * binutils-all/x86-64/compressed-1a.d: Update expected output to allow for 64-bit addresses. * ld-elf/eh1.d: Update expected output to allow for 64-bit addresses. * ld-elf/eh2.d: Likewise. * ld-elf/eh3.d: Likewise. * ld-elf/eh4.d: Likewise. * ld-elf/eh5.d: Likewise. * ld-elf/eh6.d: Likewise. * ld-mips-elf/eh-frame1-n64.d: Likewise. * ld-mips-elf/eh-frame2-n64.d: Likewise. * ld-mips-elf/eh-frame3.d: Likewise. * gas/cfi/cfi-alpha-1.d: Update expected output to allow for 64-bit addresses. * gas/cfi/cfi-alpha-3.d: Likewise. * gas/cfi/cfi-arm-1.d: Likewise. * gas/cfi/cfi-common-1.d: Likewise. * gas/cfi/cfi-common-2.d: Likewise. * gas/cfi/cfi-common-3.d: Likewise. * gas/cfi/cfi-common-4.d: Likewise. * gas/cfi/cfi-common-5.d: Likewise. * gas/cfi/cfi-common-6.d: Likewise. * gas/cfi/cfi-common-7.d: Likewise. * gas/cfi/cfi-hppa-1.d: Likewise. * gas/cfi/cfi-i386-2.d: Likewise. * gas/cfi/cfi-i386.d: Likewise. * gas/cfi/cfi-m68k.d: Likewise. * gas/cfi/cfi-mips-1.d: Likewise. * gas/cfi/cfi-ppc-1.d: Likewise. * gas/cfi/cfi-s390-1.d: Likewise. * gas/cfi/cfi-s390x-1.d: Likewise. * gas/cfi/cfi-sh-1.d: Likewise. * gas/cfi/cfi-sparc-1.d: Likewise. * gas/cfi/cfi-sparc64-1.d: Likewise. * gas/cfi/cfi-x86_64.d: Likewise.
2013-09-04ld/testsuite/Yufeng Zhang2-1/+5
2013-09-04 Vidya Praveen <vidyapraveen@arm.com> * ld-arm/export-class.exp: Fix the condition.
2013-08-29 * elf64-x86-64.c (elf_x86_64_check_tls_transition): AllowJakub Jelinek12-12/+435
64-bit -mcmodel=large -fpic TLS GD and LD sequences. (elf_x86_64_relocate_section): Handle -mcmodel=large -fpic TLS GD and LD sequences in GD->LE, GD->IE and LD->LE transitions. ld/testsuite/ * ld-x86-64/x86-64.exp: Add tlsld3, tlsgd7 and tlsgd8 tests. * ld-x86-64/tlspic1.s: Add -mcmodel=large -fpic TLS GD and LD sequences. * ld-x86-64/tlspic.dd: Adjusted. * ld-x86-64/tlspic.rd: Adjusted. * ld-x86-64/tlspic-nacl.rd: Adjusted. * ld-x86-64/tlsld3.dd: New test. * ld-x86-64/tlsld3.s: New file. * ld-x86-64/tlsgd7.dd: New test. * ld-x86-64/tlsgd7.s: New file. * ld-x86-64/tlsgd8.dd: New test. * ld-x86-64/tlsgd8.s: New file.
2013-08-28 PR ld/15896Nick Clifton2-2/+7
* ld.texinfo: Fix uses of MB abbreviation.