2012-08-21 Cary Coutant <ccoutant@google.com>
authorCary Coutant <ccoutant@google.com>
Tue, 21 Aug 2012 21:41:04 +0000 (21:41 +0000)
committerCary Coutant <ccoutant@google.com>
Tue, 21 Aug 2012 21:41:04 +0000 (21:41 +0000)
gold/
* symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert
if --export-dynamic-symbol names an undef symbol.

gold/ChangeLog
gold/symtab.cc

index 86a688979a3500da44b0db6ae1cc42f7cc50fed6..e79f4e446101eeceab7c83569b11e781033aa951 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-21  Cary Coutant  <ccoutant@google.com>
+
+       * symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert
+       if --export-dynamic-symbol names an undef symbol.
+
 2012-08-18  Alan Modra  <amodra@gmail.com>
 
        * powerpc.cc: Formatting and white space.
index fd81e8bd00664791f136fac2a6671105e1f0167d..e97f64225411abef1838f2426e06f6c4942b4bfd 100644 (file)
@@ -595,8 +595,10 @@ Symbol_table::gc_mark_undef_symbols(Layout* layout)
     {
       const char* name = p->c_str();
       Symbol* sym = this->lookup(name);
-      gold_assert(sym != NULL);
-      if (sym->source() == Symbol::FROM_OBJECT 
+      // It's not an error if a symbol named by --export-dynamic-symbol
+      // is undefined.
+      if (sym != NULL
+         && sym->source() == Symbol::FROM_OBJECT 
           && !sym->object()->is_dynamic())
         {
           Relobj* obj = static_cast<Relobj*>(sym->object());