aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-26 12:19:35 +0930
committerAlan Modra <amodra@gmail.com>2021-08-28 10:19:09 +0930
commitb05929a20efa7caa40415d2f069e44f7e76615e4 (patch)
treeca29fd90b809f01f35db26b67bf89cb480f1f391 /bfd
parentbfc25dcdad7ffb134c218c17ee819a9e715567b4 (diff)
downloadgdb-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.c2
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: