2011-07-22 Sriraman Tallam <tmsriram@google.com>
* symtab.cc (Symbol_table::add_from_relobj): Mark symbol as referenced only after checking if it cannot be forced local. * symtab.h (is_externally_visible): Check if the symbol is not forced local.
This commit is contained in:
parent
d474311490
commit
804eb4807b
|
@ -1,3 +1,10 @@
|
||||||
|
2011-07-22 Sriraman Tallam <tmsriram@google.com>
|
||||||
|
|
||||||
|
* symtab.cc (Symbol_table::add_from_relobj): Mark symbol as referenced
|
||||||
|
only after checking if it cannot be forced local.
|
||||||
|
* symtab.h (is_externally_visible): Check if the symbol is not forced
|
||||||
|
local.
|
||||||
|
|
||||||
2011-07-15 Ian Lance Taylor <iant@google.com>
|
2011-07-15 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
* options.h (class General_options): Add --print-output-format.
|
* options.h (class General_options): Add --print-output-format.
|
||||||
|
|
|
@ -1238,15 +1238,15 @@ Symbol_table::add_from_relobj(
|
||||||
is_default_version, *psym, st_shndx,
|
is_default_version, *psym, st_shndx,
|
||||||
is_ordinary, orig_st_shndx);
|
is_ordinary, orig_st_shndx);
|
||||||
|
|
||||||
|
if (is_forced_local)
|
||||||
|
this->force_local(res);
|
||||||
|
|
||||||
// If building a shared library using garbage collection, do not
|
// If building a shared library using garbage collection, do not
|
||||||
// treat externally visible symbols as garbage.
|
// treat externally visible symbols as garbage.
|
||||||
if (parameters->options().gc_sections()
|
if (parameters->options().gc_sections()
|
||||||
&& parameters->options().shared())
|
&& parameters->options().shared())
|
||||||
this->gc_mark_symbol_for_shlib(res);
|
this->gc_mark_symbol_for_shlib(res);
|
||||||
|
|
||||||
if (is_forced_local)
|
|
||||||
this->force_local(res);
|
|
||||||
|
|
||||||
if (is_defined_in_discarded_section)
|
if (is_defined_in_discarded_section)
|
||||||
res->set_is_defined_in_discarded_section();
|
res->set_is_defined_in_discarded_section();
|
||||||
|
|
||||||
|
|
|
@ -538,8 +538,9 @@ class Symbol
|
||||||
bool
|
bool
|
||||||
is_externally_visible() const
|
is_externally_visible() const
|
||||||
{
|
{
|
||||||
return (this->visibility_ == elfcpp::STV_DEFAULT
|
return ((this->visibility_ == elfcpp::STV_DEFAULT
|
||||||
|| this->visibility_ == elfcpp::STV_PROTECTED);
|
|| this->visibility_ == elfcpp::STV_PROTECTED)
|
||||||
|
&& !this->is_forced_local_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if this symbol can be preempted by a definition in
|
// Return true if this symbol can be preempted by a definition in
|
||||||
|
|
Loading…
Reference in New Issue