aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2011-07-22 22:38:42 +0000
committerSriraman Tallam <tmsriram@google.com>2011-07-22 22:38:42 +0000
commit804eb4807b7103135911ff0af4f7688d9458e4e0 (patch)
treeba7d562a55734c20a5cae3b32c141a6bdf251aeb /gold/symtab.cc
parentd474311490a5cf44059606c48c667a2e0f73732e (diff)
downloadgdb-804eb4807b7103135911ff0af4f7688d9458e4e0.zip
gdb-804eb4807b7103135911ff0af4f7688d9458e4e0.tar.gz
gdb-804eb4807b7103135911ff0af4f7688d9458e4e0.tar.bz2
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.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index 26d8032..e289f79 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -1238,15 +1238,15 @@ Symbol_table::add_from_relobj(
is_default_version, *psym, 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
// treat externally visible symbols as garbage.
if (parameters->options().gc_sections()
&& parameters->options().shared())
this->gc_mark_symbol_for_shlib(res);
- if (is_forced_local)
- this->force_local(res);
-
if (is_defined_in_discarded_section)
res->set_is_defined_in_discarded_section();