PowerPC64, correct grouping of stubs for ld.bfd
[deliverable/binutils-gdb.git] / bfd / bfdio.c
index 6f8a7c9b84d297c3b59d11a2443ae2ac7102e687..71991bd47eed3cbb1f08ea21eb3ab11b0d5d7ad3 100644 (file)
@@ -1,8 +1,6 @@
 /* Low-level I/O routines for BFDs.
 
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1990-2016 Free Software Foundation, Inc.
 
    Written by Cygnus Support.
 
@@ -87,10 +85,9 @@ FILE *
 real_fopen (const char *filename, const char *modes)
 {
 #ifdef VMS
-  char vms_modes[4];
   char *vms_attr;
 
-  /* On VMS, fopen allows file attributes as optionnal arguments.
+  /* On VMS, fopen allows file attributes as optional arguments.
      We need to use them but we'd better to use the common prototype.
      In fopen-vms.h, they are separated from the mode with a comma.
      Split here.  */
@@ -237,7 +234,8 @@ bfd_tell (bfd *abfd)
       bfd *parent_bfd = abfd;
       ptr = abfd->iovec->btell (abfd);
 
-      while (parent_bfd->my_archive != NULL)
+      while (parent_bfd->my_archive != NULL
+            && !bfd_is_thin_archive (parent_bfd->my_archive))
        {
          ptr -= parent_bfd->origin;
          parent_bfd = parent_bfd->my_archive;
@@ -292,7 +290,7 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
   if (direction == SEEK_CUR && position == 0)
     return 0;
 
-  if (abfd->format != bfd_archive && abfd->my_archive == 0)
+  if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive))
     {
       if (direction == SEEK_SET && (bfd_vma) position == abfd->where)
        return 0;
@@ -317,7 +315,8 @@ bfd_seek (bfd *abfd, file_ptr position, int direction)
     {
       bfd *parent_bfd = abfd;
 
-      while (parent_bfd->my_archive != NULL)
+      while (parent_bfd->my_archive != NULL
+            && !bfd_is_thin_archive (parent_bfd->my_archive))
         {
           file_position += parent_bfd->origin;
           parent_bfd = parent_bfd->my_archive;
@@ -587,7 +586,7 @@ memory_bclose (struct bfd *abfd)
   free (bim);
   abfd->iostream = NULL;
 
-  return TRUE;
+  return 0;
 }
 
 static int
This page took 0.024114 seconds and 4 git commands to generate.