+2013-12-21 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/kern/dl.c: Don't discard const attribute.
+
2013-12-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/disk.c: Fix potential overflow.
grub_dl_load_segments (grub_dl_t mod, const Elf_Ehdr *e)
{
unsigned i;
- Elf_Shdr *s;
+ const Elf_Shdr *s;
grub_size_t tsize = 0, talign = 1;
#if !defined (__i386__) && !defined (__x86_64__)
grub_size_t tramp;
#endif
char *ptr;
- for (i = 0, s = (Elf_Shdr *)((char *) e + e->e_shoff);
+ for (i = 0, s = (const Elf_Shdr *)((const char *) e + e->e_shoff);
i < e->e_shnum;
- i++, s = (Elf_Shdr *)((char *) s + e->e_shentsize))
+ i++, s = (const Elf_Shdr *)((const char *) s + e->e_shentsize))
{
tsize = ALIGN_UP (tsize, s->sh_addralign) + s->sh_size;
if (talign < s->sh_addralign)