]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Don't report symbol lookup failure in first phase of linking
authorAlan Modra <amodra@gmail.com>
Mon, 27 Jan 2020 23:37:46 +0000 (10:07 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 29 Jan 2020 00:45:16 +0000 (11:15 +1030)
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)

ld/ChangeLog
ld/ldexp.c

index 25878f9234a04a07b52dc8e42aef47d838a44f12..bcafc947a88c26cbe61687af799297cd78257a0c 100644 (file)
@@ -1,6 +1,10 @@
 2020-01-29  Alan Modra  <amodra@gmail.com>
 
        Apply from master
+       2020-01-28  Alan Modra  <amodra@gmail.com>
+       * ldexp.c (fold_name): Don't print bfd_link_hash_lookup failed
+       in first phase.
+
        2020-01-27  H.J. Lu  <hongjiu.lu@intel.com>
                    Alan Modra  <amodra@gmail.com>
        PR ld/25458
index 1fda65d714836f12a8b2351d0c5162ca554d631a..6d1457b929abd027d413b882cf058e874178ffe2 100644 (file)
@@ -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)
            {