aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-08-25 17:56:08 +0930
committerAlan Modra <amodra@gmail.com>2020-08-25 23:07:10 +0930
commit1ab8d928977f4d9f137f972d03e079555d0f29fa (patch)
treef7f061846c9d55d22a2d79205b218faac001cbcf /bfd
parent8640c87dcd4528e19dc060bfac801f9084fbf4e2 (diff)
downloadgdb-1ab8d928977f4d9f137f972d03e079555d0f29fa.zip
gdb-1ab8d928977f4d9f137f972d03e079555d0f29fa.tar.gz
gdb-1ab8d928977f4d9f137f972d03e079555d0f29fa.tar.bz2
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-xstormy16.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c3342ca..fbdef4e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
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
* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Ignore sections that
won't be output.
diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c
index b0644f1..3bd147b 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. */