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

madvenka
2023-02-02T07:43:10Z

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 --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);
}
--
2.25.1