diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-elf/tls.exp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/ld/testsuite/ld-elf/tls.exp b/ld/testsuite/ld-elf/tls.exp index 305eb5f..3143512 100644 --- a/ld/testsuite/ld-elf/tls.exp +++ b/ld/testsuite/ld-elf/tls.exp @@ -37,17 +37,43 @@ if { ![check_compiler_available] } { set AFLAGS_PIC "" if [istarget "sparc*-*-*"] { append AFLAGS_PIC " -K PIC -Av9" +} elseif [istarget ia64-*-*] { + append AFLAGS_PIC " -x" +} + +set ldflags "-pie -e _start -z text" +if [istarget arm*-*-*] { + append ldflags " --defsym __aeabi_read_tp=0" +} elseif [istarget m68*-*-*] { + append ldflags " --defsym __m68k_read_tp=0" +} elseif [istarget microblaze-*-*] { + append ldflags " --defsym __tls_get_addr=0" } run_ld_link_tests [list \ [list \ - "Build pr22263-1" \ - "-pie -e _start -z text" \ + "pr22263-1 -z text" \ + $ldflags \ "" \ "$AFLAGS_PIC" \ { pr22263-1a.c pr22263-1b.c } \ - {{readelf -r pr22263-1.rd}} \ + {} \ "pr22263-1" \ "-fPIE -O2 $NOSANITIZE_CFLAGS" \ ] \ ] + +if [file exists tmpdir/pr22263-1] { + run_ld_link_tests [list \ + [list \ + "pr22263-1 tprel optimisation" \ + $ldflags \ + "tmpdir/pr22263-1a.o tmpdir/pr22263-1b.o" \ + "" \ + {} \ + {{readelf -r pr22263-1.rd}} \ + "pr22263-1" \ + "" \ + ] \ + ] ia64-*-* m68*-*-* nios2-*-* s390-*-* sh*-*-* +} |