summaryrefslogtreecommitdiff
path: root/binutils/size.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-08-06 15:49:46 +0000
committerNick Clifton <nickc@redhat.com>2006-08-06 15:49:46 +0000
commit20d035da4feecb3b4861519aca94dcad58aa6be2 (patch)
tree52e98b790146a93f23770821dc9c7a0ad5760ef2 /binutils/size.c
parentbe4c253ca201b04fad9aa151c71fd6a649bdc43b (diff)
downloadbinutils-redhat-20d035da4feecb3b4861519aca94dcad58aa6be2.tar.gz
PR binutils/3001
* addr2line.c (process_file): Change function from void to returning an int. Return 0 upon success, 1 otherwise. (main): Use return value from process_file as the exit value. * ar.c (ranlib_only): Change function from void to returning an int. Return 0 upon success, 1 otherwise. (ranlib_touch): Likewise. (main): Use return value from ranlib functions as exit value. * objcopy.c (add_specific_symbol): Set status to 1 if get_file_size fails. (copy_file): Likewise. (strip_main): Likewise. (copy_main): Likewise. * objdump.c (display_file): Set exit_status to 1 if get_file_size fails. * size.c (display_file): Set return_code to 1 if get_file_size fails.
Diffstat (limited to 'binutils/size.c')
-rw-r--r--binutils/size.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/binutils/size.c b/binutils/size.c
index b78cba02ba..36a9af90c1 100644
--- a/binutils/size.c
+++ b/binutils/size.c
@@ -1,6 +1,6 @@
/* size.c -- report size of various sections of an executable file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -346,7 +346,10 @@ display_file (char *filename)
bfd *file;
if (get_file_size (filename) < 1)
- return;
+ {
+ return_code = 1;
+ return;
+ }
file = bfd_openr (filename, target);
if (file == NULL)