ld: Pass -z notext to linker for tests with DT_TEXTREL
[deliverable/binutils-gdb.git] / ld / testsuite / ld-shared / shared.exp
index 32cdbe8a417d08c5a5906bd792e335f8a70efd97..fa64730775cacdcf7ef9be657c2399bc840c6cdf 100644 (file)
@@ -133,6 +133,9 @@ proc shared_test { progname testname main sh1 sh2 dat args } {
     if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
        set shared "-bM:SRE -bE:$tmpdir/xcoff.exp"
     }
+    if { [is_elf_format] && [check_shared_lib_support] } {
+       append shared " -Wl,-z,notext"
+    }
     if {![ld_link $CC $tmpdir/$progname.so "$shared $shldflags $tmpdir/$sh1 $tmpdir/$sh2"]} {
         fail "$testname"
        return
This page took 0.022801 seconds and 4 git commands to generate.