From 74e7ad66047bda4f8323d2f7d38eb3d602eaf777 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 15 Dec 2013 00:55:17 +0100 Subject: [PATCH] * util/grub-pe2elf.c: Fix handling of .bss. --- ChangeLog | 4 ++++ util/grub-pe2elf.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 256e9314b..4a8237953 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-12-14 Vladimir Serbinenko + + * util/grub-pe2elf.c: Fix handling of .bss. + 2013-12-14 Vladimir Serbinenko Implement windows flavour of EFI install routines. diff --git a/util/grub-pe2elf.c b/util/grub-pe2elf.c index 131410f15..a711af982 100644 --- a/util/grub-pe2elf.c +++ b/util/grub-pe2elf.c @@ -143,6 +143,8 @@ write_section_data (FILE* fp, const char *name, char *image, { idx = BSS_SECTION; shdr[idx].sh_flags = SHF_ALLOC | SHF_WRITE; + if (secsize < pe_shdr->virtual_size) + secsize = pe_shdr->virtual_size; } else if (! strcmp (shname, ".modname")) idx = MODNAME_SECTION;