* [PATCH FIX] powerpc: discard .exit.data at runtime
@ 2015-10-07 23:28 Stephen Rothwell
2015-10-15 11:10 ` [FIX] " Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2015-10-07 23:28 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman; +Cc: linuxppc-dev
.exit.text is discarded at run time and there are some references from
that to .exit.data, so we need to discard .exit.data at run time as well.
Fixes these errors:
`.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
`.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/vmlinux.lds.S | 6 ++++++
1 file changed, 6 insertions(+)
I have only seen this with an allyesconfig build which fails for other
reasons.
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 1db685104ffc..d41fd0af8980 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -183,6 +183,12 @@ SECTIONS
*(.rela*)
}
#endif
+ /* .exit.data is discarded at runtime, not link time,
+ * to deal with references from .exit.text
+ */
+ .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
+ EXIT_DATA
+ }
/* freed after init ends here */
. = ALIGN(PAGE_SIZE);
--
2.5.3
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [FIX] powerpc: discard .exit.data at runtime
2015-10-07 23:28 [PATCH FIX] powerpc: discard .exit.data at runtime Stephen Rothwell
@ 2015-10-15 11:10 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2015-10-15 11:10 UTC (permalink / raw)
To: Stephen Rothwell, Benjamin Herrenschmidt, Paul Mackerras; +Cc: linuxppc-dev
On Wed, 2015-07-10 at 23:28:28 UTC, Stephen Rothwell wrote:
> .exit.text is discarded at run time and there are some references from
> that to .exit.data, so we need to discard .exit.data at run time as well.
>
> Fixes these errors:
>
> `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
> `.exit.data' referenced in section `.exit.text' of drivers/built-in.o: defined in discarded section `.exit.data' of drivers/built-in.o
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/4c8123181d692c5b78650ee5
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-15 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-07 23:28 [PATCH FIX] powerpc: discard .exit.data at runtime Stephen Rothwell
2015-10-15 11:10 ` [FIX] " 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).