Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5216105ybi; Tue, 11 Jun 2019 21:59:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKfALqB7n0w1Xc1IwgI4+KcV97UOwaQ1Qw5lyR1ZToest8dBdmB6agXfCETREZ7VeUNi6X X-Received: by 2002:a62:d45d:: with SMTP id u29mr19910341pfl.135.1560315571934; Tue, 11 Jun 2019 21:59:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560315571; cv=none; d=google.com; s=arc-20160816; b=vPn4UbbR7xq9MAqqcxbVxlZ7vk6ppxwHbuSNbI4hHbhyDt6gkA1cCUSPqDrFORc8At lLWdeyCKmk5qIw0FEoLh7FsHH8hlim+pQ4diUyyNB8+iPfJhyP+Mv9xB+jH8mBdlp6rw wfPt5zrg3o6kEVh4k9+zwRdTp0pe+nfJTbppxEzx8gwegE90pBSoNCIl7zyKi7wVgmst cmXlpShI/EtseWBj8oii3cvT2ayxAOe4fo7y/wQ0hfQpm2C0hMGCRCoeFp41qMIS745E mkPQWf5+I8tcfkgUK8I8PDHZylW7DOrTfkRGhOaPVbJxGKw09oMfBzZMcneY4AvXddh4 JFfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=aJDpC3EulFhYi+PijwHHagN3NYfP2y7AUtew+Grqd2c=; b=WcQ5qvVmlTkP6LcEK21wj0GoX0USR5jzsbKPJv34mPU2hw7t7FvqKtKkC5bQZnh0F+ gEO6Ij5XnL2A7RNlWO/XHUfGOY2UNivIkTWrHYHV6S4cK6qhBbminxGHT6HETkLb4A57 R3chNozW1TmwcGSUAj2v49DLTxticoZOGGWUubLsIP2U1gM0etycSpz9isL+NnGHc8QY 7OWD+82UB8H9weWRZZPEMiCZ3dMDSIFJeYu5hRS12YmC4f2tv8+XRb74a/ibNQiPWaRk aJ+NhiyVRY64fE/6BY56y5nG8t5ChDR3SmLdnBZqECrcC1bKGS3u9plRh5P5kk26nUcg WyWA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q64si11094662pfb.11.2019.06.11.21.59.15; Tue, 11 Jun 2019 21:59:31 -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; 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; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436881AbfFKWWZ (ORCPT + 99 others); Tue, 11 Jun 2019 18:22:25 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:29003 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436834AbfFKWWU (ORCPT ); Tue, 11 Jun 2019 18:22:20 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 11 Jun 2019 15:22:14 -0700 Received: from rlwimi.localdomain (unknown [10.129.220.121]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 8CF9B41BAC; Tue, 11 Jun 2019 15:22:17 -0700 (PDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [PATCH v2 09/13] objtool: Prepare to merge recordmcount Date: Tue, 11 Jun 2019 15:21:51 -0700 Message-ID: <84d4163ac09ad7b5051ee98253f96301bc0fa20f.1560285597.git.mhelsley@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Received-SPF: None (EX13-EDG-OU-002.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move recordmcount into the objtool directory. We keep this step separate so changes which turn recordmcount into a subcommand of objtool don't get obscured. Signed-off-by: Matt Helsley --- scripts/.gitignore | 1 - scripts/Makefile | 1 - scripts/Makefile.build | 11 ++++++----- tools/objtool/.gitignore | 1 + tools/objtool/Build | 2 ++ tools/objtool/Makefile | 13 ++++++++++++- {scripts => tools/objtool}/recordmcount.c | 0 {scripts => tools/objtool}/recordmcount.h | 0 {scripts => tools/objtool}/recordmcount.pl | 0 9 files changed, 21 insertions(+), 8 deletions(-) rename {scripts => tools/objtool}/recordmcount.c (100%) rename {scripts => tools/objtool}/recordmcount.h (100%) rename {scripts => tools/objtool}/recordmcount.pl (100%) diff --git a/scripts/.gitignore b/scripts/.gitignore index 17f8cef88fa8..1b5b5d595d80 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -6,7 +6,6 @@ conmakehash kallsyms pnmtologo unifdef -recordmcount sortextable asn1_compiler extract-cert diff --git a/scripts/Makefile b/scripts/Makefile index 9d442ee050bd..5fca50fee42b 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -14,7 +14,6 @@ hostprogs-$(CONFIG_BUILD_BIN2C) += bin2c hostprogs-$(CONFIG_KALLSYMS) += kallsyms hostprogs-$(CONFIG_LOGO) += pnmtologo hostprogs-$(CONFIG_VT) += conmakehash -hostprogs-$(BUILD_C_RECORDMCOUNT) += recordmcount hostprogs-$(CONFIG_BUILDTIME_EXTABLE_SORT) += sortextable hostprogs-$(CONFIG_ASN1) += asn1_compiler hostprogs-$(CONFIG_MODULE_SIG) += sign-file diff --git a/scripts/Makefile.build b/scripts/Makefile.build index ae9cf740633e..f32cfe63bb0e 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -186,18 +186,19 @@ endif # files, including recordmcount. sub_cmd_record_mcount = \ if [ $(@) != "scripts/mod/empty.o" ]; then \ - $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ + $(objtree)/tools/objtool/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ fi; -recordmcount_source := $(srctree)/scripts/recordmcount.c \ - $(srctree)/scripts/recordmcount.h + +recordmcount_source := $(srctree)/tools/objtool/recordmcount.c \ + $(srctree)/tools/objtool/recordmcount.h else -sub_cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ +sub_cmd_record_mcount = perl $(srctree)/tools/objtool/recordmcount.pl "$(ARCH)" \ "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ "$(if $(CONFIG_64BIT),64,32)" \ "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS)" \ "$(LD) $(KBUILD_LDFLAGS)" "$(NM)" "$(RM)" "$(MV)" \ "$(if $(part-of-module),1,0)" "$(@)"; -recordmcount_source := $(srctree)/scripts/recordmcount.pl +recordmcount_source := $(srctree)/tools/objtool/recordmcount.pl endif # BUILD_C_RECORDMCOUNT cmd_record_mcount = $(if $(findstring $(strip $(CC_FLAGS_FTRACE)),$(_c_flags)), \ $(sub_cmd_record_mcount)) diff --git a/tools/objtool/.gitignore b/tools/objtool/.gitignore index 914cff12899b..ee471f353caa 100644 --- a/tools/objtool/.gitignore +++ b/tools/objtool/.gitignore @@ -1,3 +1,4 @@ arch/x86/lib/inat-tables.c objtool +recordmcount fixdep diff --git a/tools/objtool/Build b/tools/objtool/Build index 749becdf5b90..78c4a8a2f9e7 100644 --- a/tools/objtool/Build +++ b/tools/objtool/Build @@ -20,3 +20,5 @@ $(OUTPUT)libstring.o: ../lib/string.c FORCE $(OUTPUT)str_error_r.o: ../lib/str_error_r.c FORCE $(call rule_mkdir) $(call if_changed_dep,cc_o_c) + +recordmcount-y += recordmcount.o diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index 88158239622b..bd9d0b6534cf 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -29,6 +29,12 @@ OBJTOOL_IN := $(OBJTOOL)-in.o LIBELF_FLAGS := $(shell pkg-config libelf --cflags 2>/dev/null) LIBELF_LIBS := $(shell pkg-config libelf --libs 2>/dev/null || echo -lelf) +RECORDMCOUNT := $(OUTPUT)recordmcount +RECORDMCOUNT_IN := $(RECORDMCOUNT)-in.o +ifeq ($(BUILD_C_RECORDMCOUNT),y) +all: $(RECORDMCOUNT) +endif + all: $(OBJTOOL) INCLUDES := -I$(srctree)/tools/include \ @@ -49,16 +55,21 @@ include $(srctree)/tools/build/Makefile.include $(OBJTOOL_IN): fixdep FORCE @$(MAKE) $(build)=objtool +$(RECORDMCOUNT_IN): fixdep FORCE + @$(MAKE) $(build)=recordmcount + $(OBJTOOL): $(LIBSUBCMD) $(OBJTOOL_IN) @$(CONFIG_SHELL) ./sync-check.sh $(QUIET_LINK)$(CC) $(OBJTOOL_IN) $(LDFLAGS) -o $@ +$(RECORDMCOUNT): $(RECORDMCOUNT_IN) + $(QUIET_LINK)$(CC) $(RECORDMCOUNT_IN) $(KBUILD_HOSTLDFLAGS) -o $@ $(LIBSUBCMD): fixdep FORCE $(Q)$(MAKE) -C $(SUBCMD_SRCDIR) OUTPUT=$(LIBSUBCMD_OUTPUT) clean: - $(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL) + $(call QUIET_CLEAN, objtool) $(RM) $(OBJTOOL) $(RECORDMCOUNT) $(Q)find $(OUTPUT) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete $(Q)$(RM) $(OUTPUT)arch/x86/lib/inat-tables.c $(OUTPUT)fixdep diff --git a/scripts/recordmcount.c b/tools/objtool/recordmcount.c similarity index 100% rename from scripts/recordmcount.c rename to tools/objtool/recordmcount.c diff --git a/scripts/recordmcount.h b/tools/objtool/recordmcount.h similarity index 100% rename from scripts/recordmcount.h rename to tools/objtool/recordmcount.h diff --git a/scripts/recordmcount.pl b/tools/objtool/recordmcount.pl similarity index 100% rename from scripts/recordmcount.pl rename to tools/objtool/recordmcount.pl -- 2.20.1