aboutsummaryrefslogtreecommitdiff
path: root/ld
AgeCommit message (Collapse)AuthorFilesLines
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.
2013-08-26bfd/Roland McGrath12-9/+30
* archures.c (bfd_mach_i386_nacl, bfd_mach_i386_i386_nacl): New macros. (bfd_mach_x86_64_nacl, bfd_mach_x64_32_nacl): New macros. * cpu-i386.c (bfd_arch_i386_onebyte_nop_fill): New function. (bfd_i386_nacl_arch): New variable. (bfd_x86_64_nacl_arch, bfd_x64_32_nacl_arch): New variables. (bfd_x64_32_arch_intel_syntax): Link them into the list. * bfd-in2.h: Regenerate. ld/ * emulparams/elf_i386_nacl.sh (ARCH): Set to i386:nacl. * emulparams/elf_x86_64_nacl.sh (ARCH): Set to i386:x86-64:nacl. * emulparams/elf32_x86_64_nacl.sh (ARCH): Set to i386:x64-32:nacl. ld/testsuite/ * ld-x86-64/x86-64.exp (Mixed x86_64 and i386 input test 1): Loosen string match to admit i386:x86-64*. (Mixed x86_64 and i386 input test 2): Likewise. * 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. * ld-x86-64/ia32-2.d: Likewise, and i386.* too. * ld-x86-64/ia32-3.d: Likewise.
2013-08-26bfd/Roland McGrath6-5/+22
* elf-nacl.c (nacl_modify_segment_map): Fix logic reordering the elf_segment_map list. If an executable segment is page-aligned but does not end with a full page, then append a fake section into the segment map entry that pads out the page. (nacl_final_write_processing): New function. Write the code fill laid out in nacl_modify_segment_map. * elf-nacl.h: Declare it. * elf32-arm.c (elf32_arm_nacl_final_write_processing): New function. (elf_backend_final_write_processing): Define it for NaCl backend. * elf32-i386.c (elf_backend_final_write_processing): Likewise. * elf64-x86-64.c (elf_backend_final_write_processing): Likewise. * elf-nacl.c (segment_eligible_for_headers): Rename MAXPAGESIZE parameter to MINPAGESIZE. (nacl_modify_segment_map): Use minpagesize instead of maxpagesize. * elf32-arm.c (ELF_MINPAGESIZE, ELF_COMMONPAGESIZE): Set to 0x10000 for NaCl targets. ld/testsuite/ * ld-x86-64/ilp32-4-nacl.d: Loosen .shstrtab line regexp to match any file offset. * ld-x86-64/tlsbin-nacl.rd: Update expected code segment PT_LOAD. * ld-x86-64/tlsbindesc-nacl.rd: Likewise. * ld-scripts/rgn-at3.d: XFAIL for *-*-nacl* targets. * ld-scripts/rgn-over8-ok.d: Likewise.
2013-08-24 * ld-elf/comm-data.exp: Use check_shared_lib_support rather thanMaciej W. Rozycki9-21/+96
explicit patterns for test target qualification. Define extra tool flags for *-*-hpux* and tic6x-*-* targets. Link with a linker script. Use alternative patterns for targets that do not eliminate copy relocs, currently mn10300-*-* and vax-*-*. * ld-elf/comm-data2.s: Handle HPUX's `.comm' syntax. * ld-elf/comm-data2.ld: New test linker script. * ld-elf/comm-data2.xd: Match section's VMA too. Ignore ASCII data dump. * ld-elf/comm-data2r.rd: New test pattern. * ld-elf/comm-data2r.sd: New test pattern. * ld-elf/comm-data2r.xd: New test pattern. * ld-mips-elf/comm-data.exp: Use check_shared_lib_support rather than an explicit pattern for test target qualification. Link with a linker script.
2013-08-24 * ld-arm/export-class.exp: Handle non-EABI targets.Maciej W. Rozycki2-3/+13
2013-08-23ld/testsuite/Roland McGrath6-10/+18
* ld-x86-64/ilp32-4-nacl.d: Update for 2013-05-31 gas alignment change. * ld/testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld/testsuite/ld-x86-64/tlspic-nacl.rd: Likewise.
2013-08-23ld/Roland McGrath2-1/+6
* emulparams/elf_nacl.sh (nacl_rodata_addr): Don't add in SIZEOF_HEADERS here; elf.sc does it already.
2013-08-23Fix typo.Nick Clifton1-6/+6
2013-08-23 PR binutils/15834Nick Clifton2-1/+6
Fix typos: --- bfd/bfdio.c | 2 +- bfd/elf32-spu.c | 2 +- bfd/elfnn-aarch64.c | 2 +- binutils/od-xcoff.c | 2 +- config/tcl.m4 | 2 +- gas/config/tc-ia64.c | 2 +- gas/config/tc-sparc.c | 2 +- gas/config/tc-z80.c | 12 ++++++------ gas/doc/c-i386.texi | 6 +++--- gas/doc/c-m32r.texi | 2 +- gas/testsuite/gas/d10v/instruction_packing.d | 2 +- gas/testsuite/gas/z80/atend.d | 2 +- gold/object.h | 2 +- include/gdb/remote-sim.h | 2 +- include/opcode/ChangeLog | 2 +- include/opcode/i960.h | 2 +- ld/testsuite/ld-mips-elf/mips16-pic-1.inc | 2 +- opcodes/aarch64-asm.c | 2 +- opcodes/aarch64-dis.c | 2 +- opcodes/msp430-dis.c | 2 +-
2013-08-23 PR ld/15839Nick Clifton2-9/+15
* scripttempl/avr.sc: Do not include gc'able sections into general sections during relocatable links.
2013-08-22 * emultempl/pe.em: Add --disable-large-address-aware option.Nick Clifton3-1/+22
* ld.texinfo (--disable-large-address-aware): Add documentation.
2013-08-22 * ld-powerpc/powerpc.exp: Substitute for le in options_regsub(ld).Alan Modra17-71/+93
Correct ppc64elftests option replacement. (supports_ppc64): Match elf64lppc too. * ld-powerpc/relbrlt.d: Update for little-endian. * ld-powerpc/symtocbase.d: Likewise. * ld-powerpc/tls.t: Likewise. * ld-powerpc/tlsexetoc.g: Likewise. * ld-powerpc/tlsso.d: Likewise. * ld-powerpc/tlsso.g: Likewise. * ld-powerpc/tlstoc.t: Likewise. * ld-powerpc/tlstocso.d: Likewise. * ld-powerpc/tlstocso.g: Likewise. * ld-powerpc/tlstocso.t: Likewise. * ld-powerpc/tocopt.d: Likewise. * ld-powerpc/tocopt2.d: Likewise. * ld-powerpc/tocopt3.d: Likewise. * ld-powerpc/tocopt4.d: Likewise. * ld-powerpc/tocopt5.d: Likewise.
2013-08-15 * ldexp.c: Add LOG2CEIL() builtin function to linker script languageNick Clifton10-4/+96
* ldgram.y: Likewise * ldlex.l: Likewise * NEWS: Mention the new feature. * ld.texinfo: Document the new feature. * ld-scripts/log2.exp: New: Run the new log2 test. * ld-scripts/log2.s: Source for the new test. * ld-scripts/log2.t: Linker script for new test.
2013-08-14 PR ld/15787Nick Clifton12-25/+61
* elf32-arm.c (elf32_arm_final_link_relocate): Use origin of output segment containing the relocating symbol instead of assuming 0 for sb group relocations. * ld-arm/group-relocs-ldr-bad.s: Redefine bar into foo section beyond 16 bit offset width. * ld-arm/group-relocs-ldrs-bad.s: Likewise. * ld-arm/group-relocs-ldr-bad.d: Adjust expected result. * ld-arm/group-relocs-ldrs-bad.d: Likewise. * ld-arm/group-relocs.s: Add comments. Move symbols used for sb group relocations into .data section. Drop section zero. Use pc/r0 as base register when pc/sb group relocations are used. * ld-arm/group-relocs.d: Adjust expected result. * ld-arm/group-relocs-alu-bad-2.d: New test for sb group relocation. * ld-arm/group-relocs-ldc-bad-2.d: Likewise. * ld-arm/group-relocs-ldr-bad-2.d: New test for pc group relocation. * ld-arm/group-relocs-ldrs-bad-2.d: Likewise. * ld-arm/unresolved-2.d: Add sb relocation failure test. * ld-arm/group-relocs-alu-bad-2.s: New test source. * ld-arm/group-relocs-ldr-bad-2.s: Likewise. * ld-arm/group-relocs-ldrs-bad-2.s: Likewise. * ld-arm/group-relocs-ldc-bad-2.s: Likewise. * ld-arm/unresolved-2.s: Likewise. * ld-arm/arm-elf.exp: For group-relocs, drop section zero start definition. Run the new tests.
2013-08-09 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Complain if G10Nick Clifton2-0/+6
flag bits do not match. (rl78_elf_print_private_bfd_data): Describe G10 flag. * readelf.c (get_machine_flags): Handle RL78 G10 flag. * config/tc-rl78.c (elf_flags): New variable. (enum options): Add OPTION_G10. (md_longopts): Add mg10. (md_parse_option): Parse -mg10. (rl78_elf_final_processing): New function. * config/tc-rl78.c (tc_final_processing): Define. * doc/c-rl78.texi: Document -mg10 option. * rl78.c (E_FLAG_RL78_G10): Define. * lib/ld-lib.exp (check_shared_lib_support): Note that the RL78 does not support shared library generation.
2013-07-31 PR ld/15787Nick Clifton16-43/+164
* elf32-arm.c (elf32_arm_final_link_relocate): Base SB on the output section VMA. * ld-arm/group-relocs-alu-bad-2.d; New. * ld-arm/group-relocs-alu-bad-2.s: New. * ld-arm/group-relocs-ldc-bad-2.d: New. * ld-arm/group-relocs-ldc-bad-2.s: New. * ld-arm/group-relocs-ldr-bad-2.d: New. * ld-arm/group-relocs-ldr-bad-2.s: New. * ld-arm/group-relocs-ldrs-bad-2.d: New. * ld-arm/group-relocs-ldrs-bad-2: New. * ld-arm/arm-elf.exp: Add the new tests. * ld-arm/group-relocs-ldr-bad.d: Update expected output. * ld-arm/group-relocs-ldr-bad.s: Likewise. * ld-arm/group-relocs-ldrs-bad.d: Likewise. * ld-arm/group-relocs-ldrs-bad.s: Likewise. * ld-arm/group-relocs.d: Likewise. * ld-arm/group-relocs.s: Likewise.
2013-07-27 * ld-vax-elf/export-class-call.dd: New test.Maciej W. Rozycki15-0/+262
* ld-vax-elf/export-class-call.rd: New test. * ld-vax-elf/export-class-call.xd: New test. * ld-vax-elf/export-class-data.dd: New test. * ld-vax-elf/export-class-data.rd: New test. * ld-vax-elf/export-class-data.xd: New test. * ld-vax-elf/export-class.ld: New test linker script. * ld-vax-elf/export-class-call.s: New test source. * ld-vax-elf/export-class-data.s: New test source. * ld-vax-elf/export-class-def.s: New test source. * ld-vax-elf/vax-elf.exp: Run the new tests. * ld-vax-elf/vax-export-class.rd: New test. * ld-vax-elf/vax-export-class.xd: New test. * ld-vax-elf/export-class.exp: New test script.
2013-07-27 bfd/Maciej W. Rozycki7-0/+78
* elf32-vax.c (elf_vax_check_relocs) <R_VAX_GOT32, R_VAX_PLT32>: Don't check symbol visibility here. Remove a check already asserted for. (elf_vax_instantiate_got_entries): Use SYMBOL_REFERENCES_LOCAL instead of individual checks. (elf_vax_relocate_section) <R_VAX_GOT32, R_VAX_PLT32>: Only check the offset to decide if produce a GOT or PLT entry. Remove redundant assertions. Remove code to produce GOT entries for local symbols. Remove a duplicate comment and add a comment on GOT relocations. (elf_vax_finish_dynamic_symbol): Remove code to produce RELATIVE dynamic relocs. ld/testsuite/ * ld-vax-elf/got-local-exe.xd: New test. * ld-vax-elf/got-local-lib.xd: New test. * ld-vax-elf/got-local-aux.s: New test source. * ld-vax-elf/got-local-def.s: New test source. * ld-vax-elf/got-local-ref.s: New test source. * ld-vax-elf/vax-elf.exp: Run the new tests.
2013-07-24Check .gnu.warning section in shared libraryH.J. Lu4-5/+18
PR ld/15762 * ld-elf/shared.exp (build_tests): Check .gnu.warning section in the libbarw.so library. * ld-elf/libbarw.rd: New. * lib/ld-lib.exp (run_cc_link_tests): Support checking on output with warning message.