public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* pe_ILF_make_a_symbol_reloc segfault
@ 2022-02-16 11:33 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2022-02-16 11:33 UTC (permalink / raw)
  To: binutils

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 ++;
 

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-16 11:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 11:33 pe_ILF_make_a_symbol_reloc segfault Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).