diff mbox series

[RFC,v3,11/22] objtool: arm64: Invoke the decoder

Message ID 20230202074036.507249-12-madvenka@linux.microsoft.com (mailing list archive)
State New, archived
Headers show
Series arm64: livepatch: Use ORC for dynamic frame pointer validation | expand

Commit Message

Madhavan T. Venkataraman Feb. 2, 2023, 7:40 a.m. UTC
From: "Madhavan T. Venkataraman" <madvenka@linux.microsoft.com>

Invoke decode_instructions() from check(). For Dynamic Validation of
the frame pointer, we only need the "-s" option for objtool.

Signed-off-by: Madhavan T. Venkataraman <madvenka@linux.microsoft.com>
---
 tools/objtool/dcheck.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/objtool/dcheck.c b/tools/objtool/dcheck.c
index e2098c9ad282..cd2700153408 100644
--- a/tools/objtool/dcheck.c
+++ b/tools/objtool/dcheck.c
@@ -9,8 +9,13 @@ 
 #include <sys/mman.h>
 
 #include <objtool/objtool.h>
+#include <objtool/builtin.h>
+#include <objtool/insn.h>
 
 int check(struct objtool_file *file)
 {
-	return 0;
+	if (!opts.stackval)
+		return 1;
+
+	return decode_instructions(file);
 }