/* Addend should be zero. */
if (rel->r_addend != 0)
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("internal error: addend should be zero for R_OR1K_GOT16"));
break;
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:
else
{
BFD_FAIL ();
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%B: probably compiled without -fPIC?"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
case R_OR1K_TLS_LDO_LO16:
/* TODO: implement support for local dynamic. */
BFD_FAIL ();
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%B: support for local dynamic not implemented"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
/* These are resolved dynamically on load and shouldn't
be used as linker input. */
BFD_FAIL ();
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%B: will not resolve runtime TLS relocation"),
input_bfd);
bfd_set_error (bfd_error_bad_value);
switch (r)
{
case bfd_reloc_overflow:
- r = info->callbacks->reloc_overflow
+ (*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section, rel->r_offset);
break;
case bfd_reloc_undefined:
- r = info->callbacks->undefined_symbol
+ (*info->callbacks->undefined_symbol)
(info, name, input_bfd, input_section, rel->r_offset, TRUE);
break;
}
if (msg)
- r = info->callbacks->warning
- (info, msg, name, input_bfd, input_section, rel->r_offset);
-
- if (!r)
- return FALSE;
+ (*info->callbacks->warning) (info, msg, name, input_bfd,
+ input_section, rel->r_offset);
}
}
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%B: bad relocation section name `%s\'"),
abfd, name);
}
continue;
case DT_PLTGOT:
- s = htab->sgot->output_section;
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma;
+ s = htab->sgotplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_JMPREL:
- s = htab->srelplt->output_section;
- BFD_ASSERT (s != NULL);
- dyn.d_un.d_ptr = s->vma;
+ s = htab->srelplt;
+ dyn.d_un.d_ptr = s->output_section->vma + s->output_offset;
break;
case DT_PLTRELSZ:
- s = htab->srelplt->output_section;
- BFD_ASSERT (s != NULL);
+ s = htab->srelplt;
dyn.d_un.d_val = s->size;
break;
about changing the DT_RELA entry. */
if (htab->srelplt != NULL)
{
- /* FIXME: this calculation sometimes produces
- wrong result, the problem is that the dyn.d_un.d_val
- is not always correct, needs investigation why
- that happens. In the meantime, reading the
- ".rela.dyn" section by name seems to yield
- correct result.
-
- s = htab->srelplt->output_section;
+ s = htab->srelplt;
dyn.d_un.d_val -= s->size;
- */
-
- s = bfd_get_section_by_name (output_bfd, ".rela.dyn");
- dyn.d_un.d_val = s ? s->size : 0;
}
break;
}
EF_OR1K_NODELAY flag setting. */
static bfd_boolean
-elf32_or1k_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info)
{
+ bfd *obfd = info->output_bfd;
flagword out_flags;
flagword in_flags;
if ((in_flags & EF_OR1K_NODELAY) != (out_flags & EF_OR1K_NODELAY))
{
- (*_bfd_error_handler)
+ _bfd_error_handler
(_("%B: EF_OR1K_NODELAY flag mismatch with previous modules"), ibfd);
bfd_set_error (bfd_error_bad_value);