2008-08-28 Kris Van Hees <kris.van.hees@oracle.com>
authorKris Van Hees <kris.van.hees@oracle.com>
Thu, 28 Aug 2008 14:51:04 +0000 (14:51 +0000)
committerKris Van Hees <kris.van.hees@oracle.com>
Thu, 28 Aug 2008 14:51:04 +0000 (14:51 +0000)
        PR gold/6858
        * options.cc (General_options::finalize): Allow undefined symbols
        in shlibs if linking -shared.

        PR gold/6859
        * symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined
        symbols as not needing a dynsym entry.

gold/ChangeLog
gold/options.cc
gold/symtab.cc

index 4c146581ebab781796d0d485144e325c5e276e54..de0f01b227650fbc96d92617b7fe1819bd020450 100644 (file)
@@ -1,3 +1,13 @@
+2008-08-28  Kris Van Hees  <kris.van.hees@oracle.com>
+
+       PR gold/6858
+       * options.cc (General_options::finalize): Allow undefined symbols
+       in shlibs if linking -shared.
+
+       PR gold/6859
+       * symtab.cc (Symbol::init_base_undefined): Mark explicitly undefined
+       symbols as not needing a dynsym entry.
+
 2008-08-20  Craig Silverstein  <csilvers@google.com>
 
        * fileread.cc (File_read::open): Do not lock the file unless it
index 9b0cebfadc72bc3e52587f27d051c89a12d3d9a0..78f0b1aa2baca818009d21ff0861ccae9efc2f97 100644 (file)
@@ -764,6 +764,9 @@ General_options::finalize()
       this->add_to_library_path_with_sysroot("/usr/lib");
     }
 
+  if (this->shared() && !this->user_set_allow_shlib_undefined())
+    this->set_allow_shlib_undefined(true);
+
   // Normalize library_path() by adding the sysroot to all directories
   // in the path, as appropriate.
   this->add_sysroot();
index c8a50373aea12bbbf5ca79a9e9fbc4b00209fc00..37f7d35f6680f1a737f8c80048c9e18e72b79324 100644 (file)
@@ -174,6 +174,7 @@ Symbol::init_base_undefined(const char* name, const char* version,
                            elfcpp::STV visibility, unsigned char nonvis)
 {
   this->init_fields(name, version, type, binding, visibility, nonvis);
+  this->dynsym_index_ = -1U;
   this->source_ = IS_UNDEFINED;
   this->in_reg_ = true;
 }