* grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Fix
current address calculation.
This commit is contained in:
parent
96f8caf812
commit
384ad7cc1b
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2011-12-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/loader/i386/bsdXX.c (grub_freebsd_load_elfmodule): Fix
|
||||||
|
current address calculation.
|
||||||
|
|
||||||
2011-12-15 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-12-15 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/lib/reed_solomon.c (decode_block): Allocate on heap and not
|
* grub-core/lib/reed_solomon.c (decode_block): Allocate on heap and not
|
||||||
|
|
|
@ -244,16 +244,16 @@ SUFFIX (grub_freebsd_load_elfmodule) (struct grub_relocator *relocator,
|
||||||
curload = module + s->sh_addr + s->sh_size;
|
curload = module + s->sh_addr + s->sh_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
load (file, UINT_TO_PTR (module), 0, sizeof (e));
|
load (file, (grub_uint8_t *) chunk_src + module - *kern_end, 0, sizeof (e));
|
||||||
if (curload < module + sizeof (e))
|
if (curload < module + sizeof (e))
|
||||||
curload = module + sizeof (e);
|
curload = module + sizeof (e);
|
||||||
|
|
||||||
load (file, UINT_TO_PTR (curload), e.e_shoff,
|
load (file, (grub_uint8_t *) chunk_src + curload - *kern_end, e.e_shoff,
|
||||||
e.e_shnum * e.e_shentsize);
|
e.e_shnum * e.e_shentsize);
|
||||||
e.e_shoff = curload - module;
|
e.e_shoff = curload - module;
|
||||||
curload += e.e_shnum * e.e_shentsize;
|
curload += e.e_shnum * e.e_shentsize;
|
||||||
|
|
||||||
load (file, UINT_TO_PTR (curload), e.e_phoff,
|
load (file, (grub_uint8_t *) chunk_src + curload - *kern_end, e.e_phoff,
|
||||||
e.e_phnum * e.e_phentsize);
|
e.e_phnum * e.e_phentsize);
|
||||||
e.e_phoff = curload - module;
|
e.e_phoff = curload - module;
|
||||||
curload += e.e_phnum * e.e_phentsize;
|
curload += e.e_phnum * e.e_phentsize;
|
||||||
|
|
Loading…
Reference in a new issue