projects
/
grub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68c6cec
)
arm: Fix trampoline generation.
author
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 1 Feb 2017 14:58:36 +0000
(15:58 +0100)
committer
Vladimir Serbinenko
<phcoder@gmail.com>
Wed, 1 Feb 2017 14:58:36 +0000
(15:58 +0100)
We used the wrong pointer in this case. It worked only by accident.
grub-core/kern/arm/dl.c
patch
|
blob
|
history
diff --git
a/grub-core/kern/arm/dl.c
b/grub-core/kern/arm/dl.c
index
24364e1
..
fe0abf9
100644
(file)
--- a/
grub-core/kern/arm/dl.c
+++ b/
grub-core/kern/arm/dl.c
@@
-232,8
+232,8
@@
grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
if (!grub_arm_thm_jump19_check_offset (offset)
|| !(sym_addr & 1))
{
- struct trampoline_thumb *tp = mod->
got
ptr;
- mod->
got
ptr = tp + 1;
+ struct trampoline_thumb *tp = mod->
tramp
ptr;
+ mod->
tramp
ptr = tp + 1;
grub_memcpy (tp->template, thumb_template, sizeof (tp->template));
tp->neg_addr = -sym_addr - 4;
offset = ((grub_uint8_t *) tp - (grub_uint8_t *) target - 4) | 1;