From 8b14b0cb997af3207865b342137007b406259786 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 15 Feb 2022 22:30:09 +1030 Subject: [PATCH] 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. --- bfd/peicode.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ++; -- 2.30.2