summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/link-vmlinux.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 20f44504a644..eceb3ee7ec06 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -311,6 +311,7 @@ cleanup()
rm -f vmlinux.map
rm -f vmlinux.o
rm -f .vmlinux.d
+ rm -f .vmlinux.objs
}
# Use "make V=1" to debug this script
@@ -342,6 +343,16 @@ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
modpost_link vmlinux.o
objtool_link vmlinux.o
+# Generate the list of objects in vmlinux
+for f in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do
+ case ${f} in
+ *.a)
+ ${AR} t ${f} ;;
+ *)
+ echo ${f} ;;
+ esac
+done > .vmlinux.objs
+
# modpost vmlinux.o to check for section mismatches
${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1