diff options
author | Ian Lance Taylor <iant@google.com> | 2008-01-04 05:35:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-01-04 05:35:24 +0000 |
commit | fced7afdce32a299d799f52ebd92a92572c2f9f5 (patch) | |
tree | a516bc2854971865b63f828e7ec9be8e865be6f1 /gold/layout.cc | |
parent | 1bedcac52a2f05841dcdefcd1248ae3393274471 (diff) | |
download | gdb-fced7afdce32a299d799f52ebd92a92572c2f9f5.zip gdb-fced7afdce32a299d799f52ebd92a92572c2f9f5.tar.gz gdb-fced7afdce32a299d799f52ebd92a92572c2f9f5.tar.bz2 |
Add -h/-soname option.
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()) |