gold: --export-dynamic-symbol: don't imply -u
authorFangrui Song <maskray@google.com>
Fri, 3 Sep 2021 02:07:53 +0000 (19:07 -0700)
committerFangrui Song <maskray@google.com>
Fri, 3 Sep 2021 02:07:53 +0000 (19:07 -0700)
to match GNU ld.

gold/
* archive.cc (Library_base::should_include_member): Don't handle
--export-dynamic-symbol.
* symtab.cc (Symbol_table::do_add_undefined_symbols_from_command_line):
Likewise.

gold/archive.cc
gold/symtab.cc

index 0de9717afbe9d8c49d40d10955286d9731cf3eeb..ff426b2395e96ff081d61c1ac0780b3f75ea2209 100644 (file)
@@ -120,13 +120,6 @@ Library_base::should_include_member(Symbol_table* symtab, Layout* layout,
       return Library_base::SHOULD_INCLUDE_YES;
     }
 
-  if (parameters->options().is_export_dynamic_symbol(sym_name))
-    {
-      *why = "--export-dynamic-symbol ";
-      *why += sym_name;
-      return Library_base::SHOULD_INCLUDE_YES;
-    }
-
   if (layout->script_options()->is_referenced(sym_name))
     {
       size_t alc = 100 + strlen(sym_name);
index 3fa08045911c9972e92e4a45b391009696005d03..5a21ddc8cc2f560be109f755c3d2bf8a9ef9763c 100644 (file)
@@ -2475,12 +2475,6 @@ Symbol_table::do_add_undefined_symbols_from_command_line(Layout* layout)
        ++p)
     this->add_undefined_symbol_from_command_line<size>(p->c_str());
 
-  for (options::String_set::const_iterator p =
-        parameters->options().export_dynamic_symbol_begin();
-       p != parameters->options().export_dynamic_symbol_end();
-       ++p)
-    this->add_undefined_symbol_from_command_line<size>(p->c_str());
-
   for (Script_options::referenced_const_iterator p =
         layout->script_options()->referenced_begin();
        p != layout->script_options()->referenced_end();