[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200427211628.4244-1-hjl.tools@gmail.com>
Date: Mon, 27 Apr 2020 14:16:28 -0700
From: "H.J. Lu" <hjl.tools@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Kees Cook <keescook@...omium.org>,
Borislav Petkov <bp@...e.de>,
"Naveen N . Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
linuxppc-dev@...ts.ozlabs.org
Subject: [PATCH] powerpc: Discard .rela* sections if CONFIG_RELOCATABLE is undefined
arch/powerpc/kernel/vmlinux.lds.S has
DISCARDS
/DISCARD/ : {
*(*.EMB.apuinfo)
*(.glink .iplt .plt .rela* .comment)
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
}
Since .rela* sections are needed when CONFIG_RELOCATABLE is defined,
change to discard .rela* sections if CONFIG_RELOCATABLE is undefined.
Signed-off-by: H.J. Lu <hjl.tools@...il.com>
Acked-by: Michael Ellerman <mpe@...erman.id.au> (powerpc)
---
arch/powerpc/kernel/vmlinux.lds.S | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 31a0f201fb6f..4ba07734a210 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -366,9 +366,12 @@ SECTIONS
DISCARDS
/DISCARD/ : {
*(*.EMB.apuinfo)
- *(.glink .iplt .plt .rela* .comment)
+ *(.glink .iplt .plt .comment)
*(.gnu.version*)
*(.gnu.attributes)
*(.eh_frame)
+#ifndef CONFIG_RELOCATABLE
+ *(.rela*)
+#endif
}
}
--
2.25.4
Powered by blists - more mailing lists