提交 9a3d6458 编写于 作者: S Simon Vallet 提交者: Paul Mackerras

[POWERPC] Add support for R_PPC_ADDR16_HI relocations

apply_relocate_add() does not support R_PPC_ADDR16_HI relocations, which
prevents some non gcc-built modules to be loaded.
Signed-off-by: NSimon Vallet <svallet@gmail.com>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 06c31475
......@@ -224,7 +224,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
/* Low half of the symbol */
*(uint16_t *)location = value;
break;
case R_PPC_ADDR16_HI:
/* Higher half of the symbol */
*(uint16_t *)location = (value >> 16);
break;
case R_PPC_ADDR16_HA:
/* Sign-adjusted lower 16 bits: PPC ELF ABI says:
(((x >> 16) + ((x & 0x8000) ? 1 : 0))) & 0xFFFF.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册