This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: objdump infinite loop on v850 object file
- From: Alan Modra <amodra at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Lee Moore <moore at imperas dot com>, binutils at sourceware dot org
- Date: Wed, 6 Oct 2010 09:18:06 +1030
- Subject: Re: objdump infinite loop on v850 object file
- References: <4ca9bbac.cbb1e30a.4ea2.ffffb10d@mx.google.com> <20101005053325.GJ16376@bubble.grove.modra.org> <m21v84ec7l.fsf@igel.home>
On Tue, Oct 05, 2010 at 08:17:18PM +0200, Andreas Schwab wrote:
> Wouldn't that clobber errno if the error is bfd_error_system_call?
Thanks Andreas. A good thing someone is awake around here. :-)
* bucomm.c (bfd_nonfatal, bfd_nonfatal_message): Don't clobber errno.
Index: binutils/bucomm.c
===================================================================
RCS file: /cvs/src/src/binutils/bucomm.c,v
retrieving revision 1.40
diff -u -p -r1.40 bucomm.c
--- binutils/bucomm.c 5 Oct 2010 05:48:10 -0000 1.40
+++ binutils/bucomm.c 5 Oct 2010 22:46:21 -0000
@@ -54,8 +54,8 @@ bfd_nonfatal (const char *string)
{
const char *errmsg;
- fflush (stdout);
errmsg = bfd_errmsg (bfd_get_error ());
+ fflush (stdout);
if (string)
fprintf (stderr, "%s: %s: %s\n", program_name, string, errmsg);
else
@@ -84,8 +84,8 @@ bfd_nonfatal_message (const char *filena
const char *section_name;
va_list args;
- fflush (stdout);
errmsg = bfd_errmsg (bfd_get_error ());
+ fflush (stdout);
section_name = NULL;
va_start (args, format);
fprintf (stderr, "%s", program_name);
--
Alan Modra
Australia Development Lab, IBM