[binutils-gdb] PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595
Alan Modra
amodra@sourceware.org
Tue Aug 25 13:38:52 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1ab8d928977f4d9f137f972d03e079555d0f29fa
commit 1ab8d928977f4d9f137f972d03e079555d0f29fa
Author: Alan Modra <amodra@gmail.com>
Date: Tue Aug 25 17:56:08 2020 +0930
PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595
PR 26505
* elf32-xstormy16.c (xstormy16_elf_relax_section): Check
is_elf_hash_table before accessing elf fields.
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elf32-xstormy16.c | 3 ++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c3342ca0966..fbdef4e5c75 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-25 Alan Modra <amodra@gmail.com>
+
+ PR 26505
+ * elf32-xstormy16.c (xstormy16_elf_relax_section): Check
+ is_elf_hash_table before accessing elf fields.
+
2020-08-25 Alan Modra <amodra@gmail.com>
PR 26482
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index b0644f17bdd..3bd147bc358 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. */
More information about the Binutils-cvs
mailing list