diff mbox series

[kvm-unit-tests,GIT,PULL,05/10] s390x: snippets: c: Cleanup flat.lds

Message ID 20230216171255.48799-6-imbrenda@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: storage key migration tests, snippets and linker cleanups | expand

Commit Message

Claudio Imbrenda Feb. 16, 2023, 5:12 p.m. UTC
From: Janosch Frank <frankja@linux.ibm.com>

There are a lot of things in there which we don't need for snippets
and the alignments can be switched from 64K to 4K since that's the
s390 page size.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Link: https://lore.kernel.org/r/20230112154548.163021-3-frankja@linux.ibm.com
Message-Id: <20230112154548.163021-3-frankja@linux.ibm.com>
---
 s390x/snippets/c/flat.lds | 28 +++++++++-------------------
 1 file changed, 9 insertions(+), 19 deletions(-)
diff mbox series

Patch

diff --git a/s390x/snippets/c/flat.lds b/s390x/snippets/c/flat.lds
index 260ab1c4..9e5eb66b 100644
--- a/s390x/snippets/c/flat.lds
+++ b/s390x/snippets/c/flat.lds
@@ -16,27 +16,22 @@  SECTIONS
 		 QUAD(0x0000000000004000)
 	}
 	. = 0x4000;
+	/*
+	 * The stack grows down from 0x4000 to 0x2000, we pre-allocoate
+	 * a frame via the -160.
+	 */
 	stackptr = . - 160;
 	stacktop = .;
+	/* Start text 0x4000 */
 	.text : {
 		*(.init)
 		*(.text)
 		*(.text.*)
 	}
-	. = ALIGN(64K);
+	. = ALIGN(4K);
 	etext = .;
-	.opd : { *(.opd) }
-	. = ALIGN(16);
-	.dynamic : {
-		dynamic_start = .;
-		*(.dynamic)
-	}
-	.dynsym : {
-		dynsym_start = .;
-		*(.dynsym)
-	}
-	.rela.dyn : { *(.rela*) }
-	. = ALIGN(16);
+	/* End text */
+	/* Start data */
 	.data : {
 		*(.data)
 		*(.data.rel*)
@@ -44,11 +39,6 @@  SECTIONS
 	. = ALIGN(16);
 	.rodata : { *(.rodata) *(.rodata.*) }
 	. = ALIGN(16);
-	__bss_start = .;
 	.bss : { *(.bss) }
-	__bss_end = .;
-	. = ALIGN(64K);
-	edata = .;
-	. += 64K;
-	. = ALIGN(64K);
+	/* End data */
 }