From: Alan Modra Date: Mon, 27 Jan 2020 23:37:46 +0000 (+1030) Subject: Don't report symbol lookup failure in first phase of linking X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=738174e17e539937a6d773d7dfd501241a882b0b;p=binutils-gdb.git Don't report symbol lookup failure in first phase of linking Until the symbol table is created, symbols can't be created. * ldexp.c (fold_name): Don't print bfd_link_hash_lookup failed in first phase. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index fe87678b85d..7a1dc98bca1 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-01-28 Alan Modra + + * ldexp.c (fold_name): Don't print bfd_link_hash_lookup failed + in first phase. + 2020-01-27 Alan Modra * testsuite/ld-elfvers/vers.exp: Replace case statements with diff --git a/ld/ldexp.c b/ld/ldexp.c index 1fda65d7148..6d1457b929a 100644 --- a/ld/ldexp.c +++ b/ld/ldexp.c @@ -730,7 +730,10 @@ fold_name (etree_type *tree) tree->name.name, TRUE, FALSE, TRUE); if (!h) - einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n")); + { + if (expld.phase != lang_first_phase_enum) + einfo (_("%F%P: bfd_link_hash_lookup failed: %E\n")); + } else if (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak) {