Support trampoline jumps on powerpc.
* grub-core/kern/dl.c (grub_dl_load_segments) [__powerpc__]: Follow __ia64__ path. (grub_dl_load_segments): Set mod->sz. (grub_dl_flush_cache): Flush whole space occupied by module, not just segments. * grub-core/kern/ia64/dl.c (nopm): Make const while on it. (jump): Likewise. * grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): New function. (trampoline): New struct. (trampoline_template): New const. (grub_arch_dl_relocate_symbols): Create trampolines on overflow. * include/grub/dl.h (grub_dl): Add sz element. [__powerpc__]: Follow __ia64__. (GRUB_ARCH_DL_TRAMP_ALIGN): Define on ppc. (GRUB_ARCH_DL_GOT_ALIGN): Likewise. (GRUB_ARCH_DL_TRAMP_SIZE): Likewise. (grub_arch_dl_get_tramp_got_size) [__powerpc__]: New proto.
This commit is contained in:
parent
3084ede4c7
commit
ed64e9e279
5 changed files with 120 additions and 18 deletions
|
@ -104,13 +104,13 @@ add_value_to_slot_21 (grub_addr_t addr, grub_uint32_t value)
|
|||
}
|
||||
}
|
||||
|
||||
static grub_uint8_t nopm[5] =
|
||||
static const grub_uint8_t nopm[5] =
|
||||
{
|
||||
/* [MLX] nop.m 0x0 */
|
||||
0x05, 0x00, 0x00, 0x00, 0x01
|
||||
};
|
||||
|
||||
static grub_uint8_t jump[0x20] =
|
||||
static const grub_uint8_t jump[0x20] =
|
||||
{
|
||||
/* ld8 r16=[r15],8 */
|
||||
0x02, 0x80, 0x20, 0x1e, 0x18, 0x14,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue