From patchwork Thu Jan 17 00:10:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155777 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1294907jaa; Wed, 16 Jan 2019 16:11:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN7huA3ZevZKPKn0/odb82BW9leS/42sNKVF88p8/fbKj917YMwap8K5wEmRsKi5gkEfRZw2 X-Received: by 2002:a63:2586:: with SMTP id l128mr11589884pgl.104.1547683872244; Wed, 16 Jan 2019 16:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547683872; cv=none; d=google.com; s=arc-20160816; b=DzmdRtIJIrqUT3wBIqUGnJrG8XYX3eWv22xzfr4vX4Ax9VU/Vm/9A7exwJa5NqDoET klTnioV5AeE7dyQpws+gzWnMonnbjeHfSfxGYOnRfIxBI2Z4WkgwtHxOB8b9WDreF2OG PReTF2k0WOBjt+dTjtDKBgp2f/RIf6DZt4Lz301Y0MXy7TQayZ5eFyJm24FnSspwYDbL pNBp+OGQCf7R0jPwk0ZJKFCFTXHTRK1hkm/1iyD8c/sntkczc6GOW+l4vs3PN8opnaO8 6tY/t3gmielDnv9ocPnq5ADbL5IpKmOQHsUXhYd41dOFWUTD6xwY+AXfyJhl2PD2A71k aOIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=SxYJYsVS6RJFLIMLIgeTo6HceNxuJCOtpPTp/5SyoXI=; b=r3zKqrj6fxghaSbsnMF9fsuBON8tI/gTy8ALu/B94IdIX0BtZFJ57lTOeH8O7LcRyS fzDOxvbWK8bmyYpmoUpA8SNIiYqhsGlLvYJf+lWFCTRslzxCZHrPPpwj7bBZm8VH1FdO cU1Nri2d6m/wM9wUmIex2WgxBxfzwc7B82gxyI6/pHtzwKx2R/oJtjN9qf+5It8o9Phq kfbaj92AyriehKn5vvrTHSeH5kBFRU2Bjwq48yUO+CPvFT3Wotx66G4K/eGBT4jnVD91 DfVNzWD2g3+Qyl6WDPNswnH/7z8mI+c+d+ICnPZaDsWuFiLbiWpQJx5ZutRTVbEYL6sN WrFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cowC4sas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si8201818pfd.3.2019.01.16.16.11.11; Wed, 16 Jan 2019 16:11:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=cowC4sas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbfAQALL (ORCPT + 22 others); Wed, 16 Jan 2019 19:11:11 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:16423 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728211AbfAQALK (ORCPT ); Wed, 16 Jan 2019 19:11:10 -0500 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-12.nifty.com with ESMTP id x0H0A7dI030467; Thu, 17 Jan 2019 09:10:07 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x0H0A7dI030467 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547683808; bh=SxYJYsVS6RJFLIMLIgeTo6HceNxuJCOtpPTp/5SyoXI=; h=From:To:Cc:Subject:Date:From; b=cowC4sasdge8VQIXAb6Dl6frth/JC1zE0tSjTNzWPyK2LEgr1zrfE/OGjJw4T4fVO YD0ct0gcIlCVLAWfeUdiWHQSTOeXr+F+OsZZTd9VNJsD6FHMALl0oyIGMZJdW3vLSY KhbYlgZgNMPiokP76FIMOoUPZ1xgu3FsSQIQqGkgEtRNkDRiqS5/Qoh5gachuCNL7y Ek4iR066V3ozGrsQ9i5Xri165VcTMOsCFpWFz6kyRNFa6w0+X4sogsEr9WAlOpIXp3 7NCZTpRD/JJl/wrGdjkf64Essbfty5enpWUd8KMyD4pn1w9v49ABFrSZvasV54nI/8 y7h2hmUlccuJw== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Stephen Rothwell , Nicholas Piggin , Masahiro Yamada , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Michal Marek Subject: [PATCH v3 1/2] kbuild: remove top-level built-in.a Date: Thu, 17 Jan 2019 09:10:03 +0900 Message-Id: <1547683804-17956-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The symbol table in the final archive is unneeded; the linker does not require the symbol table after the --whole-archive option. Every object file in the archive is included in the link anyway. Pass thin archives from subdirectories directly to the linker, and remove the final archiving step. Fix up the document and comments as well. Signed-off-by: Masahiro Yamada Acked-by: Nicholas Piggin --- Changes in v3: None Changes in v2: - Update the document and comments - Add Nicholas' Ack Documentation/kbuild/makefiles.txt | 9 ++------- scripts/Makefile.build | 8 ++------ scripts/link-vmlinux.sh | 30 ++++++------------------------ 3 files changed, 10 insertions(+), 37 deletions(-) -- 2.7.4 diff --git a/Documentation/kbuild/makefiles.txt b/Documentation/kbuild/makefiles.txt index bf28c47..48eab0b 100644 --- a/Documentation/kbuild/makefiles.txt +++ b/Documentation/kbuild/makefiles.txt @@ -154,13 +154,8 @@ more details, with real examples. Kbuild compiles all the $(obj-y) files. It then calls "$(AR) rcSTP" to merge these files into one built-in.a file. - This is a thin archive without a symbol table, which makes it - unsuitable as a linker input. - - The scripts/link-vmlinux.sh script later makes an aggregate - built-in.a with "${AR} rcsTP", which creates the thin archive - with a symbol table and an index, making it a valid input for - the final vmlinux link passes. + This is a thin archive without a symbol table. It will be later + linked into vmlinux by scripts/link-vmlinux.sh The order of files in $(obj-y) is significant. Duplicates in the lists are allowed: the first instance will be linked into diff --git a/scripts/Makefile.build b/scripts/Makefile.build index fd03d60..681ab58 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -394,14 +394,10 @@ $(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler $(sort $(subdir-obj-y)): $(subdir-ym) ; # -# Rule to compile a set of .o files into one .o file +# Rule to compile a set of .o files into one .a file (without symbol table) # ifdef builtin-target -# built-in.a archives are made with no symbol table or index which -# makes them small and fast, but unable to be used by the linker. -# scripts/link-vmlinux.sh builds an aggregate built-in.a with a symbol -# table and index. quiet_cmd_ar_builtin = AR $@ cmd_ar_builtin = rm -f $@; \ $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(filter $(real-obj-y), $^) @@ -426,7 +422,7 @@ $(modorder-target): $(subdir-ym) FORCE $(Q)(cat /dev/null; $(modorder-cmds)) > $@ # -# Rule to compile a set of .o files into one .a file +# Rule to compile a set of .o files into one .a file (with symbol table) # ifdef lib-target quiet_cmd_link_l_target = AR $@ diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index c8cf453..4788def 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -44,24 +44,6 @@ info() fi } -# Thin archive build here makes a final archive with symbol table and indexes -# from vmlinux objects INIT and MAIN, which can be used as input to linker. -# KBUILD_VMLINUX_LIBS archives should already have symbol table and indexes -# added. -# -# Traditional incremental style of link does not require this step -# -# built-in.a output file -# -archive_builtin() -{ - info AR built-in.a - rm -f built-in.a; - ${AR} rcsTP${KBUILD_ARFLAGS} built-in.a \ - ${KBUILD_VMLINUX_INIT} \ - ${KBUILD_VMLINUX_MAIN} -} - # Link of vmlinux.o used for section mismatch analysis # ${1} output file modpost_link() @@ -69,7 +51,8 @@ modpost_link() local objects objects="--whole-archive \ - built-in.a \ + ${KBUILD_VMLINUX_INIT} \ + ${KBUILD_VMLINUX_MAIN} \ --no-whole-archive \ --start-group \ ${KBUILD_VMLINUX_LIBS} \ @@ -88,7 +71,8 @@ vmlinux_link() if [ "${SRCARCH}" != "um" ]; then objects="--whole-archive \ - built-in.a \ + ${KBUILD_VMLINUX_INIT} \ + ${KBUILD_VMLINUX_MAIN} \ --no-whole-archive \ --start-group \ ${KBUILD_VMLINUX_LIBS} \ @@ -99,7 +83,8 @@ vmlinux_link() -T ${lds} ${objects} else objects="-Wl,--whole-archive \ - built-in.a \ + ${KBUILD_VMLINUX_INIT} \ + ${KBUILD_VMLINUX_MAIN} \ -Wl,--no-whole-archive \ -Wl,--start-group \ ${KBUILD_VMLINUX_LIBS} \ @@ -160,7 +145,6 @@ cleanup() rm -f .tmp_System.map rm -f .tmp_kallsyms* rm -f .tmp_vmlinux* - rm -f built-in.a rm -f System.map rm -f vmlinux rm -f vmlinux.o @@ -217,8 +201,6 @@ 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 From patchwork Thu Jan 17 00:10:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155778 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp1294981jaa; Wed, 16 Jan 2019 16:11:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Xcp+ilB3AWxC4U4YGP1XPXmQka+w9mhB4w30/IWlZfPPO0jOt1BC9TIydhlGmo/Hik089 X-Received: by 2002:a17:902:82c2:: with SMTP id u2mr12686215plz.110.1547683877366; Wed, 16 Jan 2019 16:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547683877; cv=none; d=google.com; s=arc-20160816; b=h/ZPe3sI1Hl50214LYs6B5OUYHlkIFw/Jkjctv0PLu2cTANkJ5Ip6GNVC8yH+tol8S vaHmg8befs8WIMppwEodGlbk/WKBbFxhkqlFp/27lBgVjBV4RyqZTdJfZ3UlmpH05yMm MTX3HBs8TWjQHRb9QSLN1RsR73aoW/fiHQzt/xM88i9jGg3mMRaJLf38K4j7tUexpuhA YFvFsI4nFgv+vYE3lOWKpmKqNU2TOSuXKCdImvIJJPNuFOYSr0aTIC3rNcwx+j+s5lwl i3nrkA1JiF0cH0XaYG4SGXpnScY57E5J2nJ3iUxbtDzCWon+KF0oTmPkN9xhr6DOGtsm hOXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=uEy0yXxWPKQVrmi5cSNRXio4PKA+5zsezyalhR/JbaM=; b=k6rgTw1OTQQJ87ssF1nh5E3r3WTNKc+tDKCCFJL1YNZef+WJdsqB3pR4O44mtDphFq y9L1QuGI0GNixe5vugmaa7IY1VmMa+7iTSrswbG7r4MTzVknqRG4RmhJkS15ITCFz2Zv gp49GDxlFXgVQvXJDcZY42D9POIhqNb1HmSZrGJsyvNsu+a7fzfZLSKc/vJcxxGGYpzZ +D1XNZ3CbI4gSwBiZI7id+ew7Hngs4f8b9q4qFHUoPO+mFtV3xKBc2yY4Rvo+youzqBB AjDgtlEQ+jP55viLu8kP7ySVcXLfXKz3tmvvGOTGuw3+oe2Y9VZVrJKyUEfAgKzAykmO aHRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="uwE9hq/5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go3si7293995plb.97.2019.01.16.16.11.17; Wed, 16 Jan 2019 16:11:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b="uwE9hq/5"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728286AbfAQALQ (ORCPT + 22 others); Wed, 16 Jan 2019 19:11:16 -0500 Received: from conuserg-12.nifty.com ([210.131.2.79]:16426 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726593AbfAQALK (ORCPT ); Wed, 16 Jan 2019 19:11:10 -0500 X-Greylist: delayed 1370 seconds by postgrey-1.27 at vger.kernel.org; Wed, 16 Jan 2019 19:11:08 EST Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-12.nifty.com with ESMTP id x0H0A7dJ030467; Thu, 17 Jan 2019 09:10:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x0H0A7dJ030467 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547683808; bh=uEy0yXxWPKQVrmi5cSNRXio4PKA+5zsezyalhR/JbaM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uwE9hq/5uv1N26PazjfTsa8IfDR9t2AGS3m+/u1d1+lbz4uObnOT6uR3jFFWaOxO3 ZG7l9KR39vUg92VWFbgmRhF0fRZs9jEHfjvnxgkMmjGdBi118iNmR2VFkwVrw56S6j BY/wtEjY40TfeqhgdEp9fBeL2eND20+Lx58M3UxxM+OhPLR1bZMLQE3Ef9H41JYQ+W mWH6RugNyz0ekfyuPVOjaiAfODdTBTTNd6NxNjK111uQKFqqGawLYF8IGAqGMwk3sP hV+HVcp1yQxmhl5kb5MX9xSXTEdfSHhvxbOwcq5HjS5wmdOZfv95lEdZm+3crtWJEa 6Z//f0SHV6Dng== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Stephen Rothwell , Nicholas Piggin , Masahiro Yamada , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Michal Marek Subject: [PATCH v3 2/2] kbuild: merge KBUILD_VMLINUX_{INIT, MAIN} into KBUILD_VMLINUX_OBJS Date: Thu, 17 Jan 2019 09:10:04 +0900 Message-Id: <1547683804-17956-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547683804-17956-1-git-send-email-yamada.masahiro@socionext.com> References: <1547683804-17956-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The top Makefile does not need to export KBUILD_VMLINUX_INIT and KBUILD_VMLINUX_MAIN separately. Put every built-in.a into KBUILD_VMLINUX_OBJS. The order of $(head-y), $(init-y), $(core-y), ... is still retained. Signed-off-by: Masahiro Yamada --- Changes in v3: - update the document Changes in v2: None Documentation/kbuild/kbuild.txt | 15 +++++---------- Makefile | 6 +++--- scripts/link-vmlinux.sh | 28 ++++++++++------------------ 3 files changed, 18 insertions(+), 31 deletions(-) -- 2.7.4 diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index c9e3d93..8a3830b 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt @@ -232,17 +232,12 @@ KBUILD_LDS -------------------------------------------------- The linker script with full path. Assigned by the top-level Makefile. -KBUILD_VMLINUX_INIT +KBUILD_VMLINUX_OBJS -------------------------------------------------- -All object files for the init (first) part of vmlinux. -Files specified with KBUILD_VMLINUX_INIT are linked first. - -KBUILD_VMLINUX_MAIN --------------------------------------------------- -All object files for the main part of vmlinux. +All object files for vmlinux. They are linked to vmlinux in the same +order as listed in KBUILD_VMLINUX_OBJS. KBUILD_VMLINUX_LIBS -------------------------------------------------- -All .a "lib" files for vmlinux. -KBUILD_VMLINUX_INIT, KBUILD_VMLINUX_MAIN, and KBUILD_VMLINUX_LIBS together -specify all the object files used to link vmlinux. +All .a "lib" files for vmlinux. KBUILD_VMLINUX_OBJS and KBUILD_VMLINUX_LIBS +together specify all the object files used to link vmlinux. diff --git a/Makefile b/Makefile index 499b968..68898cc 100644 --- a/Makefile +++ b/Makefile @@ -975,15 +975,15 @@ libs-y2 := $(patsubst %/, %/built-in.a, $(filter-out %.a, $(libs-y))) virt-y := $(patsubst %/, %/built-in.a, $(virt-y)) # Externally visible symbols (used by link-vmlinux.sh) -export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) -export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-y) +export KBUILD_VMLINUX_OBJS := $(head-y) $(init-y) $(core-y) $(libs-y2) \ + $(drivers-y) $(net-y) $(virt-y) export KBUILD_VMLINUX_LIBS := $(libs-y1) export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds export LDFLAGS_vmlinux # used by scripts/package/Makefile export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) -vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS) +vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) # Recurse until adjust_autoksyms.sh is satisfied PHONY += autoksyms_recursive diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 4788def..bc7f1fc 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -3,22 +3,17 @@ # # 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.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 -# which are linked conditionally (not within --whole-archive), and do not -# require symbol indexes added. +# vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_OBJS) 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. +# $(KBUILD_VMLINUX_LIBS) are archives which are linked conditionally +# (not within --whole-archive), and do not require symbol indexes added. # # vmlinux # ^ # | -# +-< $(KBUILD_VMLINUX_INIT) -# | +--< init/version.o + more -# | -# +--< $(KBUILD_VMLINUX_MAIN) -# | +--< drivers/built-in.a mm/built-in.a + more +# +--< $(KBUILD_VMLINUX_OBJS) +# | +--< init/built-in.a drivers/built-in.a mm/built-in.a + more # | # +--< $(KBUILD_VMLINUX_LIBS) # | +--< lib/lib.a + more @@ -51,8 +46,7 @@ modpost_link() local objects objects="--whole-archive \ - ${KBUILD_VMLINUX_INIT} \ - ${KBUILD_VMLINUX_MAIN} \ + ${KBUILD_VMLINUX_OBJS} \ --no-whole-archive \ --start-group \ ${KBUILD_VMLINUX_LIBS} \ @@ -71,8 +65,7 @@ vmlinux_link() if [ "${SRCARCH}" != "um" ]; then objects="--whole-archive \ - ${KBUILD_VMLINUX_INIT} \ - ${KBUILD_VMLINUX_MAIN} \ + ${KBUILD_VMLINUX_OBJS} \ --no-whole-archive \ --start-group \ ${KBUILD_VMLINUX_LIBS} \ @@ -83,8 +76,7 @@ vmlinux_link() -T ${lds} ${objects} else objects="-Wl,--whole-archive \ - ${KBUILD_VMLINUX_INIT} \ - ${KBUILD_VMLINUX_MAIN} \ + ${KBUILD_VMLINUX_OBJS} \ -Wl,--no-whole-archive \ -Wl,--start-group \ ${KBUILD_VMLINUX_LIBS} \