From: Kris Van Hees Date: Thu, 28 Aug 2008 14:51:04 +0000 (+0000) Subject: 2008-08-28 Kris Van Hees X-Git-Tag: binutils-2_19-branchpoint~76 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7ab2a4705e7ca4df87807aaa6c89810ae559034;p=external%2Fbinutils.git 2008-08-28 Kris Van Hees 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 4c14658..de0f01b 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,13 @@ +2008-08-28 Kris Van Hees + + 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 * fileread.cc (File_read::open): Do not lock the file unless it diff --git a/gold/options.cc b/gold/options.cc index 9b0cebf..78f0b1a 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -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(); diff --git a/gold/symtab.cc b/gold/symtab.cc index c8a5037..37f7d35 100644 --- a/gold/symtab.cc +++ b/gold/symtab.cc @@ -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; }