aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-ia64
AgeCommit message (Collapse)AuthorFilesLines
2024-01-04Update year range in copyright notice of binutils filesAlan Modra2-2/+2
Adds two new external authors to etc/update-copyright.py to cover bfd/ax_tls.m4, and adds gprofng to dirs handled automatically, then updates copyright messages as follows: 1) Update cgen/utils.scm emitted copyrights. 2) Run "etc/update-copyright.py --this-year" with an extra external author I haven't committed, 'Kalray SA.', to cover gas testsuite files (which should have their copyright message removed). 3) Build with --enable-maintainer-mode --enable-cgen-maint=yes. 4) Check out */po/*.pot which we don't update frequently.
2023-07-17PR10957, Missing option to really print section+offsetAlan Modra1-1/+1
Many of the reloc error messages have already been converted from using %C to using %H in ld.bfd, to print section+offset as well as file/line/function. This catches a few remaining, and changes gold to do the same. PR 10957 bfd/ * elf32-sh.c (sh_elf_relocate_section): Use %H in error messages. gold/ * object.cc (Relocate_info::location): Always report section+offset. * testsuite/debug_msg.sh: Adjust to suit. * testsuite/x32_overflow_pc32.sh: Likewise. * testsuite/x86_64_overflow_pc32.sh: Likewise. ld/ * emultempl/pe.em (read_addend): Use %H in error message. * emultempl/pep.em (read_addend): Likewise. * ldcref.c (check_reloc_refs): Likewise. * ldmain.c (warning_find_reloc, undefined_symbol): Likewise. * pe-dll.c (pe_create_import_fixup): Likewise. * testsuite/ld-cris/undef2.d: Adjust expected output to suit. * testsuite/ld-cris/undef3.d: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-i386/compressed1.d: Likewise. * testsuite/ld-ia64/line.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-undefined/undefined.exp: Likewise. * testsuite/ld-x86-64/compressed1.d: Likewise. * testsuite/ld-x86-64/line.exp: Likewise. * testsuite/ld-x86-64/pr27587.err: Likewise.
2023-01-01Update year range in copyright notice of binutils filesAlan Modra2-2/+2
The newer update-copyright.py fixes file encoding too, removing cr/lf on binutils/bfdtest2.c and ld/testsuite/ld-cygwin/exe-export.exp, and embedded cr in binutils/testsuite/binutils-all/ar.exp string match.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra2-2/+2
The result of running etc/update-copyright.py --this-year, fixing all the files whose mode is changed by the script, plus a build with --enable-maintainer-mode --enable-cgen-maint=yes, then checking out */po/*.pot which we don't update frequently. The copy of cgen was with commit d1dd5fcc38ead reverted as that commit breaks building of bfp opcodes files.
2021-09-21Change the linker's heuristic for computing the entry point for binaries so ↵Nick Clifton1-1/+1
that shared libraries default to an entry point of 0. * ldlang.c (lang_end): When computing the entry point, only try the start address of the entry section when creating an executable. * ld.texi (Entry point): Update description of heuristic used to choose the entry point. testsuite/ld-alpha/tlspic.rd: Update expected entry point address. testsuite/ld-arm/tls-gdesc-got.d: Likewise. testsuite/ld-i386/tlsnopic.rd: Likewise. testsuite/ld-ia64/tlspic.rd: Likewise. testsuite/ld-sparc/gotop32.rd: Likewise. testsuite/ld-sparc/gotop64.rd: Likewise. testsuite/ld-sparc/tlssunnopic32.rd: Likewise. testsuite/ld-sparc/tlssunnopic64.rd: Likewise. testsuite/ld-sparc/tlssunpic32.rd: Likewise. testsuite/ld-sparc/tlssunpic64.rd: Likewise. testsuite/ld-tic6x/shlib-1.rd: Likewise. testsuite/ld-tic6x/shlib-1b.rd: Likewise. testsuite/ld-tic6x/shlib-1r.rd: Likewise. testsuite/ld-tic6x/shlib-1rb.rd: Likewise. testsuite/ld-tic6x/shlib-noindex.rd: Likewise. testsuite/ld-x86-64/pr14207.d: Likewise. testsuite/ld-x86-64/tlsdesc.rd: Likewise. testsuite/ld-x86-64/tlspic.rd: Likewise. testsuite/ld-x86-64/tlspic2.rd: Likewise.
2021-04-21Adjust readelf's output so that section symbols without a name as shown with ↵Nick Clifton2-29/+29
their section name. binutils* readelf.c (print_dynamic_symbol): Print the section name for section symbols without a name of their own. * testsuite/binutils-all/mips/global-local-symtab-sort-n64t.d: Adjust expected output to allow for named section symbols. * testsuite/binutils-all/mips/global-local-symtab-sort-o32t.d: Likewise. * testsuite/binutils-all/readelf.s-64: Likewise. * testsuite/binutils-all/readelf.ss-64-unused: Likewise. * testsuite/binutils-all/readelf.ss-tmips: Likewise. * testsuite/binutils-all/readelf.ss-unused: Likewise. ld * testsuite/ld-aarch64/variant_pcs-now.d: Adjust expected output to allow for named section symbols. * testsuite/ld-aarch64/variant_pcs-r.d: Likewise. * testsuite/ld-aarch64/variant_pcs-shared.d: Likewise. * testsuite/ld-alpha/tlsbin.rd: Likewise. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-arm/rodata-merge-map.sym: Likewise. * testsuite/ld-arm/script-type.sym: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-cris/pr16044.d: Likewise. * testsuite/ld-elf/sec64k.exp: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-ia64/tlspic.rd: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-n64t.d: Likewise. * testsuite/ld-mips-elf/global-local-symtab-sort-o32t.d: Likewise. * testsuite/ld-mmix/bspec1.d: Likewise. * testsuite/ld-mmix/bspec2.d: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-mmix/undef-3.d: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-sparc/gotop32.rd: Likewise. * testsuite/ld-sparc/gotop64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-sparc/tlssunnopic32.rd: Likewise. * testsuite/ld-sparc/tlssunnopic64.rd: Likewise. * testsuite/ld-sparc/tlssunpic32.rd: Likewise. * testsuite/ld-sparc/tlssunpic64.rd: Likewise. * testsuite/ld-tic6x/common.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. gas * testsuite/gas/aarch64/dwarf.d: Adjust expected output to allow for named section symbols. * testsuite/gas/arm/thumbver.d: Likewise. * testsuite/gas/bfin/loop_temps.d: Likewise. * testsuite/gas/elf/section2.e-arc: Likewise. * testsuite/gas/elf/section2.e-arm: Likewise. * testsuite/gas/elf/section2.e-csky: Likewise. * testsuite/gas/elf/section2.e-m32r: Likewise. * testsuite/gas/elf/section2.e-mips: Likewise. * testsuite/gas/elf/section2.e-msp430: Likewise. * testsuite/gas/elf/section2.e-riscv: Likewise. * testsuite/gas/elf/section2.e-rl78: Likewise. * testsuite/gas/elf/section2.e-rx: Likewise. * testsuite/gas/elf/section2.e-score: Likewise. * testsuite/gas/elf/section2.e-tic6x: Likewise. * testsuite/gas/elf/section2.e-unused: Likewise. * testsuite/gas/elf/section2.e-v850: Likewise. * testsuite/gas/elf/section2.e-xtensa: Likewise. * testsuite/gas/ia64/alias-ilp32.d: Likewise. * testsuite/gas/ia64/alias.d: Likewise. * testsuite/gas/ia64/global.d: Likewise. * testsuite/gas/microblaze/relax_size.elf: Likewise. * testsuite/gas/microblaze/relax_size2.elf: Likewise. * testsuite/gas/mips/global-local-symtab-sort-n64t.d: Likewise. * testsuite/gas/mips/global-local-symtab-sort-o32t.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/byte-1.d: Likewise. * testsuite/gas/mmix/comment-1.d: Likewise. * testsuite/gas/mmix/loc-1.d: Likewise. * testsuite/gas/mmix/loc-2.d: Likewise. * testsuite/gas/mmix/loc-3.d: Likewise. * testsuite/gas/mmix/loc-4.d: Likewise. * testsuite/gas/mmix/loc-5.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise.
2021-01-01Update year range in copyright notice of binutils filesAlan Modra2-2/+2
2020-06-20Remove perror from ld_assemble, ld_compile and ld_nmAlan Modra1-1/+1
ERROR should really be reserved for errors in the testsuite framework, not just normal errors from the tools under test. Removing use of perror has been suggested before but without action, over concerns that some test failures might be missed. This patch removes uses of perror in ld_assemble, ld_compile and ld_nm, and updates numerous places that ignored the result of these functions by inappropriately returning an "unresolved" test status. Net result over my large set of targets look good, in some cases improving the diagnostics, eg: i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos -ERROR: tmpdir/script: nm failed i386-msdos +FAIL: script i386-msdos +FAIL: MRI script i386-msdos +FAIL: MEMORY i386-msdos +FAIL: MEMORY with symbols * testsuite/lib/ld-lib.exp (default_ld_compile): Don't perror on a compiler error. (default_ld_assemble): Similarly for an assembler error. (default_ld_nm): Similarly for an nm error. (run_ld_link_tests): Report ld_assemble errors as a fail. (check_as_cfi): Remove now unnecessary perror substitution. * testsuite/ld-elf/exclude.exp: Report ld_nm error return as test fails rather then unresolved. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-scripts/defined.exp: Likewise. * testsuite/ld-scripts/script.exp: Likewise. * testsuite/ld-scripts/sizeof.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-scripts/extern.exp: Likewise. Return on ld_link failure. * testsuite/ld-elfweak/elfweak.exp: Report compiler errors as test unresolved. * testsuite/ld-fastcall/fastcall.exp: Report assember errors as test fails. * testsuite/ld-i386/i386.exp (iamcu_tests): Likewise. * testsuite/ld-ia64/line.exp: Likewise. * testsuite/ld-mep/mep.exp: Likewise. * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise. * testsuite/ld-nios2/nios2.exp: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-x86-64/line.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-scripts/log2.exp: Formatting. * testsuite/ld-tic6x/tic6x.exp: Report ld_link errors as a test fail.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra2-2/+2
2019-01-01Update year range in copyright notice of binutils filesAlan Modra2-2/+2
2018-06-08Define various symbols conditionally in shared librariesAlan Modra7-14/+5
The values of symbols in shared libraries like _end, _edata, and __bss_start are generally not that useful outside of the shared library. This patch defines them conditionally with PROVIDE, since a shared library might need the local value. An example is glibc ld.so local access to "_begin", "_etext" and "_end". (ld.so gains access to the local values by making the references using hidden visibility. That makes the definitions hidden too.) We can't use PROVIDE_HIDDEN in the linker scripts because the shared library might need the value of the symbol in the executable. An example is freebsd libc dynamic access to "_end". PR ld/23161 * emulparams/aarch64cloudabi.sh: PROVIDE __bss_start__, _bss_end__, and __end__ in shared libraries. * emulparams/aarch64fbsd.sh: Likewise. * emulparams/aarch64linux.sh: Likewise. * emulparams/aarch64linux32.sh: Likewise. * emulparams/armelf_fuchsia.sh: Likewise. * emulparams/armelf_linux.sh: Likewise. * emulparams/armelf_phoenix.sh: Likewise. * emulparams/aarch64elf.sh: Likewise, and __data_start * emulparams/aarch64elf32.sh: Likewise. * emulparams/armelf.sh: Likewise. * emulparams/armnto.sh: Likewise. * emulparams/elf32bmip.sh: Remove duplicate ". = ." from OTHER_GOT_SYMBOLS. PROVIDE _ftext, _fdata, and _fbss in shared libs. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32frv.sh: PROVIDE __end and __data_start in shared libs. * emulparams/elf32lriscv-defs.sh: Tidy. * emulparams/elf32mcore.sh: PROVIDE __bss_start and _bss_end in shared libs * emulparams/elf32ppccommon.sh: PROVIDE __end in shared libs. * emulparams/elf32rl78.sh: Tidy. * emulparams/i386nto.sh: PROVIDE _btext in shared libs. * emulparams/shelf_nto.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/score3_elf.sh: PROVIDE _gp, _bss_start__, _bss_end__, __bss_end__, __end__, _fdata, _sdata_begin, and _bss_start in shared libs. * scripttempl/elf.sc: Don't use EXECUTABLE_SYMBOLS for shared libraries. PROVIDE _edata, edata, __bss_start, and _end in shared libraries. * testsuite/ld-elf/pr23161.map, * testsuite/ld-elf/pr23161a.c, * testsuite/ld-elf/pr23161b.c, * testsuite/ld-elf/pr23161c.c, * testsuite/ld-elf/pr23161a.rd, * testsuite/ld-elf/pr23161b.rd, * testsuite/ld-elf/pr23161c.rd, * testsuite/ld-elf/pr23161d.rd: New tests. * testsuite/ld-elf/shared.exp: Run ld/23161 tests. * testsuite/ld-elf/pr23162.rd, * testsuite/ld-aarch64/ifunc-1-local.d, * testsuite/ld-aarch64/ifunc-1.d, * testsuite/ld-aarch64/ifunc-2-local.d, * testsuite/ld-aarch64/ifunc-2.d, * testsuite/ld-aarch64/ifunc-21.d, * testsuite/ld-aarch64/ifunc-3a.d, * testsuite/ld-alpha/tlsbin.rd, * testsuite/ld-alpha/tlsbin.sd, * testsuite/ld-alpha/tlsbinr.rd, * testsuite/ld-alpha/tlspic.rd, * testsuite/ld-alpha/tlspic.sd, * testsuite/ld-cris/dso-pltdis1.d, * testsuite/ld-cris/dso-pltdis2.d, * testsuite/ld-cris/dso12-pltdis.d, * testsuite/ld-cris/gotplt1.d, * testsuite/ld-cris/gotplt2.d, * testsuite/ld-cris/gotplt3.d, * testsuite/ld-cris/hiddef1.d, * testsuite/ld-cris/libdso-1.d, * testsuite/ld-cris/libdso-10.d, * testsuite/ld-cris/libdso-11.d, * testsuite/ld-cris/libdso-12.d, * testsuite/ld-cris/libdso-12b.d, * testsuite/ld-cris/libdso-12c.d, * testsuite/ld-cris/libdso-13.d, * testsuite/ld-cris/libdso-13b.d, * testsuite/ld-cris/libdso-14.d, * testsuite/ld-cris/libdso-15.d, * testsuite/ld-cris/libdso-15b.d, * testsuite/ld-cris/libdso-1c.d, * testsuite/ld-cris/libdso-1d.d, * testsuite/ld-cris/libdso-2.d, * testsuite/ld-cris/pic-gc-72.d, * testsuite/ld-cris/pic-gc-73.d, * testsuite/ld-cris/pr16044.d, * testsuite/ld-cris/pv32-1.d, * testsuite/ld-cris/tls-dso-dtpoffd2.d, * testsuite/ld-cris/tls-dso-dtpoffd4.d, * testsuite/ld-cris/tls-dso-tpoffgotcomm1.d, * testsuite/ld-cris/tls-gc-71.d, * testsuite/ld-cris/tls-gd-1.d, * testsuite/ld-cris/tls-gd-1h.d, * testsuite/ld-cris/tls-gd-2.d, * testsuite/ld-cris/tls-gd-2h.d, * testsuite/ld-cris/tls-ie-10.d, * testsuite/ld-cris/tls-ie-11.d, * testsuite/ld-cris/tls-ie-78.d, * testsuite/ld-cris/tls-ie-8.d, * testsuite/ld-cris/tls-ie-9.d, * testsuite/ld-cris/tls-js1.d, * testsuite/ld-cris/tls-ld-4.d, * testsuite/ld-cris/tls-ld-5.d, * testsuite/ld-cris/tls-ld-6.d, * testsuite/ld-cris/tls-ld-7.d, * testsuite/ld-cris/tls-ldgd-14.d, * testsuite/ld-cris/tls-ldgd-15.d, * testsuite/ld-cris/tls-ldgdex-14.d, * testsuite/ld-cris/tls-ldgdex-15.d, * testsuite/ld-cris/tls-ldgdx-14.d, * testsuite/ld-cris/tls-ldgdx-15.d, * testsuite/ld-cris/tls-legdx-16.d, * testsuite/ld-cris/tls-legdx-17.d, * testsuite/ld-cris/tls-local-54.d, * testsuite/ld-cris/tls-local-60.d, * testsuite/ld-cris/tls-local-61.d, * testsuite/ld-cris/tls-local-63.d, * testsuite/ld-cris/tls-local-64.d, * testsuite/ld-cris/tls-ok-30.d, * testsuite/ld-cris/tls-ok-32.d, * testsuite/ld-cris/tls-ok-34.d, * testsuite/ld-cris/tls-und-38.d, * testsuite/ld-cris/tls-und-42.d, * testsuite/ld-cris/tls-und-46.d, * testsuite/ld-cris/tls-und-50.d, * testsuite/ld-cris/weakhiddso.d, * testsuite/ld-cris/weakref2.d, * testsuite/ld-frv/fdpic-shared-1.d, * testsuite/ld-frv/fdpic-shared-2.d, * testsuite/ld-frv/fdpic-shared-3.d, * testsuite/ld-frv/fdpic-shared-4.d, * testsuite/ld-frv/fdpic-shared-5.d, * testsuite/ld-frv/fdpic-shared-7.d, * testsuite/ld-frv/fdpic-shared-8.d, * testsuite/ld-frv/tls-dynamic-2.d, * testsuite/ld-i386/ibt-plt-1.d, * testsuite/ld-i386/ibt-plt-2a.d, * testsuite/ld-i386/ibt-plt-2b.d, * testsuite/ld-i386/ibt-plt-2c.d, * testsuite/ld-i386/ibt-plt-2d.d, * testsuite/ld-i386/ibt-plt-3a.d, * testsuite/ld-i386/ibt-plt-3b.d, * testsuite/ld-i386/ibt-plt-3c.d, * testsuite/ld-i386/ibt-plt-3d.d, * testsuite/ld-i386/plt2.dd, * testsuite/ld-i386/pr20830.d, * testsuite/ld-i386/tlsbin-nacl.rd, * testsuite/ld-i386/tlsbin.rd, * testsuite/ld-i386/tlsbin2-nacl.rd, * testsuite/ld-i386/tlsbin2.rd, * testsuite/ld-i386/tlsbindesc-nacl.rd, * testsuite/ld-i386/tlsbindesc.rd, * testsuite/ld-i386/tlsdesc-nacl.rd, * testsuite/ld-i386/tlsdesc.rd, * testsuite/ld-i386/tlsgdesc-nacl.rd, * testsuite/ld-i386/tlsgdesc.rd, * testsuite/ld-i386/tlsnopic-nacl.rd, * testsuite/ld-i386/tlsnopic.dd, * testsuite/ld-i386/tlsnopic.rd, * testsuite/ld-i386/tlsnopic.sd, * testsuite/ld-i386/tlspic-nacl.rd, * testsuite/ld-i386/tlspic.rd, * testsuite/ld-i386/tlspic2-nacl.rd, * testsuite/ld-i386/tlspic2.rd, * testsuite/ld-ia64/merge1.d, * testsuite/ld-ia64/merge2.d, * testsuite/ld-ia64/merge3.d, * testsuite/ld-ia64/merge4.d, * testsuite/ld-ia64/merge5.d, * testsuite/ld-ia64/tlsbin.rd, * testsuite/ld-ia64/tlspic.rd, * testsuite/ld-ifunc/ifunc-2-i386-now.d, * testsuite/ld-ifunc/ifunc-2-local-i386-now.d, * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d, * testsuite/ld-ifunc/ifunc-2-local-x86-64.d, * testsuite/ld-ifunc/ifunc-2-x86-64-now.d, * testsuite/ld-ifunc/ifunc-2-x86-64.d, * testsuite/ld-ifunc/pr17154-i386-now.d, * testsuite/ld-ifunc/pr17154-i386.d, * testsuite/ld-ifunc/pr17154-x86-64-now.d, * testsuite/ld-ifunc/pr17154-x86-64.d, * testsuite/ld-m68k/tls-def-1.d, * testsuite/ld-m68k/tls-gd-1.d2, * testsuite/ld-metag/shared.d, * testsuite/ld-metag/stub_pic_app.d, * testsuite/ld-mips-elf/rel32-n32.d, * testsuite/ld-mips-elf/rel32-o32.d, * testsuite/ld-mips-elf/rel64.d, * testsuite/ld-powerpc/ambiguousv1.d, * testsuite/ld-powerpc/ambiguousv1b.d, * testsuite/ld-powerpc/ambiguousv2.d, * testsuite/ld-powerpc/ambiguousv2b.d, * testsuite/ld-powerpc/tlsexe.d, * testsuite/ld-powerpc/tlsexe.r, * testsuite/ld-powerpc/tlsexe32.d, * testsuite/ld-powerpc/tlsexe32.g, * testsuite/ld-powerpc/tlsexe32.r, * testsuite/ld-powerpc/tlsexetoc.d, * testsuite/ld-powerpc/tlsexetoc.r, * testsuite/ld-powerpc/tlsso.d, * testsuite/ld-powerpc/tlsso.r, * testsuite/ld-powerpc/tlsso32.g, * testsuite/ld-powerpc/tlsso32.r, * testsuite/ld-powerpc/tlstocso.d, * testsuite/ld-powerpc/tlstocso.g, * testsuite/ld-powerpc/tlstocso.r, * testsuite/ld-s390/gotreloc_31-1.dd, * testsuite/ld-s390/tlsbin.dd, * testsuite/ld-s390/tlsbin.rd, * testsuite/ld-s390/tlsbin_64.dd, * testsuite/ld-s390/tlsbin_64.rd, * testsuite/ld-s390/tlspic.rd, * testsuite/ld-s390/tlspic_64.rd, * testsuite/ld-sh/tlsbin-2.d, * testsuite/ld-sh/tlspic-2.d, * testsuite/ld-sparc/gotop32.rd, * testsuite/ld-sparc/gotop64.rd, * testsuite/ld-sparc/tlssunbin32.rd, * testsuite/ld-sparc/tlssunbin64.rd, * testsuite/ld-sparc/tlssunnopic32.rd, * testsuite/ld-sparc/tlssunnopic64.rd, * testsuite/ld-sparc/tlssunpic32.rd, * testsuite/ld-sparc/tlssunpic64.rd, * testsuite/ld-x86-64/bnd-branch-1-now.d, * testsuite/ld-x86-64/bnd-ifunc-1-now.d, * testsuite/ld-x86-64/bnd-ifunc-2-now.d, * testsuite/ld-x86-64/bnd-ifunc-2.d, * testsuite/ld-x86-64/bnd-plt-1-now.d, * testsuite/ld-x86-64/bnd-plt-1.d, * testsuite/ld-x86-64/ibt-plt-1-x32.d, * testsuite/ld-x86-64/ibt-plt-1.d, * testsuite/ld-x86-64/ibt-plt-2a-x32.d, * testsuite/ld-x86-64/ibt-plt-2a.d, * testsuite/ld-x86-64/ibt-plt-2b-x32.d, * testsuite/ld-x86-64/ibt-plt-2b.d, * testsuite/ld-x86-64/ibt-plt-2c-x32.d, * testsuite/ld-x86-64/ibt-plt-2c.d, * testsuite/ld-x86-64/ibt-plt-2d-x32.d, * testsuite/ld-x86-64/ibt-plt-2d.d, * testsuite/ld-x86-64/ibt-plt-3a-x32.d, * testsuite/ld-x86-64/ibt-plt-3a.d, * testsuite/ld-x86-64/ibt-plt-3b-x32.d, * testsuite/ld-x86-64/ibt-plt-3b.d, * testsuite/ld-x86-64/ibt-plt-3c-x32.d, * testsuite/ld-x86-64/ibt-plt-3c.d, * testsuite/ld-x86-64/ibt-plt-3d-x32.d, * testsuite/ld-x86-64/ibt-plt-3d.d, * testsuite/ld-x86-64/ilp32-4-nacl.d, * testsuite/ld-x86-64/ilp32-4.d, * testsuite/ld-x86-64/load1c-nacl.d, * testsuite/ld-x86-64/load1c.d, * testsuite/ld-x86-64/load1d-nacl.d, * testsuite/ld-x86-64/load1d.d, * testsuite/ld-x86-64/mpx3n.dd, * testsuite/ld-x86-64/mpx4.dd, * testsuite/ld-x86-64/mpx4n.dd, * testsuite/ld-x86-64/plt2.dd, * testsuite/ld-x86-64/pr14207.d, * testsuite/ld-x86-64/pr19162.d, * testsuite/ld-x86-64/pr20253-1f.d, * testsuite/ld-x86-64/pr20253-1l.d, * testsuite/ld-x86-64/pr20830a-now.d, * testsuite/ld-x86-64/pr20830a.d, * testsuite/ld-x86-64/pr20830b-now.d, * testsuite/ld-x86-64/pr20830b.d, * testsuite/ld-x86-64/pr21038a-now.d, * testsuite/ld-x86-64/pr21038a.d, * testsuite/ld-x86-64/pr21038b-now.d, * testsuite/ld-x86-64/pr21038b.d, * testsuite/ld-x86-64/pr21038c-now.d, * testsuite/ld-x86-64/pr21038c.d, * testsuite/ld-x86-64/tlsbin-nacl.rd, * testsuite/ld-x86-64/tlsbin.rd, * testsuite/ld-x86-64/tlsbin2-nacl.rd, * testsuite/ld-x86-64/tlsbin2.rd, * testsuite/ld-x86-64/tlsbindesc-nacl.rd, * testsuite/ld-x86-64/tlsbindesc.rd, * testsuite/ld-x86-64/tlsdesc-nacl.rd, * testsuite/ld-x86-64/tlsdesc.rd, * testsuite/ld-x86-64/tlsgdesc-nacl.rd, * testsuite/ld-x86-64/tlsgdesc.rd, * testsuite/ld-x86-64/tlspic-nacl.rd, * testsuite/ld-x86-64/tlspic.rd, * testsuite/ld-x86-64/tlspic2-nacl.rd, * testsuite/ld-x86-64/tlspic2.rd: Update.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra2-2/+2
2017-11-12ld: Remove PF_X from PT_PHDR segmentH.J. Lu1-1/+1
It was reasonable to mark PT_PHDR segment with PF_X for compatibility with UnixWare and Solaris linkers 20 years ago. But it is inappropriate today when the primary OS of GNU ld is Linux. This patch removes PF_X from PT_PHDR segment as gold does. Tested natively on Linux/x86 as well as crosss-binutils for alpha-linux, ia64-linux, powerpc64-linux, powerpc-linux, s390-linux, s390x-linux, sparc64-linux and sparc-linux. bfd/ PR ld/22423 * elf.c (_bfd_elf_map_sections_to_segments): Remove PF_X from PT_PHDR segment. ld/ PR ld/22423 * testsuite/ld-alpha/tlsbin.rd: Replace "R E " with "R +" for PT_PHDR segment. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-powerpc/tlsexe.r: Likewise. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-elf/pr22423.d: New test.
2017-11-07readelf ngettext fixesAlan Modra2-2/+2
This patch is a first pass at fixing readelf message pluralization. I've deliberately not fixed the "out of memory" errors since it's very unlikely that they will ever be complaining about not being able to allocate for a single entry, and a few others where the size is very unlikely to be 1 byte. Then there are messages like this one: "Out of %lu items there are %zu bucket clashes (longest of %zu entries).\n" I suppose this could be split into three parts, "Of %lu items ", "there are %zu bucket clashes ", and "(longest of %zu entries).\n", each part being printed separately, but that might not be ideal for sentence construction in other languages. For now I'm punting on this one. Changes to readelf output require lots of testsuite adjustment.. binutils/ * dwarf.c (read_uleb128): Properly pluralize messages. (display_debug_lines_raw, display_debug_loc): Likewise. (display_debug_names, process_cu_tu_index): Likewise. * od-macho.c (dump_code_signature_superblob): Likewise. * readelf.c (process_program_headers): Likewise. (process_section_header, process_relocs): Likewise. (hppa_process_unwind, arm_process_unwind): Likewise. (process_dynamic_section, process_version_sections): Likewise. (process_symbol_table, process_syminfo): Likewise. (apply_relocations, process_mips_specific): Likewise. (process_gnu_liblist, process_notes_at): Likewise. (process_archive): Likewise. * testsuite/binutils-all/dw2-1.W, * testsuite/binutils-all/dw2-3.W, * testsuite/binutils-all/dw2-3gabi.W, * testsuite/binutils-all/dw5.S, * testsuite/binutils-all/dw5.W, * testsuite/binutils-all/i386/compressed-1a.d, * testsuite/binutils-all/libdw2-compressedgabi.out, * testsuite/binutils-all/objdump.W, * testsuite/binutils-all/readelf.r, * testsuite/binutils-all/readelf.r-64, * testsuite/binutils-all/x86-64/compressed-1a.d: Update for pluralization fixes. gas/ * testsuite/gas/arm/got_prel.d, * testsuite/gas/elf/dwarf2-1.d, * testsuite/gas/elf/dwarf2-2.d, * testsuite/gas/elf/dwarf2-3.d, * testsuite/gas/elf/dwarf2-5.d, * testsuite/gas/elf/dwarf2-6.d, * testsuite/gas/i386/debug1.d, * testsuite/gas/i386/dw2-compress-1.d, * testsuite/gas/i386/dw2-compress-3a.d, * testsuite/gas/i386/dw2-compress-3b.d, * testsuite/gas/i386/dw2-compressed-1.d, * testsuite/gas/i386/dw2-compressed-3a.d, * testsuite/gas/i386/dw2-compressed-3b.d, * testsuite/gas/i386/ilp32/x86-64-localpic.d, * testsuite/gas/i386/localpic.d, * testsuite/gas/i386/x86-64-localpic.d, * testsuite/gas/ia64/pr13167.d, * testsuite/gas/mips/loc-swap-2.d, * testsuite/gas/mips/loc-swap.d, * testsuite/gas/mips/micromips@loc-swap-2.d, * testsuite/gas/mips/micromips@loc-swap.d, * testsuite/gas/mips/mips16-dwarf2-n32.d, * testsuite/gas/mips/mips16-dwarf2.d, * testsuite/gas/mips/mips16@loc-swap-2.d, * testsuite/gas/mips/mips16@loc-swap.d, * testsuite/gas/mips/mips16e@loc-swap.d, * testsuite/gas/mmix/bspec-1.d, * testsuite/gas/mmix/bspec-2.d, * testsuite/gas/tic6x/unwind-1.d, * testsuite/gas/tic6x/unwind-2.d, * testsuite/gas/tic6x/unwind-3.d: Update for pluralization fixes. ld/ * testsuite/ld-aarch64/ifunc-13.d, * testsuite/ld-aarch64/ifunc-15.d, * testsuite/ld-aarch64/ifunc-20.d, * testsuite/ld-alpha/tlsbin.rd, * testsuite/ld-alpha/tlspic.rd, * testsuite/ld-arm/ifunc-3.rd, * testsuite/ld-arm/ifunc-9.rd, * testsuite/ld-arm/unwind-mix.d, * testsuite/ld-arm/unwind-rel.d, * testsuite/ld-cris/hiddef1.d, * testsuite/ld-cris/libdso-13.d, * testsuite/ld-cris/libdso-2.d, * testsuite/ld-cris/pr16044.d, * testsuite/ld-cris/tls-local-63.d, * testsuite/ld-cris/tls-local-64.d, * testsuite/ld-cris/tls-und-38.d, * testsuite/ld-cris/tls-und-42.d, * testsuite/ld-cris/tls-und-46.d, * testsuite/ld-cris/tls-und-50.d, * testsuite/ld-cris/weakref3.d, * testsuite/ld-cris/weakref4.d, * testsuite/ld-elf/comm-data2r.rd, * testsuite/ld-elf/discard1.d, * testsuite/ld-elf/discard2.d, * testsuite/ld-elf/pr19539.d, * testsuite/ld-elf/pr22374-1.r, * testsuite/ld-elf/pr22374-2.r, * testsuite/ld-i386/combreloc.d, * testsuite/ld-i386/emit-relocs-nacl.rd, * testsuite/ld-i386/emit-relocs.rd, * testsuite/ld-i386/pr13302.d, * testsuite/ld-i386/pr17709-nacl.rd, * testsuite/ld-i386/pr17709.rd, * testsuite/ld-i386/pr19539.d, * testsuite/ld-i386/pr19615.d, * testsuite/ld-i386/pr19636-1a.d, * testsuite/ld-i386/pr19636-1e.d, * testsuite/ld-i386/pr19636-1f.d, * testsuite/ld-i386/pr19636-2a.d, * testsuite/ld-i386/pr19636-2b.d, * testsuite/ld-i386/pr19636-2d-nacl.d, * testsuite/ld-i386/pr19636-2e-nacl.d, * testsuite/ld-i386/pr19636-3a.d, * testsuite/ld-i386/pr19636-3d.d, * testsuite/ld-i386/pr19636-3e.d, * testsuite/ld-i386/pr19636-4a.d, * testsuite/ld-i386/pr19645.d, * testsuite/ld-i386/pr19827-nacl.rd, * testsuite/ld-i386/pr19827.rd, * testsuite/ld-i386/pr20253-4a.d, * testsuite/ld-i386/pr20253-4b.d, * testsuite/ld-i386/pr20253-5.d, * testsuite/ld-i386/tlsbin-nacl.rd, * testsuite/ld-i386/tlsbin.rd, * testsuite/ld-i386/tlspic-nacl.rd, * testsuite/ld-i386/tlspic.rd, * testsuite/ld-i386/undefweakb.d, * testsuite/ld-ia64/tlsbin.rd, * testsuite/ld-ia64/tlspic.rd, * testsuite/ld-ifunc/ifunc-13-i386.d, * testsuite/ld-ifunc/ifunc-13-x86-64.d, * testsuite/ld-ifunc/ifunc-15-i386.d, * testsuite/ld-ifunc/ifunc-15-x86-64.d, * testsuite/ld-ifunc/ifunc-20-i386.d, * testsuite/ld-ifunc/ifunc-20-x86-64.d, * testsuite/ld-ifunc/ifunc-23a-x86.d, * testsuite/ld-ifunc/ifunc-23b-x86.d, * testsuite/ld-ifunc/ifunc-23c-x86.d, * testsuite/ld-ifunc/ifunc-24a-x86.d, * testsuite/ld-ifunc/ifunc-24b-x86.d, * testsuite/ld-ifunc/ifunc-24c-x86.d, * testsuite/ld-ifunc/ifunc-25a-x86.d, * testsuite/ld-ifunc/ifunc-25b-x86.d, * testsuite/ld-ifunc/ifunc-25c-x86.d, * testsuite/ld-m68k/got-1.d, * testsuite/ld-mips-elf/vxworks1.rd, * testsuite/ld-powerpc/ambiguousv1.d, * testsuite/ld-powerpc/ambiguousv1b.d, * testsuite/ld-powerpc/ambiguousv2.d, * testsuite/ld-powerpc/ambiguousv2b.d, * testsuite/ld-powerpc/tlsexe.r, * testsuite/ld-powerpc/tlsexe32.r, * testsuite/ld-powerpc/tlsexetoc.r, * testsuite/ld-powerpc/tlsso.r, * testsuite/ld-powerpc/tlsso32.r, * testsuite/ld-powerpc/tlstocso.r, * testsuite/ld-powerpc/vle-multiseg-1.d, * testsuite/ld-powerpc/vle-multiseg-2.d, * testsuite/ld-powerpc/vle-multiseg-3.d, * testsuite/ld-s390/tlsbin.rd, * testsuite/ld-s390/tlsbin_64.rd, * testsuite/ld-s390/tlspic.rd, * testsuite/ld-s390/tlspic_64.rd, * testsuite/ld-sh/ld-r-1.d, * testsuite/ld-sh/sh64/gotplt.d, * testsuite/ld-sh/shared-1.d, * testsuite/ld-sh/tlsbin-2.d, * testsuite/ld-sh/tlspic-2.d, * testsuite/ld-sparc/gotop32.rd, * testsuite/ld-sparc/gotop64.rd, * testsuite/ld-sparc/tlssunpic32.rd, * testsuite/ld-sparc/tlssunpic64.rd, * testsuite/ld-sparc/vxworks1-lib.rd, * testsuite/ld-tic6x/shlib-app-1.rd, * testsuite/ld-tic6x/shlib-app-1b.rd, * testsuite/ld-tic6x/shlib-app-1r.rd, * testsuite/ld-tic6x/shlib-app-1rb.rd, * testsuite/ld-tic6x/shlib-noindex.rd, * testsuite/ld-vax-elf/export-class-data.rd, * testsuite/ld-x86-64/pr13082-1a.d, * testsuite/ld-x86-64/pr13082-1b.d, * testsuite/ld-x86-64/pr13082-2a.d, * testsuite/ld-x86-64/pr13082-2b.d, * testsuite/ld-x86-64/pr13082-3a.d, * testsuite/ld-x86-64/pr13082-3c.d, * testsuite/ld-x86-64/pr13082-4a.d, * testsuite/ld-x86-64/pr13082-5a.d, * testsuite/ld-x86-64/pr13082-5b.d, * testsuite/ld-x86-64/pr13082-6a.d, * testsuite/ld-x86-64/pr13082-6b.d, * testsuite/ld-x86-64/pr17709-nacl.rd, * testsuite/ld-x86-64/pr17709.rd, * testsuite/ld-x86-64/pr19539a.d, * testsuite/ld-x86-64/pr19539b.d, * testsuite/ld-x86-64/pr19615.d, * testsuite/ld-x86-64/pr19636-1a.d, * testsuite/ld-x86-64/pr19636-1d.d, * testsuite/ld-x86-64/pr19636-1e.d, * testsuite/ld-x86-64/pr19636-2a.d, * testsuite/ld-x86-64/pr19636-2e.d, * testsuite/ld-x86-64/pr19636-2f.d, * testsuite/ld-x86-64/pr19636-3a.d, * testsuite/ld-x86-64/pr19645.d, * testsuite/ld-x86-64/pr19807-2b.d, * testsuite/ld-x86-64/pr19807-2d.d, * testsuite/ld-x86-64/pr19827-nacl.rd, * testsuite/ld-x86-64/pr19827.rd, * testsuite/ld-x86-64/pr20253-4a.d, * testsuite/ld-x86-64/pr20253-4b.d, * testsuite/ld-x86-64/pr20253-4d.d, * testsuite/ld-x86-64/pr20253-4e.d, * testsuite/ld-x86-64/pr20253-5a.d, * testsuite/ld-x86-64/pr20253-5b.d, * testsuite/ld-x86-64/tlsbin-nacl.rd, * testsuite/ld-x86-64/tlsbin.rd, * testsuite/ld-x86-64/tlspic-nacl.rd, * testsuite/ld-x86-64/tlspic.rd, * testsuite/ld-x86-64/tlspic2-nacl.rd: Update for pluralization fixes.
2017-08-07Support different ld --hash-style in the ld testsuiteAlan Modra6-7/+8
When ld is running with something other than --hash-style=sysv by default, numerous tests need tweaking. Most of the changes just add --hash-style=sysv. I didn't want to make --hash-style=sysv global as that means --hash-style=gnu isn't well tested. * testsuite/ld-alpha/alpha.exp: Add --hash-style=sysv to various test's ld options. * testsuite/ld-arm/arm-elf.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/readelf.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-ia64/ia64.exp: Likewise. * testsuite/ld-m68k/m68k.exp: Likewise. * testsuite/ld-metag/metag.exp: Likewise. * testsuite/ld-powerpc/powerpc.exp: Likewise. * testsuite/ld-s390/s390.exp: Likewise. * testsuite/ld-sh/sh-vxworks.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-sparc/sparc.exp: Likewise. * testsuite/ld-tic6x/tic6x.exp: Likewise. * testsuite/ld-vax-elf/vax-elf.exp: Likewise. * testsuite/ld-x86-64/mpx.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-xtensa/xtensa.exp: Likewise. * testsuite/ld-elf/comm-data2.ld: Add .gnu.hash output section. * testsuite/ld-elf/pr20828-v.ld: Likewise. * testsuite/ld-elf/pr20828.ld: Likewise. * testsuite/ld-elf/pr21233.ld: Likewise. * testsuite/ld-elf/pr21384.ld: Likewise. * testsuite/ld-elf/provide-hidden-1.ld: Likewise. * testsuite/ld-elf/provide-hidden-2.ld: Likewise. * testsuite/ld-elf/provide-hidden-s.ld: Likewise. * testsuite/ld-scripts/cross1.t: Likewise. * testsuite/ld-elf/stab.d: Adjust allowed section indices. * testsuite/ld-i386/pie1.d: Don't match addresses. * testsuite/ld-i386/plt-pic2.dd: Likewise. * testsuite/ld-i386/pr19636-1d.d: Likewise. * testsuite/ld-i386/pr19636-2c.d: Likewise. * testsuite/ld-powerpc/elfv2so.d: Likewise. * testsuite/ld-powerpc/tlsopt5.d: Likewise. * testsuite/ld-powerpc/tlsopt5.wf: Likewise. * testsuite/ld-powerpc/tlsopt5_32.d: Likewise. * testsuite/ld-i386/pr19636-2b.d: Don't match _start. * testsuite/ld-powerpc/ambiguousv1.d: Relax symbol count, index and address match. * testsuite/ld-powerpc/ambiguousv1b.d: Likewise. * testsuite/ld-powerpc/ambiguousv2.d: Likewise. * testsuite/ld-powerpc/ambiguousv2b.d: Likewise. * testsuite/ld-aarch64/gc-plt-relocs.d: Run ld with --hash-style=sysv. * testsuite/ld-aarch64/ifunc-1.d: Likewise. * testsuite/ld-aarch64/ifunc-2.d: Likewise. * testsuite/ld-aarch64/ifunc-21.d: Likewise. * testsuite/ld-aarch64/relasz.d: Likewise. * testsuite/ld-aarch64/tls-small-ld.d: Likewise. * testsuite/ld-aarch64/tls-tiny-ld.d: Likewise. * testsuite/ld-arc/tls_gd-01.d: Likewise. * testsuite/ld-cris/libdso-10.d: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-cris/pic-gc-72.d: Likewise. * testsuite/ld-cris/pic-gc-73.d: Likewise. * testsuite/ld-cris/tls-gd-1.d: Likewise. * testsuite/ld-cris/tls-gd-1h.d: Likewise. * testsuite/ld-cris/tls-gd-2.d: Likewise. * testsuite/ld-cris/tls-gd-2h.d: Likewise. * testsuite/ld-cris/tls-ie-10.d: Likewise. * testsuite/ld-cris/tls-ie-11.d: Likewise. * testsuite/ld-cris/tls-ie-8.d: Likewise. * testsuite/ld-cris/tls-ie-9.d: Likewise. * testsuite/ld-cris/tls-ld-4.d: Likewise. * testsuite/ld-cris/tls-ld-5.d: Likewise. * testsuite/ld-cris/tls-ld-6.d: Likewise. * testsuite/ld-cris/tls-ld-7.d: Likewise. * testsuite/ld-cris/tls-ldgd-14.d: Likewise. * testsuite/ld-cris/tls-ldgd-15.d: Likewise. * testsuite/ld-cris/tls-ldgdx-14.d: Likewise. * testsuite/ld-cris/tls-ldgdx-15.d: Likewise. * testsuite/ld-cris/tls-local-54.d: Likewise. * testsuite/ld-cris/tls-local-60.d: Likewise. * testsuite/ld-cris/tls-local-61.d: Likewise. * testsuite/ld-cris/weakhiddso.d: Likewise. * testsuite/ld-elf/linkinfo1a.d: Likewise. * testsuite/ld-elf/linkinfo1b.d: Likewise. * testsuite/ld-elf/pr19617a.d: Likewise. * testsuite/ld-elfvsb/hidden2.d: Likewise. * testsuite/ld-frv/fdpic-pie-6.d: Likewise. * testsuite/ld-frv/fdpic-shared-2.d: Likewise. * testsuite/ld-frv/fdpic-shared-5.d: Likewise. * testsuite/ld-frv/fdpic-shared-6.d: Likewise. * testsuite/ld-frv/fdpic-shared-8.d: Likewise. * testsuite/ld-frv/fdpic-shared-local-2.d: Likewise. * testsuite/ld-frv/fdpic-shared-local-8.d: Likewise. * testsuite/ld-frv/tls-dynamic-2.d: Likewise. * testsuite/ld-i386/ibt-plt-1.d: Likewise. * testsuite/ld-i386/ibt-plt-2a.d: Likewise. * testsuite/ld-i386/ibt-plt-2c.d: Likewise. * testsuite/ld-i386/ibt-plt-3a.d: Likewise. * testsuite/ld-i386/ibt-plt-3c.d: Likewise. * testsuite/ld-i386/pr20830.d: Likewise. * testsuite/ld-ia64/merge1.d: Likewise. * testsuite/ld-ia64/merge2.d: Likewise. * testsuite/ld-ia64/merge3.d: Likewise. * testsuite/ld-ia64/merge4.d: Likewise. * testsuite/ld-ia64/merge5.d: Likewise. * testsuite/ld-ifunc/ifunc-1-local-x86.d: Likewise. * testsuite/ld-ifunc/ifunc-1-x86.d: Likewise. * testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise. * testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise. * testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise. * testsuite/ld-ifunc/pr17154-i386-now.d: Likewise. * testsuite/ld-ifunc/pr17154-i386.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise. * testsuite/ld-ifunc/pr17154-x86-64.d: Likewise. * testsuite/ld-m68k/got-1.d: Likewise. * testsuite/ld-m68k/got-multigot-12-13-14-34-35-ok.d: Likewise. * testsuite/ld-m68k/got-multigot-14-ok.d: Likewise. * testsuite/ld-m68k/got-multigot-15-er.d: Likewise. * testsuite/ld-m68k/got-negative-12-13-14-34-ok.d: Likewise. * testsuite/ld-m68k/got-negative-12-13-14-35-er.d: Likewise. * testsuite/ld-m68k/got-negative-14-ok.d: Likewise. * testsuite/ld-m68k/got-negative-15-er.d: Likewise. * testsuite/ld-m68k/got-single-12-ok.d: Likewise. * testsuite/ld-m68k/got-single-13-er.d: Likewise. * testsuite/ld-m68k/got-xgot-12-13-14-15-34-35-ok.d: Likewise. * testsuite/ld-m68k/got-xgot-15-ok.d: Likewise. * testsuite/ld-m68k/tls-gd-1.d: Likewise. * testsuite/ld-m68k/tls-gd-2.d: Likewise. * testsuite/ld-m68k/tls-gd-ie-1.d: Likewise. * testsuite/ld-m68k/tls-ie-1.d: Likewise. * testsuite/ld-m68k/tls-ld-1.d: Likewise. * testsuite/ld-m68k/tls-ld-2.d: Likewise. * testsuite/ld-sh/shared-2.d: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-1.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise. * testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise. * testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise. * testsuite/ld-x86-64/bnd-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-1.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2c.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-3c.d: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/load1c-nacl.d: Likewise. * testsuite/ld-x86-64/load1c.d: Likewise. * testsuite/ld-x86-64/load1d-nacl.d: Likewise. * testsuite/ld-x86-64/load1d.d: Likewise. * testsuite/ld-x86-64/pie3-nacl.d: Likewise. * testsuite/ld-x86-64/pie3.d: Likewise. * testsuite/ld-x86-64/pr14207.d: Likewise. * testsuite/ld-x86-64/pr19162.d: Likewise. * testsuite/ld-x86-64/pr19636-2d-nacl.d: Likewise. * testsuite/ld-x86-64/pr19636-2d.d: Likewise. * testsuite/ld-x86-64/pr20253-1d.d: Likewise. * testsuite/ld-x86-64/pr20253-1f.d: Likewise. * testsuite/ld-x86-64/pr20253-1j.d: Likewise. * testsuite/ld-x86-64/pr20253-1l.d: Likewise. * testsuite/ld-x86-64/pr20830a-now.d: Likewise. * testsuite/ld-x86-64/pr20830a.d: Likewise. * testsuite/ld-x86-64/pr20830b-now.d: Likewise. * testsuite/ld-x86-64/pr20830b.d: Likewise. * testsuite/ld-x86-64/pr21038a-now.d: Likewise. * testsuite/ld-x86-64/pr21038a.d: Likewise. * testsuite/ld-x86-64/pr21038b-now.d: Likewise. * testsuite/ld-x86-64/pr21038b.d: Likewise. * testsuite/ld-x86-64/pr21038c-now.d: Likewise. * testsuite/ld-x86-64/pr21038c.d: Likewise.
2017-01-02Update year range in copyright notice of all files.Alan Modra2-2/+2
2016-08-19Place .shstrtab section after .symtab and .strtab, thus restoring ↵Nick Clifton2-2/+2
monotonically increasing section offsets. bfd * elf.c (assign_section_numbers): Assign number for the .shstrtab section after the symbol table and string table sections. binutils * testsuite/binutils-all/readelf.s: Adjust expected ordering of sections. * testsuite/binutils-all/readelf.s-64: Likewise. gas * testsuite/gas/i386/ilp32/x86-64-unwind.d: Adjust expected ordering of sections. * testsuite/gas/i386/x86-64-unwind.d: Likewise. * testsuite/gas/ia64/alias-ilp32.d: Likewise. * testsuite/gas/ia64/alias.d: Likewise. * testsuite/gas/ia64/group-1.d: Likewise. * testsuite/gas/ia64/group-2.d: Likewise. * testsuite/gas/ia64/secname-ilp32.d: Likewise. * testsuite/gas/ia64/secname.d: Likewise. * testsuite/gas/ia64/unwind-ilp32.d: Likewise. * testsuite/gas/ia64/unwind.d: Likewise. * testsuite/gas/ia64/xdata-ilp32.d: Likewise. * testsuite/gas/ia64/xdata.d: Likewise. * testsuite/gas/mmix/bspec-1.d: Likewise. * testsuite/gas/mmix/bspec-2.d: Likewise. * testsuite/gas/mmix/byte-1.d: Likewise. * testsuite/gas/mmix/loc-1.d: Likewise. * testsuite/gas/mmix/loc-2.d: Likewise. * testsuite/gas/mmix/loc-3.d: Likewise. * testsuite/gas/mmix/loc-4.d: Likewise. * testsuite/gas/mmix/loc-5.d: Likewise. * testsuite/gas/tic6x/scomm-directive-4.d: Likewise. ld * testsuite/ld-alpha/tlsbin.rd: Adjust expected ordering of sections. * testsuite/ld-alpha/tlsbinr.rd: Likewise. * testsuite/ld-alpha/tlspic.rd: Likewise. * testsuite/ld-cris/libdso-2.d: Likewise. * testsuite/ld-i386/nogot1.d: Likewise. * testsuite/ld-i386/pr12718.d: Likewise. * testsuite/ld-i386/pr12921.d: Likewise. * testsuite/ld-i386/tlsbin-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin.rd: Likewise. * testsuite/ld-i386/tlsbin2-nacl.rd: Likewise. * testsuite/ld-i386/tlsbin2.rd: Likewise. * testsuite/ld-i386/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsbindesc.rd: Likewise. * testsuite/ld-i386/tlsdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsdesc.rd: Likewise. * testsuite/ld-i386/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-i386/tlsgdesc.rd: Likewise. * testsuite/ld-i386/tlsnopic-nacl.rd: Likewise. * testsuite/ld-i386/tlsnopic.rd: Likewise. * testsuite/ld-i386/tlspic-nacl.rd: Likewise. * testsuite/ld-i386/tlspic.rd: Likewise. * testsuite/ld-i386/tlspic2-nacl.rd: Likewise. * testsuite/ld-i386/tlspic2.rd: Likewise. * testsuite/ld-ia64/tlsbin.rd: Likewise. * testsuite/ld-ia64/tlspic.rd: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-10.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-50.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-60.d: Likewise. * testsuite/ld-mips-elf/attr-gnu-4-70.d: Likewise. * testsuite/ld-mmix/bspec1.d: Likewise. * testsuite/ld-mmix/bspec2.d: Likewise. * testsuite/ld-mmix/local1.d: Likewise. * testsuite/ld-mmix/local3.d: Likewise. * testsuite/ld-mmix/local5.d: Likewise. * testsuite/ld-mmix/local7.d: Likewise. * testsuite/ld-mmix/undef-3.d: Likewise. * testsuite/ld-powerpc/tlsexe.r: Likewise. * testsuite/ld-powerpc/tlsexe32.r: Likewise. * testsuite/ld-powerpc/tlsexetoc.r: Likewise. * testsuite/ld-powerpc/tlsso.r: Likewise. * testsuite/ld-powerpc/tlsso32.r: Likewise. * testsuite/ld-powerpc/tlstocso.r: Likewise. * testsuite/ld-s390/tlsbin.rd: Likewise. * testsuite/ld-s390/tlsbin_64.rd: Likewise. * testsuite/ld-s390/tlspic.rd: Likewise. * testsuite/ld-s390/tlspic_64.rd: Likewise. * testsuite/ld-sh/sh64/crange1.rd: Likewise. * testsuite/ld-sh/sh64/crange2.rd: Likewise. * testsuite/ld-sh/sh64/crange3-cmpct.rd: Likewise. * testsuite/ld-sh/sh64/crange3-media.rd: Likewise. * testsuite/ld-sh/sh64/crange3.rd: Likewise. * testsuite/ld-sh/sh64/crangerel1.rd: Likewise. * testsuite/ld-sh/sh64/crangerel2.rd: Likewise. * testsuite/ld-sh/tlsbin-2.d: Likewise. * testsuite/ld-sh/tlspic-2.d: Likewise. * testsuite/ld-sparc/gotop32.rd: Likewise. * testsuite/ld-sparc/gotop64.rd: Likewise. * testsuite/ld-sparc/tlssunbin32.rd: Likewise. * testsuite/ld-sparc/tlssunbin64.rd: Likewise. * testsuite/ld-sparc/tlssunnopic32.rd: Likewise. * testsuite/ld-sparc/tlssunnopic64.rd: Likewise. * testsuite/ld-sparc/tlssunpic32.rd: Likewise. * testsuite/ld-sparc/tlssunpic64.rd: Likewise. * testsuite/ld-tic6x/common.d: Likewise. * testsuite/ld-tic6x/shlib-1.rd: Likewise. * testsuite/ld-tic6x/shlib-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1b.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1r.rd: Likewise. * testsuite/ld-tic6x/shlib-app-1rb.rd: Likewise. * testsuite/ld-tic6x/shlib-noindex.rd: Likewise. * testsuite/ld-tic6x/static-app-1.rd: Likewise. * testsuite/ld-tic6x/static-app-1b.rd: Likewise. * testsuite/ld-tic6x/static-app-1r.rd: Likewise. * testsuite/ld-tic6x/static-app-1rb.rd: Likewise. * testsuite/ld-x86-64/ilp32-4-nacl.d: Likewise. * testsuite/ld-x86-64/ilp32-4.d: Likewise. * testsuite/ld-x86-64/nogot1.d: Likewise. * testsuite/ld-x86-64/pr12718.d: Likewise. * testsuite/ld-x86-64/pr12921.d: Likewise. * testsuite/ld-x86-64/split-by-file-nacl.rd: Likewise. * testsuite/ld-x86-64/split-by-file.rd: Likewise. * testsuite/ld-x86-64/tlsbin-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin.rd: Likewise. * testsuite/ld-x86-64/tlsbin2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbin2.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsbindesc.rd: Likewise. * testsuite/ld-x86-64/tlsdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsdesc.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc-nacl.rd: Likewise. * testsuite/ld-x86-64/tlsgdesc.rd: Likewise. * testsuite/ld-x86-64/tlspic-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic.rd: Likewise. * testsuite/ld-x86-64/tlspic2-nacl.rd: Likewise. * testsuite/ld-x86-64/tlspic2.rd: Likewise. * testsuite/ld-xtensa/tlsbin.rd: Likewise. * testsuite/ld-xtensa/tlspic.rd: Likewise.
2016-01-01Copyright update for binutilsAlan Modra2-2/+2
2015-02-19Strip undefined symbols from .symtabAlan Modra3-6/+0
bfd/ PR ld/4317 * elflink.c (elf_link_input_bfd): Drop undefined local syms. (elf_link_output_extsym): Drop local and global undefined syms. Tidy. Expand comment. ld/testsuite/ PR ld/4317 * ld-aarch64/gc-tls-relocs.d, * ld-cris/locref2.d, * ld-elf/ehdr_start-weak.d, * ld-elf/group1.d, * ld-i386/compressed1.d, * ld-ia64/error1.d, * ld-ia64/error2.d, * ld-ia64/error3.d, * ld-mips-elf/pic-and-nonpic-1.nd, * ld-mmix/undef-3.d, * ld-powerpc/tlsexe.r, * ld-powerpc/tlsexetoc.r, * ld-powerpc/tlsso.r, * ld-powerpc/tlstocso.r, * ld-x86-64/compressed1.d, * ld-x86-64/pie1.d: Update.
2015-02-18Properly place the NULL STT_FILE symbol revistitedAlan Modra1-3/+3
I was having a little closer look at what is going on here and noticed that HJ unconditionally emits a NULL STT_FILE symbol before emitting forced local symbols. That means we really don't need a second pass over forced local symbols. The only reason for two passes is when some forced local symbol can be emitted before the NULL STT_FILE. So I set about removing the second pass, updating the testsuite all over again. It's also unnecessary to emit the NULL STT_FILE when no previous file symbol has been emitted. bfd/ PR ld/17975 * elflink.c (struct elf_outext_info): Remove need_second_pass and second_pass. (elf_link_output_extsym): Delete code handling second forced local pass. Move code emitting NULL STT_FILE symbol later, so that it can be omitted if forced local is stripped. Don't emit the NULL STT_FILE if no file symbols have been output. (bfd_elf_final_link): Remove second forced local pass. * elf32-ppc.c (add_stub_sym): Set linker_def on linker syms. (ppc_elf_size_dynamic_sections): Likewise. * elf64-ppc.c (ppc_build_one_stub): Likewise. (build_global_entry_stubs): Likewise. (ppc64_elf_build_stubs): Likewise. ld/testsuite/ PR ld/17975 * ld-aarch64/gc-tls-relocs.d, * ld-alpha/tlspic.rd, * ld-cris/libdso-2.d, * ld-i386/tlsdesc-nacl.rd, * ld-i386/tlsdesc.rd, * ld-i386/tlsnopic-nacl.rd, * ld-i386/tlsnopic.rd, * ld-i386/tlspic-nacl.rd, * ld-i386/tlspic.rd, * ld-ia64/tlspic.rd, * ld-powerpc/tlsexe.r, * ld-powerpc/tlsexetoc.r, * ld-powerpc/tlsso.r, * ld-powerpc/tlstocso.r, * ld-s390/tlspic.rd, * ld-s390/tlspic_64.rd, * ld-sparc/tlssunnopic32.rd, * ld-sparc/tlssunnopic64.rd, * ld-sparc/tlssunpic32.rd, * ld-sparc/tlssunpic64.rd, * ld-tic6x/shlib-1.rd, * ld-tic6x/shlib-1b.rd, * ld-tic6x/shlib-1r.rd, * ld-tic6x/shlib-1rb.rd, * ld-tic6x/shlib-noindex.rd, * ld-x86-64/tlsdesc-nacl.rd, * ld-x86-64/tlsdesc.rd, * ld-x86-64/tlspic-nacl.rd, * ld-x86-64/tlspic.rd: Update.
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra2-2/+2
2014-03-05Update copyright yearsAlan Modra2-2/+2
2013-11-05Pass ignored unresolved relocations to ld backendH.J. Lu4-0/+51
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-02-19 * lib/ld-lib.exp (run_ld_link_tests): Add another argument, passMaciej W. Rozycki1-6/+6
its contents to ar_simple_create and ld_simple_link after objfiles. * ld-aarch64/aarch64-elf.exp: Adjust accordingly. * ld-alpha/alpha.exp: Likewise. * ld-arm/arm-elf.exp: Likewise. * ld-arm/export-class.exp: Likewise. * ld-elf/comm-data.exp: Likewise. * ld-elf/eh-group.exp: Likewise. * ld-elf/elf.exp: Likewise. * ld-elf/export-class.exp: Likewise. * ld-elfvers/vers.exp: Likewise. * ld-frv/tls.exp: Likewise. * ld-i386/export-class.exp: Likewise. * ld-i386/i386.exp: Likewise. * ld-ia64/ia64.exp: Likewise. * ld-libs/libs.exp: Likewise. * ld-m68k/m68k.exp: Likewise. * ld-metag/metag.exp: Likewise. * ld-mips-elf/comm-data.exp: Likewise. * ld-mips-elf/export-class.exp: Likewise. * ld-mips-elf/mips-elf.exp: Likewise. * ld-mn10300/mn10300.exp: Likewise. * ld-pe/pe-compile.exp: Likewise. * ld-pe/pe.exp: Likewise. * ld-plugin/plugin.exp: Likewise. * ld-powerpc/aix52.exp: Likewise. * ld-powerpc/export-class.exp: Likewise. * ld-powerpc/powerpc.exp: Likewise. * ld-s390/s390.exp: Likewise. * ld-sh/sh-vxworks.exp: Likewise. * ld-sh/sh64/sh64.exp: Likewise. * ld-sparc/sparc.exp: Likewise. * ld-tic6x/tic6x.exp: Likewise. * ld-tilegx/tilegx.exp: Likewise. * ld-tilepro/tilepro.exp: Likewise. * ld-undefined/entry.exp: Likewise. * ld-vax-elf/vax-elf.exp: Likewise. * ld-x86-64/dwarfreloc.exp: Likewise. * ld-x86-64/export-class.exp: Likewise. * ld-x86-64/x86-64.exp: Likewise. * ld-xc16x/xc16x.exp: Likewise. * ld-xstormy16/xstormy16.exp: Likewise. * ld-xtensa/xtensa.exp: Likewise.
2012-06-15ld/Alan Modra2-12/+12
* ldlang.h (lang_output_section_statement_type): Add after_end field. (lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete. (section_for_dot): Declare. * ldlang.c (lang_size_sections_1): Correct comment. (current_section): Move earlier. (current_assign, prefer_next_section): New static vars. (lang_do_assignments_1): Add found_end param. Detect _end assignment to set found_end. Set os->after_end. Set above statics. (lang_do_assignments): Adjust lang_do_assignments_1 call. Init vars. (section_for_dot): New function. (lang_set_startof): Don't make an absolute symbol. (lang_abs_symbol_at_beginning_of, lang_abs_symbol_at_end_of): Delete. * ldexp.c (new_rel_from_abs): Use section_for_dot. * emultempl/lnk960.em (symbol_at_beginning_of): New function. (symbol_at_end_of): Likewise. (lnk960_after_allocation): Use them. * scripttempl/elf.sc: Precede OTHER_GOT_SYMBOLS with . = .; and likewise before __bss_start. ld/testsuite/ Update far too many tests.
2012-06-06bfd/Alan Modra2-2/+7
* elflink.c (elf_link_input_bfd): Provide a file symbol for each input file with local syms, if the input lacks such. (bfd_elf_final_link): Add a file symbol to mark end of locals for which we can associate with input files. (struct elf_final_link_info): Add filesym_count field. (struct elf_outext_info): Add need_second_pass and second_pass. (elf_link_output_extsym): Detect symbols defined in the output file, emit them on second pass over locals. ld/testsuite/ Update to suit added STT_FILE symbols.
2012-05-11Always display addend as signed hex numberH.J. Lu1-3/+3
binutils/ PR binutils/14088 * readelf.c (dump_relocations): Always display addend as signed hex number. ld/testsuite/ PR binutils/14088 * ld-ia64/tlspic.rd: Updated. * ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlspic-nacl.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2009-10-07Checked in the missing testcases.H.J. Lu3-0/+36
2009-09-24bfd/H.J. Lu2-20/+20
2009-09-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/10630 * elflink.c (elf_link_output_extsym): Turn off visibility on local symbol. (bfd_elf_final_link): Turn off visibility on dynamic local symbol. ld/testsuite/ 2009-09-24 H.J. Lu <hongjiu.lu@intel.com> PR ld/10630 * ld-alpha/tlsbin.rd: Remove HIDDEN/.hidden on local symbols. * ld-alpha/tlsbinr.rd: Likewise. * ld-alpha/tlspic.rd: Likewise. * ld-cris/libdso-2.d: Likewise. * ld-cris/locref1.d: Likewise. * ld-cris/locref2.d: Likewise. * ld-cris/tls-e-20a.d: Likewise. * ld-cris/tls-e-20.d: Likewise. * ld-cris/tls-e-80.d: Likewise. * ld-cris/tls-gc-68.d: Likewise. * ld-cris/tls-gc-69.d: Likewise. * ld-cris/tls-gc-70.d: Likewise. * ld-cris/tls-gc-75.d: Likewise. * ld-cris/tls-gc-76.d: Likewise. * ld-cris/tls-gc-79.d: Likewise. * ld-cris/tls-gd-1h.d: Likewise. * ld-cris/tls-gd-2h.d: Likewise. * ld-cris/tls-ld-4.d: Likewise. * ld-cris/tls-ld-5.d: Likewise. * ld-cris/tls-ld-6.d: Likewise. * ld-cris/tls-ld-7.d: Likewise. * ld-cris/tls-ldgd-14.d: Likewise. * ld-cris/tls-ldgd-15.d: Likewise. * ld-cris/tls-local-63.d: Likewise. * ld-cris/tls-local-64.d: Likewise. * ld-elf/pr9676.rd: Likewise. * ld-elf/pr9679.rd: Likewise. * ld-elfvsb/hidden2.d: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsgdesc.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-sparc/gotop32.rd: Likewise. * ld-sparc/gotop64.rd: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunbin64.rd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunnopic64.rd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-sparc/tlssunpic64.rd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlsgdesc.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise. * ld-xtensa/tlsbin.rd: Likewise. * ld-xtensa/tlspic.rd: Likewise. * ld-elf/local1.d: New. * ld-elf/local1.map: Likewise. * ld-elf/local1.s: Likewise. * ld-ia64/local1.d: Likewise. * ld-ia64/local1.map: Likewise. * ld-ia64/local1.s: Likewise.
2009-09-23Tolerate some whitespace differences in readelf output.Alan Modra2-114/+114
2009-09-02update copyright datesAlan Modra1-1/+1
2008-10-07 * readelf.c (process_section_headers): Do not cut the section names andNick Clifton2-4/+4
types if running with --wide. * ld-ia64/tlsbin.rd: Update expected output now that --wide does not truncate section names. * ld-ia64/tlspic.rd: Likewise.
2007-09-302007-09-29 Mike Frysinger <vapier@gentoo.org>Mike Frysinger2-45/+45
* ld-alpha/tlsbin.rd: Use [0-9]+ to match section header count and 0x[0-9a-f]+ to match section header offset. Match section indexes with \[[ 0-9]+\]. Use [0-9]+ to match program header count and 0x[0-9a-f]+ to match program header offset. Match .dynsym and .symtab entry counts with [0-9]+. * ld-alpha/tlsbinr.rd: Likewise. * ld-alpha/tlspic.rd: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsbindesc.rd: Likewise. * ld-i386/tlsdesc.rd: Likewise. * ld-i386/tlsgdesc.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunbin64.rd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunnopic64.rd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-sparc/tlssunpic64.rd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlsbindesc.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlsgdesc.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2007-09-02bfd/H.J. Lu2-0/+209
2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/4986 * dwarf2.c (new_line_sorts_after): Undo the last change. (add_line_info): Only keep the last entry with the same address and end sequence. ld/testsuite/ 2007-09-02 H.J. Lu <hongjiu.lu@intel.com> PR ld/4986 * ld-ia64/line.exp: New. * ld-ia64/undefined.s: Likewise. * ld-x86-64/line.exp: Don't check CC.
2007-07-06Update sources to GPLv3Nick Clifton1-4/+7
2007-06-19bfd/H.J. Lu10-0/+147
2007-06-19 H.J. Lu <hongjiu.lu@intel.com> PR ld/4590 * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset when removing duplicated entries. (get_dyn_sym_info): Initialize the got_offset field to -1. Update call to sort_dyn_sym_info. (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort array of addend and remove duplicates. ld/testsuite/ 2007-06-19 H.J. Lu <hongjiu.lu@intel.com> PR ld/4590 * ld-ia64/merge1.d: New. * ld-ia64/merge1.s: Likewise. * ld-ia64/merge2.d: Likewise. * ld-ia64/merge2.s: Likewise. * ld-ia64/merge3.d: Likewise. * ld-ia64/merge3.s: Likewise. * ld-ia64/merge4.d: Likewise. * ld-ia64/merge4.s: Likewise. * ld-ia64/merge5.d: Likewise. * ld-ia64/merge5.s: Likewise.
2006-12-04bfd/Jan Beulich2-10/+10
2006-12-04 Jan Beulich <jbeulich@novell.com> * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create .eh_frame_hdr section from here anymore. (bfd_elf_size_dynamic_sections): Call _bfd_elf_maybe_strip_eh_frame_hdr a little earlier. ld/ 2006-12-04 Jan Beulich <jbeulich@novell.com> * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Create .eh_frame_hdr section here. ld/testsuite/ 2006-12-04 Jan Beulich <jbeulich@novell.com> * ld-elf/eh-frame-hdr.d: New. * ld-elf/eh-frame-hdr.s: New. * ld-ia64/tlsbin.dd, ld-ia64/tlsbin.sd: Don't depend on exact linkage table layout.
2006-10-17bfd/Alan Modra1-5/+0
* elf-bfd.h (struct elf_link_hash_table): Reorder. Add text_index_section and data_index_section. (struct elf_backend_data): Add elf_backend_init_index_section. (_bfd_elf_init_1_index_section): Declare. (_bfd_elf_init_2_index_sections): Declare. * elfxx-target.h (elf_backend_init_index_section): Define. (elfNN_bed): Init new field. * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls section and text_index_section plus data_index_section. (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections. (_bfd_elf_init_1_index_section): New function. (_bfd_elf_init_2_index_sections): New function. (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section. (elf_link_input_bfd): When emitting relocs, use text_index_section and data_index_section for removed sections. * elf-m10300.c (elf_backend_omit_section_dynsym): Define. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-sh.c: Likewise. * elf32-xstormy16.c: Likewise. * elf32-xtensa.c: Likewise. * elf64-alpha.c: Likewise. * elf64-hppa.c: Likewise. * elf64-mmix.c: Likewise. * elf64-sh64.c: Likewise. * elfxx-ia64.c: Likewise. * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section and data_index_section sym for relocs against sections with no dynamic section sym. (elf_backend_init_index_section): Define. * elf32-cris.c: Similarly. * elf32-hppa.c: Similarly. * elf32-i370.c: Similarly. * elf32-m68k.c: Similarly. * elf32-mips.c: Similarly. * elf32-ppc.c: Similarly. * elf32-s390.c: Similarly. * elf32-sparc.c: Similarly. * elf32-vax.c: Similarly. * elf64-mips.c: Similarly. * elf64-ppc.c: Similarly. * elf64-s390.c: Similarly. * elf64-sparc.c: Similarly. * elf64-x86-64.c: Similarly. * elfn32-mips.c: Similarly. * elfxx-mips.c: Similarly. * elfxx-sparc.c: Similarly. * linker.c (fix_syms): Base symbols in removed sections on previous section in preference to using absolute section. ld/ * ldlang.c (strip_excluded_output_sections): Do strip sections that define syms, but don't ignore them. * ld.texinfo (Output Section Discarding): Revise. * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call finish_default. ld/testsuite/ Update for section sym changes.
2006-06-02bfd/Alan Modra2-8/+2
PR ld/2723 * elflink.c (bfd_elf_final_link): Don't output section symbols for special ELF sections. ld/testsuite/ Update for removal of some section syms.
2005-10-24bfd/H.J. Lu1-1/+0
2005-10-23 H.J. Lu <hongjiu.lu@intel.com> PR ld/1487 * elf-bfd.h (_bfd_generic_init_private_section_data): New. (_bfd_elf_init_private_section_data): New. * elf.c (elf_fake_sections): Don't set SHF_GROUP for relocatable link. (bfd_elf_set_group_contents): Don't handle relocatable link specially. (assign_section_numbers): If it isn't called by assembler, use the output section of elf_linked_to_section for SHF_LINK_ORDER. (_bfd_elf_init_private_section_data): New. (_bfd_elf_copy_private_section_data): Call it. * libbfd-in.h (_bfd_generic_init_private_section_data): New. * libbfd.c (_bfd_generic_init_private_section_data): New. * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_generic_init_private_section_data. (bfd_init_private_section_data): Likewise. * bfd-in2.h: Regenerated. * libbfd.h: Likewise. ld/ 2005-10-23 H.J. Lu <hongjiu.lu@intel.com> PR ld/1487 * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call bfd_match_sections_by_type to match section types. * ldlang.c (init_os): Take the input section. Call bfd_init_private_section_data if the input section isn't NULL. (exp_init_os): Pass NULL to init_os. (map_input_to_output_sections): Likewise. (lang_add_section): Pass the input section to init_os. ld/testsuite/ 2005-10-23 H.J. Lu <hongjiu.lu@intel.com> PR ld/1487 * ld-ia64/tlspic.rd: Updated.
2005-10-202005-10-20 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu2-44/+14
* ld-ia64/ia64.exp: Undo the last change. Add support for *.d. * ld-ia64/link-order.d: New file.
2005-10-192005-10-19 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-0/+46
* ld-ia64/ia64.exp: Check link order for ld -r.
2005-08-17bfd/Alan Modra1-2/+2
* elf32-cris.c (elf_cris_adjust_gotplt_to_got): Move assert later. * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Cope with being called without any got section. ld/testsuite/ * ld-alpha/tlsbin.rd: Update. * ld-alpha/tlsbinr.rd: Update. * ld-cris/locref1.d: Update. * ld-cris/locref2.d: Update. * ld-i386/tlsbin.rd: Update. * ld-ia64/tlsbin.rd: Update. * ld-powerpc/tlsexe.r: Update. * ld-powerpc/tlsexe32.r: Update. * ld-powerpc/tlsexetoc.r: Update. * ld-s390/tlsbin.rd: Update. * ld-s390/tlsbin_64.rd: Update. * ld-sparc/tlssunbin32.rd: Update. * ld-sparc/tlssunbin64.rd: Update. * ld-x86-64/tlsbin.rd: Update.
2005-08-15Adjust for dynamic sym changes.Alan Modra4-176/+174
2005-07-082005-07-08 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu5-31/+29
* ld-ia64/tlsbin.rd: Update for empty section removal change. * ld-ia64/tlsbin.sd: Likewise. * ld-ia64/tlspic.dd: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-ia64/tlspic.sd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2005-05-12Update FSF addressesNick Clifton1-1/+1
2005-03-28gas/H.J. Lu1-2/+2
2005-03-28 David Mosberger <davidm@hpl.hp.com> H.J. Lu <hongjiu.lu@intel.com> PR 803 NEWS: Mention "-mtune=[itanium1|itanium2]". * config/tc-ia64.c (md): Add tune. (md_parse_option): Accepted "-mtune=[itanium1|itanium2]". (md_show_usage): Add "-mtune=[itanium1|itanium2]". (extra_goodness): Prefer M- and I-unit NOPs for itanium2. F and B unit NOPs are discouraged for McKinley-derived cores. (md_begin): Don't hardcode the "extra_goodness()" function in the comment... (ia64_init): Set md.tune to itanium2. * doc/as.texinfo: Add -mtune=[itanium1|itanium2]". * doc/c-ia64.texi: Likewise. gas/testsuite/ 2005-03-28 H.J. Lu <hongjiu.lu@intel.com> PR 803 * gas/ia64/dv-imply.d: Pass -mtune=itanium1 to as. * gas/ia64/dv-mutex.d : Likewise. * gas/ia64/dv-safe.d: Likewise. * gas/ia64/dv-srlz.d.nop: Likewise. * gas/ia64/ldxmov-1.d: Likewise. * gas/ia64/opc-b.d: Likewise. * gas/ia64/opc-f.d: Likewise. * gas/ia64/opc-i.d: Likewise. * gas/ia64/opc-m.d: Likewise. * gas/ia64/operand-or.d: Likewise. * gas/ia64/pcrel.d: Likewise. * gas/ia64/pseudo.d: Likewise. * gas/ia64/tls.d: Likewise. ld/testsuite/ 2005-03-28 H.J. Lu <hongjiu.lu@intel.com> PR 803 * ld-ia64/ia64.exp: Pass -mtune=itanium1 to as.
2005-03-16bfd/H.J. Lu2-106/+94
2005-03-16 H.J. Lu <hongjiu.lu@intel.com> * elflink.c (elf_mark_used_section): New. (bfd_elf_gc_sections): Call elf_gc_mark_section for non-relocatable link if we don't do GC. include/ 2005-03-16 H.J. Lu <hongjiu.lu@intel.com> * bfdlink.h (bfd_link_info): Add gc_sections. ld/ 2005-03-16 H.J. Lu <hongjiu.lu@intel.com> * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Remove unused empty output sections for non-relocatable link. * ld.h (args_type): Remove gc_sections. * ldlang.c (lang_mark_used_section): New. (lang_gc_sections): Use link_info.gc_sections instead of command_line.gc_sections. * ldmain.c (main): Likewise. * lexsup.c (parse_args): Likewise. * ldlang.c (lang_process): Call lang_mark_used_section. * ldmain.c (main): Initialize link_info.gc_sections to FALSE. ld/testsuite/ 2005-03-16 H.J. Lu <hongjiu.lu@intel.com> * ld-alpha/tlsbin.rd: Updated for empty section removal. * ld-alpha/tlsbinr.rd: Likewise. * ld-alpha/tlspic.rd: Likewise. * ld-arm/mixed-lib.sym: Likewise. * ld-i386/tlsbin.rd: Likewise. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-ia64/tlsbin.rd: Likewise. * ld-ia64/tlspic.rd: Likewise. * ld-powerpc/apuinfo.rd: Likewise. * ld-powerpc/powerpc.exp: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-sh/tlsbin-2.d: Likewise. * ld-sh/tlspic-2.d: Likewise. * ld-sparc/tlssunbin32.rd: Likewise. * ld-sparc/tlssunnopic32.rd: Likewise. * ld-sparc/tlssunpic32.rd: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
2005-02-14gas/Jan Beulich3-2/+5
2005-02-13 Jan Beulich <jbeulich@novell.com> * config/tc-ia64.c (md_parse_option): Handle -xnone and -xdebugn. (md_show_usage): Add -xnone, -xdebugn, and -xdebugx. Relocate default indicator. (ia64_init): Set md.detect_dv. (ia64_start_line): New static variable warned. Warn only once when encountering explicit stops in automatic mode. * doc/c-ia64.texi: Describe -xnone, -xdebugn, and -xdebugx. * NEWS: Mention new default mode. gas/testsuite/ 2005-02-13 Jan Beulich <jbeulich@novell.com> * gas/ia64/label.l: Adjust line numbers. * gas/ia64/label.s: Add .explicit. * gas/ia64/nop_x.s: Likewise. * gas/ia64/opc-a.d: Add assembler option -xnone. * gas/ia64/opc-b.d: Likewise. * gas/ia64/opc-f.d: Likewise. * gas/ia64/opc-i.d: Likewise. * gas/ia64/opc-m.d: Likewise. * gas/ia64/opc-x.d: Likewise. * gas/ia64/pseudo.d: Likewise. * gas/ia64/regs.d: Likewise. * gas/ia64/tls.d: Likewise. * gas/ia64/unwind-err.l: Adjust line numbers. * gas/ia64/unwind-err.s: Remove explicit stops. ld/testsuite/ 2005-02-13 Jan Beulich <jbeulich@novell.com> * ld-elfvers/vers.exp (as_options): New. Set to -x for ia64. (build_binary): Pass as_options to ld_assemble. (test_ldfail): Likewise. (build_exec): Likewise. Pass as_options to run_ld_link_tests. * ld-ia64/tlsbin.s: Add .explicit. * ld-ia64/tlsbinpic.s: Likewise. * ld-ia64/tlspic1.s: Likewise.
2005-01-28gas/Jan Beulich4-31/+31
2005-01-28 Jan Beulich <jbeulich@novell.com> * config/tc-ia64.c (ia64_estimate_size_before_relax): Allocate space for personality routine pointer only if there is one. (ia64_convert_frag): Likewise. (generate_unwind_image): Likewise. ld/testsuite/ 2005-01-28 Jan Beulich <jbeulich@novell.com> * ld/ia64/tlsbin.[rt]d: Widen expected offset/size ranges. * ld/ia64/tlspic.[rt]d: Likewise.