2007-10-12 Robert Millan * util/elf/grub-mkimage.c (add_segments): Allocate Program header table right after ELF header. diff -ur grub2/util/elf/grub-mkimage.c grub2.phdr/util/elf/grub-mkimage.c --- grub2/util/elf/grub-mkimage.c 2007-10-12 12:22:27.000000000 +0200 +++ grub2.phdr/util/elf/grub-mkimage.c 2007-10-12 12:36:38.000000000 +0200 @@ -250,7 +250,7 @@ ehdr.e_shstrndx = 0; /* Append entire segment table to the file. */ - phdroff = ALIGN_UP (grub_util_get_fp_size (out), sizeof (long)); + phdroff = ALIGN_UP (sizeof (ehdr), sizeof (long)); grub_util_write_image_at (phdrs, grub_target_to_host16 (ehdr.e_phentsize) * grub_target_to_host16 (ehdr.e_phnum), phdroff, out);