powerpc: discard .exit.data at runtime
PATCH 1/1 powerpc: discard .exit.data at runtime
.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
--- 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.
arch/powerpc/kernel/vmlinux.lds.S +6 -0
@@ -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);
Signature · 5 lines
2.5.3 -- Cheers, Stephen Rothwell [email protected]
Quoted 9 lines · Stephen Rothwell
.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' ofdrivers/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' ofdrivers/built-in.oSigned-off-by Stephen Rothwell <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/4c8123181d692c5b78650ee5
cheers