From: Cary Coutant Date: Tue, 21 Aug 2012 21:41:04 +0000 (+0000) Subject: 2012-08-21 Cary Coutant X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d5dfe78f9e94c652e61cf3eb04d8baa9c198042;p=binutils-gdb.git 2012-08-21 Cary Coutant gold/ * symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert if --export-dynamic-symbol names an undef symbol. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 86a688979a3..e79f4e44610 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2012-08-21 Cary Coutant + + * symtab.cc (Symbol_table::gc_mark_undef_symbols): Don't assert + if --export-dynamic-symbol names an undef symbol. + 2012-08-18 Alan Modra * powerpc.cc: Formatting and white space. diff --git a/gold/symtab.cc b/gold/symtab.cc index fd81e8bd006..e97f6422541 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -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(sym->object());