Mon Nov 10 14:32:40 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
authorIan Lance Taylor <ian@airs.com>
Mon, 10 Nov 1997 19:33:59 +0000 (19:33 +0000)
committerIan Lance Taylor <ian@airs.com>
Mon, 10 Nov 1997 19:33:59 +0000 (19:33 +0000)
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
a version dependency could not be found.

bfd/ChangeLog
bfd/elflink.h

index 99660776da8773b37abbd7abe8a364de8211d13e..b542937361443f10ef5d7afe2b6dde3c2b047c4f 100644 (file)
@@ -1,3 +1,8 @@
+Mon Nov 10 14:32:40 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't crash if
+       a version dependency could not be found.
+
 Tue Nov  4 12:05:56 1997  Klaus K"ampf  <kkaempf@progis.de>
 
        * configure.com: Get version info from configure.in
index 97bb4b935a486ba1d9a0be4e72036fa816fb8355..711372d88cdbd0e79531a7ec82d6e31ac95fb0f7 100644 (file)
@@ -2542,7 +2542,14 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
 
              for (n = t->deps; n != NULL; n = n->next)
                {
-                 defaux.vda_name = n->version_needed->name_indx;
+                 if (n->version_needed == NULL)
+                   {
+                     /* This can happen if there was an error in the
+                        version script.  */
+                     defaux.vda_name = 0;
+                   }
+                 else
+                   defaux.vda_name = n->version_needed->name_indx;
                  if (n->next == NULL)
                    defaux.vda_next = 0;
                  else