From patchwork Tue May 24 00:16:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhavan T. Venkataraman" X-Patchwork-Id: 12859580 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FE6EC433F5 for ; Tue, 24 May 2022 00:21:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ubKQqMPfFwhc4gzSL4f26bmy/qBFr1jqL+qIxE0bGdU=; b=PPMbY15VYG0uqF 3BDfhO03xODgLdi/xZw0r/aN0jrWDPa52dy10oOLlU5v0FQt+nkPR6t1kvzWRHFQnQ5xFloqD9v8u ofX7YctYXBsh3TigrZvcunmPsLUA5YlRKX0991QoICXM7Roie/vAX2T0aUd9QhmSvSs6VrTc1wSRt CAevvHRr72gtZhoTy9yVxT2chb4+UrUxOYWdy/dgsF1BjleVFbhShiRBaYkCqGkklVWRiDY/R0xXy KjDuRM9BQ0SeIMCjy/yoVblulZNLu1c2akehm3Jwru3NDMmYaOLn7RL8ey8aXAekXWKbDQ9k8csDP RDgOBcpdjo9EQ0o8wkIA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntIH8-006Kfm-EJ; Tue, 24 May 2022 00:19:50 +0000 Received: from linux.microsoft.com ([13.77.154.182]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ntIEO-006JTG-IG for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2022 00:17:06 +0000 Received: from x64host.home (unknown [47.189.24.195]) by linux.microsoft.com (Postfix) with ESMTPSA id 840CD20B8968; Mon, 23 May 2022 17:16:59 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 840CD20B8968 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1653351420; bh=L/zVpQucNi7H5ecmmGZpBtWf3xyfz9caTMZwGZoyPb8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SCsal7wIoTOh0RTw4YSmNL6lsw6JYsOoXBp2B84WHf60eScEGnfiLPENyQW0TbnBF uCkG3E+ZnohnDGWGv/gmBU5Y0k/tr27GKAM/OyvN0h9KtFifJusnJzdZ0YzIVTjb40 CCx4NNCfGg71eK/I099mC1w6dWDf5zWqXgGjqKL4= From: madvenka@linux.microsoft.com To: jpoimboe@redhat.com, peterz@infradead.org, chenzhongjin@huawei.com, mark.rutland@arm.com, broonie@kernel.org, nobuta.keiya@fujitsu.com, sjitindarsingh@gmail.com, catalin.marinas@arm.com, will@kernel.org, jamorris@linux.microsoft.com, linux-arm-kernel@lists.infradead.org, live-patching@vger.kernel.org, linux-kernel@vger.kernel.org, madvenka@linux.microsoft.com Subject: [RFC PATCH v2 13/20] objtool: arm64: Dump ORC data present in object files Date: Mon, 23 May 2022 19:16:30 -0500 Message-Id: <20220524001637.1707472-14-madvenka@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220524001637.1707472-1-madvenka@linux.microsoft.com> References: <20220524001637.1707472-1-madvenka@linux.microsoft.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220523_171700_696571_12D54D22 X-CRM114-Status: UNSURE ( 9.41 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: "Madhavan T. Venkataraman" Call orc_dump() from cmd_fpv() to dump the ORC sections in an object file. This is for debug purposes. Signed-off-by: Madhavan T. Venkataraman --- tools/objtool/Build | 1 + tools/objtool/builtin-fpv.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tools/objtool/Build b/tools/objtool/Build index 5de79c76f3f0..d40ee95039cf 100644 --- a/tools/objtool/Build +++ b/tools/objtool/Build @@ -20,6 +20,7 @@ objtool-$(SUBCMD_FPV) += cfi.o objtool-$(SUBCMD_FPV) += insn.o objtool-$(SUBCMD_FPV) += decode.o objtool-$(SUBCMD_FPV) += orc_gen.o +objtool-$(SUBCMD_FPV) += orc_dump.o objtool-y += builtin-check.o objtool-y += builtin-orc.o diff --git a/tools/objtool/builtin-fpv.c b/tools/objtool/builtin-fpv.c index bc8f88f204b5..7934c569e60a 100644 --- a/tools/objtool/builtin-fpv.c +++ b/tools/objtool/builtin-fpv.c @@ -19,6 +19,7 @@ static const char * const fpv_usage[] = { "objtool fpv generate file.o", + "objtool fpv dump file.o", NULL, }; @@ -69,6 +70,9 @@ int cmd_fpv(int argc, const char **argv) return elf_write(file->elf); } + if (!strcmp(argv[0], "dump")) + return orc_dump(objname); + usage_with_options(fpv_usage, fpv_options); return 0;