@@ -114,3 +114,5 @@ all.config
# Kdevelop4
*.kdev4
+
+scripts/module-common.lds
@@ -7887,6 +7887,7 @@ M: Rusty Russell <rusty@rustcorp.com.au>
S: Maintained
F: include/linux/module.h
F: kernel/module.c
+F: scripts/module-common.lds.S
MOTION EYE VAIO PICTUREBOOK CAMERA DRIVER
W: http://popies.net/meye/
@@ -408,6 +408,10 @@ KBUILD_AFLAGS_MODULE := -DMODULE
KBUILD_CFLAGS_MODULE := -DMODULE
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
+$(srctree)/scripts/module-common.lds: $(srctree)/scripts/module-common.lds.S
+ $(Q)$(CC) $(CFLAGS) $(INCLUDES) $(LINUXINCLUDE) -E -P \
+ -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
+
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
@@ -1174,7 +1178,7 @@ all: modules
# using awk while concatenating to the final file.
PHONY += modules
-modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
+modules: $(srctree)/scripts/module-common.lds $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
@@ -121,7 +121,7 @@ quiet_cmd_ld_ko_o = LD [M] $@
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
-o $@ $(filter-out FORCE,$^)
-$(modules): %.ko :%.o %.mod.o FORCE
+$(modules): %.ko : $(srctree)/scripts/module-common.lds %.o %.mod.o FORCE
$(call if_changed,ld_ko_o)
targets += $(modules)
similarity index 100%
rename from scripts/module-common.lds
rename to scripts/module-common.lds.S