mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 23:23:09 +00:00
PR27631, ubsan: elf32-metag.c:1550:10
PR 27631 * elf32-metag.c (elf_metag_relocate_section): Don't use &hh->elf when hh might be NULL, test for NULL first.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
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>
|
2021-04-14 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 27630
|
PR 27630
|
||||||
|
|||||||
@@ -1546,8 +1546,8 @@ elf_metag_relocate_section (bfd *output_bfd,
|
|||||||
if ((bfd_link_pic (info)
|
if ((bfd_link_pic (info)
|
||||||
&& r_symndx != STN_UNDEF
|
&& r_symndx != STN_UNDEF
|
||||||
&& (input_section->flags & SEC_ALLOC) != 0
|
&& (input_section->flags & SEC_ALLOC) != 0
|
||||||
&& (r_type != R_METAG_RELBRANCH
|
&& !(r_type == R_METAG_RELBRANCH
|
||||||
|| !SYMBOL_CALLS_LOCAL (info, &hh->eh)))
|
&& (hh == NULL || SYMBOL_CALLS_LOCAL (info, &hh->eh))))
|
||||||
|| (!bfd_link_pic (info)
|
|| (!bfd_link_pic (info)
|
||||||
&& hh != NULL
|
&& hh != NULL
|
||||||
&& hh->eh.dynindx != -1
|
&& hh->eh.dynindx != -1
|
||||||
|
|||||||
Reference in New Issue
Block a user