summaryrefslogtreecommitdiffstats
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-02-11 00:25:04 +1000
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-26 02:01:19 +0900
commitf49821ee32b76b1a356fab17316eb62430182ecf (patch)
tree289c979dcb971c009d3c858851af50a55be8a3e4 /scripts/link-vmlinux.sh
parent6358d6e8b9846c2ff6fd1d4ad2809145635dd813 (diff)
downloadlinux-f49821ee32b76b1a356fab17316eb62430182ecf.tar.gz
linux-f49821ee32b76b1a356fab17316eb62430182ecf.tar.bz2
linux-f49821ee32b76b1a356fab17316eb62430182ecf.zip
kbuild: rename built-in.o to built-in.a
Incremental linking is gone, so rename built-in.o to built-in.a, which is the usual extension for archive files. This patch does two things, first is a simple search/replace: git grep -l 'built-in\.o' | xargs sed -i 's/built-in\.o/built-in\.a/g' The second is to invert nesting of nested text manipulations to avoid filtering built-in.a out from libs-y2: -libs-y2 := $(filter-out %.a, $(patsubst %/, %/built-in.a, $(libs-y))) +libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-xscripts/link-vmlinux.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index 601ca8b528b3..08ca08e9105c 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -4,7 +4,7 @@
# link vmlinux
#
# vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_INIT) and
-# $(KBUILD_VMLINUX_MAIN) and $(KBUILD_VMLINUX_LIBS). Most are built-in.o files
+# $(KBUILD_VMLINUX_MAIN) and $(KBUILD_VMLINUX_LIBS). Most are built-in.a files
# from top-level directories in the kernel tree, others are specified in
# arch/$(ARCH)/Makefile. Ordering when linking is important, and
# $(KBUILD_VMLINUX_INIT) must be first. $(KBUILD_VMLINUX_LIBS) are archives
@@ -18,7 +18,7 @@
# | +--< init/version.o + more
# |
# +--< $(KBUILD_VMLINUX_MAIN)
-# | +--< drivers/built-in.o mm/built-in.o + more
+# | +--< drivers/built-in.a mm/built-in.a + more
# |
# +--< $(KBUILD_VMLINUX_LIBS)
# | +--< lib/lib.a + more
@@ -51,13 +51,13 @@ info()
#
# Traditional incremental style of link does not require this step
#
-# built-in.o output file
+# built-in.a output file
#
archive_builtin()
{
- info AR built-in.o
- rm -f built-in.o;
- ${AR} rcsTP${KBUILD_ARFLAGS} built-in.o \
+ info AR built-in.a
+ rm -f built-in.a;
+ ${AR} rcsTP${KBUILD_ARFLAGS} built-in.a \
${KBUILD_VMLINUX_INIT} \
${KBUILD_VMLINUX_MAIN}
}
@@ -69,7 +69,7 @@ modpost_link()
local objects
objects="--whole-archive \
- built-in.o \
+ built-in.a \
--no-whole-archive \
--start-group \
${KBUILD_VMLINUX_LIBS} \
@@ -88,7 +88,7 @@ vmlinux_link()
if [ "${SRCARCH}" != "um" ]; then
objects="--whole-archive \
- built-in.o \
+ built-in.a \
--no-whole-archive \
--start-group \
${KBUILD_VMLINUX_LIBS} \
@@ -99,7 +99,7 @@ vmlinux_link()
-T ${lds} ${objects}
else
objects="-Wl,--whole-archive \
- built-in.o \
+ built-in.a \
-Wl,--no-whole-archive \
-Wl,--start-group \
${KBUILD_VMLINUX_LIBS} \
@@ -164,7 +164,7 @@ cleanup()
rm -f .tmp_System.map
rm -f .tmp_kallsyms*
rm -f .tmp_vmlinux*
- rm -f built-in.o
+ rm -f built-in.a
rm -f System.map
rm -f vmlinux
rm -f vmlinux.o