diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-07-27 11:59:03 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-07-28 06:01:10 -0700 |
commit | 265dcb69c2ec6e9f24f40cb25349534e44360098 (patch) | |
tree | 3629186dcb3347a435fbe9e31cf0bfcadde1ae2b /ld/ldfile.c | |
parent | 96a7037cd8573cf065aa6b12baca68696f96d9ca (diff) | |
download | binutils-gdb-265dcb69c2ec6e9f24f40cb25349534e44360098.tar.gz |
ld: Report error reason when a library cannot be found
With "ulimit -n 20", report:
ld: cannot find -lgcc: Too many open files
instead of
ld: cannot find -lgcc
* ldfile.c (ldfile_open_file): Rport error reason when a library
cannot be found.
Diffstat (limited to 'ld/ldfile.c')
-rw-r--r-- | ld/ldfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ld/ldfile.c b/ld/ldfile.c index 9d0af06f1f6..43b1116b1d5 100644 --- a/ld/ldfile.c +++ b/ld/ldfile.c @@ -491,11 +491,11 @@ ldfile_open_file (lang_input_statement_type *entry) } else /* We ignore the return status of the script and always print the error message. */ - einfo (_("%P: cannot find %s\n"), entry->local_sym_name); + einfo (_("%P: cannot find %s: %E\n"), entry->local_sym_name); } #endif else - einfo (_("%P: cannot find %s\n"), entry->local_sym_name); + einfo (_("%P: cannot find %s: %E\n"), entry->local_sym_name); /* PR 25747: Be kind to users who forgot to add the "lib" prefix to their library when it was created. */ |