From af2c48d8545cbc24aa6caf9b9f2a49ab6c0aaa7b Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 25 May 2020 04:54:31 -0700 Subject: ld: Pass -z notext to linker for tests with DT_TEXTREL Some linker tests need DT_TEXTREL. Pass -z notext to linker for these tests so that they will pass with DT_TEXTREL check defaulting to warning or error. * testsuite/ld-elf/eh6.d: Pass -z notext to linker. * testsuite/ld-elf/ehdr_start-shared.d: Likewise. * testsuite/ld-elf/pr19539.d: Likewise. * testsuite/ld-elfvers/vers.exp: Likewise. * testsuite/ld-elfvsb/elfvsb.exp: Likewise. * testsuite/ld-i386/i386.exp: Likewise. * testsuite/ld-i386/nogot1.d: Likewise. * testsuite/ld-i386/pr19539.d: Likewise. * testsuite/ld-i386/pr19636-2a.d: Likewise. * testsuite/ld-i386/pr19636-2b.d: Likewise. * testsuite/ld-i386/pr19636-2c.d: Likewise. * testsuite/ld-i386/pr19636-2d.d: Likewise. * testsuite/ld-i386/pr19636-2e.d: Likewise. * testsuite/ld-i386/pr19636-3d.d: Likewise. * testsuite/ld-i386/pr19636-3e.d: Likewise. * testsuite/ld-i386/pr19939b.d: Likewise. * testsuite/ld-i386/undefweaka.d: Likewise. * testsuite/ld-i386/undefweakb.d: Likewise. * testsuite/ld-shared/shared.exp: Likewise. * testsuite/ld-size/size.exp: Likewise. * testsuite/ld-unique/unique.exp: Likewise. * testsuite/ld-x86-64/pie1.d: Likewise. * testsuite/ld-x86-64/pr19539a.d: Likewise. * testsuite/ld-x86-64/pr19539b.d: Likewise. * testsuite/ld-x86-64/pr19636-1d.d: Likewise. * testsuite/ld-x86-64/pr19636-1e.d: Likewise. * testsuite/ld-x86-64/pr19807-1a.d: Likewise. * testsuite/ld-x86-64/pr19807-1b.d: Likewise. * testsuite/ld-x86-64/pr19807-2b.d: Likewise. * testsuite/ld-x86-64/pr19807-2c.d: Likewise. * testsuite/ld-x86-64/pr19807-2d.d: Likewise. * testsuite/ld-x86-64/pr19807-2e.d: Likewise. * testsuite/ld-x86-64/pr19939b.d: Likewise. * testsuite/ld-x86-64/x86-64.exp: Likewise. --- ld/testsuite/ld-shared/shared.exp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ld/testsuite/ld-shared/shared.exp') diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/shared.exp index 32cdbe8..fa64730 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -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 -- cgit v1.1