From patchwork Wed Nov 23 16:41:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9443785 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 39BDA60779 for ; Wed, 23 Nov 2016 16:42:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4236A27B81 for ; Wed, 23 Nov 2016 16:42:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 371D927C7A; Wed, 23 Nov 2016 16:42:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6C4427C0C for ; Wed, 23 Nov 2016 16:42:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932626AbcKWQmY (ORCPT ); Wed, 23 Nov 2016 11:42:24 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36347 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934743AbcKWQmX (ORCPT ); Wed, 23 Nov 2016 11:42:23 -0500 Received: by mail-pg0-f67.google.com with SMTP id x23so1425392pgx.3 for ; Wed, 23 Nov 2016 08:42:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TpkH+CMvIKnf1FoOMaG9ePFBU5Z4LYXOLn2aBop0lkI=; b=hhpOhKdfwzro5gBTC+al9/fVrdl81/YE2bR/xzlVvdMm83BVZ19upCunbfBcuSc3Jy LQrSEVdeZw1rfm0vP5+NYTrufpnPV+0iWoKPaFa0wF3eubCrPnb46E4rcKue0XqzDZAx TyBGDCQz3WiB6X4XkvaatM62rvlWPplxjA0zEhCyDdaz+7TIyzPkgdgmkOyaHAcbljiQ 1v1yvVWOObYRLuVbORV7JYCVCMhgGGmmAaW3SCwpN7YIYUvKhAo4py48Q6xSmH6a4Au5 OsphwI0zrYP6bu5EuiYMHArHCTVzT03INzArILU6eWpvbb31Rrt5rkR+6XnGtvyvO+1V p2MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TpkH+CMvIKnf1FoOMaG9ePFBU5Z4LYXOLn2aBop0lkI=; b=gSkKCGLqaEIPqRfOELmyvHiUBOu8DGuzCTbuV2V73hFFZxkbFf6A1oAnn0zGAaJPwM M65RTx5AYhz9pzF+Ke0QOeyxOGdPdu8FFvL2qozHwyz7g1IIQTNZDNNUj+ljd7KpMAAk LT5ULu78QBL0IOv/+cGyDUa9cSXBfzB0hrcWQnSeQ5yjualaE3gdEzdDnDbhBUzx1h7j 1hegYYCw2RiT2QRikMxY8wALv/aDUh/53/ShsuN7CYTa7BXZUwc3FNJaYgmAE1gAtCxS RGx9UpTd3ZoPCgNXrdH1OZ0QbW4dnm6tyqxqgwYaFfK3BqokuH7/ia7RvvjV06hW/kjo M/pQ== X-Gm-Message-State: AKaTC02iLdWvIGJr1JGpXyb3OLQpPSgFon7nAjy8l+h54tndpTu+IcfNZCtsBAcPXuQbIg== X-Received: by 10.99.102.69 with SMTP id a66mr6595156pgc.49.1479919342341; Wed, 23 Nov 2016 08:42:22 -0800 (PST) Received: from roar.au.ibm.com (27-33-21-189.tpgi.com.au. [27.33.21.189]) by smtp.gmail.com with ESMTPSA id o26sm53959762pfk.91.2016.11.23.08.42.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 08:42:21 -0800 (PST) From: Nicholas Piggin To: Michal Marek Cc: Nicholas Piggin , linux-kbuild@vger.kernel.org Subject: [PATCH 7/7] kbuild: minor improvement for thin archives build Date: Thu, 24 Nov 2016 03:41:43 +1100 Message-Id: <20161123164143.16839-8-npiggin@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161123164143.16839-1-npiggin@gmail.com> References: <20161123164143.16839-1-npiggin@gmail.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- scripts/link-vmlinux.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 6b94fe4..c802913 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -209,15 +209,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 @@ -231,6 +222,15 @@ fi; # final build of init/ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init GCC_PLUGINS_CFLAGS="${GCC_PLUGINS_CFLAGS}" +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