public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: linux-s390@vger.kernel.org
Cc: "Nicholas Piggin" <npiggin@gmail.com>,
	"Janosch Frank" <frankja@linux.ibm.com>,
	"Claudio Imbrenda" <imbrenda@linux.ibm.com>,
	"Nico Böhr" <nrb@linux.ibm.com>,
	"David Hildenbrand" <david@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	kvm@vger.kernel.org
Subject: [kvm-unit-tests PATCH 2/2] s390x: Specify program headers with flags to avoid linker warnings
Date: Sun,  2 Jun 2024 23:06:56 +1000	[thread overview]
Message-ID: <20240602130656.120866-3-npiggin@gmail.com> (raw)
In-Reply-To: <20240602130656.120866-1-npiggin@gmail.com>

Avoid "LOAD segment with RWX permissions" warnings from new linkers
by specifying program headers. See 59a797f451cde and linked commits
for similar fixes for other architectures.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 s390x/snippets/c/flat.lds.S | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/s390x/snippets/c/flat.lds.S b/s390x/snippets/c/flat.lds.S
index 468b5f1ee..6b8ceb9e0 100644
--- a/s390x/snippets/c/flat.lds.S
+++ b/s390x/snippets/c/flat.lds.S
@@ -1,5 +1,11 @@
 #include <asm/asm-offsets.h>
 
+PHDRS
+{
+    text PT_LOAD FLAGS(5);
+    data PT_LOAD FLAGS(6);
+}
+
 SECTIONS
 {
 	.lowcore : {
@@ -29,7 +35,7 @@ SECTIONS
 		*(.init)
 		*(.text)
 		*(.text.*)
-	}
+	} :text
 	. = ALIGN(4K);
 	etext = .;
 	/* End text */
@@ -37,9 +43,9 @@ SECTIONS
 	.data : {
 		*(.data)
 		*(.data.rel*)
-	}
+	} :data
 	. = ALIGN(16);
-	.rodata : { *(.rodata) *(.rodata.*) }
+	.rodata : { *(.rodata) *(.rodata.*) } :data
 	. = ALIGN(16);
 	.bss : { *(.bss) }
 	/* End data */
-- 
2.43.0


  parent reply	other threads:[~2024-06-02 13:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-02 13:06 [kvm-unit-tests PATCH 0/2] s390x: Fix build error messages Nicholas Piggin
2024-06-02 13:06 ` [kvm-unit-tests PATCH 1/2] s390x: Only run genprotimg if necessary Nicholas Piggin
2024-06-03 11:54   ` Janosch Frank
2024-06-04  5:18     ` Nicholas Piggin
2024-06-02 13:06 ` Nicholas Piggin [this message]
2024-06-04  5:32 ` [kvm-unit-tests PATCH 0/2] s390x: Fix build error messages Thomas Huth

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=20240602130656.120866-3-npiggin@gmail.com \
    --to=npiggin@gmail.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=thuth@redhat.com \
    /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