R_OR1K_GOTOFF_* relocations
PR 20475 * elf32-or1k.c (or1k_elf_relocate_section): Offset from _GLOBAL_OFFSET_TABLE_, not start of .got section.
This commit is contained in:
parent
ed02c2d194
commit
eacfca90f1
2 changed files with 10 additions and 1 deletions
|
@ -998,7 +998,10 @@ or1k_elf_relocate_section (bfd *output_bfd,
|
|||
case R_OR1K_GOTOFF_HI16:
|
||||
/* Relocation is offset from GOT. */
|
||||
BFD_ASSERT (sgot != NULL);
|
||||
relocation -= sgot->output_section->vma;
|
||||
relocation
|
||||
-= (htab->root.hgot->root.u.def.value
|
||||
+ htab->root.hgot->root.u.def.section->output_offset
|
||||
+ htab->root.hgot->root.u.def.section->output_section->vma);
|
||||
break;
|
||||
|
||||
case R_OR1K_INSN_REL_26:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue