// symtab.h -- the gold symbol table -*- C++ -*-
-// Copyright (C) 2006-2014 Free Software Foundation, Inc.
+// Copyright (C) 2006-2015 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
type() const
{ return this->type_; }
+ // Set the symbol type.
+ void
+ set_type(elfcpp::STT type)
+ { this->type_ = type; }
+
// Return true for function symbol.
bool
is_func() const
{
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.
{
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.
{
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);
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
// 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)