aboutsummaryrefslogtreecommitdiff
path: root/gold/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/object.h')
-rw-r--r--gold/object.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/object.h b/gold/object.h
index eb3271e..7c27b7b 100644
--- a/gold/object.h
+++ b/gold/object.h
@@ -85,12 +85,16 @@ class Object
is_locked() const
{ return this->input_file_->file().is_locked(); }
+#ifdef HAVE_MEMBER_TEMPLATE_SPECIFICATIONS
// Return the sized target structure associated with this object.
// This is like the target method but it returns a pointer of
// appropriate checked type.
template<int size, bool big_endian>
Sized_target<size, big_endian>*
sized_target();
+#else
+ virtual Target* sized_target() = 0;
+#endif
// Read the symbol and relocation information.
Read_symbols_data
@@ -198,6 +202,8 @@ class Object
std::vector<Map_to_output> map_to_output_;
};
+#ifdef HAVE_MEMBER_TEMPLATE_SPECIFICATIONS
+
// Implement sized_target inline for efficiency. This approach breaks
// static type checking, but is made safe using asserts.
@@ -210,6 +216,8 @@ Object::sized_target()
return static_cast<Sized_target<size, big_endian>*>(this->target_);
}
+#endif
+
// A regular object file. This is size and endian specific.
template<int size, bool big_endian>