summaryrefslogtreecommitdiffstats
path: root/tools/objtool/arch/powerpc/decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objtool/arch/powerpc/decode.c')
-rw-r--r--tools/objtool/arch/powerpc/decode.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/objtool/arch/powerpc/decode.c b/tools/objtool/arch/powerpc/decode.c
index dcd0975cad6b..01cade98b49e 100644
--- a/tools/objtool/arch/powerpc/decode.c
+++ b/tools/objtool/arch/powerpc/decode.c
@@ -9,6 +9,11 @@
#include <objtool/builtin.h>
#include <objtool/endianness.h>
+int arch_ftrace_match(char *name)
+{
+ return !strcmp(name, "_mcount");
+}
+
unsigned long arch_dest_reloc_offset(int addend)
{
return addend;
@@ -50,6 +55,17 @@ int arch_decode_instruction(struct objtool_file *file, const struct section *sec
typ = INSN_OTHER;
imm = 0;
+ switch (opcode) {
+ case 18: /* b[l][a] */
+ if ((insn & 3) == 1) /* bl */
+ typ = INSN_CALL;
+
+ imm = insn & 0x3fffffc;
+ if (imm & 0x2000000)
+ imm -= 0x4000000;
+ break;
+ }
+
if (opcode == 1)
*len = 8;
else