public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Shaun Jackman <sjackman@gmail.com>
Cc: binutils@sources.redhat.com
Subject: Re: objcopy fails silently with an empty input file
Date: Wed, 13 Apr 2005 16:08:00 -0000	[thread overview]
Message-ID: <425D43A3.3090706@redhat.com> (raw)
In-Reply-To: <7f45d939050412163547d2cfe9@mail.gmail.com>

Hi Shaun,

> objcopy silently fails when the input file is empty. I'd rather it
> didn't fail -- this used to work in previous versions -- but it
> definitely shouldn't fail silently.

Please could you try the attached patch and let me know if you have any 
problems with it ?

Cheers
   Nick

binutils/ChangeLog
2005-04-13  Nick Clifton  <nickc@redhat.com>

	* objcopy.c (copy_file): Emit a message when skipping an empty
	input file.

Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.77
diff -c -3 -p -r1.77 objcopy.c
*** binutils/objcopy.c	15 Mar 2005 17:45:18 -0000	1.77
--- binutils/objcopy.c	13 Apr 2005 16:06:23 -0000
*************** copy_file (const char *input_filename, c
*** 1701,1706 ****
--- 1701,1707 ----

     if (get_file_size (input_filename) < 1)
       {
+       non_fatal (_("%s: empty input file"), input_filename);
         status = 1;
         return;
       }

  reply	other threads:[~2005-04-13 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-12 23:35 Shaun Jackman
2005-04-13 16:08 ` Nick Clifton [this message]
2005-04-13 17:21   ` Shaun Jackman
2005-04-14  9:54     ` Nick Clifton
2005-04-14 15:25       ` Shaun Jackman
2005-04-15  9:13         ` Nick Clifton
2005-04-15 16:01           ` Shaun Jackman
2005-04-15 16:27             ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=425D43A3.3090706@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=sjackman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).