It's OK to have a version if we have an existing symbol.
authorIan Lance Taylor <iant@google.com>
Sat, 22 Sep 2007 20:08:16 +0000 (20:08 +0000)
committerIan Lance Taylor <iant@google.com>
Sat, 22 Sep 2007 20:08:16 +0000 (20:08 +0000)
gold/symtab.cc

index a6e79585a19714e16ff6376f546f27d3df59dabc..09a3b0eb9ed48ae851bad1855e9a61a26739fb0a 100644 (file)
@@ -835,7 +835,7 @@ Symbol_table::do_define_in_output_data(
   if (sym == NULL)
     return NULL;
 
-  gold_assert(version == NULL);
+  gold_assert(version == NULL || oldsym != NULL);
   sym->init(name, od, value, symsize, type, binding, visibility, nonvis,
            offset_is_from_end);
 
@@ -918,7 +918,7 @@ Symbol_table::do_define_in_output_segment(
   if (sym == NULL)
     return NULL;
 
-  gold_assert(version == NULL);
+  gold_assert(version == NULL || oldsym != NULL);
   sym->init(name, os, value, symsize, type, binding, visibility, nonvis,
            offset_base);
 
@@ -995,7 +995,7 @@ Symbol_table::do_define_as_constant(
   if (sym == NULL)
     return NULL;
 
-  gold_assert(version == NULL);
+  gold_assert(version == NULL || oldsym != NULL);
   sym->init(name, value, symsize, type, binding, visibility, nonvis);
 
   if (oldsym != NULL