reloc_howto_type *howto = reloc_entry->howto;
bfd_vma relocation;
bfd_vma insn;
-
+
if (output_bfd != (bfd *) NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (! howto->partial_inplace
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
-
+
if (output_bfd != NULL)
return bfd_reloc_continue;
-
+
if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
return bfd_reloc_outofrange;
-
+
relocation = (symbol->value
+ symbol->section->output_section->vma
+ symbol->section->output_offset);
+ input_section->output_offset);
relocation -= reloc_entry->address;
}
-
+
insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
insn |= (relocation & 0xfff) << 16 | (relocation & 0xff000) >> 4;
bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
-
+
if ((bfd_signed_vma) relocation < - 0x80000
|| (bfd_signed_vma) relocation > 0x7ffff)
return bfd_reloc_overflow;
{
struct plt_entry *plt;
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+
if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info))
return FALSE;
switch (r_type)
{
+ case R_390_PLTOFF16:
+ case R_390_PLTOFF32:
+ relocation -= htab->elf.sgot->output_section->vma;
+ break;
case R_390_GOTPLT12:
case R_390_GOTPLT16:
case R_390_GOTPLT20:
/* For local symbols or if we didn't make a PLT entry for
this symbol resolve the symbol directly. */
- if ( h == NULL
+ if (h == NULL
|| h->plt.offset == (bfd_vma) -1
- || htab->elf.splt == NULL)
+ || (htab->elf.splt == NULL && !s390_is_ifunc_symbol_p (h)))
{
relocation -= htab->elf.sgot->output_section->vma;
break;