public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [committed, PATCH] Pass %E to einfo when bfd_section == NULL
@ 2016-05-05  2:45 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2016-05-05  2:45 UTC (permalink / raw)
  To: binutils

When ld runs out of memory, I get

output format XXX cannot represent section called

I checked in this patch to report BFD error.

H.J.
----
Report BFD error When bfd_section == NULL in init_os.

	* ldlang.c (init_os): Pass %E to einfo when bfd_section == NULL.
---
 ld/ChangeLog | 4 ++++
 ld/ldlang.c  | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 5fae3c0..f1a38c3 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2016-05-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* ldlang.c (init_os): Pass %E to einfo when bfd_section == NULL.
+
 2016-05-04  Maciej W. Rozycki  <macro@imgtec.com>
 
 	* testsuite/ld-unique/unique.d: New test.
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 96947da..1cbba39 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -2204,7 +2204,7 @@ init_os (lang_output_section_statement_type *s, flagword flags)
 							 s->name, flags);
   if (s->bfd_section == NULL)
     {
-      einfo (_("%P%F: output format %s cannot represent section called %s\n"),
+      einfo (_("%P%F: output format %s cannot represent section called %s: %E\n"),
 	     link_info.output_bfd->xvec->name, s->name);
     }
   s->bfd_section->output_section = s->bfd_section;
-- 
2.5.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-05  2:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05  2:45 [committed, PATCH] Pass %E to einfo when bfd_section == NULL H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).