public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Subject: [PATCH] ld-x86-64: Pass options to linker with "-Wl,"
Date: Fri, 31 Dec 2021 19:44:11 -0800	[thread overview]
Message-ID: <20220101034411.189574-1-hjl.tools@gmail.com> (raw)

	* testsuite/ld-x86-64/x86-64.exp: Pass options to linker with
	"-Wl,".
---
 ld/testsuite/ld-x86-64/x86-64.exp | 44 +++++++++++++++++--------------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index ba065c0fe7f..a36b77a4993 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -1970,8 +1970,8 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with -z bndplt" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,bndplt \
+		 -Wl,-z,noseparate-code,-z,max-page-size=0x200000" \
 		"-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \
 		{ plt-main5.c } \
 		{{objdump {-drw} plt-main-bnd.dd}} \
@@ -1980,8 +1980,9 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with PIE and -z bndplt" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -pie \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \
+		 -Wl,-z,bndplt,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \
 		{ plt-main5.c } \
 		{{objdump {-drw} plt-main-bnd.dd}} \
@@ -1990,8 +1991,8 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with -z bndplt -z now" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,bndplt \
+		 -Wl,-z,now,-z,noseparate-code,-z,max-page-size=0x200000" \
 		"-Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \
 		{ plt-main5.c } \
 		{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
@@ -2000,8 +2001,9 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with PIE and -z bndplt -z now" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z bndplt -z now -pie \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \
+		 -Wl,-z,bndplt,-z,now,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes $NOCF_PROTECTION_CFLAGS" \
 		{ plt-main5.c } \
 		{{readelf {-SW} plt-main-bnd-now.rd} {objdump {-drw} plt-main-bnd.dd}} \
@@ -2097,8 +2099,8 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with -z ibtplt" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,ibtplt \
+		 -Wl,-z,noseparate-code,-z,max-page-size=0x200000" \
 		"-Wa,-mx86-used-note=yes" \
 		{ plt-main5.c } \
 		$pltdump \
@@ -2107,8 +2109,9 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with PIE and -z ibtplt" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -pie \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \
+		 -Wl,-z,ibtplt,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes" \
 		{ plt-main5.c } \
 		$pltdump \
@@ -2117,8 +2120,8 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with -z ibtplt -z now" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -Wl,-z,ibtplt \
+		 -Wl,-z,now,-z,noseparate-code,-z,max-page-size=0x200000" \
 		"-Wa,-mx86-used-note=yes" \
 		{ plt-main5.c } \
 		$pltsecdump \
@@ -2127,8 +2130,9 @@ if { [isnative] && [check_compiler_available] } {
 	    [list \
 		"Build plt-main with PIE and -z ibtplt -z now" \
 		"tmpdir/plt-main1.o tmpdir/plt-main2.o tmpdir/plt-main3.o \
-		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -z ibtplt -z now -pie \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		 tmpdir/plt-main4.o tmpdir/libplt-lib.so -pie \
+		 -Wl,-z,ibtplt,-z,now,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes" \
 		{ plt-main5.c } \
 		$pltsecdump \
@@ -2136,8 +2140,8 @@ if { [isnative] && [check_compiler_available] } {
 	    ] \
 	    [list \
 		"Build libibtplt-lib.so with -z ibtplt" \
-		"-shared -z ibtplt \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		"-shared -Wl,-z,ibtplt,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes" \
 		{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
 		$pltdump \
@@ -2145,8 +2149,8 @@ if { [isnative] && [check_compiler_available] } {
 	    ] \
 	    [list \
 		"Build libibtplt--now-lib.so with -z ibtplt -z now" \
-		"-shared -z ibtplt -z now \
-		 -z noseparate-code -z max-page-size=0x200000" \
+		"-shared -Wl,-z,ibtplt,-z,now,-z,noseparate-code \
+		 -Wl,-z,max-page-size=0x200000" \
 		"-fPIC -Wa,-mx86-used-note=yes" \
 		{ plt-main1.c plt-main2.c plt-main3.c plt-main4.c} \
 		$pltdump \
-- 
2.33.1


                 reply	other threads:[~2022-01-01  3:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220101034411.189574-1-hjl.tools@gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).