Skip to content

Commit 7c868b6

Browse files
npigginmpe
authored andcommitted
powerpc/64: Do not link crtsaveres.o in boot
crtsaveres.S is empty with 64-bit builds already, so just don't build and link it to match the vmlinux build. Signed-off-by: Nicholas Piggin <[email protected]> [mpe: Use CONFIG_PPC64_BOOT_WRAPPER not CONFIG_PPC32 to fix BE build] Signed-off-by: Michael Ellerman <[email protected]>
1 parent baa25b5 commit 7c868b6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

arch/powerpc/boot/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,16 @@ libfdtheader := fdt.h libfdt.h libfdt_internal.h
9595
$(addprefix $(obj)/,$(libfdt) libfdt-wrapper.o simpleboot.o epapr.o opal.o): \
9696
$(addprefix $(obj)/,$(libfdtheader))
9797

98-
src-wlib-y := string.S crt0.S crtsavres.S stdio.c decompress.c main.c \
98+
src-wlib-y := string.S crt0.S stdio.c decompress.c main.c \
9999
$(libfdt) libfdt-wrapper.c \
100100
ns16550.c serial.c simple_alloc.c div64.S util.S \
101101
elf_util.c $(zlib-y) devtree.c stdlib.c \
102102
oflib.c ofconsole.c cuboot.c mpsc.c cpm-serial.c \
103103
uartlite.c mpc52xx-psc.c opal.c
104104
src-wlib-$(CONFIG_PPC64_BOOT_WRAPPER) += opal-calls.S
105+
ifndef CONFIG_PPC64_BOOT_WRAPPER
106+
src-wlib-y += crtsavres.S
107+
endif
105108
src-wlib-$(CONFIG_40x) += 4xx.c planetcore.c
106109
src-wlib-$(CONFIG_44x) += 4xx.c ebony.c bamboo.c
107110
src-wlib-$(CONFIG_8xx) += mpc8xx.c planetcore.c fsl-soc.c

arch/powerpc/boot/crtsavres.S

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@
3737
* the executable file might be covered by the GNU General Public License.
3838
*/
3939

40+
#ifdef __powerpc64__
41+
#error "On PPC64, FPR save/restore functions are provided by the linker."
42+
#endif
43+
4044
.file "crtsavres.S"
4145
.section ".text"
4246

43-
/* On PowerPC64 Linux, these functions are provided by the linker. */
44-
#ifndef __powerpc64__
45-
4647
#define _GLOBAL(name) \
4748
.type name,@function; \
4849
.globl name; \
@@ -230,4 +231,3 @@ _GLOBAL(_rest32gpr_31_x)
230231
mtlr 0
231232
mr 1,11
232233
blr
233-
#endif

0 commit comments

Comments
 (0)