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.
This commit is contained in:
Kris Van Hees 2008-08-28 14:51:04 +00:00
parent 1ca35711f4
commit d7ab2a4705
3 changed files with 14 additions and 0 deletions

View 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> 2008-08-20 Craig Silverstein <csilvers@google.com>
* fileread.cc (File_read::open): Do not lock the file unless it * fileread.cc (File_read::open): Do not lock the file unless it

View file

@ -764,6 +764,9 @@ General_options::finalize()
this->add_to_library_path_with_sysroot("/usr/lib"); 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 // Normalize library_path() by adding the sysroot to all directories
// in the path, as appropriate. // in the path, as appropriate.
this->add_sysroot(); this->add_sysroot();

View file

@ -174,6 +174,7 @@ Symbol::init_base_undefined(const char* name, const char* version,
elfcpp::STV visibility, unsigned char nonvis) elfcpp::STV visibility, unsigned char nonvis)
{ {
this->init_fields(name, version, type, binding, visibility, nonvis); this->init_fields(name, version, type, binding, visibility, nonvis);
this->dynsym_index_ = -1U;
this->source_ = IS_UNDEFINED; this->source_ = IS_UNDEFINED;
this->in_reg_ = true; this->in_reg_ = true;
} }