Browse Source

powerpc/module: Add support for R_PPC64_REL32 relocations

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>
Michael Ellerman 8 năm trước cách đây
mục cha
commit
9f751b82b4
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      arch/powerpc/kernel/module_64.c

+ 5 - 0
arch/powerpc/kernel/module_64.c

@@ -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.