mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 14:59:34 +00:00
* grub-core/kern/ia64/dl.c (grub_arch_dl_relocate_symbols): Handle
non-function pcrel21b relocation. It happens with .text.unlikely section.
This commit is contained in:
1 parent
16c8f78513
commit
979742bc7e
2 files changed
+19
-8
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
2013-12-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/kern/ia64/dl.c (grub_arch_dl_relocate_symbols): Handle
|
||||||
|
non-function pcrel21b relocation. It happens with .text.unlikely
|
||||||
|
section.
|
||||||
|
|
||||||
2013-12-10 Leif Lindholm <leif.lindholm@linaro.org>
|
2013-12-10 Leif Lindholm <leif.lindholm@linaro.org>
|
||||||
|
|
||||||
* make MAX_USABLE_ADDRESS platform-specific
|
* make MAX_USABLE_ADDRESS platform-specific
|
||||||
|
|||||||
@@ -76,15 +76,20 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
|
|||||||
{
|
{
|
||||||
case R_IA64_PCREL21B:
|
case R_IA64_PCREL21B:
|
||||||
{
|
{
|
||||||
grub_uint64_t noff;
|
grub_int64_t noff;
|
||||||
struct grub_ia64_trampoline *tr = mod->trampptr;
|
if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
|
||||||
grub_ia64_make_trampoline (tr, value);
|
{
|
||||||
noff = ((char *) tr - (char *) (addr & ~3)) >> 4;
|
struct grub_ia64_trampoline *tr = mod->trampptr;
|
||||||
mod->trampptr = tr + 1;
|
grub_ia64_make_trampoline (tr, value);
|
||||||
|
noff = ((char *) tr - (char *) (addr & ~3)) >> 4;
|
||||||
|
mod->trampptr = tr + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
noff = ((char *) value - (char *) (addr & ~3)) >> 4;
|
||||||
|
|
||||||
if (noff & ~MASK19)
|
if ((noff & ~MASK19) && ((-noff) & ~MASK19))
|
||||||
return grub_error (GRUB_ERR_BAD_OS,
|
return grub_error (GRUB_ERR_BAD_MODULE,
|
||||||
"trampoline offset too big (%lx)", noff);
|
"jump offset too big (%lx)", noff);
|
||||||
grub_ia64_add_value_to_slot_20b (addr, noff);
|
grub_ia64_add_value_to_slot_20b (addr, noff);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user