[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190605113249.6393-1-malat@debian.org>
Date: Wed, 5 Jun 2019 13:32:49 +0200
From: Mathieu Malaterre <malat@...ian.org>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Mathieu Malaterre <malat@...ian.org>,
Christophe Leroy <christophe.leroy@....fr>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH] powerpc/32: Add .data..LASAN* sections explicitly
When both `CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y` and `CONFIG_KASAN=y`
are set, link step typically produce numberous warnings about orphan
section:
powerpc-linux-gnu-ld: warning: orphan section `.data..LASAN0' from `net/core/filter.o' being placed in section `.data..LASAN0'
powerpc-linux-gnu-ld: warning: orphan section `.data..LASANLOC1' from `net/core/filter.o' being placed in section `.data..LASANLOC1'
This commit remove those warnings produced at W=1.
Reported-by: Christophe Leroy <christophe.leroy@....fr>
Signed-off-by: Mathieu Malaterre <malat@...ian.org>
---
arch/powerpc/kernel/vmlinux.lds.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 060a1acd7c6d..c74f4cb6ec3a 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -307,6 +307,9 @@ SECTIONS
#ifdef CONFIG_PPC32
.data : AT(ADDR(.data) - LOAD_OFFSET) {
DATA_DATA
+#ifdef CONFIG_KASAN
+ *(.data..LASAN*)
+#endif
#ifdef CONFIG_UBSAN
*(.data..Lubsan_data*)
*(.data..Lubsan_type*)
--
2.20.1
Powered by blists - more mailing lists