mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
arm: Fix trampoline generation.
We used the wrong pointer in this case. It worked only by accident.
This commit is contained in:
1 parent
68c6cec061
commit
3d173955f0
1 file changed
+2
-2
@@ -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;
|
||||||
|
|||||||
Reference in new issue
Block a user