+// Define the base version of a shared library. The base version definition
+// must be the first entry in defs_. We insert it lazily so that defs_ is
+// empty if no symbol versioning is used. Then layout can just drop the
+// version sections.
+
+void
+Versions::define_base_version(Stringpool* dynpool)
+{
+ // If we do any versioning at all, we always need a base version, so
+ // define that first. Nothing explicitly declares itself as part of base,
+ // so it doesn't need to be in version_table_.
+ gold_assert(this->defs_.empty());
+ const char* name = parameters->options().soname();
+ if (name == NULL)
+ name = parameters->options().output_file_name();
+ name = dynpool->add(name, false, NULL);
+ Verdef* vdbase = new Verdef(name, std::vector<std::string>(),
+ true, false, true);
+ this->defs_.push_back(vdbase);
+ this->needs_base_version_ = false;
+}
+