summaryrefslogtreecommitdiffstats
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-xscripts/link-vmlinux.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index eceb3ee7ec06..db34dc3163ae 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -90,7 +90,6 @@ modpost_link()
if is_enabled CONFIG_MODVERSIONS; then
gen_symversions
- lds="${lds} -T .tmp_symversions.lds"
fi
# This might take a while, so indicate that we're doing
@@ -183,6 +182,10 @@ vmlinux_link()
libs="${KBUILD_VMLINUX_LIBS}"
fi
+ if is_enabled CONFIG_MODULES; then
+ objs="${objs} .vmlinux.export.o"
+ fi
+
if [ "${SRCARCH}" = "um" ]; then
wl=-Wl,
ld="${CC}"
@@ -312,6 +315,7 @@ cleanup()
rm -f vmlinux.o
rm -f .vmlinux.d
rm -f .vmlinux.objs
+ rm -f .vmlinux.export.c
}
# Use "make V=1" to debug this script
@@ -363,6 +367,10 @@ info GEN modules.builtin
tr '\0' '\n' < modules.builtin.modinfo | sed -n 's/^[[:alnum:]:_]*\.file=//p' |
tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$/.ko/' > modules.builtin
+if is_enabled CONFIG_MODULES; then
+ ${MAKE} -f "${srctree}/scripts/Makefile.vmlinux" .vmlinux.export.o
+fi
+
btf_vmlinux_bin_o=""
if is_enabled CONFIG_DEBUG_INFO_BTF; then
btf_vmlinux_bin_o=.btf.vmlinux.bin.o