OSDN Git Service

objtool/powerpc: Implement arch_pc_relative_reloc()
authorMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Nov 2022 10:26:10 +0000 (21:26 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Nov 2022 10:26:10 +0000 (21:26 +1100)
Provide an implementation for arch_pc_relative_reloc(). It is needed to
pass the build once 61c6065ef7ec ("objtool: Allow !PC relative
relocations") is merged.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/objtool/arch/powerpc/decode.c
tools/objtool/include/objtool/arch.h

index 01cade9..9c65380 100644 (file)
@@ -82,6 +82,15 @@ unsigned long arch_jump_destination(struct instruction *insn)
        return insn->offset + insn->immediate;
 }
 
+bool arch_pc_relative_reloc(struct reloc *reloc)
+{
+       /*
+        * The powerpc build only allows certain relocation types, see
+        * relocs_check.sh, and none of those accepted are PC relative.
+        */
+       return false;
+}
+
 void arch_initial_func_cfi_state(struct cfi_init_state *state)
 {
        int i;
index 5149330..4ecb480 100644 (file)
@@ -95,4 +95,6 @@ bool arch_is_rethunk(struct symbol *sym);
 
 int arch_rewrite_retpolines(struct objtool_file *file);
 
+bool arch_pc_relative_reloc(struct reloc *reloc);
+
 #endif /* _ARCH_H */