[RFC PATCH v2 13/20] objtool: arm64: Dump ORC data present in object files

madvenka at linux.microsoft.com madvenka at linux.microsoft.com
Mon May 23 17:16:30 PDT 2022


From: "Madhavan T. Venkataraman" <madvenka at linux.microsoft.com>

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 <madvenka at linux.microsoft.com>
---
 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;
-- 
2.25.1




More information about the linux-arm-kernel mailing list