From patchwork Mon Mar 19 11:26:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 132034 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp2607340ljb; Mon, 19 Mar 2018 04:28:08 -0700 (PDT) X-Google-Smtp-Source: AG47ELtAZj3/3cPJ+OqcjmNt5Xx5FQVDTmMUakCi9KVgTIo5F4RyMfTzWdi31Dsi1TNqcJkSYGrc X-Received: by 10.99.4.202 with SMTP id 193mr6816828pge.409.1521458888564; Mon, 19 Mar 2018 04:28:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521458888; cv=none; d=google.com; s=arc-20160816; b=hXWV0khonIfffptf4a7UJhkPf5J9VYstQI3cF+lgWX3o75K/JGWYd04uTzuheumdcG BqR2i9gW80VztOj21GkbVKCqFggqJISpR0NzrxnQ+wnKpIF/y1y32917M8jDqrgcXvtW S4uDVBNwoJ7dEQWQFhRgOTWMPlqJUvnpZZBWg801jQnJH1Hy5sfjXEKLpnTJYCuWPN3y X2aeXhajlgv1PyVruSC6mqFta92dbc1NiXnLNlzfFijPipUP4hC4wP69jvMQ1QqvMZkw 5D2xnI/Mb86jE3k2RM/cnNrLl4AN4XQ06F9qpshs7BOI68c3Ks/XW7hUEvRldGbWFs59 bHVg== 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 :arc-authentication-results; bh=AmY3feTX0KccPgLpjhutntuw5y6WBHrulX7j3+F9OT0=; b=NH7IOZJOMPLlPibPdNXNOFfekySuYm/4JsiVgvN7Eg+We/JqY2cxow7XdSjepCQUlD d3lJDxLMMM3+tmtyX0FVz+NuCUYHEjTM8XKPu2rTFciBQYiME6c4mexPd1GtM+dv1xU9 ntTf5aCePA1peVqXv3VBRWnM/rDRhnCnLXwx0hX57kJYFPBHtpj9sM4fWa6G9p15Txlc QehFCOXifhhS7293PF1f9gn3qeo5HMENgF9baEWZ/qoKv8++DgItIDBI86OyqzN1LSgA OI7NMoYYp145debYeYCkGfa1kpNELCkFLliPLacGknfYp03EFzfN8fuxWod6rHcku3vu SoYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=j9LjUHMg; 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 l15si3494669pgn.826.2018.03.19.04.28.08; Mon, 19 Mar 2018 04:28:08 -0700 (PDT) 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=j9LjUHMg; 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 S933135AbeCSL1Z (ORCPT + 28 others); Mon, 19 Mar 2018 07:27:25 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:30213 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755372AbeCSL1R (ORCPT ); Mon, 19 Mar 2018 07:27:17 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id w2JBQHQt023258; Mon, 19 Mar 2018 20:26:21 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com w2JBQHQt023258 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1521458782; bh=AmY3feTX0KccPgLpjhutntuw5y6WBHrulX7j3+F9OT0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j9LjUHMgCYBuS+sL0zrrjf/ta7ItRig91crI1ySGfij5BAhNT/MPt41Ma/0GA8TYb 77PMffC0kYrJUuk+bPcNZvQSmx13I+7xF5nkKeTSUVvriB6faIyxEGwioN/uk5PhsS jnpGiMv0dDrIQGZubIUdPQqdHVi96+mVXvNtHs+C6yl5FpeoToV/hZAsnCbGjnnBc/ clT86RSnRUyiZLRg45kDW8IeBN/nbHBxM51x6VvgJSeqwXjuNNFgBOS3GOE9Kb741g kGKHMuyD7bfEJTqlZEqQabGPtb4/YKH7GfCdC6H8XH2GdLHtp8VWh7hKdvWrVdM2ef WHXagKFK5c7Rg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , linux-kernel@vger.kernel.org, Nicholas Piggin , Masahiro Yamada Subject: [PATCH 5/7] kbuild: remove partial section mismatch detection for built-in.a Date: Mon, 19 Mar 2018 20:26:11 +0900 Message-Id: <1521458773-14224-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1521458773-14224-1-git-send-email-yamada.masahiro@socionext.com> References: <1521458773-14224-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 When built-in.o was incrementally linked with 'ld -r', the section mismatch analysis for the individual built-in.o was possible when CONFIG_DEBUG_SECTION_MISMATCH was enabled. With the migration to the thin archive, built-in.a (former, built-in.o) is no longer an ELF file. So, the modpost does nothing useful. scripts/mod/modpost.c just checks the header to bail out, as follows: /* Is this a valid ELF file? */ if ((hdr->e_ident[EI_MAG0] != ELFMAG0) || (hdr->e_ident[EI_MAG1] != ELFMAG1) || (hdr->e_ident[EI_MAG2] != ELFMAG2) || (hdr->e_ident[EI_MAG3] != ELFMAG3)) { /* Not an ELF file - silently ignore it */ return 0; } We have the full analysis in the final link stage anyway, so we would not miss the section mismatching. I do not see a good reason to require extra linking only for the purpose of the per-directory analysis. Just get rid of this part. Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 316cb95..66461e9 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -456,8 +456,7 @@ quiet_cmd_link_o_target = AR $@ # If the list of objects to link is empty, just create an empty built-in.a cmd_link_o_target = $(if $(strip $(real-obj-y)),\ - $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^) \ - $(cmd_secanalysis),\ + $(cmd_make_builtin) $@ $(filter $(real-obj-y), $^), \ $(cmd_make_empty_builtin) $@) $(builtin-target): $(real-obj-y) FORCE