arm: Fix trampoline generation.
We used the wrong pointer in this case. It worked only by accident.
This commit is contained in:
parent
68c6cec061
commit
3d173955f0
1 changed files with 2 additions and 2 deletions
|
@ -232,8 +232,8 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
||||||
if (!grub_arm_thm_jump19_check_offset (offset)
|
if (!grub_arm_thm_jump19_check_offset (offset)
|
||||||
|| !(sym_addr & 1))
|
|| !(sym_addr & 1))
|
||||||
{
|
{
|
||||||
struct trampoline_thumb *tp = mod->gotptr;
|
struct trampoline_thumb *tp = mod->trampptr;
|
||||||
mod->gotptr = tp + 1;
|
mod->trampptr = tp + 1;
|
||||||
grub_memcpy (tp->template, thumb_template, sizeof (tp->template));
|
grub_memcpy (tp->template, thumb_template, sizeof (tp->template));
|
||||||
tp->neg_addr = -sym_addr - 4;
|
tp->neg_addr = -sym_addr - 4;
|
||||||
offset = ((grub_uint8_t *) tp - (grub_uint8_t *) target - 4) | 1;
|
offset = ((grub_uint8_t *) tp - (grub_uint8_t *) target - 4) | 1;
|
||||||
|
|
Loading…
Reference in a new issue