From patchwork Thu Mar 5 05:50:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 206485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92AADC3F2CD for ; Thu, 5 Mar 2020 06:00:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 686022146E for ; Thu, 5 Mar 2020 06:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583388036; bh=H6OWK4dVMoL/irrWtX6AMausyAG3bSEayZBwCdqNvnc=; h=From:To:Cc:Subject:Date:List-ID:From; b=Sb/QE6JN32bZbkJLtmpmWopIAkfKFspb43ERo3qcK3uiwLns1c62R3qjUiqsAhPF8 tpx1Q7LY8q+5+Eyb71X8AQ0mKQ67fValufMH/jylmNGhO6ibs4cHlNeCD6x21A0tvZ VXFPJrFEUfolEb+N/ZC/a9geKbP6hLGdUR49ADls= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725830AbgCEGAg (ORCPT ); Thu, 5 Mar 2020 01:00:36 -0500 Received: from condef-05.nifty.com ([202.248.20.70]:21597 "EHLO condef-05.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbgCEGAf (ORCPT ); Thu, 5 Mar 2020 01:00:35 -0500 X-Greylist: delayed 324 seconds by postgrey-1.27 at vger.kernel.org; Thu, 05 Mar 2020 01:00:34 EST Received: from conuserg-11.nifty.com ([10.126.8.74])by condef-05.nifty.com with ESMTP id 0255p35G013621 for ; Thu, 5 Mar 2020 14:51:03 +0900 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id 0255olWQ019741; Thu, 5 Mar 2020 14:50:48 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com 0255olWQ019741 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1583387448; bh=lSt9Fl4a87jd5z1QdbgJFDFK/59k3ohlQI/SOmb9I0U=; h=From:To:Cc:Subject:Date:From; b=DJef37jmzWlPA1JvWq/ZFJDymTCCEf6RHNFkdJrcN5Vi8Lml3GYJxGVXJQhmNvsSe 6T92QRPDw9lUzD7G/HuLZlwPUXHy9j+km15ISg8V7kPGvAaxKnf4V3yoW2l6+XXV0x JZsw67FsTZw3DOLEcGq06WW1JPj4vXUltI0GhXj7dGsrA721FwK/AaywF0c+Zsj+/G LSLarBonUvoC58kHNgNd3x+Ngqh82EDiaikEJYs5dkUdFb+iKw7lfLGJXfF8wOi9ZG oRHja4pcz5bnWdDKlr7ir4+HBSl9I2m3pqUd5HUwOyEyIj1ZfEDZ5eg/WMohpCxkhg 0hR6+00ZUJheQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Ard Biesheuvel , linux-efi@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Masahiro Yamada Subject: [PATCH] efi/libstub: avoid linking libstub/lib-ksyms.o into vmlinux Date: Thu, 5 Mar 2020 14:50:47 +0900 Message-Id: <20200305055047.6097-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.17.1 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org drivers/firmware/efi/libstub/Makefile is supposed to create a static library, which is not directly linked to vmlinux. Since commit 7f2084fa55e6 ("[kbuild] handle exports in lib-y objects reliably"), any Makefile using lib-y generates lib-ksyms.o which is linked into vmlinux. In this case, the following garbage object is linked into vmlinux. drivers/firmware/efi/libstub/lib-ksyms.o We do not want to link anything from libstub/ directly to vmlinux, so using subdir-y instead of obj-y is the correct way to descend into this directory. Signed-off-by: Masahiro Yamada --- drivers/firmware/efi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index 554d795270d9..4fd2fa02f549 100644 --- a/drivers/firmware/efi/Makefile +++ b/drivers/firmware/efi/Makefile @@ -19,7 +19,7 @@ obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o obj-$(CONFIG_UEFI_CPER) += cper.o obj-$(CONFIG_EFI_RUNTIME_MAP) += runtime-map.o obj-$(CONFIG_EFI_RUNTIME_WRAPPERS) += runtime-wrappers.o -obj-$(CONFIG_EFI_STUB) += libstub/ +subdir-$(CONFIG_EFI_STUB) += libstub obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o obj-$(CONFIG_EFI_TEST) += test/