From: Alan Modra Date: Tue, 25 Aug 2020 08:26:08 +0000 (+0930) Subject: PR26505, ASAN: xstormy16_elf_relax_section elf32-xstormy16.c:595 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ab8d928977f4d9f137f972d03e079555d0f29fa;p=binutils-gdb.git 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 --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 + + PR 26505 + * elf32-xstormy16.c (xstormy16_elf_relax_section): Check + is_elf_hash_table before accessing elf fields. + 2020-08-25 Alan Modra 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. */