X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Fsymtab.h;h=1a1f1c78633b76d05224f5d6ec6878b931a8d8a7;hb=55c144e691ec05a7b8231b5c58dc6d6659a1c4eb;hp=aa0cb68c1deb3c3e68699551a68e8fd043bf244d;hpb=b90efa5b79ac1524ec260f8eb89d1be37e0219a7;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/symtab.h b/gold/symtab.h index aa0cb68c1d..1a1f1c7863 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -140,6 +140,11 @@ class Symbol set_is_default() { this->is_def_ = true; } + // Set that this version is not the default for this symbol name. + void + set_is_not_default() + { this->is_def_ = false; } + // Return the symbol's name as name@version (or name@@version). std::string versioned_name() const; @@ -526,7 +531,8 @@ class Symbol { return (this->is_undefined() && (this->binding() == elfcpp::STB_WEAK - || this->is_undef_binding_weak())); + || this->is_undef_binding_weak() + || parameters->options().weak_unresolved_symbols())); } // Return whether this is a strong undefined symbol. @@ -535,7 +541,8 @@ class Symbol { return (this->is_undefined() && this->binding() != elfcpp::STB_WEAK - && !this->is_undef_binding_weak()); + && !this->is_undef_binding_weak() + && !parameters->options().weak_unresolved_symbols()); } // Return whether this is an absolute symbol. @@ -555,8 +562,6 @@ class Symbol { if (this->source_ != FROM_OBJECT) return false; - if (this->type_ == elfcpp::STT_COMMON) - return true; bool is_ordinary; unsigned int shndx = this->shndx(&is_ordinary); return !is_ordinary && Symbol::is_common_shndx(shndx); @@ -604,10 +609,8 @@ class Symbol if (parameters->options().in_dynamic_list(this->name())) return true; - // If the user used -Bsymbolic or provided a --dynamic-list script, - // then nothing (else) is preemptible. - if (parameters->options().Bsymbolic() - || parameters->options().have_dynamic_list()) + // If the user used -Bsymbolic, then nothing (else) is preemptible. + if (parameters->options().Bsymbolic()) return false; // If the user used -Bsymbolic-functions, then functions are not @@ -1372,7 +1375,7 @@ class Symbol_table // Returns true if ICF determined that this is a duplicate section. bool - is_section_folded(Object* obj, unsigned int shndx) const; + is_section_folded(Relobj* obj, unsigned int shndx) const; void set_gc(Garbage_collection* gc) @@ -1708,7 +1711,8 @@ class Symbol_table const elfcpp::Sym& sym, unsigned int st_shndx, bool is_ordinary, unsigned int orig_st_shndx, - Object*, const char* version); + Object*, const char* version, + bool is_default_version); template void @@ -1727,7 +1731,7 @@ class Symbol_table // resolve.cc. static bool should_override(const Symbol*, unsigned int, elfcpp::STT, Defined, - Object*, bool*, bool*); + Object*, bool*, bool*, bool); // Report a problem in symbol resolution. static void