mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
d981640286
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,. |
||
---|---|---|
.. | ||
attr-arch-c62x-c62x.d | ||
attr-arch-c62x-c64x.d | ||
attr-arch-c62x-c64x+.d | ||
attr-arch-c62x-c67x.d | ||
attr-arch-c62x-c67x+.d | ||
attr-arch-c62x-c674x.d | ||
attr-arch-c62x.s | ||
attr-arch-c64x-c62x.d | ||
attr-arch-c64x-c64x.d | ||
attr-arch-c64x-c64x+.d | ||
attr-arch-c64x-c67x.d | ||
attr-arch-c64x-c67x+.d | ||
attr-arch-c64x-c674x.d | ||
attr-arch-c64x.s | ||
attr-arch-c64x+-c62x.d | ||
attr-arch-c64x+-c64x.d | ||
attr-arch-c64x+-c64x+.d | ||
attr-arch-c64x+-c67x.d | ||
attr-arch-c64x+-c67x+.d | ||
attr-arch-c64x+-c674x.d | ||
attr-arch-c64x+.s | ||
attr-arch-c67x-c62x.d | ||
attr-arch-c67x-c64x.d | ||
attr-arch-c67x-c64x+.d | ||
attr-arch-c67x-c67x.d | ||
attr-arch-c67x-c67x+.d | ||
attr-arch-c67x-c674x.d | ||
attr-arch-c67x.s | ||
attr-arch-c67x+-c62x.d | ||
attr-arch-c67x+-c64x.d | ||
attr-arch-c67x+-c64x+.d | ||
attr-arch-c67x+-c67x.d | ||
attr-arch-c67x+-c67x+.d | ||
attr-arch-c67x+-c674x.d | ||
attr-arch-c67x+.s | ||
attr-arch-c674x-c62x.d | ||
attr-arch-c674x-c64x.d | ||
attr-arch-c674x-c64x+.d | ||
attr-arch-c674x-c67x.d | ||
attr-arch-c674x-c67x+.d | ||
attr-arch-c674x-c674x.d | ||
attr-arch-c674x.s | ||
attr-array-4-4.d | ||
attr-array-4-8.d | ||
attr-array-4-16.d | ||
attr-array-4-48.d | ||
attr-array-4-416.d | ||
attr-array-4-816.d | ||
attr-array-4.s | ||
attr-array-8-4.d | ||
attr-array-8-8.d | ||
attr-array-8-16.d | ||
attr-array-8-48.d | ||
attr-array-8-416.d | ||
attr-array-8-816.d | ||
attr-array-8.s | ||
attr-array-16-4.d | ||
attr-array-16-8.d | ||
attr-array-16-16.d | ||
attr-array-16-48.d | ||
attr-array-16-416.d | ||
attr-array-16-816.d | ||
attr-array-16.s | ||
attr-array-48-4.d | ||
attr-array-48-8.d | ||
attr-array-48-16.d | ||
attr-array-48-48.d | ||
attr-array-48-416.d | ||
attr-array-48-816.d | ||
attr-array-48.s | ||
attr-array-416-4.d | ||
attr-array-416-8.d | ||
attr-array-416-16.d | ||
attr-array-416-48.d | ||
attr-array-416-416.d | ||
attr-array-416-816.d | ||
attr-array-416.s | ||
attr-array-816-4.d | ||
attr-array-816-8.d | ||
attr-array-816-16.d | ||
attr-array-816-48.d | ||
attr-array-816-416.d | ||
attr-array-816-816.d | ||
attr-array-816.s | ||
attr-compatibility-gnu-gnu.d | ||
attr-compatibility-gnu-other.d | ||
attr-compatibility-gnu.s | ||
attr-compatibility-other-gnu.d | ||
attr-compatibility-other-other.d | ||
attr-compatibility-other.s | ||
attr-conformance-10-10.d | ||
attr-conformance-10-11.d | ||
attr-conformance-10-none.d | ||
attr-conformance-10.s | ||
attr-conformance-11-10.d | ||
attr-conformance-11-11.d | ||
attr-conformance-11-none.d | ||
attr-conformance-11.s | ||
attr-conformance-none-10.d | ||
attr-conformance-none-11.d | ||
attr-conformance-none-none.d | ||
attr-conformance-none.s | ||
attr-dsbt-0.s | ||
attr-dsbt-1.s | ||
attr-dsbt-00.d | ||
attr-dsbt-01.d | ||
attr-dsbt-10.d | ||
attr-dsbt-11.d | ||
attr-pic-0.s | ||
attr-pic-1.s | ||
attr-pic-00.d | ||
attr-pic-01.d | ||
attr-pic-10.d | ||
attr-pic-11.d | ||
attr-pid-0.s | ||
attr-pid-1.s | ||
attr-pid-2.s | ||
attr-pid-00.d | ||
attr-pid-01.d | ||
attr-pid-02.d | ||
attr-pid-10.d | ||
attr-pid-11.d | ||
attr-pid-12.d | ||
attr-pid-20.d | ||
attr-pid-21.d | ||
attr-pid-22.d | ||
attr-stack-8-8.d | ||
attr-stack-8-16.d | ||
attr-stack-8-816.d | ||
attr-stack-8.s | ||
attr-stack-16-8.d | ||
attr-stack-16-16.d | ||
attr-stack-16-816.d | ||
attr-stack-16.s | ||
attr-stack-816-8.d | ||
attr-stack-816-16.d | ||
attr-stack-816-816.d | ||
attr-stack-816.s | ||
attr-unknown-1.d | ||
attr-unknown-2.d | ||
attr-unknown-3.d | ||
attr-unknown-4.d | ||
attr-unknown-5.d | ||
attr-unknown-6.d | ||
attr-unknown-7.d | ||
attr-unknown-54-1.s | ||
attr-unknown-55-a.s | ||
attr-unknown-71-a.s | ||
attr-unknown-71-b.s | ||
attr-unknown-1000-1.s | ||
attr-unknown-1000-2.s | ||
attr-unknown-1024-1.s | ||
attr-wchar-0.s | ||
attr-wchar-1.s | ||
attr-wchar-2.s | ||
attr-wchar-00.d | ||
attr-wchar-01.d | ||
attr-wchar-02.d | ||
attr-wchar-10.d | ||
attr-wchar-11.d | ||
attr-wchar-12.d | ||
attr-wchar-20.d | ||
attr-wchar-21.d | ||
attr-wchar-22.d | ||
common.d | ||
common.ld | ||
common.s | ||
data-reloc-global-rel.d | ||
data-reloc-global-rel.s | ||
data-reloc-global.d | ||
data-reloc-global.s | ||
data-reloc-local-1.s | ||
data-reloc-local-2.s | ||
data-reloc-local-r-rel.d | ||
data-reloc-local-r.d | ||
data-reloc-local-rel.d | ||
data-reloc-local.d | ||
discard-unwind.ld | ||
dsbt-be.ld | ||
dsbt-index-error.d | ||
dsbt-index.d | ||
dsbt-index.s | ||
dsbt-inrange.ld | ||
dsbt-overflow.ld | ||
dsbt.ld | ||
ehtype-reloc-1-rel.d | ||
ehtype-reloc-1.d | ||
ehtype-reloc-1.s | ||
generic.ld | ||
got-reloc-global-addend-1.d | ||
got-reloc-global-addend-1.s | ||
got-reloc-global-addend-2.d | ||
got-reloc-global-addend-2.s | ||
got-reloc-global.s | ||
got-reloc-inrange.d | ||
got-reloc-local-1.s | ||
got-reloc-local-2.s | ||
got-reloc-local-r.d | ||
got-reloc-overflow.d | ||
mvk-reloc-global-rel.d | ||
mvk-reloc-global-rel.s | ||
mvk-reloc-global.d | ||
mvk-reloc-global.s | ||
mvk-reloc-local-1-rel.s | ||
mvk-reloc-local-1.s | ||
mvk-reloc-local-2-rel.s | ||
mvk-reloc-local-2.s | ||
mvk-reloc-local-r-rel.d | ||
mvk-reloc-local-r.d | ||
mvk-reloc-local-rel.d | ||
mvk-reloc-local.d | ||
pcr-reloc.d | ||
pcr-reloc.s | ||
pcrel-reloc-global-rel.d | ||
pcrel-reloc-global.d | ||
pcrel-reloc-global.s | ||
pcrel-reloc-local-1.s | ||
pcrel-reloc-local-2.s | ||
pcrel-reloc-local-r-rel-rela.d | ||
pcrel-reloc-local-r-rel.d | ||
pcrel-reloc-local-r.d | ||
pcrel-reloc-local-rel.d | ||
pcrel-reloc-local.d | ||
reloc-overflow-abs8-1.d | ||
reloc-overflow-abs8-2.d | ||
reloc-overflow-abs8.s | ||
reloc-overflow-abs16-1.d | ||
reloc-overflow-abs16-2.d | ||
reloc-overflow-abs16.s | ||
reloc-overflow-abs-s16-1.d | ||
reloc-overflow-abs-s16-2.d | ||
reloc-overflow-abs-s16.s | ||
reloc-overflow-pcr-s7-1.d | ||
reloc-overflow-pcr-s7-2.d | ||
reloc-overflow-pcr-s7.s | ||
reloc-overflow-pcr-s10-1.d | ||
reloc-overflow-pcr-s10-2.d | ||
reloc-overflow-pcr-s10.s | ||
reloc-overflow-pcr-s12-1.d | ||
reloc-overflow-pcr-s12-2.d | ||
reloc-overflow-pcr-s12.s | ||
reloc-overflow-pcr-s21-1.d | ||
reloc-overflow-pcr-s21-2.d | ||
reloc-overflow-pcr-s21.s | ||
reloc-overflow-sbr-s16-1.d | ||
reloc-overflow-sbr-s16-2.d | ||
reloc-overflow-sbr-s16.s | ||
reloc-overflow-sbr-u15-b-1.d | ||
reloc-overflow-sbr-u15-b-2.d | ||
reloc-overflow-sbr-u15-b.s | ||
reloc-overflow-sbr-u15-h-1.d | ||
reloc-overflow-sbr-u15-h-2.d | ||
reloc-overflow-sbr-u15-h.s | ||
reloc-overflow-sbr-u15-w-1.d | ||
reloc-overflow-sbr-u15-w-2.d | ||
reloc-overflow-sbr-u15-w.s | ||
sbr-reloc-global-rel.d | ||
sbr-reloc-global-rel.s | ||
sbr-reloc-global.d | ||
sbr-reloc-global.s | ||
sbr-reloc-local-1-rel.s | ||
sbr-reloc-local-1.s | ||
sbr-reloc-local-2-rel.s | ||
sbr-reloc-local-2.s | ||
sbr-reloc-local-r-rel.d | ||
sbr-reloc-local-r.d | ||
sbr-reloc-local-rel.d | ||
sbr-reloc-local.d | ||
sbr.ld | ||
shared-nopic.d | ||
shared-nopid.d | ||
shlib-1.dd | ||
shlib-1.rd | ||
shlib-1.s | ||
shlib-1.sd | ||
shlib-1b.dd | ||
shlib-1b.rd | ||
shlib-1b.sd | ||
shlib-1r.dd | ||
shlib-1r.rd | ||
shlib-1r.sd | ||
shlib-1rb.dd | ||
shlib-1rb.rd | ||
shlib-1rb.sd | ||
shlib-2.s | ||
shlib-app-1.dd | ||
shlib-app-1.od | ||
shlib-app-1.rd | ||
shlib-app-1.s | ||
shlib-app-1.sd | ||
shlib-app-1b.dd | ||
shlib-app-1b.od | ||
shlib-app-1b.rd | ||
shlib-app-1b.sd | ||
shlib-app-1r.dd | ||
shlib-app-1r.od | ||
shlib-app-1r.rd | ||
shlib-app-1r.s | ||
shlib-app-1r.sd | ||
shlib-app-1rb.dd | ||
shlib-app-1rb.od | ||
shlib-app-1rb.rd | ||
shlib-app-1rb.sd | ||
shlib-noindex.dd | ||
shlib-noindex.rd | ||
shlib-noindex.sd | ||
static-app-1.dd | ||
static-app-1.od | ||
static-app-1.rd | ||
static-app-1.sd | ||
static-app-1b.dd | ||
static-app-1b.od | ||
static-app-1b.rd | ||
static-app-1b.sd | ||
static-app-1r.dd | ||
static-app-1r.od | ||
static-app-1r.rd | ||
static-app-1r.sd | ||
static-app-1rb.dd | ||
static-app-1rb.od | ||
static-app-1rb.rd | ||
static-app-1rb.sd | ||
tic6x.exp | ||
unwind-1.d | ||
unwind-1.s | ||
unwind-2.d | ||
unwind-2.s | ||
unwind-3.d | ||
unwind-3.s | ||
unwind-4.d | ||
unwind-4.s | ||
unwind-5.d | ||
unwind-5.s | ||
unwind-6.d | ||
unwind.ld | ||
weak-be.d | ||
weak-data.d | ||
weak.d | ||
weak.s |