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-Tag: binutils-2_34~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fbcb30f2c1b26cd972abed8d9cd8a6a2de4c5cc4;p=thirdparty%2Fbinutils-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. (cherry picked from commit 738174e17e539937a6d773d7dfd501241a882b0b) --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 25878f9234a..bcafc947a88 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,6 +1,10 @@ 2020-01-29 Alan Modra Apply from master + 2020-01-28 Alan Modra + * ldexp.c (fold_name): Don't print bfd_link_hash_lookup failed + in first phase. + 2020-01-27 H.J. Lu Alan Modra PR ld/25458 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) {