From f646e143090e26fc8087f3395fc2c1e03190c584 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 23 Oct 2011 23:55:38 +0200 Subject: [PATCH] * grub-core/lib/reed_solomon.c (gf_invert): Declare as const and save some space. * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Decrease. (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise. --- ChangeLog | 7 +++++++ grub-core/lib/reed_solomon.c | 4 ++-- include/grub/offsets.h | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0198ba4ee..ea8804bd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-10-23 Vladimir Serbinenko + + * grub-core/lib/reed_solomon.c (gf_invert): Declare as const and + save some space. + * include/grub/offsets.h (GRUB_KERNEL_I386_PC_RAW_SIZE): Decrease. + (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Likewise. + 2011-10-23 Vladimir Serbinenko * util/import_gcry.py: Automatically fix camellia.c and camellia.h. diff --git a/grub-core/lib/reed_solomon.c b/grub-core/lib/reed_solomon.c index 365b76003..78d249c2f 100644 --- a/grub-core/lib/reed_solomon.c +++ b/grub-core/lib/reed_solomon.c @@ -57,13 +57,13 @@ typedef grub_uint16_t gf_double_t; #define GF_POLYNOMIAL 0x1d #define GF_INVERT2 0x8e #if defined (STANDALONE) && !defined (TEST) -static char *gf_invert __attribute__ ((section(".text"))) = (void *) 0x100000; +static gf_single_t * const gf_invert __attribute__ ((section(".text"))) = (void *) 0x100000; static char *scratch __attribute__ ((section(".text"))) = (void *) 0x100100; #else #if defined (STANDALONE) static char *scratch; #endif -static grub_uint8_t gf_invert[256]; +static gf_single_t gf_invert[256]; #endif #define SECTOR_SIZE 512 diff --git a/include/grub/offsets.h b/include/grub/offsets.h index aa65cd5cc..92354f700 100644 --- a/include/grub/offsets.h +++ b/include/grub/offsets.h @@ -35,9 +35,9 @@ #define GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY 0x18 /* The size of the first region which won't be compressed. */ -#define GRUB_KERNEL_I386_PC_RAW_SIZE 0xcd0 +#define GRUB_KERNEL_I386_PC_RAW_SIZE 0xc70 -#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x730 +#define GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART 0x6e0 /* The segment where the kernel is loaded. */ #define GRUB_BOOT_I386_PC_KERNEL_SEG 0x800