Support R_PPC_PLTREL24
It's emitted by clang 7. It's the same as R_PPC_REL24. Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
This commit is contained in:
parent
9dab2f51ea
commit
4ff051880f
2 changed files with 4 additions and 1 deletions
|
@ -79,7 +79,8 @@ grub_arch_dl_get_tramp_got_size (const void *ehdr, grub_size_t *tramp,
|
||||||
max = rel + s->sh_size / s->sh_entsize;
|
max = rel + s->sh_size / s->sh_entsize;
|
||||||
rel < max;
|
rel < max;
|
||||||
rel++)
|
rel++)
|
||||||
if (ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_REL24)
|
if (ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_REL24
|
||||||
|
|| ELF_R_TYPE (rel->r_info) == GRUB_ELF_R_PPC_PLTREL24)
|
||||||
(*tramp)++;
|
(*tramp)++;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -122,6 +123,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||||
*(Elf_Half *) addr = value;
|
*(Elf_Half *) addr = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case GRUB_ELF_R_PPC_PLTREL24:
|
||||||
case GRUB_ELF_R_PPC_REL24:
|
case GRUB_ELF_R_PPC_REL24:
|
||||||
{
|
{
|
||||||
Elf_Sword delta = value - (Elf_Word) addr;
|
Elf_Sword delta = value - (Elf_Word) addr;
|
||||||
|
|
|
@ -29,6 +29,7 @@ struct grub_module_verifier_arch archs[] = {
|
||||||
GRUB_ELF_R_PPC_ADDR16_HA,
|
GRUB_ELF_R_PPC_ADDR16_HA,
|
||||||
GRUB_ELF_R_PPC_ADDR32,
|
GRUB_ELF_R_PPC_ADDR32,
|
||||||
GRUB_ELF_R_PPC_REL32,
|
GRUB_ELF_R_PPC_REL32,
|
||||||
|
GRUB_ELF_R_PPC_PLTREL24,
|
||||||
-1
|
-1
|
||||||
} },
|
} },
|
||||||
{ "sparc64", 8, 1, EM_SPARCV9, GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){
|
{ "sparc64", 8, 1, EM_SPARCV9, GRUB_MODULE_VERIFY_SUPPORTS_RELA, (int[]){
|
||||||
|
|
Loading…
Reference in a new issue