aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
committerIan Lance Taylor <iant@google.com>2007-11-22 00:05:51 +0000
commitc79126688f8211ab17a893c5e80b09811d424fc1 (patch)
tree23a727f6718dc203a4e3b9ef1575e8a10b6f0d80 /gold/symtab.cc
parent06d063c072d0e247751535bc5e394aa7b8be3b0f (diff)
downloadgdb-c79126688f8211ab17a893c5e80b09811d424fc1.zip
gdb-c79126688f8211ab17a893c5e80b09811d424fc1.tar.gz
gdb-c79126688f8211ab17a893c5e80b09811d424fc1.tar.bz2
Add threading support.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc33
1 files changed, 33 insertions, 0 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index f0c09f9..b2901ab 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -159,6 +159,17 @@ Symbol::init_base(const char* name, elfcpp::STT type,
this->in_reg_ = true;
}
+// Allocate a common symbol in the base.
+
+void
+Symbol::allocate_base_common(Output_data* od)
+{
+ gold_assert(this->is_common());
+ this->source_ = IN_OUTPUT_DATA;
+ this->u_.in_output_data.output_data = od;
+ this->u_.in_output_data.offset_is_from_end = false;
+}
+
// Initialize the fields in Sized_symbol for SYM in OBJECT.
template<int size>
@@ -219,6 +230,16 @@ Sized_symbol<size>::init(const char* name, Value_type value, Size_type symsize,
this->symsize_ = symsize;
}
+// Allocate a common symbol.
+
+template<int size>
+void
+Sized_symbol<size>::allocate_common(Output_data* od, Value_type value)
+{
+ this->allocate_base_common(od);
+ this->value_ = value;
+}
+
// Return true if this symbol should be added to the dynamic symbol
// table.
@@ -2017,6 +2038,18 @@ Warnings::issue_warning(const Symbol* sym,
// script to restrict this to only the ones needed for implemented
// targets.
+#if defined(HAVE_TARGET_32_LITTLE) || defined(HAVE_TARGET_32_BIG)
+template
+void
+Sized_symbol<32>::allocate_common(Output_data*, Value_type);
+#endif
+
+#if defined(HAVE_TARGET_64_LITTLE) || defined(HAVE_TARGET_64_BIG)
+template
+void
+Sized_symbol<64>::allocate_common(Output_data*, Value_type);
+#endif
+
#ifdef HAVE_TARGET_32_LITTLE
template
void