/* 32-bit ELF support for S+core.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by
Brain.lin (brain.lin@sunplusct.com)
Mei Ligang (ligang@sunnorth.com.cn)
}
/* Score backend functions. */
-static void
+static bfd_boolean
s3_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);
- s3_bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel);
+ if (! s3_bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel))
+ continue;
howto = bfd_reloc.howto;
h = NULL;
/* Use bfd_reloc_other to check lw48, sw48 word align. */
case bfd_reloc_other:
- msg = _("address not word align");
+ msg = _("address not word aligned");
goto common_error;
default:
{
_bfd_error_handler
/* xgettext:c-format */
- (_("%pB: Malformed reloc detected for section %pA"), abfd, sec);
+ (_("%pB: malformed reloc detected for section %pA"), abfd, sec);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
/*****************************************************************************/
/* s3_s7: backend hooks. */
-static void
+static bfd_boolean
_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
arelent *bfd_reloc,
Elf_Internal_Rela *elf_reloc)
#define ELF_MACHINE_ALT1 EM_SCORE_OLD
#define ELF_MAXPAGESIZE 0x8000
-#define elf_info_to_howto 0
+#define elf_info_to_howto NULL
#define elf_info_to_howto_rel _bfd_score_info_to_howto
#define elf_backend_relocate_section _bfd_score_elf_relocate_section
#define elf_backend_check_relocs _bfd_score_elf_check_relocs