Skip to content

Commit a39818a

Browse files
committed
objtool/powerpc: Implement arch_pc_relative_reloc()
Provide an implementation for arch_pc_relative_reloc(). It is needed to pass the build once 61c6065 ("objtool: Allow !PC relative relocations") is merged. Signed-off-by: Michael Ellerman <[email protected]>
1 parent c984aef commit a39818a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tools/objtool/arch/powerpc/decode.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ unsigned long arch_jump_destination(struct instruction *insn)
8282
return insn->offset + insn->immediate;
8383
}
8484

85+
bool arch_pc_relative_reloc(struct reloc *reloc)
86+
{
87+
/*
88+
* The powerpc build only allows certain relocation types, see
89+
* relocs_check.sh, and none of those accepted are PC relative.
90+
*/
91+
return false;
92+
}
93+
8594
void arch_initial_func_cfi_state(struct cfi_init_state *state)
8695
{
8796
int i;

tools/objtool/include/objtool/arch.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,6 @@ bool arch_is_rethunk(struct symbol *sym);
9595

9696
int arch_rewrite_retpolines(struct objtool_file *file);
9797

98+
bool arch_pc_relative_reloc(struct reloc *reloc);
99+
98100
#endif /* _ARCH_H */

0 commit comments

Comments
 (0)