* symbols.c: Add missing prototypes.
[deliverable/binutils-gdb.git] / bfd / section.c
index 9918b012628b469d455e20a011d1cbc946178b78..78ab0cb48306293e0ad128ecbed1408047d28e36 100644 (file)
@@ -1,6 +1,6 @@
 /* Object file "section" support for the BFD library.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000
+   2000, 2001
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -372,6 +372,10 @@ CODE_FRAGMENT
 .  {* A mark flag used by some of the linker backends.  *}
 .  unsigned int linker_mark : 1;
 .
+.  {* Another mark flag used by some of the linker backends.  Set for
+.     output sections that have a input section.  *}
+.  unsigned int linker_has_input : 1;
+.
 .  {* A mark flag used by some linker backends for garbage collection.  *}
 .  unsigned int gc_mark : 1;
 .
@@ -578,11 +582,14 @@ static const asymbol global_syms[] =
     /* name, id,  index, next, flags, user_set_vma, reloc_done,      */        \
     { NAME,  IDX, 0,     NULL, FLAGS, 0,            0,                 \
                                                                        \
-    /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size,   */        \
-       0,           1,       0,            0,   0,   0,                \
+    /* linker_mark, linker_has_input, gc_mark, segment_mark,         */        \
+       0,           0,                1,       0,                      \
+                                                                       \
+    /* vma, lma, _cooked_size, _raw_size,                            */        \
+       0,   0,   0,            0,                                      \
                                                                        \
-    /* _raw_size, output_offset, output_section,    alignment_power, */ \
-       0,         0,           (struct sec *) &SEC, 0,                 \
+    /* output_offset, output_section,      alignment_power,          */        \
+       0,             (struct sec *) &SEC, 0,                          \
                                                                        \
     /* relocation, orelocation, reloc_count, filepos, rel_filepos,   */        \
        NULL,       NULL,        0,           0,       0,               \
@@ -590,11 +597,11 @@ static const asymbol global_syms[] =
     /* line_filepos, userdata, contents, lineno, lineno_count,       */        \
        0,            NULL,     NULL,     NULL,   0,                    \
                                                                        \
-    /* comdat, kept_section, moving_line_filepos, target_index,      */        \
-       NULL,   NULL,         0,                   0,                   \
+    /* entsize, comdat, kept_section, moving_line_filepos,           */        \
+       0,       NULL,   NULL,         0,                               \
                                                                        \
-    /* used_by_bfd, constructor_chain, owner,                        */        \
-       NULL,        NULL,              NULL,                           \
+    /* target_index, used_by_bfd, constructor_chain, owner,          */        \
+       0,            NULL,        NULL,              NULL,             \
                                                                        \
     /* symbol,                                                       */        \
        (struct symbol_cache_entry *) &global_syms[IDX],                        \
@@ -1217,6 +1224,11 @@ _bfd_strip_section_from_output (info, s)
      orders have not yet been set up.  So why are we checking them? --
      Ian */
   os = s->output_section;
+
+  /* Handle a section that wasn't output.  */
+  if (os == NULL)
+    return;
+
   for (p = os->link_order_head, pp = NULL; p != NULL; pp = p, p = p->next)
     if (p->type == bfd_indirect_link_order
        && p->u.indirect.section == s)
This page took 0.024579 seconds and 4 git commands to generate.