From ce55ed03892f7956a7e9a23766e7b493f89f2c03 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 30 Nov 2013 11:14:30 +0100 Subject: [PATCH] Remove leftover GRUB_IA64_DL_TRAMP_SIZE. --- ChangeLog | 4 ++++ grub-core/kern/ia64/dl.c | 3 ++- grub-core/kern/ia64/dl_helper.c | 2 -- include/grub/dl.h | 1 - 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index ad8356344..8aef55ea6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-11-30 Vladimir Serbinenko + + Remove leftover GRUB_IA64_DL_TRAMP_SIZE. + 2013-11-29 Colin Watson * docs/grub-dev.texi (Font Metrics): Exclude @image command from DVI diff --git a/grub-core/kern/ia64/dl.c b/grub-core/kern/ia64/dl.c index 957ceaae6..91a2645ce 100644 --- a/grub-core/kern/ia64/dl.c +++ b/grub-core/kern/ia64/dl.c @@ -115,7 +115,8 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr) grub_uint64_t noff; grub_ia64_make_trampoline (tr, value); noff = ((char *) tr - (char *) (addr & ~3)) >> 4; - tr = (struct grub_ia64_trampoline *) ((char *) tr + GRUB_IA64_DL_TRAMP_SIZE); + tr++; + if (noff & ~MASK19) return grub_error (GRUB_ERR_BAD_OS, "trampoline offset too big (%lx)", noff); diff --git a/grub-core/kern/ia64/dl_helper.c b/grub-core/kern/ia64/dl_helper.c index 515e323ad..0bebe60e0 100644 --- a/grub-core/kern/ia64/dl_helper.c +++ b/grub-core/kern/ia64/dl_helper.c @@ -152,8 +152,6 @@ static const grub_uint8_t jump[0x20] = void grub_ia64_make_trampoline (struct grub_ia64_trampoline *tr, grub_uint64_t addr) { - COMPILE_TIME_ASSERT (sizeof (struct grub_ia64_trampoline) - == GRUB_IA64_DL_TRAMP_SIZE); grub_memcpy (tr->nop, nopm, sizeof (tr->nop)); tr->addr_hi[0] = ((addr & 0xc00000) >> 16); tr->addr_hi[1] = (addr >> 24) & 0xff; diff --git a/include/grub/dl.h b/include/grub/dl.h index 11fc77568..d1d20d9d2 100644 --- a/include/grub/dl.h +++ b/include/grub/dl.h @@ -240,7 +240,6 @@ void grub_arch_dl_init_linker (void); #endif #define GRUB_IA64_DL_TRAMP_ALIGN 16 -#define GRUB_IA64_DL_TRAMP_SIZE 48 #define GRUB_IA64_DL_GOT_ALIGN 16 grub_err_t