public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm64: Change the location of DISCARDS
@ 2020-11-04 10:48 Youling Tang
  2020-11-05 21:47 ` Will Deacon
  0 siblings, 1 reply; 5+ messages in thread
From: Youling Tang @ 2020-11-04 10:48 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Paul Walmsley, Palmer Dabbelt,
	Albert Ou
  Cc: linux-riscv, tangyouling, linux-kernel, linux-arm-kernel

In the include/asm-generic/vmlinux.lds.h file, the "must be the last"
comment indicates that DISCARDS should be placed in the last position
of SECTIONS, like x86, mips, riscv, etc.

Signed-off-by: Youling Tang <tangyouling@loongson.cn>
---
 arch/arm64/kernel/vmlinux.lds.S | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S
index 1bda604..bf31074 100644
--- a/arch/arm64/kernel/vmlinux.lds.S
+++ b/arch/arm64/kernel/vmlinux.lds.S
@@ -109,12 +109,6 @@ SECTIONS
 	 * matching the same input section name.  There is no documented
 	 * order of matching.
 	 */
-	DISCARDS
-	/DISCARD/ : {
-		*(.interp .dynamic)
-		*(.dynsym .dynstr .hash .gnu.hash)
-	}
-
 	. = KIMAGE_VADDR;
 
 	.head.text : {
@@ -284,6 +278,13 @@ SECTIONS
 
 	.data.rel.ro : { *(.data.rel.ro) }
 	ASSERT(SIZEOF(.data.rel.ro) == 0, "Unexpected RELRO detected!")
+
+	/* Sections to be discarded */
+	DISCARDS
+	/DISCARD/ : {
+		*(.interp .dynamic)
+		*(.dynsym .dynstr .hash .gnu.hash)
+	}
 }
 
 #include "image-vars.h"
-- 
2.1.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-11-12 13:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-04 10:48 [PATCH] arm64: Change the location of DISCARDS Youling Tang
2020-11-05 21:47 ` Will Deacon
2020-11-06  1:06   ` tangyouling
2020-11-06  9:07     ` Will Deacon
2020-11-12 13:17       ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox