Update FSF address
[external/binutils.git] / binutils / addr2line.c
index b5f5a0c..b4f48fc 100644 (file)
@@ -1,5 +1,5 @@
 /* addr2line.c -- convert addresses to line number and function name
-   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003
+   Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
    Free Software Foundation, Inc.
    Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
 
@@ -17,7 +17,7 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* Derived from objdump.c and nm.c by Ulrich.Lauther@mchp.siemens.de
 
@@ -29,6 +29,7 @@
    both forms write results to stdout, the second form reads addresses
    to be converted from stdin.  */
 
+#include "config.h"
 #include <string.h>
 
 #include "bfd.h"
@@ -137,7 +138,7 @@ find_address_in_section (bfd *abfd, asection *section,
   if (pc < vma)
     return;
 
-  size = bfd_get_section_size_before_reloc (section);
+  size = bfd_get_section_size (section);
   if (pc >= vma + size)
     return;
 
@@ -230,6 +231,9 @@ process_file (const char *file_name, const char *target)
   bfd *abfd;
   char **matching;
 
+  if (get_file_size (file_name) < 1)
+    return;
+
   abfd = bfd_openr (file_name, target);
   if (abfd == NULL)
     bfd_fatal (file_name);