oops - omitted from previous delta!
[deliverable/binutils-gdb.git] / bfd / ecoff.c
index f22112bd75bdd83c0942f0df8e98e2152524bbe1..86a12228e7febf5a3f538e3a33e05ed032b37c52 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic ECOFF (Extended-COFF) routines.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
    Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -74,20 +74,28 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
 
 static asection bfd_debug_section =
 {
-  /* name,   index, next, flags, set_vma, reloc_done, linker_mark, gc_mark */
-  "*DEBUG*", 0,     0,    0,     0,       0,          0,           0,
-  /* vma, lma, _cooked_size, _raw_size, output_offset, output_section, */
-  0,      0,   0,            0,         0,             NULL,
-  /* alig, reloc..., orel..., reloc_count, filepos, rel_..., line_... */
-  0,       0,        0,       0,           0,       0,            0,
-  /* userdata, contents, lineno, lineno_count */
-  0,           0,        0,      0,
-  /* comdat_info, moving_line_filepos, target_index, used_by_bfd,  */
-  NULL,           0,                   0,            0,
-  /* cons, owner, symbol */
-  0,       0,     (struct symbol_cache_entry *) NULL,
-  /* symbol_ptr_ptr,                   link_order_head, ..._tail */
-  (struct symbol_cache_entry **) NULL, NULL,            NULL
+  /* name,   id,  index, next, flags, user_set_vma, reloc_done,    */
+  "*DEBUG*", 0,   0,     NULL, 0,     0,            0,
+  /* linker_mark, linker_has_input, gc_mark, segment_mark,         */
+     0,           0,                0,       0,
+  /* vma, lma, _cooked_size, _raw_size,                            */ 
+     0,   0,   0,            0,
+  /* output_offset, output_section, alignment_power,               */
+     0,             NULL,           0,
+  /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */
+     NULL,       NULL,        0,           0,       0,
+  /* line_filepos, userdata, contents, lineno, lineno_count,       */
+     0,            NULL,     NULL,     NULL,   0,
+  /* entsize, comdat, kept_section, moving_line_filepos,           */
+     0,       NULL,   NULL,         0,
+  /* target_index, used_by_bfd, constructor_chain, owner,          */
+     0,            NULL,        NULL,              NULL,
+  /* symbol,                                                       */
+     (struct symbol_cache_entry *) NULL,
+  /* symbol_ptr_ptr,                                               */
+     (struct symbol_cache_entry **) NULL,
+  /* link_order_head, link_order_tail                              */
+     NULL,            NULL
 };
 
 /* Create an ECOFF object.  */
@@ -363,16 +371,17 @@ ecoff_sec_to_styp_flags (name, flags)
 
 /* Get the BFD flags to use for a section.  */
 
-flagword
-_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
+boolean
+_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
      bfd *abfd ATTRIBUTE_UNUSED;
      PTR hdr;
      const char *name ATTRIBUTE_UNUSED;
      asection *section ATTRIBUTE_UNUSED;
+     flagword * flags_ptr;
 {
   struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
   long styp_flags = internal_s->s_flags;
-  flagword sec_flags=0;
+  flagword sec_flags = 0;
 
   if (styp_flags & STYP_NOLOAD)
     sec_flags |= SEC_NEVER_LOAD;
@@ -414,29 +423,20 @@ _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
     }
   else if ((styp_flags & STYP_BSS)
           || (styp_flags & STYP_SBSS))
-    {
-      sec_flags |= SEC_ALLOC;
-    }
+    sec_flags |= SEC_ALLOC;
   else if ((styp_flags & STYP_INFO) || styp_flags == STYP_COMMENT)
-    {
-      sec_flags |= SEC_NEVER_LOAD;
-    }
+    sec_flags |= SEC_NEVER_LOAD;
   else if ((styp_flags & STYP_LITA)
           || (styp_flags & STYP_LIT8)
           || (styp_flags & STYP_LIT4))
-    {
-      sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_READONLY;
-    }
+    sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_READONLY;
   else if (styp_flags & STYP_ECOFF_LIB)
-    {
-      sec_flags |= SEC_COFF_SHARED_LIBRARY;
-    }
+    sec_flags |= SEC_COFF_SHARED_LIBRARY;
   else
-    {
-      sec_flags |= SEC_ALLOC | SEC_LOAD;
-    }
+    sec_flags |= SEC_ALLOC | SEC_LOAD;
 
-  return sec_flags;
+  * flags_ptr = sec_flags;
+  return true;
 }
 \f
 /* Read in the symbolic header for an ECOFF object file.  */
This page took 0.028143 seconds and 4 git commands to generate.