* grub-core/kern/dl.c (grub_dl_load_segments): Fix alignment handling.
This commit is contained in:
parent
bb41695449
commit
10b64f1cf4
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-11-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/dl.c (grub_dl_load_segments): Fix alignment handling.
|
||||
|
||||
2011-11-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/kern/dl.c (grub_dl_unload): Fix freeing segments.
|
||||
|
|
|
@ -243,7 +243,7 @@ grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
|
|||
i < e->e_shnum;
|
||||
i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
|
||||
{
|
||||
tsize += ALIGN_UP (s->sh_size, s->sh_addralign);
|
||||
tsize = ALIGN_UP (tsize, s->sh_addralign) + s->sh_size;
|
||||
if (talign < s->sh_addralign)
|
||||
talign = s->sh_addralign;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue