diff options
Diffstat (limited to 'arch/powerpc/kernel/module_32.c')
-rw-r--r-- | arch/powerpc/kernel/module_32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c index 8339fd609de0..07a89a398639 100644 --- a/arch/powerpc/kernel/module_32.c +++ b/arch/powerpc/kernel/module_32.c | |||
@@ -224,7 +224,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, | |||
224 | /* Low half of the symbol */ | 224 | /* Low half of the symbol */ |
225 | *(uint16_t *)location = value; | 225 | *(uint16_t *)location = value; |
226 | break; | 226 | break; |
227 | 227 | ||
228 | case R_PPC_ADDR16_HI: | ||
229 | /* Higher half of the symbol */ | ||
230 | *(uint16_t *)location = (value >> 16); | ||
231 | break; | ||
232 | |||
228 | case R_PPC_ADDR16_HA: | 233 | case R_PPC_ADDR16_HA: |
229 | /* Sign-adjusted lower 16 bits: PPC ELF ABI says: | 234 | /* Sign-adjusted lower 16 bits: PPC ELF ABI says: |
230 | (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF. | 235 | (((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF. |