2009-06-27 H.J. Lu <hongjiu.lu@intel.com>
[deliverable/binutils-gdb.git] / binutils / objcopy.c
index 83d9e1b2aace81bc1e76e13bd601339f6b388baf..8908b564e1311e6266274fea5db0dd9588fd68ef 100644 (file)
@@ -2159,9 +2159,13 @@ copy_file (const char *input_filename, const char *output_filename,
   bfd *ibfd;
   char **obj_matching;
   char **core_matching;
+  off_t size = get_file_size (input_filename);
 
-  if (get_file_size (input_filename) < 1)
+  if (size < 1)
     {
+      if (size == 0)
+       non_fatal (_("error: the input file '%s' is empty"),
+                  input_filename);
       status = 1;
       return;
     }
This page took 0.026826 seconds and 4 git commands to generate.