Merge pull request #57 from dm0-/2.02-coreos

x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
This commit is contained in:
David Michael 2019-05-30 15:37:58 -04:00 committed by GitHub
commit c6b9a0af3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
break;
case R_X86_64_PC32:
case R_X86_64_PLT32:
err = grub_efiemu_write_value (addr,
*addr32 + rel->r_addend
+ sym.off

View File

@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
break;
case R_X86_64_PC32:
case R_X86_64_PLT32:
{
grub_int64_t value;
value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -

View File

@ -832,6 +832,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
break;
case R_X86_64_PC32:
case R_X86_64_PLT32:
{
grub_uint32_t *t32 = (grub_uint32_t *) target;
*t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)

View File

@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
-1
}, (int[]){
R_X86_64_PC32,
R_X86_64_PLT32,
-1
}
},