* [PATCH] powerpc: Discard .rela* sections if CONFIG_RELOCATABLE is undefined
@ 2020-04-27 21:16 H.J. Lu
2020-04-28 1:18 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2020-04-27 21:16 UTC (permalink / raw)
To: linux-kernel
Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Kees Cook, Borislav Petkov, Naveen N . Rao, linuxppc-dev
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@gmail.com>
Acked-by: Michael Ellerman <mpe@ellerman.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: Discard .rela* sections if CONFIG_RELOCATABLE is undefined
2020-04-27 21:16 [PATCH] powerpc: Discard .rela* sections if CONFIG_RELOCATABLE is undefined H.J. Lu
@ 2020-04-28 1:18 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-04-28 1:18 UTC (permalink / raw)
To: H.J. Lu, linux-kernel
Cc: Benjamin Herrenschmidt, Paul Mackerras, Kees Cook,
Borislav Petkov, Naveen N . Rao, linuxppc-dev
"H.J. Lu" <hjl.tools@gmail.com> writes:
> 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@gmail.com>
> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
> ---
> arch/powerpc/kernel/vmlinux.lds.S | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
Please insert this patch into your series prior to the patch that caused
the build break.
cheers
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-28 1:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 21:16 [PATCH] powerpc: Discard .rela* sections if CONFIG_RELOCATABLE is undefined H.J. Lu
2020-04-28 1:18 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).