Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Stephen Rothwell and committed by
Michael Ellerman
4c812318 54f9a64a

+6
+6
arch/powerpc/kernel/vmlinux.lds.S
··· 183 183 *(.rela*) 184 184 } 185 185 #endif 186 + /* .exit.data is discarded at runtime, not link time, 187 + * to deal with references from .exit.text 188 + */ 189 + .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) { 190 + EXIT_DATA 191 + } 186 192 187 193 /* freed after init ends here */ 188 194 . = ALIGN(PAGE_SIZE);