From: Alan Modra Date: Tue, 15 Feb 2022 12:00:09 +0000 (+1030) Subject: pe_ILF_make_a_symbol_reloc segfault X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b14b0cb997af3207865b342137007b406259786;p=binutils-gdb.git pe_ILF_make_a_symbol_reloc segfault pei-aarch64-little apparently lacks support for BFD_RELOC_RVA. * peicode.h (pe_ILF_make_a_symbol_reloc): Don't segfault on NULL howto. --- diff --git a/bfd/peicode.h b/bfd/peicode.h index bbf44813a75..0346bc2174e 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -489,7 +489,7 @@ pe_ILF_make_a_symbol_reloc (pe_ILF_vars * vars, internal->r_vaddr = address; internal->r_symndx = sym_index; - internal->r_type = entry->howto->type; + internal->r_type = entry->howto ? entry->howto->type : 0; vars->relcount ++;