public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595
@ 2020-08-25 13:33 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2020-08-25 13:33 UTC (permalink / raw)
  To: binutils

	PR 26505
	* elf32-xstormy16.c (xstormy16_elf_relax_section): Check
	is_elf_hash_table before accessing elf fields.

diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index b0644f17bd..3bd147bc35 100644
--- a/bfd/elf32-xstormy16.c
+++ b/bfd/elf32-xstormy16.c
@@ -588,7 +588,8 @@ xstormy16_elf_relax_section (bfd *dynobj,
   /* Assume nothing changes.  */
   *again = FALSE;
 
-  if (bfd_link_relocatable (info))
+  if (bfd_link_relocatable (info)
+      || !is_elf_hash_table (info->hash))
     return TRUE;
 
   /* We only relax the .plt section at the moment.  */

-- 
Alan Modra
Australia Development Lab, IBM

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

only message in thread, other threads:[~2020-08-25 13:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-25 13:33 PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595 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).