aboutsummaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-01-28 10:07:46 +1030
committerAlan Modra <amodra@gmail.com>2020-01-28 12:11:27 +1030
commit738174e17e539937a6d773d7dfd501241a882b0b (patch)
treefe4527fb2c28af7cf7766c03d602a46759ca8a6d /ld/ldexp.c
parentaeb87a633cc7a3070e563229e9411503e412318a (diff)
downloadbinutils-738174e17e539937a6d773d7dfd501241a882b0b.zip
binutils-738174e17e539937a6d773d7dfd501241a882b0b.tar.gz
binutils-738174e17e539937a6d773d7dfd501241a882b0b.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.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 1fda65d..6d1457b 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)
{