/* Adapteva epiphany specific support for 32-bit ELF
- Copyright (C) 2000-2015 Free Software Foundation, Inc.
+ Copyright (C) 2000-2017 Free Software Foundation, Inc.
Contributed by Embecosm on behalf of Adapteva, Inc.
This file is part of BFD, the Binary File Descriptor library.
/* We don't have to do anything for a relocatable link,
if this section does not have relocs, or if this is
not a code section. */
- if (link_info->relocatable
+ if (bfd_link_relocatable (link_info)
|| (sec->flags & SEC_RELOC) == 0
|| sec->reloc_count == 0
|| (sec->flags & SEC_CODE) == 0)
r_type = ELF32_R_TYPE (dst->r_info);
if (r_type >= (unsigned int) R_EPIPHANY_max)
{
- _bfd_error_handler (_("%A: invalid Epiphany reloc number: %d"), abfd, r_type);
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%B: invalid Epiphany reloc number: %d"), abfd, r_type);
r_type = 0;
}
cache_ptr->howto = & epiphany_elf_howto_table [r_type];
relocation += rel->r_addend;
if ((unsigned int) relocation > 0x7ff)
return bfd_reloc_outofrange;
+ /* Fall through. */
disp11:
- relocation = ((relocation & 7) << 5)
- || ((relocation & 0x7f8 ) << 13);
+ relocation = (((relocation & 7) << 5)
+ | ((relocation & 0x7f8 ) << 13));
return _bfd_relocate_contents (howto, input_bfd, relocation,
contents + rel->r_offset);
RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
rel, 1, relend, howto, 0, contents);
- if (info->relocatable)
+ if (bfd_link_relocatable (info))
continue;
/* Finally, the sole EPIPHANY-specific part. */
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);
}
}