2009-09-24 Pavel Roskin <proski@gnu.org>

* include/grub/kernel.h (struct grub_module_header): Remove
        `grub_module_header_types'.  Make `type' unsigned.  Make `size'
        32-bit on all platforms.
        * util/elf/grub-mkimage.c (load_modules): Treat `type' as an
        8-bit field.  Use grub_host_to_target32() for `size'.
        * util/i386/efi/grub-mkimage.c (make_mods_section): Likewise.
        * util/i386/pc/grub-mkimage.c (generate_image): Likewise.
        * util/sparc64/ieee1275/grub-mkimage.c (generate_image): Likewise.
This commit is contained in:
robertmh 2009-09-24 13:40:40 +00:00
parent 4e5a02a7ba
commit 6b9b6276d4
6 changed files with 35 additions and 24 deletions

View file

@ -683,8 +683,8 @@ make_mods_section (FILE *out, Elf_Addr current_address,
grub_util_info ("adding module %s", p->name);
mod_size = grub_util_get_image_size (p->name);
header.type = grub_cpu_to_le32 (OBJ_TYPE_ELF);
header.size = grub_cpu_to_le32 (mod_size + sizeof (header));
header.type = OBJ_TYPE_ELF;
header.size = grub_host_to_target32 (mod_size + sizeof (header));
mod_image = grub_util_read_image (p->name);