fix
This commit is contained in:
parent
b07c261cfc
commit
141278b5e0
1 changed files with 8 additions and 10 deletions
|
@ -57,11 +57,9 @@ extern grub_uint32_t grub_relocator32_backward_esp;
|
||||||
#define PREFIX(x) grub_relocator32_ ## x
|
#define PREFIX(x) grub_relocator32_ ## x
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_relocator_bw (void *ptr, void *src, grub_uint32_t dest,
|
write_call_relocator_bw (void *ptr, void *src, grub_uint32_t dest,
|
||||||
grub_size_t size, struct grub_relocator32_state state)
|
grub_size_t size, struct grub_relocator32_state state)
|
||||||
{
|
{
|
||||||
void (*entry) ();
|
|
||||||
|
|
||||||
grub_relocator32_backward_dest = dest;
|
grub_relocator32_backward_dest = dest;
|
||||||
grub_relocator32_backward_src = PTR_TO_UINT64 (src);
|
grub_relocator32_backward_src = PTR_TO_UINT64 (src);
|
||||||
grub_relocator32_backward_size = size;
|
grub_relocator32_backward_size = size;
|
||||||
|
@ -76,12 +74,11 @@ write_relocator_bw (void *ptr, void *src, grub_uint32_t dest,
|
||||||
grub_memmove (ptr,
|
grub_memmove (ptr,
|
||||||
&grub_relocator32_backward_start,
|
&grub_relocator32_backward_start,
|
||||||
RELOCATOR_SIZEOF (backward));
|
RELOCATOR_SIZEOF (backward));
|
||||||
entry = (void (*)()) (ptr);
|
((void (*)()) ptr) ();
|
||||||
entry ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_relocator_bw (void *ptr, void *src, grub_uint32_t dest,
|
write_call_relocator_fw (void *ptr, void *src, grub_uint32_t dest,
|
||||||
grub_size_t size, struct grub_relocator32_state state)
|
grub_size_t size, struct grub_relocator32_state state)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -99,6 +96,7 @@ write_relocator_bw (void *ptr, void *src, grub_uint32_t dest,
|
||||||
grub_memmove (ptr,
|
grub_memmove (ptr,
|
||||||
&grub_relocator32_forward_start,
|
&grub_relocator32_forward_start,
|
||||||
RELOCATOR_SIZEOF (forward));
|
RELOCATOR_SIZEOF (forward));
|
||||||
entry = (void (*)()) ptr;
|
((void (*)()) ptr) ();
|
||||||
entry ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include "../relocator.c"
|
||||||
|
|
Loading…
Reference in a new issue