diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf32-metag.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c3e5253..4d71522 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2021-04-14 Alan Modra <amodra@gmail.com> + PR 27631 + * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf + when hh might be NULL, test for NULL first. + +2021-04-14 Alan Modra <amodra@gmail.com> + PR 27630 * elf32-arm.c (elf32_arm_size_stubs): Don't use &hash->root when hash might be NULL, cast instead. diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 82e67ea..9847418 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -1546,8 +1546,8 @@ elf_metag_relocate_section (bfd *output_bfd, if ((bfd_link_pic (info) && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0 - && (r_type != R_METAG_RELBRANCH - || !SYMBOL_CALLS_LOCAL (info, &hh->eh))) + && !(r_type == R_METAG_RELBRANCH + && (hh == NULL || SYMBOL_CALLS_LOCAL (info, &hh->eh)))) || (!bfd_link_pic (info) && hh != NULL && hh->eh.dynindx != -1 |