From: Michal Marek <mmarek@suse.cz>
Subject: kbuild: Record which objects make up a built-in.o file
Patch-mainline: never, will die together with the symsets crap

Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 scripts/Makefile.build |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-3.0-tmp-jikos/scripts/Makefile.build
===================================================================
--- linux-3.0-tmp-jikos.orig/scripts/Makefile.build
+++ linux-3.0-tmp-jikos/scripts/Makefile.build
@@ -362,10 +362,12 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ;
 # Rule to compile a set of .o files into one .o file
 #
 ifdef builtin-target
+cmd_recordlink = ; echo $(filter %.o, $(filter $(obj-y), $^)) >$@.parts
 quiet_cmd_link_o_target = LD      $@
 # If the list of objects to link is empty, just create an empty built-in.o
 cmd_link_o_target = $(if $(strip $(obj-y)),\
 		      $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \
+		      $(cmd_recordlink) \
 		      $(cmd_secanalysis),\
 		      rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@)
 
