aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfweak
AgeCommit message (Collapse)AuthorFilesLines
2023-01-04Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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-11-07ld/testsuite: skip tests related to -shared when disabledClément Chigot1-0/+5
Call the helper function "check_shared_lib_support" to ensure -shared is enabled before launching ld-shared, ld-elfweak and ld-elfvers. This allows to catch custom targets explicitly disabling it. ld/ChangeLog: * testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise.
2022-01-02Update year range in copyright notice of binutils filesAlan Modra1-1/+1
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-03ld testsuite tidyAlan Modra1-17/+17
Fixes a few issues: 1) If you use "-fsanitize=address,undefined" in CFLAGS, the Makefile attempt to trim off -fsanitize options left us with ",undefined". 2) ld_compile adds CFLAGS_FOR_TARGET itself, no need to pass it. 3) CFLAGS might be needed linking bootstrap test. * Makefile.am (CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET): Trim off all -fsanitize=*. * Makefile.in: Regenerate. * testsuite/ld-bootstrap/bootstrap.exp: Use CFLAGS when linking. * testsuite/ld-cdtest/cdtest.exp: Use CFLAGS_FOR_TARGET when linking. * testsuite/ld-auto-import/auto-import.exp: Don't pass CFLAGS_FOR_TARGET to ld_compile. * testsuite/ld-cygwin/exe-export.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-pe/pe-compile.exp: Likewise. * testsuite/ld-pe/pe-run.exp: Likewise. * testsuite/ld-pe/pe-run2.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise, and don't allow nios2 testing to trash CFLAGS_FOR_TARGET. * testsuite/ld-scripts/crossref.exp: Don't pass options in CC_FOR_TARGET, do so in CFLAGS_FOR_TARGET instead. * testsuite/ld-srec/srec.exp: Likewise, and for CXX.
2021-09-03CC_FOR_TARGET et alAlan Modra1-28/+28
The top level Makefile, the ld Makefile and others, define CC_FOR_TARGET to be a compiler for the binutils target machine. This is the compiler that should be used for almost all tests with C source. There are _FOR_TARGET versions of CFLAGS, CXX, and CXXFLAGS too. This was all supposed to work with the testsuite .exp files using CC for the target compiler, and CC_FOR_HOST for the host compiler, with the makefiles passing CC=$CC_FOR_TARGET and CC_FOR_HOST=$CC to the runtest invocation. One exception to the rule of using CC_FOR_TARGET is the native-only ld bootstrap test, which uses the newly built ld to link a copy of itself. Since the files being linked were created with the host compiler, the boostrap test should use CC and CFLAGS, in case some host compiler option provides needed libraries automatically. However, bootstrap.exp used CC where it should have used CC_FOR_HOST. I set about fixing that problem, then decided that playing games in the makefiles with CC was a bad idea. Not only is it confusing, but other dejagnu code knows about CC_FOR_TARGET. See dejagnu/target.exp. So this patch gets rid of the makefile variable renaming and changes all the .exp files to use the correct _FOR_TARGET variables. CC_FOR_HOST and CFLAGS_FOR_HOST disappear. A followup patch will correct bootstrap.exp to use CFLAGS, and a number of other things I noticed. binutils/ * testsuite/lib/binutils-common.exp (run_dump_test): Use CC_FOR_TARGET and CFLAGS_FOR_TARGET rather than CC and CFLAGS. ld/ * Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET and similar. Pass variables with unchanged names. Don't set CC_FOR_HOST or CFLAGS_FOR_HOST. * Makefile.in: Regenerate. * testsuite/config/default.exp: Update default CC and similar. (compiler_supports, plug_opt): Use CC_FOR_TARGET. * testsuite/ld-cdtest/cdtest.exp: Replace all uses of CC with CC_FOR_TARGET, and similarly for CFLAGS, CXX and CXXFLAGS. * testsuite/ld-auto-import/auto-import.exp: Likewise. * testsuite/ld-cygwin/exe-export.exp: Likewise. * testsuite/ld-elf/dwarf.exp: Likewise. * testsuite/ld-elf/indirect.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-mn10300/mn10300.exp: Likewise. * testsuite/ld-pe/pe-compile.exp: Likewise. * testsuite/ld-pe/pe-run.exp: Likewise. * testsuite/ld-pe/pe-run2.exp: Likewise. * testsuite/ld-pie/pie.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-sh/sh.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-undefined/undefined.exp: Likewise. * testsuite/ld-unique/unique.exp: Likewise. * testsuite/ld-x86-64/tls.exp: Likewise. * testsuite/lib/ld-lib.exp: Likewise. libctf/ * Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET. Pass CC and CC_FOR_TARGET. Don't set CC_FOR_HOST. * Makefile.in: Regenerate. * testsuite/config/default.exp: Update default CC and similar. * testsuite/lib/ctf-lib.exp (run_native_host_cmd): Use CC rather than CC_FOR_HOST. (run_lookup_test): Use CC_FOR_TARGET and CFLAGS_FOR_TARGET.
2021-02-14ld testsuite: change unresolved to unsupported/failAlan Modra1-3/+3
"unresolved" as a test result means runtest returns an error, which can be confusing when there is no apparent error unless you look in .log files. In particular many tests are skipped without reporting an error if no target C compiler is found, but if a target C compiler is found but won't compile a testcase for some reason we used to mark the test as unresolved. Which is no more worthy of an error than when lacking a C compiler entirely. * testsuite/ld-cdtest/cdtest.exp, * testsuite/ld-checks/checks.exp, * testsuite/ld-elf/binutils.exp, * testsuite/ld-elf/compress.exp, * testsuite/ld-elf/dwarf.exp, * testsuite/ld-elf/exclude.exp, * testsuite/ld-elf/frame.exp, * testsuite/ld-elf/indirect.exp, * testsuite/ld-elf/linux-x86.exp, * testsuite/ld-elf/sec-to-seg.exp, * testsuite/ld-elf/tls_common.exp, * testsuite/ld-elfcomm/elfcomm.exp, * testsuite/ld-elfvers/vers.exp, * testsuite/ld-elfvsb/elfvsb.exp, * testsuite/ld-elfweak/elfweak.exp, * testsuite/ld-ifunc/binutils.exp, * testsuite/ld-mips-elf/mips-elf-flags.exp, * testsuite/ld-misc/defsym.exp, * testsuite/ld-mn10300/mn10300.exp, * testsuite/ld-plugin/lto.exp, * testsuite/ld-plugin/plugin.exp, * testsuite/ld-scripts/align.exp, * testsuite/ld-scripts/assert.exp, * testsuite/ld-scripts/crossref.exp, * testsuite/ld-scripts/defined.exp, * testsuite/ld-scripts/extern.exp, * testsuite/ld-scripts/log2.exp, * testsuite/ld-scripts/map-address.exp, * testsuite/ld-scripts/phdrs.exp, * testsuite/ld-scripts/phdrs2.exp, * testsuite/ld-scripts/script.exp, * testsuite/ld-scripts/section-flags.exp, * testsuite/ld-scripts/sizeof.exp, * testsuite/ld-scripts/weak.exp, * testsuite/ld-selective/selective.exp, * testsuite/ld-sh/sh.exp, * testsuite/ld-shared/shared.exp, * testsuite/ld-srec/srec.exp, * testsuite/ld-tic6x/tic6x.exp, * testsuite/ld-undefined/undefined.exp, * testsuite/ld-undefined/weak-undef.exp, * testsuite/lib/ld-lib.exp: Don't use unresolved except after perror. Instead report "unsupported" or "fail".
2021-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2020-10-26ld: Pass -fno-lto in ld-elfweak/elfweak.expH.J. Lu1-5/+10
* testsuite/ld-elfweak/elfweak.exp: Pass $NOLTO_CFLAGS to CC.
2020-09-03ld: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGSH.J. Lu1-6/+6
* testsuite/config/default.exp: Change NOSANTIZE_CFLAGS to NOSANITIZE_CFLAGS. * testsuite/ld-elf/dwarf.exp: Likewise. * testsuite/ld-elf/indirect.exp: Likewise. * testsuite/ld-elf/linux-x86.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise.
2020-08-26ld: Add $NOSANTIZE_CFLAGS to more linker testsH.J. Lu1-1/+5
-fsanitize= can be used to build binutils with $ CC="gcc -fsanitize=address,undefined" CXX="g++ -fsanitize=address,undefined" .../configure --disable-werror Since not all linker tests are compatible with -fsanitize=, pass $NOSANTIZE_CFLAGS to disable -fsanitize= for such tests. * testsuite/ld-elf/indirect.exp: Append $NOSANTIZE_CFLAGS to CC. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise.
2020-08-03Tidy objdump_symstuff and objdump_dynsymstuffAlan Modra1-15/+6
* testsuite/ld-elfvers/vers.exp (objdump_symstuff): Remove unused variable. Init list_a and list_b to empty. (objdump_dynsymstuff): Likewise, and remove undefined list_a handling. * testsuite/ld-elfweak/elfweak.exp (objdump_symstuff): Similarly. (objdump_dynsymstuff): Similarly.
2020-07-31ld: Add -fno-lto to linker testsH.J. Lu1-22/+28
LTO can be used to build binutils with $ CC="gcc -flto -ffat-lto-objects -Wl,--as-needed" CXX="g++ -flto -ffat-lto-objects -Wl,--as-needed" .../configure But not all linker tests are compatible with LTO. Pass -fno-lto to CC to disable LTO on linker tests by default. -flto is passed explicitly to CC in linker LTO tests. * testsuite/ld-elf/indirect.exp: Append -fno-lto to CC. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-plugin/lto.exp (no_lto): New. Add $no_lto to build pr15146c.so. * testsuite/lib/ld-lib.exp (at_least_gcc_version): Filter out -Wl,xxx options. (check_gcc_plugin_enabled): Likewise. (run_ld_link_exec_tests): Prepend -fno-lto to $cflags. (run_cc_link_tests): Likewise.
2020-07-07Use is_xcoff_format in ld testsuiteAlan Modra1-3/+0
* testsuite/ld-checks/checks.exp: Use is_xcoff_format. * testsuite/ld-powerpc/powerpc.exp: Likewise. * testsuite/ld-scripts/print-memory-usage.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-undefined/require-defined.exp: Likewise. * testsuite/ld-scripts/expr2.d: Likewise. * testsuite/ld-scripts/section-match-1.d: Only run for ELF. * testsuite/ld-elfvers/vers.exp: Delete dead code. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise.
2020-06-20Remove perror from ld_assemble, ld_compile and ld_nmAlan Modra1-4/+5
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-06-04tcl global directive outside proc body does nothing (ld)Alan Modra1-2/+0
* testsuite/config/default.exp: Remove global directive outside proc body. * testsuite/ld-bootstrap/bootstrap.exp: Likewise. * testsuite/ld-elf/compress.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/exclude.exp: Likewise. * testsuite/ld-elf/frame.exp: Likewise. * testsuite/ld-elf/indirect.exp: Likewise. * testsuite/ld-elf/linux-x86.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elf/tls_common.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-frv/fdpic.exp: Likewise. * testsuite/ld-frv/tls.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-i386/no-plt.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise. * testsuite/ld-nios2/nios2.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-powerpc/export-class.exp: Likewise. * testsuite/ld-scripts/align.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-scripts/defined.exp: Likewise. * testsuite/ld-scripts/overlay-size.exp: Likewise. * testsuite/ld-scripts/provide.exp: Likewise. * testsuite/ld-scripts/weak.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-sh/rd-sh.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-x86-64/mpx.exp: Likewise. * testsuite/ld-x86-64/no-plt.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise.
2020-06-03ld: Pass -fno-sanitize=all to tests with linkerH.J. Lu1-2/+4
When binutils is compiled with -fsanitize=undefined, many tests with linker, instead of $CC, fail with undefined symbol references to sanitize library. Define NOSANTIZE_CFLAGS to -fno-sanitize=all if target compiler supports it and compile such tests with $NOSANTIZE_CFLAGS. * testsuite/config/default.exp (NOSANTIZE_CFLAGS): New. * testsuite/ld-elf/linux-x86.exp: Add $NOSANTIZE_CFLAGS to tests with run_ld_link_exec_tests. * testsuite/ld-elf/shared.exp: Add $NOSANTIZE_CFLAGS to tests with run_ld_link_tests. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Add $NOSANTIZE_CFLAGS to tests with ld_link. * testsuite/ld-gc/gc.exp: Add $NOSANTIZE_CFLAGS to cflags. * testsuite/ld-plugin/lto.exp: Add $NOSANTIZE_CFLAGS to tests with run_ld_link_tests.a * testsuite/ld-plugin/plugin.exp: Append $NOSANTIZE_CFLAGS to CFLAGS. * testsuite/ld-selective/selective.exp: Add $NOSANTIZE_CFLAGS to cflags and cxxflags. * testsuite/ld-srec/srec.exp: Append $NOSANTIZE_CFLAGS to CC and CXX. * testsuite/ld-x86-64/plt-main-ibt-x32.dd: Updated for -fsanitize=undefined. * testsuite/ld-x86-64/plt-main-ibt.dd: Likewise. * testsuite/ld-x86-64/x86-64.exp: Add $NOSANTIZE_CFLAGS to tests with run_cc_link_tests and run_ld_link_tests.
2020-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2019-04-24Use better test for usable compiler in ld testsuite.Sandra Loosemore1-1/+1
The ld testsuite includes numerous tests that depend on being able to compile and link programs with the C compiler. Some of these tests use [which $CC] to check for the presence of the compiler before proceeding with the test, but run_ld_link_exec_tests and run_cc_link_tests give ERRORs if compilation fails. Also, even if $CC is defined and present, it may not be usable due to missing libraries, etc. This patch adds a new procedure check_compiler_available that attempts to build an empty program and caches the result. Uses of [which $CC] are replaced with calls to this procedure, and run_ld_link_exec_tests and run_cc_link_tests now also guard attempts to use $CC. 2019-04-24 Sandra Loosemore <sandra@codesourcery.com> ld/ * testsuite/config/default.exp: Use [check_compiler_available] instead of [which $CC]. * testsuite/ld-auto-import/auto-import.exp: Likewise. * testsuite/ld-cygwin/exe-export.exp: Likewise. * testsuite/ld-elf/audit.exp: Likewise. * testsuite/ld-elf/compress.exp: Likewise. * testsuite/ld-elf/dwarf.exp: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/indirect.exp: Likewise. * testsuite/ld-elf/linux-x86.exp: Likewise. * testsuite/ld-elf/shared.exp: Likewise. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elf/wrap.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-i386/no-plt.exp: Likewise. * testsuite/ld-i386/tls.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-mn10300/mn10300.exp: Likewise. * testsuite/ld-pe/pe-compile.exp: Likewise. * testsuite/ld-pe/pe-run.exp: Likewise. * testsuite/ld-pe/pe-run2.exp: Likewise. * testsuite/ld-pie/pie.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/crossref.exp: Likewise. * testsuite/ld-sh/sh.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-undefined/undefined.exp: Likewise. * testsuite/ld-unique/unique.exp: Likewise. * testsuite/ld-x86-64/mpx.exp: Likewise. * testsuite/ld-x86-64/no-plt.exp: Likewise. * testsuite/ld-x86-64/tls.exp: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/lib/ld-lib.exp (run_ld_link_exec_tests): Call check_compiler_available before trying to use the compiler. (run_cc_link_tests): Likewise. (check_compiler_available): New. Use it instead of [which $CC].
2019-01-01Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2018-04-18various i386-aout and i386-coff target removalAlan Modra1-6/+0
Also tidies some other aout leftovers in binutils-common.exp. bfd/ * Makefile.am: Remove support for assorted i386 aout and coff targets. * config.bfd: Likewise. * configure.ac: Likewise. * doc/bfdint.texi: Likewise. * targets.c: Likewise. * freebsd.h: Delete. * i386dynix.c: Delete. * i386freebsd.c: Delete. * i386linux.c: Delete. * i386mach3.c: Delete. * i386netbsd.c: Delete. * i386os9k.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/lib/binutils-common.exp: Remove support for assorted aout targets. gas/ * Makefile.am: Remove support for assorted i386 aout and coff targets. * config/obj-elf.c: Likewise. * config/tc-i386.h: Likewise. * configure.ac: Likewise. * configure.tgt: Likewise. * config/te-dynix.h: Delete. * config/te-i386aix.h: Delete. * config/te-mach.h: Delete. * Makefile.in: Regenerate. * config.in: Regenerate. * configure: Regenerate. * po/POTFILES.in: Regenerate. include/ * aout/dynix3.h: Delete. ld/ * Makefile.am: Remove support for assorted i386 aout and coff targets. * configure.tgt: Likewise. * testsuite/ld-discard/discard.exp: Likewise. * testsuite/ld-elf/binutils.exp: Likewise. * testsuite/ld-elf/tls.exp: Likewise. * testsuite/ld-elf/tls_common.exp: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-gc/abi-note.d: Likewise. * testsuite/ld-gc/pr19167.d: Likewise. * testsuite/ld-gc/pr20022.d: Likewise. * testsuite/ld-gc/start.d: Likewise. * testsuite/ld-gc/stop.d: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-ifunc/binutils.exp: Likewise. * testsuite/ld-ifunc/ifunc.exp: Likewise. * testsuite/ld-linkonce/linkonce.exp: Likewise. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-scripts/empty-address-2a.d: Likewise. * testsuite/ld-scripts/empty-address-2b.d: Likewise. * testsuite/ld-scripts/phdrs2.exp: Likewise. * testsuite/ld-scripts/section-match-1.d: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-sparc/sparc.exp: Likewise. * emulparams/i386coff.sh: Delete. * emulparams/i386linux.sh: Delete. * emulparams/i386mach.sh: Delete. * emulparams/i386nbsd.sh: Delete. * emulparams/vsta.sh: Delete. * scripttempl/i386coff.sc: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
2018-04-16Remove sparc-aout and sparc-coff supportAlan Modra1-5/+1
bfd/ * Makefile.am: Remove sparc-aout and sparc-coff support. * config.bfd: Likewise. * configure.ac: Likewise. * targets.c: Likewise. * aout-sparcle.c: Delete. * aoutf1.h: Delete. * cf-sparclynx.c: Delete. * coff-sparc.c: Delete. * demo64.c: Delete. * sparclinux.c: Delete. * sparclynx.c: Delete. * sparcnetbsd.c: Delete. * sunos.c: Delete. * Makefile.in: Regenerate. * configure: Regenerate. * po/SRC-POTFILES.in: Regenerate. binutils/ * testsuite/lib/binutils-common.exp: Remove sparc-aout and sparc-coff support. gas/ * Makefile.am: Remove sparc-aout and sparc-coff support. * config/obj-coff.h: Likewise. * config/tc-sparc.c: Likewise. * config/tc-sparc.h: Likewise. * configure.tgt: Likewise. * config/te-sparcaout.h: Delete. * testsuite/gas/sun4/addend.d: Delete. * testsuite/gas/sun4/addend.exp: Delete. * testsuite/gas/sun4/addend.s: Delete. * Makefile.in: Regenerate. * po/POTFILES.in: Regenerate. ld/ * Makefile.am: Remove sparc-aout and sparc-coff support. * configure.tgt: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * emulparams/coff_sparc.sh: Delete. * emulparams/sparcaout.sh: Delete. * emulparams/sparclinux.sh: Delete. * emulparams/sparcnbsd.sh: Delete. * emulparams/sun4.sh: Delete. * scripttempl/sparccoff.sc: Delete. * Makefile.in: Regenerate. * po/BLD-POTFILES.in: Regenerate.
2018-01-03Update year range in copyright notice of binutils filesAlan Modra1-1/+1
2017-12-01weak alias testAlan Modra6-110/+75
This adds the test I was using when testing 60d67dc8. * testsuite/ld-elfweak/alias.c, * testsuite/ld-elfweak/alias.dat, * testsuite/ld-elfweak/aliasmain.c, * testsuite/ld-elfweak/weakref1.c, * testsuite/ld-elfweak/weakref2.c: New test. * testsuite/ld-elfweak/elfweak.exp: Run it. Don't return on fails, attempt other tests.
2017-01-03Add -rpath-link to various testsAlan Modra1-2/+2
Needed for cross-builds without --sysroot, where USE_LIBPATH isn't set. See elf32.em after_open. Perhap ld ought to look at -rpath in this case? * testsuite/ld-elf/shared.exp: Add -rpath-link and -no-as-needed to various tests. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-elfvers/vers.exp (vers19): Fix -rpath-link option.
2017-01-02Run more ld tests when not nativeAlan Modra1-8/+14
Many of the ld tests are not run for cross builds, in some cases because the test needs to run a newly linked executable, and in others simply because it was easier to write the test for native only. Even when a test needs to run, it's good to compile and link to exercise the linker. So that's what this patch does. I've also rid us of the old ld_link procedure with all the HOSTING_CRT0 etc. setup. It's much simpler to just link with $CC. This does mean that a cross build with cross-compiler installed but no cross C-library will give lots of failures. If that turns out to be too annoying, I guess we can write a tcl procedure to detect it and not run all the extra tests. * Makefile.am (bootstrap): Delete rule. (ld-partial, ld1, ld1-full, ld2, ld3): Likewise. (HOSTING_CRT0, HOSTING_SCRT0): Don't define. (HOSTING_LIBS, HOSTING_SLIBS, HOSTING_EMU): Likewise. * configure.ac (HOSTING_CRT0, HOSTING_SCRT0): Don't define. (HOSTING_LIBS, HOSTING_SLIBS): Likewise. * configure.host (HOSTING_CRT0, HOSTING_LIBS): Don't define. * Makefile.in: Regenerate. * configure: Regenerate. * testsuite/config/default.exp (get_link_files): Delete. (HOSTING_CRT0, HOSTING_SCRT0, HOSTING_LIBS, HOSTING_SLIBS): Don't define. (ld_simple_link): Delete. * testsuite/lib/ld-lib.exp (default_ld_link): Delete (default_ld_simple_link): Rename to default_ld_link. (ld_simple_link_defsyms): Rename to ld_link_defsyms. (run_ld_link_tests): Use ld_link, not ld_simple_link. (run_cc_link_tests): Likewise. (run_ld_link_exec_tests): Use $CC or $CXX to link, not $ld. Don't run exe when not native, and return unsupported. * testsuite/ld-bootstrap/bootstrap.exp: Create gccld1 etc. dirs. Link ld1 etc. using $CC. * testsuite/ld-cdtest/cdtest.exp: Link cdtest using $CC. * testsuite/ld-checks/checks.exp: Use ld_link, not ld_simple_link. * testsuite/ld-cygwin/exe-export.exp: Likewise. * testsuite/ld-elf/binutils.exp: Likewise. * testsuite/ld-elf/eh-group.exp: Likewise. * testsuite/ld-elf/exclude.exp: Likewise. * testsuite/ld-elf/frame.exp: Likewise. * testsuite/ld-elf/sec-to-seg.exp: Likewise. * testsuite/ld-elf/tls_common.exp: Likewise. * testsuite/ld-elfcomm/elfcomm.exp: Likewise. * testsuite/ld-fastcall/fastcall.exp: Likewise. * testsuite/ld-gc/gc.exp: Likewise. * testsuite/ld-ifunc/binutils.exp: Likewise. * testsuite/ld-mep/mep.exp: Likewise. * testsuite/ld-mips-elf/mips-elf-flags.exp: Likewise. * testsuite/ld-mn10300/mn10300.exp: Likewise. * testsuite/ld-nios2/nios2.exp: Likewise. * testsuite/ld-pe/pe-compile.exp: Likewise. * testsuite/ld-pe/pe-run.exp: Likewise. * testsuite/ld-pe/pe-run2.exp: Likewise. * testsuite/ld-plugin/plugin.exp: Likewise. * testsuite/ld-scripts/align.exp: Likewise. * testsuite/ld-scripts/alignof.exp: Likewise. * testsuite/ld-scripts/assert.exp: Likewise. * testsuite/ld-scripts/defined.exp: Likewise. * testsuite/ld-scripts/extern.exp: Likewise. * testsuite/ld-scripts/log2.exp: Likewise. * testsuite/ld-scripts/map-address.exp: Likewise. * testsuite/ld-scripts/phdrs.exp: Likewise. * testsuite/ld-scripts/phdrs2.exp: Likewise. * testsuite/ld-scripts/script.exp: Likewise. * testsuite/ld-scripts/section-flags.exp: Likewise. * testsuite/ld-scripts/sizeof.exp: Likewise. * testsuite/ld-scripts/sysroot-prefix.exp: Likewise. * testsuite/ld-scripts/weak.exp: Likewise. * testsuite/ld-selective/selective.exp: Likewise. * testsuite/ld-sh/sh.exp: Likewise. * testsuite/ld-sh/sh64/relax.exp: Likewise. * testsuite/ld-sh/sh64/relfail.exp: Likewise. * testsuite/ld-srec/srec.exp: Likewise. * testsuite/ld-tic6x/tic6x.exp: Likewise. * testsuite/ld-undefined/weak-undef.exp: Likewise. * testsuite/ld-versados/versados.exp: Likewise. * testsuite/ld-x86-64/dwarfreloc.exp: Likewise. * testsuite/ld-xtensa/coalesce.exp: Likewise. * testsuite/ld-xtensa/diff_overflow.exp: Likewise. * testsuite/ld-xtensa/lcall.exp: Likewise. * testsuite/ld-elf/audit.exp: Run non-native too. * testsuite/ld-elf/compress.exp: Likewise. Replace ld options with gcc -Wl, options. * testsuite/ld-elf/dwarf.exp: Run non-native too. Use ld_link, not ld_simple_link. Add -Wl,--no-as-needed to some tests. * testsuite/ld-elf/elf.exp: Run non-native too. Formatting. * testsuite/ld-elf/indirect.exp: Run non-native too. Add -Wl,--no-as-needed to most tests. * testsuite/ld-elf/shared.exp: Run non-native too. Use braces to simplify quoting. Set run_tests using [list] rather than brace assignment to expand $extralibs. Add -Wl,--no-as-needed to many test. Prefix ld options with -Wl,. (mix_pic_and_non_pic): Don't run exe if not native. * testsuite/ld-elf/wrap.exp: Run non-native too. Add -Wl,--no-as-needed and prefix ld options with -Wl,. * testsuite/ld-elfvers/vers.exp: Run non-native too. Use ld_link, not ld_simple_link. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. (visibility_test): Don't run exe if not native. * testsuite/ld-elfweak/elfweak.exp: Run non-native too. Use ld_link, not ld_simple_link. (build_exec): Don't run exe if not native. * testsuite/ld-ifunc/ifunc.exp: Run non-native too. Use ld_link, not ld_simple_link. Link using $CC. Add -Wl,--no-as-needed to some tests and prefix ld options with -Wl,. Expect GNU for hppa-linux even when no ifuncs. Delete cleanup. * testsuite/ld-pie/pie.exp: Run non-native too. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. Use ld_link, not ld_simple_link. (shared_test): Don't run exe if not native. * testsuite/ld-size/size.exp: Run non-native too. Add -Wl,--no-as-needed to some tests. Prefix ld options with -Wl,. * testsuite/ld-unique/unique.exp: Run non-native too. Use ld_link, not ld_simple_link. Link using $CC. Add -Wl,--no-as-needed to some tests and prefix ld options with -Wl,. Expect GNU for hppa-linux even when no unique syms. Delete cleanup. * testsuite/ld-x86-64/tls.exp: Add -Wl,--no-as-needed to some tests and prefix ld options with -Wl,. * testsuite/ld-x86-64/x86-64.exp: Use ld_link, not ld_simple_link. Add -Wl,--no-as-needed to some tests. Prefix ld options with -Wl,.
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-12-03PowerPC64 dot-sym testsuite fixesAlan Modra4-13/+15
This illustrates quite well why dot-symbols had to go. PowerPC64 gcc for Linux stopped producing them 12 years ago, but the Linux kernel still persists in using them so it's necessary to keep and regression test ld support. * testsuite/ld-elf/indirect1b.c: Give dot-symbol a version too. * testsuite/ld-elf/indirect2.c: Likewise. * testsuite/ld-elf/indirect3b.c: Likewise. * testsuite/ld-elf/indirect4b.c: Likewise. * testsuite/ld-elf/pr18718.c: Likewise. * testsuite/ld-elf/pr18720b.c: Likewise. * testsuite/ld-elf/pr19553c.c: Likewise. * testsuite/ld-elfvers/vers.h (FUNC_SYMVER): Define. * testsuite/ld-elfvers/vers1.c: Use FUNC_SYMVER for functions. * testsuite/ld-elfvers/vers4.c: Likewise. * testsuite/ld-elfvers/vers5.c: Likewise. * testsuite/ld-elfvers/vers6.c: Likewise. * testsuite/ld-elfvers/vers7a.c: Likewise. * testsuite/ld-elfvers/vers9.c: Likewise. * testsuite/ld-elfvers/vers15.c: Likewise. * testsuite/ld-elfvers/vers18.c: Likewise. * testsuite/ld-elfvers/vers22a.c: Likewise. * testsuite/ld-elfvers/vers23a.c: Likewise. * testsuite/ld-elfvers/vers27d1.c: Likewise. * testsuite/ld-elfvers/vers21.c: Likewise. (_old_bar): Use attribute weak rather than asm weak. * testsuite/ld-ifunc/pr16467b.c: Give dot-symbol a version. * testsuite/ld-plugin/pr12760b.c: Define warning on .bar rather than bar for ppc64 -mcall-aixdesc. * testsuite/ld-plugin/pr16746a.c: Similarly for foobar. * testsuite/ld-plugin/pr16746b.c: Likewise. * testsuite/ld-elf/shared.exp: Allow dot-symbol in warnings and errors. * testsuite/ld-plugin/lto.exp: Likewise. * testsuite/ld-plugin/plugin-6.d: Likewise. * testsuite/ld-plugin/plugin-7.d: Likewise. * testsuite/ld-plugin/plugin-8.d: Likewise. * testsuite/ld-plugin/plugin-13.d: Likewise. * testsuite/ld-plugin/plugin-14.d: Likewise. * testsuite/ld-plugin/plugin-15.d: Likewise. * testsuite/ld-plugin/plugin-16.d: Likewise. * testsuite/ld-plugin/plugin-20.d: Likewise. * testsuite/ld-plugin/plugin-21.d: Likewise. * testsuite/ld-plugin/plugin-22.d: Likewise. * testsuite/ld-plugin/plugin-23.d: Likewise. * testsuite/ld-plugin/plugin.exp: Define .main and .puts for ppc64 -mcall-aixdesc. * testsuite/ld-elfvers/vers.exp (test_ar): Trim dot-symbols. (objdump_dynsymstuff): Likewise. (objdump_symstuff): Likewise. Pack flags to keep column count consistent. * testsuite/ld-elfweak/elfweak.exp (objdump_dynsymstuff, objdump_symstuff): As for vers.exp. * testsuite/ld-elfvers/vers6.sym: Allow dot-symbols. * testsuite/ld-elfvers/vers1.sym: Allow missing F flag for -mcall-aixdesc .opd syms and adjust for flag packing. * testsuite/ld-elfvers/vers4.sym: Likewise. * testsuite/ld-elfvers/vers4a.sym: Likewise. * testsuite/ld-elfvers/vers7a.sym: Likewise. * testsuite/ld-elfvers/vers9.sym: Likewise. * testsuite/ld-elfvers/vers15.sym: Likewise. * testsuite/ld-elfvers/vers18.sym: Likewise. * testsuite/ld-elfvers/vers21.sym: Likewise. * testsuite/ld-elfvers/vers22a.sym: Likewise. * testsuite/ld-elfvers/vers23a.sym: Likewise. * testsuite/ld-elfvers/vers27d.sym: Likewise. * testsuite/ld-elfweak/strong.sym: Likewise. * testsuite/ld-elfweak/strongcomm.sym: Likewise. * testsuite/ld-elfweak/strongdata.sym: Likewise.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-1/+1
2014-03-05Update copyright yearsAlan Modra1-2/+1
2014-02-16ld: Remove Hurd-specific XFAILs related to weak symbols.Thomas Schwinge1-17/+0
This has been fixed properly, in glibc. ld/testsuite/ * ld-elfweak/elfweak.exp (setup_xfail_gnu_hurd): Remove function and all usage of it.
2013-03-20 * ld-elfvers/vers.exp: Add -Wl,--no-as-needed to all testsAlan Modra1-10/+10
linking against shared libraries. * ld-elfweak/elfweak.exp: Likewise. Enable for x86_64-linux. Build main1.o using $picflag.
2012-04-03bfd/Roland McGrath1-17/+18
2012-04-03 Roland McGrath <mcgrathr@google.com> * elf-nacl.c: New file. * elf-nacl.h: New file. * elf32-i386.c (elf_backend_modify_segment_map): Define for bfd_elf32_i386_nacl_vec. (elf_backend_modify_program_headers): Likewise. * elf64-x86-64.c (elf_backend_modify_segment_map): Define for bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec. (elf_backend_modify_program_headers): Likewise. * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here. (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here. * Makefile.in: Regenerated. * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here. (bfd_elf32_x86_64_nacl_vec): Likewise. (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise. (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise. (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise. (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise. (bfd_elf32_i386_nacl_vec): Likewise. (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise. (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise. * configure: Regenerated. binutils/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * lib/binutils-common.exp (is_elf_format): Consider *-*-nacl* to be ELF too. * binutils-all/elfedit-4.d: Add "#as: --64" option. * binutils-all/i386/i386.exp: Accept nacl targets too. * binutils-all/x86-64/x86-64.exp: Likewise. gas/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * gas/i386/k1om.d: Add not-target match for *-*-nacl*. * gas/i386/l1om.d: Likewise. ld/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * configure.tgt (i[3-7]86-*-nacl*, x86_64-*-nacl*): Handle them. * emulparams/elf_nacl.sh: New file. * emulparams/elf_i386_nacl.sh: New file. * emulparams/elf32_x86_64_nacl.sh: New file. * emulparams/elf_x86_64_nacl.sh: New file. * Makefile.am (ALL_EMULATION_SOURCES): Add eelf_i386_nacl.c here. (ALL_64_EMULATION_SOURCES): Add eelf32_x86_64_nacl.c and eelf_x86_64_nacl.c here. (eelf_i386_nacl.c, eelf32_x86_64_nacl.c, eelf_x86_64_nacl.c): New targets. * Makefile.in: Regenerated. * scripttempl/elf.sc: Handle SEPARATE_CODE cases. ld/testsuite/ 2012-04-03 Roland McGrath <mcgrathr@google.com> * ld-x86-64/ilp32-4-nacl.d: New file. * ld-x86-64/x86-64.exp: Run it. * ld-discard/discard.exp: Accept nacl targets too. * ld-elf/binutils.exp: Likewise. * ld-elf/comm-data.exp: Likewise. * ld-elf/elf.exp: Likewise. * ld-elf/tls_common.exp: Likewise. * ld-elfvers/vers.exp: Likewise. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-gc/gc.exp: Likewise. * ld-ifunc/binutils.exp: Likewise. * ld-ifunc/ifunc.exp: Likewise. * ld-linkonce/linkonce.exp:Likewise. * ld-pie/pie.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-undefined/weak-undef.exp: Likewise. * ld-unique/unique.exp: Likewise. * ld-x86-64/dwarfreloc.exp: Likewise. * ld-x86-64/line.exp: Likewise. * lib/ld-lib.exp (slurp_options): Support global array options_regsub to apply substitutions to the contents of options lines read from the file. * ld-i386/emit-relocs.d: Renamed to ... * ld-i386/emit-relocs.rd: ... this. * ld-i386/i386.exp: Accept nacl targets too. For them, use options_regsub to replace elf_i386 with elf_i386_nacl in run_dump_test cases; apply the same substitution in $i386tests; replace foo.rd expectations files with foo-nacl.rd in $i386tests. (i386tests): Change emit-relocs.d to emit-relocs.rd here. * ld-i386/emit-relocs-nacl.rd: New file. * ld-i386/plt-nacl.pd: New file. * ld-i386/plt-pic-nacl.pd: New file. * ld-i386/tlsbin-nacl.rd: New file. * ld-i386/tlsbindesc-nacl.rd: New file. * ld-i386/tlsdesc-nacl.rd: New file. * ld-i386/tlsgdesc-nacl.rd: New file. * ld-i386/tlsnopic-nacl.rd: New file. * ld-i386/tlspic-nacl.rd: New file. * ld-x86-64/x86-64.exp: Accept nacl targets too. For them, use options_regsub to replace elf_x86_64 with elf_x86_64_nacl in run_dump_test cases; apply the same substitution in $x86_64tests; replace foo.rd expectations files with foo-nacl.rd in $x86_64tests. Add explicit -melf_x86_64 to ld options in tests that need it, in case the default emulation is x32 (as it is for x86_64-nacl). * ld/testsuite/ld-x86-64/plt-nacl.pd: New file. * ld/testsuite/ld-x86-64/split-by-file-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsbin-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsbindesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsdesc-nacl.pd: New file. * ld/testsuite/ld-x86-64/tlsdesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlsgdesc-nacl.rd: New file. * ld/testsuite/ld-x86-64/tlspic-nacl.rd: New file. * ld-i386/hidden2.d: Loosen regexps to match any file format variant, and not to depend on exact addresses, displacements, etc. where they are irrelevant. * ld-i386/pcrel16.d: Likewise. * ld-i386/pcrel16abs.d: Likewise. * ld-i386/pr12718.d: Likewise. * ld-i386/pr12921.d: Likewise. * ld-i386/reloc.d: Likewise. * ld-i386/tlsbin.dd: Likewise. * ld-i386/tlsbin.sd: Likewise. * ld-i386/tlsbin.td: Likewise. * ld-i386/tlsbindesc.dd: Likewise. * ld-i386/tlsbindesc.sd: Likewise. * ld-i386/tlsbindesc.td: Likewise. * ld-i386/tlsdesc.dd: Likewise. * ld-i386/tlsdesc.sd: Likewise. * ld-i386/tlsdesc.td: Likewise. * ld-i386/tlsg.sd: Likewise. * ld-i386/tlsgdesc.dd: Likewise. * ld-i386/tlsindntpoff.dd: Likewise. * ld-i386/tlsnopic.dd: Likewise. * ld-i386/tlsnopic.sd: Likewise. * ld-i386/tlspic.dd: Likewise. * ld-i386/tlspic.sd: Likewise. * ld-i386/tlspic.td: Likewise. * ld-i386/tlspie2.d: Likewise. * ld-x86-64/hidden2.d: Likewise. * ld-x86-64/pcrel16.d: Likewise. * ld-x86-64/pr12718.d: Likewise. * ld-x86-64/pr12921.d: Likewise. * ld-x86-64/protected3.d: Likewise. * ld-x86-64/tlsbin.dd: Likewise. * ld-x86-64/tlsbin.sd: Likewise. * ld-x86-64/tlsbin.td: Likewise. * ld-x86-64/tlsbindesc.dd: Likewise. * ld-x86-64/tlsbindesc.sd: Likewise. * ld-x86-64/tlsbindesc.td: Likewise. * ld-x86-64/tlsdesc.dd: Likewise. * ld-x86-64/tlsdesc.sd: Likewise. * ld-x86-64/tlsdesc.td: Likewise. * ld-x86-64/tlsg.sd: Likewise. * ld-x86-64/tlsgd5.dd: Likewise. * ld-x86-64/tlsgd6.dd: Likewise. * ld-x86-64/tlsgdesc.dd: Likewise. * ld-x86-64/tlspic.dd: Likewise. * ld-x86-64/tlspic.sd: Likewise. * ld-x86-64/tlspic.td: Likewise. * ld-x86-64/ilp32-8.d: Match any file format variant. Use a -Ttext and adjust expected results, to handle variant layouts. * ld-x86-64/ilp32-9.d: Likewise. * ld-i386/alloc.t: Remove superfluous OUTPUT_FORMAT statement. * ld-i386/pr12627.t: Likewise. * ld-x86-64/abs-l1om.d: Add target: constraint. * ld-x86-64/protected2-l1om.d: Likewise. * ld-x86-64/protected3-l1om.d: Likewise. * ld-x86-64/ilp32-4.d: Likewise. * ld-x86-64/plt.s: New file. * ld-x86-64/pltlib.s: New file. * ld-x86-64/plt.pd: New file. * ld-x86-64/x86-64.exp (x86_64tests): Add them. * ld-i386/plt.s: New file. * ld-i386/pltlib.s: New file. * ld-i386/plt.pd: New file. * ld-i386/plt-pic.s: New file. * ld-i386/plt-pic.pd: New file. * ld-i386/i386.exp (i386tests): Add them.
2011-12-162011-12-15 David Daney <david.daney@cavium.com>David Daney1-1/+3
Nick Clifton <nickc@redhat.com> * ld-elfvers/vers.exp (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. (pic): Set to "yes" for mips*-*-linux*. * ld-elfvsb/elfvsb.exp: Don't test non-PIC shared libraried on mips*-*-linux*. (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. * ld-elfweak/elfweak.exp (picflag): Set to -fpic for mips*-*-* when using GCC-4.3 or later. * ld-shared/shared.exp (picflag): Same. * lib/ld-lib.exp (at_least_gcc_version): New proc.
2010-12-21Adjust URLs.Thomas Schwinge1-1/+1
2010-11-18 * ld-elf/binutils.exp: Correct x86 gnu target match.Alan Modra1-27/+26
* ld-i386/i386.exp: Likewise. * ld-ifunc/binutils.exp: Likewise. * ld-ifunc/ifunc.exp: Likewise. * ld-discard/discard.exp: Remove unnecessary line continuations. * ld-elfvers/vers.exp: Likewise. Simplify linuxaout and linuxoldld test. * ld-elfweak/elfweak.exp: Likewise.
2010-11-08Improve binutils testsuite coverage for GNU/Hurd.Thomas Schwinge1-1/+21
binutils/testsuite/ * lib/utils-lib.exp (is_elf_format): Consider for *-*-gnu*, too. * binutils-all/elfedit-2.d (target): Likewise. * binutils-all/elfedit-3.d (target): Likewise. * binutils-all/i386/i386.exp: Likewise. * binutils-all/objcopy.exp: Likewise. * binutils-all/strip-3.d (target): Likewise. gas/testsuite/ * lib/gas-defs.exp (is_elf_format): Consider for *-*-gnu*, too. * gas/elf/elf.exp: Likewise. * gas/symver/symver.exp: Likewise. ld/ * configure.host: Add stanza for *-*-gnu*. ld/testsuite/ * lib/ld-lib.exp (is_elf_format): Consider for *-*-gnu*, too. * ld-discard/discard.exp: Likewise. * ld-elf/binutils.exp: Likewise. * ld-elf/commonpage1.d (target): Likewise. * ld-elf/compress1c.d (target): Likewise. * ld-elf/discard1.d (target): Likewise. * ld-elf/discard2.d (target): Likewise. * ld-elf/discard3.d (target): Likewise. * ld-elf/dynsym1.d (target): Likewise. * ld-elf/eh6.d (target): Likewise. * ld-elf/elf.exp: Likewise. (array_tests): Move -static tests to... (array_tests_static): ... here, and handle it accordingly. * ld-elf/hash.d (target): Likewise. * ld-elf/header.d (target): Likewise. * ld-elf/loadaddr1.d (target): Likewise. * ld-elf/loadaddr2.d (target): Likewise. * ld-elf/loadaddr3a.d (target): Likewise. * ld-elf/loadaddr3b.d (target): Likewise. * ld-elf/local1.d (target): Likewise. * ld-elf/maxpage1.d (target): Likewise. * ld-elf/maxpage2.d (target): Likewise. * ld-elf/maxpage3a.d (target): Likewise. * ld-elf/multibss1.d (target): Likewise. * ld-elf/noload-2.d (target): Likewise. * ld-elf/seg.d (target): Likewise. * ld-elf/textaddr1.d (target): Likewise. * ld-elf/textaddr2.d (target): Likewise. * ld-elf/textaddr3.d (target): Likewise. * ld-elf/textaddr4.d (target): Likewise. * ld-elf/textaddr5.d (target): Likewise. * ld-elf/textaddr6.d (target): Likewise. * ld-elf/textaddr7.d (target): Likewise. * ld-elf/tls_common.exp: Likewise. * ld-elf/unknown2.d (target): Likewise. * ld-elfvers/vers.exp: Likewise. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. (setup_xfail_gnu_hurd): New function. Use it where appropriate. * ld-gc/abi-note.d (target): Likewise. * ld-gc/gc.exp: Likewise. * ld-gc/pr11218.d (target): Likewise. * ld-gc/start.d (target): Likewise. * ld-i386/i386.exp: Likewise. * ld-ifunc/binutils.exp: Likewise. * ld-ifunc/ifunc.exp: Likewise. * ld-linkonce/linkonce.exp: Likewise. * ld-linkonce/zeroehl32.d (target): Likewise. * ld-pie/pie.exp: Likewise. * ld-scripts/phdrs2.exp: Likewise. * ld-scripts/rgn-at5.d (target): Likewise. * ld-shared/shared.exp: Likewise. * ld-undefined/entry-3.d (target): Likewise. * ld-undefined/entry-4.d (target): Likewise. * ld-undefined/weak-undef.exp: Likewise.
2010-10-28 * ld-elfvers/vers.exp: Enable test for powerpc64.Alan Modra10-15/+15
* ld-elfweak/elfweak.exp: Likewise * ld-shared/shared.exp: Likewise. Xfail non-pic dso tests for ppc64. * ld-elfvers/vers1.dsym, * ld-elfvers/vers1.sym, * ld-elfvers/vers2.dsym, * ld-elfvers/vers3.dsym, * ld-elfvers/vers4.sym, * ld-elfvers/vers4a.dsym, * ld-elfvers/vers4a.sym, * ld-elfvers/vers6.dsym, * ld-elfvers/vers6.sym, * ld-elfvers/vers7a.dsym, * ld-elfvers/vers7a.sym, * ld-elfvers/vers9.dsym, * ld-elfvers/vers9.sym, * ld-elfvers/vers15.dsym, * ld-elfvers/vers15.sym, * ld-elfvers/vers16.dsym, * ld-elfvers/vers16a.dsym, * ld-elfvers/vers17.dsym, * ld-elfvers/vers18.dsym, * ld-elfvers/vers18.sym, * ld-elfvers/vers19.dsym, * ld-elfvers/vers20.dsym, * ld-elfvers/vers21.dsym, * ld-elfvers/vers21.sym, * ld-elfvers/vers22.dsym, * ld-elfvers/vers22a.dsym, * ld-elfvers/vers22a.sym, * ld-elfvers/vers22b.dsym, * ld-elfvers/vers23.dsym, * ld-elfvers/vers23a.dsym, * ld-elfvers/vers23a.sym, * ld-elfvers/vers23b.dsym, * ld-elfvers/vers25a.dsym, * ld-elfvers/vers26a.dsym, * ld-elfvers/vers27a.dsym, * ld-elfvers/vers27d.dsym, * ld-elfvers/vers27d.sym, * ld-elfvers/vers27d4.dsym, * ld-elfvers/vers28b.dsym, * ld-elfvers/vers28c.dsym, * ld-elfvers/vers29.dsym, * ld-elfvers/vers30.dsym, * ld-elfvers/vers31.dsym, * ld-elfvers/vers32a.dsym, * ld-elfvers/vers32b.dsym, * ld-elfvers/vers32c.dsym, * ld-elfweak/dso.dsym, * ld-elfweak/dsodata.dsym, * ld-elfweak/dsow.dsym, * ld-elfweak/dsowdata.dsym, * ld-elfweak/strong.sym, * ld-elfweak/strongcomm.sym, * ld-elfweak/strongdata.sym, * ld-elfweak/weak.dsym, * ld-elfweak/weakdata.dsym: Relax whitespace matching, tighten non-whitespace matching. Match powerpc64 functions in .opd section. * ld-shared/elf-offset.ld: Place powerpc64 .toc sections.
2009-09-02update copyright datesAlan Modra1-1/+1
2007-07-06Update sources to GPLv3Nick Clifton1-6/+9
2006-05-17 * ld-elfweak/size2.d, ld-elfweak/size2a.s, ld-elfweak/size2b.s:Thiemo Seufer3-1/+9
Add __start as entry symbol.
2005-07-27 * ld-elfweak/size2a.s: Extend test to check size for two weaks.Alan Modra3-1/+16
* ld-elfweak/size2b.s: Likewise. * ld-elfweak/size2.d: Update.
2005-06-23 * ld-elfweak/size_foo.c (foo): Fix warning about implicit returnAndreas Schwab1-0/+1
type.
2005-05-22 * ld-elfweak/dsow.dsym: Adjust for non-zero ST_OTHER.Richard Henderson2-2/+2
* ld-elfweak/weak.dsym: Likewise. * ld-selective/selective.exp: Don't test alpha.
2005-05-12Update FSF addressesNick Clifton1-1/+1
2005-05-052005-05-05 Paul Brook <paul@codesourcery.com>Paul Brook4-0/+24
gas/testsuite/ * lib/gas-defs.exp (regexp_diff): Pass test if last line is "#...". ld/testsuite/ * lib/ld-lib.exp (regexp_diff): Pass test if last line is "#...". * ld-elfweak/elfweak.exp: Run size2.d. * ld-elfwaek/size2.d: New file. * ld-elfwaek/size2a.s: New file. * ld-elfwaek/size2b.s: New file.
2005-03-03update copyright datesAlan Modra1-1/+1
2004-04-202004-04-20 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu5-1/+59
* ld-elfweak/elfweak.exp: Add an undefined weak size change test. * ld-elfweak/size.dat: New file. * ld-elfweak/size_bar.c: Likewise. * ld-elfweak/size_foo.c: Likewise. * ld-elfweak/size_main.c: Likewise.
2003-05-162003-05-15 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-17/+17
* config/default.exp (gcc_ld_flag): New. Make the newly built linker available to gcc. * lib/ld-lib.exp (default_ld_simple_link): Pass $gcc_ld_flag to gcc. * ld-elfvers/vers.exp: Use "ld_simple_link $CC" to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfweak/elfweak.exp: Likewise. * ld-shared/shared.exp: Likewise. * ld-elfvers/vers.exp: Use "-Wl,-rpath,." to build shared libraries. * ld-elfvsb/elfvsb.exp: Likewise. * ld-elfvsb/elfvsb.exp: Remove xfail for powerpc-*-linux*. * ld-elfweak/elfweak.exp: Use PIC for shared libraries.
2003-05-132003-05-13 H.J. Lu <hongjiu.lu@intel.com>H.J. Lu1-2/+2
* ld-elfweak/elfweak.exp: Fix typo.