Fix 2 incorrect vaddr_offsets
This commit is contained in:
parent
ad6e5cf25f
commit
a988e7aa63
1 changed files with 3 additions and 3 deletions
|
@ -446,8 +446,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||||
grub_uint64_t noff;
|
grub_uint64_t noff;
|
||||||
make_trampoline (tr, addend + sym_addr);
|
make_trampoline (tr, addend + sym_addr);
|
||||||
noff = ((char *) tr - (char *) pe_target
|
noff = ((char *) tr - (char *) pe_target
|
||||||
- target_section_addr - (offset & ~3)
|
- target_section_addr - (offset & ~3)) >> 4;
|
||||||
- image_target->vaddr_offset) >> 4;
|
|
||||||
tr++;
|
tr++;
|
||||||
if (noff & ~MASK19)
|
if (noff & ~MASK19)
|
||||||
grub_util_error ("trampoline offset too big (%lx)",
|
grub_util_error ("trampoline offset too big (%lx)",
|
||||||
|
@ -461,7 +460,8 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||||
case R_IA64_LTOFF22:
|
case R_IA64_LTOFF22:
|
||||||
*gpptr = grub_host_to_target64 (addend + sym_addr);
|
*gpptr = grub_host_to_target64 (addend + sym_addr);
|
||||||
add_value_to_slot_21 ((grub_addr_t) target,
|
add_value_to_slot_21 ((grub_addr_t) target,
|
||||||
(char *) gpptr - (char *) pe_target);
|
(char *) gpptr - (char *) pe_target
|
||||||
|
+ image_target->vaddr_offset);
|
||||||
gpptr++;
|
gpptr++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue