diff options
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index eebb26c..75aecfe 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -1713,6 +1713,13 @@ Layout::finish_dynamic_section(const Input_objects* input_objects, odyn->add_string(elfcpp::DT_NEEDED, (*p)->soname()); } + if (parameters->output_is_shared()) + { + const char* soname = this->options_.soname(); + if (soname != NULL) + odyn->add_string(elfcpp::DT_SONAME, soname); + } + // FIXME: Support --init and --fini. Symbol* sym = symtab->lookup("_init"); if (sym != NULL && sym->is_defined() && !sym->is_from_dynobj()) |