Switch to GPLv3
[deliverable/binutils-gdb.git] / gas / config / obj-ecoff.c
index 71aade070835f4e7195c51ec18eeec6109b6dea0..0c61ee30b99f2f62233cd5188cd6c1ab81f73a50 100644 (file)
@@ -1,6 +1,6 @@
 /* ECOFF object file format.
    Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
 /* ECOFF object file format.
    Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-   2005  Free Software Foundation, Inc.
+   2005, 2007  Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    This file was put together by Ian Lance Taylor <ian@cygnus.com>.
 
    Contributed by Cygnus Support.
    This file was put together by Ian Lance Taylor <ian@cygnus.com>.
 
@@ -8,7 +8,7 @@
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -18,8 +18,8 @@
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to the Free
 
    You should have received a copy of the GNU General Public License
    along with GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 #define OBJ_HEADER "obj-ecoff.h"
 #include "as.h"
 
 #define OBJ_HEADER "obj-ecoff.h"
 #include "as.h"
@@ -37,7 +37,7 @@ void
 ecoff_frob_file_before_fix (void)
 {
   bfd_vma addr;
 ecoff_frob_file_before_fix (void)
 {
   bfd_vma addr;
-  asection **sec;
+  asection *sec;
 
   /* Set the section VMA values.  We force the .sdata and .sbss
      sections to the end to ensure that their VMA addresses are close
 
   /* Set the section VMA values.  We force the .sdata and .sbss
      sections to the end to ensure that their VMA addresses are close
@@ -78,22 +78,21 @@ ecoff_frob_file_before_fix (void)
 
   addr = 0;
   for (i = 0; i < n_names; i++)
 
   addr = 0;
   for (i = 0; i < n_names; i++)
-    secs[i] = 0;
+    secs[i] = NULL;
 
 
-  for (sec = &stdoutput->sections; *sec !=  NULL;)
+  for (sec = stdoutput->sections; sec != NULL; sec = sec->next)
     {
       for (i = 0; i < n_names; i++)
     {
       for (i = 0; i < n_names; i++)
-       if (!strcmp ((*sec)->name, names[i]))
+       if (!strcmp (sec->name, names[i]))
          {
          {
-           secs[i] = *sec;
+           secs[i] = sec;
            bfd_section_list_remove (stdoutput, sec);
            break;
          }
       if (i == n_names)
        {
            bfd_section_list_remove (stdoutput, sec);
            break;
          }
       if (i == n_names)
        {
-         bfd_set_section_vma (stdoutput, *sec, addr);
-         addr += bfd_section_size (stdoutput, *sec);
-         sec = &(*sec)->next;
+         bfd_set_section_vma (stdoutput, sec, addr);
+         addr += bfd_section_size (stdoutput, sec);
        }
     }
   for (i = 0; i < n_names; i++)
        }
     }
   for (i = 0; i < n_names; i++)
@@ -104,7 +103,7 @@ ecoff_frob_file_before_fix (void)
       }
   for (i = n_names - 1; i >= 0; i--)
     if (secs[i])
       }
   for (i = n_names - 1; i >= 0; i--)
     if (secs[i])
-      bfd_section_list_insert (stdoutput, &stdoutput->sections, secs[i]);
+      bfd_section_list_prepend (stdoutput, secs[i]);
 
   /* Fill in the register masks.  */
   {
 
   /* Fill in the register masks.  */
   {
This page took 0.024181 seconds and 4 git commands to generate.