Skip to content

Commit

Permalink
powerpc/module: Add support for R_PPC64_REL32 relocations
Browse files Browse the repository at this point in the history
We haven't seen these before, but the soon to be merged relative
exception tables support causes them to be generated.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Michael Ellerman committed Nov 14, 2016
1 parent e3f2c6c commit 9f751b8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/module_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,11 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
*location = value - (unsigned long)location;
break;

case R_PPC64_REL32:
/* 32 bits relative (used by relative exception tables) */
*(u32 *)location = value - (unsigned long)location;
break;

case R_PPC64_TOCSAVE:
/*
* Marker reloc indicates we don't have to save r2.
Expand Down

0 comments on commit 9f751b8

Please sign in to comment.