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)) ...@@ -25,9 +25,9 @@ ifneq ($(COMPILE_ARCH),$(ARCH))
endif endif
ifndef CONFIG_SUN3 ifndef CONFIG_SUN3
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds.s
else else
LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux-sun3.lds -N LDFLAGS_vmlinux = -T $(TOPDIR)/arch/m68k/vmlinux.lds.s -N
endif endif
# without -fno-strength-reduce the 53c7xx.c driver fails ;-( # without -fno-strength-reduce the 53c7xx.c driver fails ;-(
...@@ -134,6 +134,8 @@ CORE_FILES := $(CORE_FILES) arch/m68k/math-emu/mathemu.o ...@@ -134,6 +134,8 @@ CORE_FILES := $(CORE_FILES) arch/m68k/math-emu/mathemu.o
SUBDIRS := $(SUBDIRS) arch/m68k/math-emu SUBDIRS := $(SUBDIRS) arch/m68k/math-emu
endif endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
lilo: vmlinux lilo: vmlinux
if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi 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 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 @@ ...@@ -20,7 +20,7 @@
FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S 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_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce CFLAGS_NSR := -fno-strength-reduce
...@@ -55,6 +55,8 @@ SUBDIRS := $(SUBDIRS) arch/parisc/kdb ...@@ -55,6 +55,8 @@ SUBDIRS := $(SUBDIRS) arch/parisc/kdb
DRIVERS := $(DRIVERS) arch/parisc/kdb/kdb.o DRIVERS := $(DRIVERS) arch/parisc/kdb/kdb.o
endif endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
palo: vmlinux palo: vmlinux
export TOPDIR=`pwd`; export CONFIG_STI_CONSOLE=$(CONFIG_STI_CONSOLE); \ export TOPDIR=`pwd`; export CONFIG_STI_CONSOLE=$(CONFIG_STI_CONSOLE); \
unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
......
...@@ -21,7 +21,7 @@ else ...@@ -21,7 +21,7 @@ else
KERNELLOAD =0xc0000000 KERNELLOAD =0xc0000000
endif 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) CPPFLAGS := $(CPPFLAGS) -I$(TOPDIR)/arch/$(ARCH)
AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH) AFLAGS := $(AFLAGS) -I$(TOPDIR)/arch/$(ARCH)
CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \ CFLAGS := $(CFLAGS) -I$(TOPDIR)/arch/$(ARCH) -fsigned-char \
...@@ -103,6 +103,8 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm ...@@ -103,6 +103,8 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd pImage vmlinux.sm
# All the instructions talk about "make bzImage". # All the instructions talk about "make bzImage".
bzImage: zImage bzImage: zImage
vmlinux: arch/$(ARCH)/vmlinux.lds.s
$(BOOT_TARGETS): vmlinux $(BOOT_TARGETS): vmlinux
@$(MAKEBOOT) $@ @$(MAKEBOOT) $@
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
KERNELLOAD =0xc000000000000000 KERNELLOAD =0xc000000000000000
LDFLAGS := -m elf64ppc LDFLAGS := -m elf64ppc
LDFLAGS_vmlinux = -T arch/ppc64/vmlinux.lds -Bstatic \ LDFLAGS_vmlinux = -T arch/ppc64/vmlinux.lds.s -Bstatic \
-e $(KERNELLOAD) -Ttext $(KERNELLOAD) -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
CFLAGS := $(CFLAGS) -msoft-float -pipe \ CFLAGS := $(CFLAGS) -msoft-float -pipe \
-Wno-uninitialized -mminimal-toc -mtraceback=full \ -Wno-uninitialized -mminimal-toc -mtraceback=full \
...@@ -46,6 +46,8 @@ ifdef CONFIG_PPC_ISERIES ...@@ -46,6 +46,8 @@ ifdef CONFIG_PPC_ISERIES
BOOT_TARGETS = vmlinux.sminitrd vmlinux.initrd vmlinux.sm BOOT_TARGETS = vmlinux.sminitrd vmlinux.initrd vmlinux.sm
endif endif
vmlinux: arch/$(ARCH)/vmlinux.lds.s
$(BOOT_TARGETS): vmlinux $(BOOT_TARGETS): vmlinux
@$(MAKEBOOT) $@ @$(MAKEBOOT) $@
......
...@@ -15,12 +15,7 @@ ...@@ -15,12 +15,7 @@
LDFLAGS := -m elf_s390 LDFLAGS := -m elf_s390
OBJCOPYFLAGS := -O binary OBJCOPYFLAGS := -O binary
ifeq ($(CONFIG_SHARED_KERNEL),y) LDFLAGS_vmlinux := -T arch/$(ARCH)/vmlinux.lds.s -e start
LINKSCRIPT := arch/s390/vmlinux-shared.lds
else
LINKSCRIPT := arch/s390/vmlinux.lds
endif
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
CFLAGS_PIPE := -pipe CFLAGS_PIPE := -pipe
CFLAGS_NSR := -fno-strength-reduce CFLAGS_NSR := -fno-strength-reduce
...@@ -46,7 +41,7 @@ listing: vmlinux ...@@ -46,7 +41,7 @@ listing: vmlinux
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: $(LINKSCRIPT) vmlinux: arch/$(ARCH)/vmlinux.lds.s
image: vmlinux image: vmlinux
@$(MAKEBOOT) image @$(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 @@ ...@@ -15,12 +15,7 @@
LDFLAGS := -m elf64_s390 LDFLAGS := -m elf64_s390
OBJCOPYFLAGS := -O binary OBJCOPYFLAGS := -O binary
ifeq ($(CONFIG_SHARED_KERNEL),y) LDFLAGS_vmlinux := -T arch/$(ARCH)/vmlinux.lds.s -e start
LINKSCRIPT := arch/s390x/vmlinux-shared.lds
else
LINKSCRIPT := arch/s390x/vmlinux.lds
endif
LDFLAGS_vmlinux := -T $(LINKSCRIPT) -e start
MODFLAGS += -fpic MODFLAGS += -fpic
CFLAGS_PIPE := -pipe CFLAGS_PIPE := -pipe
...@@ -41,7 +36,7 @@ listing: vmlinux ...@@ -41,7 +36,7 @@ listing: vmlinux
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
vmlinux: $(LINKSCRIPT) vmlinux: arch/$(ARCH)/vmlinux.lds.s
image: vmlinux image: vmlinux
@$(MAKEBOOT) image @$(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 ...@@ -31,7 +31,7 @@ CFLAGS := $(CFLAGS) -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
endif endif
#LDFLAGS_vmlinux = -N -Ttext 0xf0004000 #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 HEAD := arch/sparc/kernel/head.o arch/sparc/kernel/init_task.o
...@@ -52,6 +52,8 @@ CORE_FILES += arch/sparc/boot/btfix.o ...@@ -52,6 +52,8 @@ CORE_FILES += arch/sparc/boot/btfix.o
export CORE_FILES_NO_BTFIX export CORE_FILES_NO_BTFIX
export INIT export INIT
vmlinux: arch/$(ARCH)/vmlinux.lds.s
archclean: archclean:
rm -f $(TOPDIR)/vmlinux.aout rm -f $(TOPDIR)/vmlinux.aout
-$(MAKE) -C arch/sparc/boot clean -$(MAKE) -C arch/sparc/boot clean
......
...@@ -53,7 +53,7 @@ ifeq ($(CONFIG_MCOUNT),y) ...@@ -53,7 +53,7 @@ ifeq ($(CONFIG_MCOUNT),y)
CFLAGS := $(CFLAGS) -pg CFLAGS := $(CFLAGS) -pg
endif 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 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 ...@@ -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 \ LIBS := $(TOPDIR)/lib/lib.a $(LIBS) $(TOPDIR)/arch/sparc64/prom/promlib.a \
$(TOPDIR)/arch/sparc64/lib/lib.a $(TOPDIR)/arch/sparc64/lib/lib.a
vmlinux: arch/$(ARCH)/vmlinux.lds.s
vmlinux.aout: vmlinux vmlinux.aout: vmlinux
$(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux $(ELFTOAOUT) -o $(TOPDIR)/vmlinux.aout $(TOPDIR)/vmlinux
......
...@@ -35,7 +35,7 @@ export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP ...@@ -35,7 +35,7 @@ export IA32_CC IA32_LD IA32_AS IA32_OBJCOPY IA32_CPP
LD=$(CROSS_COMPILE)ld -m elf_x86_64 LD=$(CROSS_COMPILE)ld -m elf_x86_64
OBJCOPYFLAGS := -O binary -R .note -R .comment -S 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 += -mno-red-zone
CFLAGS += -mcmodel=kernel CFLAGS += -mcmodel=kernel
...@@ -66,7 +66,7 @@ CORE_FILES += $(core-y) ...@@ -66,7 +66,7 @@ CORE_FILES += $(core-y)
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot 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 \ .PHONY: zImage bzImage compressed zlilo bzlilo zdisk bzdisk install \
clean archclean archmrproper 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