Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10010047ybi; Wed, 24 Jul 2019 14:06:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqFZ5bYti9sF2TjRTVRsMpNAEZv339pusR9APia9haZfAIW2DPWpa7s778f8o5HPNgvAQ4 X-Received: by 2002:a62:ac1a:: with SMTP id v26mr13437905pfe.184.1564002404249; Wed, 24 Jul 2019 14:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564002404; cv=none; d=google.com; s=arc-20160816; b=RI37aD2K4MhmnOR0DA9x91HAA1weZLu+jJNJSfoXQ+jfdcnUJz6BLRNQPFTEfVo2bQ ka4spR1Zqp0IQJzpBFspTEPFWuzPz1eYj5vLI3EmogYHeiqJaXTiDq0Yf4gxfMOXHu4/ /XrZmH7CRcKQrKWHqEMSqWFSnKkk5/m850Nh9zMKiJdB7ImLR9RZeRVrkn45hwvPBoSH t6VGFQJR3A3X1ZdBkVIIJlFGTJ7xnOor/DCI4y1O64bANpk5F6uKW7PpLlINfT1PEgFu QQRZHB5T6nEWb3Kx8KDCQL/l7QGBPomsCS6jKfZhp2xbySedp5xkD/SydsvgDHIKbfH5 CzVw== 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=s0Pm8J/aBYQy0i+uebZKI4vlt8uoCZeGSbbFPRSnxDc=; b=ZJD9nfk4ZrESzndKxfFbISZx9u5QSgNIYfoWzBoo8h3IUCl9k5gQ3b9v9zYkKCfkNA s3KJaxgK0VJvVF51GX+8WsaG7cG4ovevoySsYyBmG1W+yqLyROoE1BNM3thHdOpFUE80 r9Zd6Pb8iR8ofpF8prfkCBqbX4fE+c51KgCSqZTYD+LjyxgqaVcAnXFsGB5PNsDoXYUH qjL4+1vcvAy2rDdLXXxk1/BlzfUSh7BuS2sKsZAtpdoJp1uxwbVZb0sphMgliajS2wRs y8zurtDm12cOp8WUC2auFjAV7INwNY147nPXWG2Bsgavlvel3olo+eLsqA8hu1i76LzH fV/A== 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 x2si15873180pgp.475.2019.07.24.14.06.29; Wed, 24 Jul 2019 14:06:44 -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 S2388101AbfGXVFn (ORCPT + 99 others); Wed, 24 Jul 2019 17:05:43 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:53154 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388080AbfGXVFk (ORCPT ); Wed, 24 Jul 2019 17:05:40 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Wed, 24 Jul 2019 14:05:09 -0700 Received: from rlwimi.localdomain (unknown [10.166.65.164]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 23B7840708; Wed, 24 Jul 2019 14:05:29 -0700 (PDT) From: Matt Helsley To: LKML CC: Ingo Molnar , Josh Poimboeuf , Peter Zijlstra , Steven Rostedt , Matt Helsley Subject: [PATCH v3 09/13] objtool: Prepare to merge recordmcount Date: Wed, 24 Jul 2019 14:05:03 -0700 Message-ID: <2767f55f4a5fbf30ba0635aed7a9c5ee92ac07dd.1563992889.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-001.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 16bcb8087899..8839b136b2c9 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 0d434d0afc0b..08b70ee9614a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -181,18 +181,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 8dc4f0848362..686edb170e3a 100644 --- a/tools/objtool/Build +++ b/tools/objtool/Build @@ -25,3 +25,5 @@ $(OUTPUT)libctype.o: ../lib/ctype.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