From aa04fc78256d4b166d942a89b5f2cd7e86eb96df Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Thu, 24 Nov 2016 03:41:43 +1100 Subject: kbuild: minor improvement for thin archives build The root built-in.o archive is currently generated before all object files are built for the final link, due to final build of init/ after version update. In practice it seems like it doesn't matter because the archive symbol table does not change, but it is more logical to create the final archive as the last step. Signed-off-by: Nicholas Piggin Signed-off-by: Michal Marek Change-Id: I8255d2e046dc2632d6875a5f9e59514a8e16bb65 --- scripts/link-vmlinux.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'scripts/link-vmlinux.sh') diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 270b663721a0..ed6a0127f724 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -208,15 +208,6 @@ case "${KCONFIG_CONFIG}" in . "./${KCONFIG_CONFIG}" esac -archive_builtin - -#link vmlinux.o -info LD vmlinux.o -modpost_link vmlinux.o - -# modpost vmlinux.o to check for section mismatches -${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o - # Update version info GEN .version if [ ! -r .version ]; then @@ -230,6 +221,15 @@ fi; # final build of init/ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init +archive_builtin + +#link vmlinux.o +info LD vmlinux.o +modpost_link vmlinux.o + +# modpost vmlinux.o to check for section mismatches +${MAKE} -f "${srctree}/scripts/Makefile.modpost" vmlinux.o + kallsymso="" kallsyms_vmlinux="" if [ -n "${CONFIG_KALLSYMS}" ]; then -- cgit v1.2.3