* section.c (_bfd_strip_section_from_output): Handle NULL
authorHans-Peter Nilsson <hp@axis.com>
Sat, 2 Jun 2001 19:05:34 +0000 (19:05 +0000)
committerHans-Peter Nilsson <hp@axis.com>
Sat, 2 Jun 2001 19:05:34 +0000 (19:05 +0000)
output_section.

bfd/ChangeLog
bfd/section.c

index 9818471c680efad5b8a1f02be6b7af6320af34d3..bbaa444f0727101a343ce14f7d4ca7eb23512ff8 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-02  Hans-Peter Nilsson  <hp@axis.com>
+
+       * section.c (_bfd_strip_section_from_output): Handle NULL
+       output_section.
+
 2001-06-02  H.J. Lu  <hjl@gnu.org>
 
        * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
index ad9046285e60d54daa5dcb5a210a419b2996dea8..78ab0cb48306293e0ad128ecbed1408047d28e36 100644 (file)
@@ -1224,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)