error check up and add error message.
+2013-04-29 Will Newton <will.newton@linaro.org>
+
+ * elf64-aarch64.c (elf64_aarch64_check_relocs): Move relocation
+ error check up and add error message.
+
2013-04-26 Will Newton <will.newton@linaro.org>
* elf64-aarch64.c (elf64_aarch64_check_relocs): Remove dead code.
bfd_reloc.howto = elf64_aarch64_howto_from_type (r_type);
howto = bfd_reloc.howto;
+ if (howto == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%B: unrecognized relocation (0x%x) in section `%A'"),
+ input_bfd, input_section, r_type);
+ return FALSE;
+ }
+
h = NULL;
sym = NULL;
sec = NULL;
return FALSE;
}
- if (r_type >= R_AARCH64_dyn_max)
- {
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
}
else