Commit bba8b9e8 authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: Preprocess vmlinux.lds.S on all archs

For consistency reasons, generate 

	arch/$(ARCH)/vmlinux.lds.s

from 

 	arch/$(ARCH)/vmlinux.lds.S

on all archs, even those which do not need preprocessing (yet).
parent 28826032
......@@ -25,9 +25,9 @@ ifneq ($(COMPILE_ARCH),$(ARCH))
endif
ifndef CONFIG_SUN3
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds.s
else
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux-sun3.lds -N
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds.s -N
endif
# without -fno-strength-reduce the 53c7xx.c driver fails ;-(
......@@ -134,6 +134,8 @@ CORE_FILES := $(CORE_FILES) arch/m68k/math-emu/mathemu.o
SUBDIRS := $(SUBDIRS) arch/m68k/math-emu
endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
lilo: vmlinux
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi
if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi
......
#include <linux/config.h>
#ifdef CONFIG_SUN3
#include "vmlinux-sun3.lds"
#else
#include "vmlinux-std.lds"
#endif
\ No newline at end of file
......@@ -20,7 +20,7 @@
FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
LDFLAGS_vmlinux =-T arch/parisc/vmlinux.lds
LDFLAGS_vmlinux =-T arch/parisc/vmlinux.lds.s
CFLAGS_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce
......@@ -55,6 +55,8 @@ SUBDIRS := $(SUBDIRS) arch/parisc/kdb
DRIVERS := $(DRIVERS) arch/parisc/kdb/kdb.o
endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
palo: vmlinux
export TOPDIR=`pwd`; export CONFIG_STI_CONSOLE=$(CONFIG_STI_CONSOLE); \
unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
......
......@@ -21,7 +21,7 @@ else
KERNELLOAD =0xc0000000
endif
LDFLAGS_vmlinux = -T arch/ppc/vmlinux.lds -Ttext $(KERNELLOAD) -Bstatic
LDFLAGS_vmlinux = -T arch/ppc/vmlinux.lds.s -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \
......@@ -103,6 +103,8 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm
# All the instructions talk about "make bzImage".
bzImage: zImage
vmlinux: arch/$(ARCH)/vmlinux.lds.s
$(BOOT_TARGETS): vmlinux
@$(MAKEBOOT) $@
......
......@@ -16,7 +16,7 @@
KERNELLOAD =0xc000000000000000
LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux = -T arch/ppc64/vmlinux.lds -Bstatic \
LDFLAGS_vmlinux = -T arch/ppc64/vmlinux.lds.s -Bstatic \
-e $(KERNELLOAD) -Ttext $(KERNELLOAD)
CFLAGS := $(CFLAGS) -msoft-float -pipe \
-Wno-uninitialized -mminimal-toc -mtraceback=full \
......@@ -46,6 +46,8 @@ ifdef CONFIG_PPC_ISERIES
BOOT_TARGETS = vmlinux.sminitrd vmlinux.initrd vmlinux.sm
endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
$(BOOT_TARGETS): vmlinux
@$(MAKEBOOT) $@
......
......@@ -15,12 +15,7 @@
LDFLAGS := -m elf_s390
OBJCOPYFLAGS := -O binary
ifeq ($(CONFIG_SHARED_KERNEL),y)
LINKSCRIPT := arch/s390/vmlinux-shared.lds
else
LINKSCRIPT := arch/s390/vmlinux.lds
endif
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
LDFLAGS_vmlinux := -T arch/$(ARCH)/vmlinux.lds.s -e start
CFLAGS_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce
......@@ -46,7 +41,7 @@ listing: vmlinux
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: $(LINKSCRIPT)
vmlinux: arch/$(ARCH)/vmlinux.lds.s
image: vmlinux
@$(MAKEBOOT) image
......
#include <linux/config.h>
#ifdef CONFIG_SHARED_KERNEL
#include "vmlinux-shared.lds"
#else
#include "vmlinux.lds"
#endif
\ No newline at end of file
......@@ -15,12 +15,7 @@
LDFLAGS := -m elf64_s390
OBJCOPYFLAGS := -O binary
ifeq ($(CONFIG_SHARED_KERNEL),y)
LINKSCRIPT := arch/s390x/vmlinux-shared.lds
else
LINKSCRIPT := arch/s390x/vmlinux.lds
endif
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
LDFLAGS_vmlinux := -T arch/$(ARCH)/vmlinux.lds.s -e start
MODFLAGS += -fpic
CFLAGS_PIPE := -pipe
......@@ -41,7 +36,7 @@ listing: vmlinux
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: $(LINKSCRIPT)
vmlinux: arch/$(ARCH)/vmlinux.lds.s
image: vmlinux
@$(MAKEBOOT) image
......
#include <linux/config.h>
#ifdef CONFIG_SHARED_KERNEL
#include "vmlinux-shared.lds"
#else
#include "vmlinux.lds"
#endif
\ No newline at end of file
......@@ -31,7 +31,7 @@ CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000
LDFLAGS_vmlinux = -T arch/sparc/vmlinux.lds
LDFLAGS_vmlinux = -T arch/sparc/vmlinux.lds.s
HEAD := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
......@@ -52,6 +52,8 @@ CORE_FILES += arch/sparc/boot/btfix.o
export CORE_FILES_NO_BTFIX
export INIT
vmlinux: arch/$(ARCH)/vmlinux.lds.s
archclean:
rm -f $(TOPDIR)/vmlinux.aout
-$(MAKE) -C arch/sparc/boot clean
......
......@@ -53,7 +53,7 @@ ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(CFLAGS) -pg
endif
LDFLAGS_vmlinux = -T arch/sparc64/vmlinux.lds
LDFLAGS_vmlinux = -T arch/sparc64/vmlinux.lds.s
HEAD := arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o
......@@ -77,6 +77,8 @@ CORE_FILES += arch/sparc64/math-emu/math-emu.o
LIBS := $(TOPDIR)/lib/lib.a $(LIBS) $(TOPDIR)/arch/sparc64/prom/promlib.a \
$(TOPDIR)/arch/sparc64/lib/lib.a
vmlinux: arch/$(ARCH)/vmlinux.lds.s
vmlinux.aout: vmlinux
$(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux
......
......@@ -35,7 +35,7 @@ export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
LD=$(CROSS_COMPILE)ld -m elf_x86_64
OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux := -T arch/x86_64/vmlinux.lds -e stext
LDFLAGS_vmlinux := -T arch/x86_64/vmlinux.lds.s -e stext
CFLAGS += -mno-red-zone
CFLAGS += -mcmodel=kernel
......@@ -66,7 +66,7 @@ CORE_FILES += $(core-y)
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: arch/x86_64/vmlinux.lds
vmlinux: arch/x86_64/vmlinux.lds.s
.PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
clean archclean archmrproper
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment