2001-08-09 H.J. Lu <hjl@gnu.org>
[deliverable/binutils-gdb.git] / bfd / ecoff.c
index 2237441e610338b1b61f06567a3f71ff6bf1dcb7..86a12228e7febf5a3f538e3a33e05ed032b37c52 100644 (file)
@@ -74,12 +74,14 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
 
 static asection bfd_debug_section =
 {
-  /* name,   id,  index, next, flags, user_set_vma, reloc_done,    */ 
-  "*DEBUG*", 0,   0,     NULL, 0,     0,            0,        
-  /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size,   */ 
-     0,           0,       0,            0,   0,   0,
-  /* _raw_size, output_offset, output_section, alignment_power,    */
-     0,         0,             NULL,           0,
+  /* 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,       */
@@ -369,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;
@@ -420,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.025675 seconds and 4 git commands to generate.