/* 32-bit ELF support for S+core.
- Copyright (C) 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2009-2019 Free Software Foundation, Inc.
Contributed by
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
/* Score backend functions. */
-void
+bfd_boolean
s7_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
r_type = ELF32_R_TYPE (elf_reloc->r_info);
if (r_type >= ARRAY_SIZE (elf32_score_howto_table))
- bfd_reloc->howto = NULL;
- else
- bfd_reloc->howto = &elf32_score_howto_table[r_type];
+ return FALSE;
+
+ bfd_reloc->howto = &elf32_score_howto_table[r_type];
+ return TRUE;
}
/* Relocate an score ELF section. */
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
- s7_bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel);
+ if (! s7_bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel))
+ continue;
howto = bfd_reloc.howto;
h = NULL;