[PATCH v3 2/3] powerpc: Discard dynsym section for !PPC32
Joel Stanley
joel at jms.id.au
Tue Dec 11 09:28:53 AEDT 2018
Alan Modra <amodra at gmail.com> explains:
> Likely you could discard .interp > and .dynstr too, and .dynsym when
> !CONFIG_PPC32.
Discarding of interp and dynstr happened in a previous patch. The dynsym
cleanup was a bit less straightforward, so it gets it's own patch.
Signed-off-by: Joel Stanley <joel at jms.id.au>
---
See https://lore.kernel.org/lkml/CACPK8Xft3n5KkpTjN3=7_VUCXHFcK7mxvZm2Rrqu7tppcBoyOg@mail.gmail.com/T/#m58532c86cf0c7b4fb01cc1fe724e48d4c7d8e4a7
v3: Move dynstr hunk to patch 1 (it was incorrectly left in this patch)
---
arch/powerpc/kernel/vmlinux.lds.S | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 779b8b3075a1..2c93a420f456 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -266,13 +266,13 @@ SECTIONS
}
#ifdef CONFIG_RELOCATABLE
. = ALIGN(8);
+#ifdef CONFIG_PPC32
.dynsym : AT(ADDR(.dynsym) - LOAD_OFFSET)
{
-#ifdef CONFIG_PPC32
__dynamic_symtab = .;
-#endif
*(.dynsym)
}
+#endif
.dynamic : AT(ADDR(.dynamic) - LOAD_OFFSET)
{
__dynamic_start = .;
@@ -388,5 +388,8 @@ SECTIONS
*(.hash .gnu.hash)
*(.interp)
*(.dynstr)
+#ifndef CONFIG_PPC32
+ *(.dynsym)
+#endif
}
}
--
2.19.1
More information about the Linuxppc-dev
mailing list