diff options
author | Alan Modra <amodra@gmail.com> | 2020-01-28 10:07:46 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-01-29 11:15:16 +1030 |
commit | fbcb30f2c1b26cd972abed8d9cd8a6a2de4c5cc4 (patch) | |
tree | b016974580de8e135564ab1316f90fef328e1c44 | |
parent | 7b647b69680015f240b20e6f38d824d71d4bd30d (diff) | |
download | fsf-binutils-gdb-fbcb30f2c1b26cd972abed8d9cd8a6a2de4c5cc4.zip fsf-binutils-gdb-fbcb30f2c1b26cd972abed8d9cd8a6a2de4c5cc4.tar.gz fsf-binutils-gdb-fbcb30f2c1b26cd972abed8d9cd8a6a2de4c5cc4.tar.bz2 |
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)
-rw-r--r-- | ld/ChangeLog | 4 | ||||
-rw-r--r-- | ld/ldexp.c | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 25878f9..bcafc94 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -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 @@ -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) { |