diff options
author | Alan Modra <amodra@gmail.com> | 2021-08-26 12:19:35 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-08-28 10:19:09 +0930 |
commit | b05929a20efa7caa40415d2f069e44f7e76615e4 (patch) | |
tree | ca29fd90b809f01f35db26b67bf89cb480f1f391 /bfd | |
parent | bfc25dcdad7ffb134c218c17ee819a9e715567b4 (diff) | |
download | gdb-b05929a20efa7caa40415d2f069e44f7e76615e4.zip gdb-b05929a20efa7caa40415d2f069e44f7e76615e4.tar.gz gdb-b05929a20efa7caa40415d2f069e44f7e76615e4.tar.bz2 |
PR28264, ld.bfd crash on linking efivar with LTO
PR 28264
PR 26978
* linker.c (_bfd_generic_link_add_one_symbol <MIND>): Check
that string is non-NULL.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/linker.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index 755ff19..f8257ea 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -1682,7 +1682,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, cycle = true; break; } - if (strcmp (h->u.i.link->root.string, string) == 0) + if (string != NULL && strcmp (h->u.i.link->root.string, string) == 0) break; /* Fall through. */ case MDEF: |