+2020-10-16 Alan Modra <amodra@gmail.com>
+
+ * elf32-arc.c (replace_func): Correct return type.
+ (get_replace_function): Use a replace_func function pointer rather
+ than void*. Update associated ARC_RELOC_HOWTO define.
+
2020-10-16 Alan Modra <amodra@gmail.com>
* elf32-cr16.c: Formatting.
#undef ARC_RELOC_HOWTO
-typedef ATTRIBUTE_UNUSED bfd_vma (*replace_func) (unsigned, int ATTRIBUTE_UNUSED);
+typedef ATTRIBUTE_UNUSED unsigned (*replace_func) (unsigned, int ATTRIBUTE_UNUSED);
#define ARC_RELOC_HOWTO(TYPE, VALUE, SIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \
case TYPE: \
- func = (void *) RELOC_FUNCTION; \
+ func = RELOC_FUNCTION; \
break;
static replace_func
get_replace_function (bfd *abfd, unsigned int r_type)
{
- void *func = NULL;
+ replace_func func = NULL;
switch (r_type)
{
if (func == replace_bits24 && bfd_big_endian (abfd))
func = replace_bits24_be;
- return (replace_func) func;
+ return func;
}
#undef ARC_RELOC_HOWTO