mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
6c0d3bdec7
Pass explicit -mx86-used-note=[yes|no] to x86 assembler and update expected outputs from "readelf -n" if needed. binutils/ * testsuite/binutils-all/i386/compressed-1b.d: Pass -mx86-used-note=no to assembler. * testsuite/binutils-all/i386/compressed-1c.d: Likewise. * testsuite/binutils-all/x86-64/compressed-1b.d: Likewise. * testsuite/binutils-all/x86-64/compressed-1c.d: Likewise. * testsuite/binutils-all/i386/empty.d: Pass -mx86-used-note=yes to assembler and update expected output from "readelf -n". * testsuite/binutils-all/i386/ibt.d: Likewise. * testsuite/binutils-all/i386/pr21231a.d: Likewise. * testsuite/binutils-all/i386/pr21231b.d: Likewise. * testsuite/binutils-all/i386/shstk.d: Likewise. * testsuite/binutils-all/x86-64/empty-x32.d: Likewise. * testsuite/binutils-all/x86-64/empty.d: Likewise. * testsuite/binutils-all/x86-64/ibt-x32.d: Likewise. * testsuite/binutils-all/x86-64/ibt.d: Likewise. * testsuite/binutils-all/x86-64/pr21231a.d: Likewise. * testsuite/binutils-all/x86-64/pr21231b.d: Likewise. * testsuite/binutils-all/x86-64/pr23494a-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494a.d: Likewise. * testsuite/binutils-all/x86-64/pr23494b-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494b.d: Likewise. * testsuite/binutils-all/x86-64/pr23494c-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494c.d: Likewise. * testsuite/binutils-all/x86-64/pr23494d-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494d.d: Likewise. * testsuite/binutils-all/x86-64/pr23494e-x32.d: Likewise. * testsuite/binutils-all/x86-64/pr23494e.d: Likewise. * testsuite/binutils-all/x86-64/shstk-x32.d: Likewise. * testsuite/binutils-all/x86-64/shstk.d: Likewise. gas/ * testsuite/gas/i386/bss.d: Pass -mx86-used-note=no to assembler. * testsuite/gas/i386/ilp32/quad.d: Likewise. * testsuite/gas/i386/ilp32/reloc64.d: Likewise. * testsuite/gas/i386/ilp32/x86-64-size-1.d: Likewise. * testsuite/gas/i386/ilp32/x86-64-size-3.d: Likewise. * testsuite/gas/i386/ilp32/x86-64-size-5.d: Likewise. * testsuite/gas/i386/ilp32/x86-64-unwind.d: Likewise. * testsuite/gas/i386/property-1.d: Likewise. * testsuite/gas/i386/relax.d: Likewise. * testsuite/gas/i386/reloc64.d: Likewise. * testsuite/gas/i386/size-1.d: Likewise. * testsuite/gas/i386/size-3.d: Likewise. * testsuite/gas/i386/x86-64-property-1.d: Likewise. * testsuite/gas/i386/x86-64-size-1.d: Likewise. * testsuite/gas/i386/x86-64-size-3.d: Likewise. * testsuite/gas/i386/x86-64-size-5.d: Likewise. * testsuite/gas/i386/x86-64-unwind.d: Likewise. * testsuite/gas/i386/divide.d: Append "#pass". ld/ * testsuite/ld-i386/i386.exp: (ASFLAGS): Save, append -mx86-used-note=no and restore. Pass -mx86-used-note=yes and -mx86-used-note=no to assembler. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/no-plt.exp: Pass -mx86-used-note=yes to assembler. * testsuite/ld-i386/tls.exp: Likewise. * testsuite/ld-x86-64/no-plt.exp: Likewise. * testsuite/ld-x86-64/tls.exp: Likewise. * testsuite/ld-i386/pr23486a.d: Pass -mx86-used-note=no to assembler. * testsuite/ld-i386/pr23486b.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-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/pr23486a-x32.d: Likewise. * testsuite/ld-x86-64/pr23486a.d: Likewise. * testsuite/ld-x86-64/pr23486b-x32.d: Likewise. * testsuite/ld-x86-64/pr23486b.d: Likewise. * testsuite/ld-i386/property-x86-3.d: Pass -mx86-used-note=yes to assembler and update expected output from "readelf -n". * testsuite/ld-i386/property-x86-4a.d: Likewise. * testsuite/ld-i386/property-x86-ibt1a.d: Likewise. * testsuite/ld-i386/property-x86-ibt1b.d: Likewise. * testsuite/ld-i386/property-x86-ibt2.d: Likewise. * testsuite/ld-i386/property-x86-ibt3a.d: Likewise. * testsuite/ld-i386/property-x86-ibt3b.d: Likewise. * testsuite/ld-i386/property-x86-ibt4.d: Likewise. * testsuite/ld-i386/property-x86-ibt5.d: Likewise. * testsuite/ld-i386/property-x86-shstk1a.d: Likewise. * testsuite/ld-i386/property-x86-shstk1b.d: Likewise. * testsuite/ld-i386/property-x86-shstk2.d: Likewise. * testsuite/ld-i386/property-x86-shstk3a.d: Likewise. * testsuite/ld-i386/property-x86-shstk3b.d: Likewise. * testsuite/ld-i386/property-x86-shstk4.d: Likewise. * testsuite/ld-i386/property-x86-shstk5.d: Likewise. * testsuite/ld-x86-64/property-x86-3-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-3.d: Likewise. * testsuite/ld-x86-64/property-x86-4a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-4a.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt1a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt1a.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt1b-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt1b.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt2-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt2.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt3a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt3a.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt3b-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt3b.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt4-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt4.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt5-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-ibt5.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk1a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk1a.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk1b-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk1b.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk2-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk2.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk3a-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk3a.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk3b-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk3b.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk4-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk4.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk5-x32.d: Likewise. * testsuite/ld-x86-64/property-x86-shstk5.d: Likewise. * testsuite/ld-i386/property-1a.r: New file. * testsuite/ld-i386/property-2a.r: Likewise. * testsuite/ld-i386/property-3a.r: Likewise. * testsuite/ld-i386/property-4a.r: Likewise. * testsuite/ld-i386/property-5a.r: Likewise. * testsuite/ld-i386/property-7a.r: Likewise. * testsuite/ld-x86-64/property-1a.r: Likewise. * testsuite/ld-x86-64/property-2a.r: Likewise. * testsuite/ld-x86-64/property-3a.r: Likewise. * testsuite/ld-x86-64/property-4a.r: Likewise. * testsuite/ld-x86-64/property-5a.r: Likewise. * testsuite/ld-x86-64/property-7a.r: Likewise. * testsuite/ld-x86-64/mpx.exp: Pass -mx86-used-note=no to assembler.
252 lines
5.9 KiB
Plaintext
252 lines
5.9 KiB
Plaintext
# Expect script for x86-64 TLS tests.
|
|
# Copyright (C) 2016-2018 Free Software Foundation, Inc.
|
|
#
|
|
# This file is part of the GNU Binutils.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
# MA 02110-1301, USA.
|
|
#
|
|
|
|
# The following tests require running the executable generated by ld,
|
|
# or enough of a build environment to create a fully linked executable.
|
|
# This is not commonly available when testing a cross-built linker.
|
|
if ![isnative] {
|
|
return
|
|
}
|
|
|
|
# Only on Linux for now.
|
|
if ![istarget "x86_64-*-linux*"] {
|
|
return
|
|
}
|
|
|
|
# Check to see if the C compiler works
|
|
if { [which $CC] == 0 } {
|
|
return
|
|
}
|
|
|
|
run_cc_link_tests [list \
|
|
[list \
|
|
"Build tls-def1.o tls-main1.o" \
|
|
"" \
|
|
"-fPIE -Wa,-mx86-used-note=yes" \
|
|
{tls-def1.c tls-main1.c} \
|
|
] \
|
|
[list \
|
|
"Build tls-gd1.o tls-ld1.o" \
|
|
"" \
|
|
"-fPIC -Wa,-mrelax-relocations=yes,-mx86-used-note=yes" \
|
|
{tls-gd1.S tls-ld1.S} \
|
|
] \
|
|
[list \
|
|
"Build libtls-1a.so" \
|
|
"-shared tmpdir/tls-def1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{dummy.s} \
|
|
{} \
|
|
"libtls-1a.so" \
|
|
] \
|
|
[list \
|
|
"Build libtls-1b.so" \
|
|
"-shared tmpdir/tls-gd1.o tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{dummy.s} \
|
|
{} \
|
|
"libtls-1b.so" \
|
|
] \
|
|
[list \
|
|
"Build libtls-1bn.so" \
|
|
"-Wl,-z,now -shared tmpdir/tls-gd1.o tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{dummy.s} \
|
|
{} \
|
|
"libtls-1bn.so" \
|
|
] \
|
|
]
|
|
|
|
run_ld_link_exec_tests [list \
|
|
[list \
|
|
"TLS GD/LD -> LE transition without PLT (dynamic)" \
|
|
"tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
|
|
tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1a" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> LE transition without PLT (dynamic, -z now)" \
|
|
"-Wl,-z,now tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
|
|
tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1an" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> LE transition without PLT (PIE)" \
|
|
"-pie tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
|
|
tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1b" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> LE transition without PLT (PIE, -z now)" \
|
|
"-pie -Wl,-z,now tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
|
|
tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1bn" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> LE transition without PLT (static)" \
|
|
"-static tmpdir/tls-def1.o tmpdir/tls-main1.o tmpdir/tls-gd1.o \
|
|
tmpdir/tls-ld1.o" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1c" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> IE transition without PLT" \
|
|
"-Wl,--no-as-needed,-R,tmpdir tmpdir/tls-main1.o \
|
|
tmpdir/tls-gd1.o tmpdir/tls-ld1.o tmpdir/libtls-1a.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1d" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS GD/LD -> IE transition without PLT (-z now)" \
|
|
"-Wl,-z,now tmpdir/tls-main1.o tmpdir/tls-gd1.o tmpdir/tls-ld1.o \
|
|
tmpdir/libtls-1a.so -Wl,-R,tmpdir" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1dn" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS without PLT (1)" \
|
|
"-Wl,--no-as-needed,-R,tmpdir tmpdir/tls-main1.o \
|
|
tmpdir/libtls-1a.so tmpdir/libtls-1b.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1e" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS without PLT (2)" \
|
|
"-Wl,--no-as-needed,-R,tmpdir tmpdir/tls-main1.o \
|
|
tmpdir/tls-def1.o tmpdir/libtls-1b.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1f" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS without PLT (3)" \
|
|
"-Wl,--no-as-needed -Wl,-z,now tmpdir/tls-main1.o \
|
|
tmpdir/libtls-1a.so tmpdir/libtls-1bn.so -Wl,-R,tmpdir" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1en" \
|
|
"pass.out" \
|
|
] \
|
|
[list \
|
|
"TLS without PLT (4)" \
|
|
"-Wl,-z,now tmpdir/tls-main1.o tmpdir/tls-def1.o \
|
|
tmpdir/libtls-1bn.so -Wl,-R,tmpdir" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ dummy.s } \
|
|
"tls-1fn" \
|
|
"pass.out" \
|
|
] \
|
|
]
|
|
|
|
# -mtls-dialect=gnu2 isn't supported on x32.
|
|
if [istarget "x86_64-*-linux*-gnux32"] {
|
|
return
|
|
}
|
|
|
|
run_cc_link_tests [list \
|
|
[list \
|
|
"Build libtlsdesc1.so" \
|
|
"-shared" \
|
|
"-fPIC $GNU2_CFLAGS -Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1b.c } \
|
|
{} \
|
|
"libtlsdesc1.so" \
|
|
] \
|
|
[list \
|
|
"Build libtlsdesc1n.so" \
|
|
"-Wl,-z,now -shared" \
|
|
"-fPIC $GNU2_CFLAGS -Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1b.c } \
|
|
{} \
|
|
"libtlsdesc1n.so" \
|
|
] \
|
|
]
|
|
|
|
# Run-time tests which require working GNU2 TLS support.
|
|
if { ![check_gnu2_tls_available] } {
|
|
return
|
|
}
|
|
|
|
if { [at_least_gcc_version 5 0] } {
|
|
run_ld_link_exec_tests [list \
|
|
[list \
|
|
"Run tlsdesc1" \
|
|
"-Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1a.c } \
|
|
"tlsdesc1a" \
|
|
"pass.out" \
|
|
"$GNU2_CFLAGS" \
|
|
] \
|
|
[list \
|
|
"Run tlsdesc1 with PIE" \
|
|
"-pie -Wl,--no-as-needed tmpdir/libtlsdesc1.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1a.c } \
|
|
"tlsdesc1c" \
|
|
"pass.out" \
|
|
"-fPIE $GNU2_CFLAGS" \
|
|
] \
|
|
]
|
|
}
|
|
|
|
run_ld_link_exec_tests [list \
|
|
[list \
|
|
"Run tlsdesc1 (-z now)" \
|
|
"-Wl,-z,now -Wl,--no-as-needed tmpdir/libtlsdesc1n.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1a.c } \
|
|
"tlsdesc1b" \
|
|
"pass.out" \
|
|
"$GNU2_CFLAGS" \
|
|
] \
|
|
[list \
|
|
"Run tlsdesc1 with PIE (-z now)" \
|
|
"-pie -Wl,-z,now -Wl,--no-as-needed tmpdir/libtlsdesc1n.so" \
|
|
"-Wa,-mx86-used-note=yes" \
|
|
{ tlsdesc1a.c } \
|
|
"tlsdesc1d" \
|
|
"pass.out" \
|
|
"-fPIE $GNU2_CFLAGS" \
|
|
] \
|
|
]
|