2015-02-16 Cary Coutant <ccoutant@google.com>
+ PR gold/13577
+ PR gold/16992
+ * layout.cc (Layout::finish_dynamic_section): Don't set DT_SYMBOLIC or
+ DF_SYMBOLIC if --dynamic-list option is used.
+ * options.cc (General_options::finalize): --dynamic-list is not
+ mutually exclusive with -Bsymbolic.
+ * symtab.h (Symbol::is_preemptible): Don't exclude dynamic symbols not
+ listed in --dynamic-list.
+ * testsuite/Makefile.am (dynamic_list_lib2.so): Add
+ -Bsymbolic-functions.
+ * testsuite/Makefile.in: Regenerate.
+
+2015-02-16 Cary Coutant <ccoutant@google.com>
+
PR gold/17971
* incremental.cc: Remove redundant include of "output.h".
flags |= elfcpp::DF_STATIC_TLS;
if (parameters->options().origin())
flags |= elfcpp::DF_ORIGIN;
- if (parameters->options().Bsymbolic())
+ if (parameters->options().Bsymbolic()
+ && !parameters->options().have_dynamic_list())
{
flags |= elfcpp::DF_SYMBOLIC;
// Add DT_SYMBOLIC for compatibility with older loaders.
// in the path, as appropriate.
this->add_sysroot();
- // --dynamic-list overrides -Bsymbolic and -Bsymbolic-functions.
- if (this->have_dynamic_list())
- {
- this->set_Bsymbolic(false);
- this->set_Bsymbolic_functions(false);
- }
-
// Now that we've normalized the options, check for contradictory ones.
if (this->shared() && this->is_static())
gold_fatal(_("-shared and -static are incompatible"));
if (parameters->options().in_dynamic_list(this->name()))
return true;
- // If the user used -Bsymbolic or provided a --dynamic-list script,
- // then nothing (else) is preemptible.
- if (parameters->options().Bsymbolic()
- || parameters->options().have_dynamic_list())
+ // If the user used -Bsymbolic, then nothing (else) is preemptible.
+ if (parameters->options().Bsymbolic())
return false;
// If the user used -Bsymbolic-functions, then functions are not
$(CXXCOMPILE) -c -fpic -o $@ $<
dynamic_list_lib2.so: gcctestdir/ld dynamic_list_lib2.o $(srcdir)/dynamic_list_2.t
- $(CXXLINK) -Bgcctestdir/ -shared -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
+ $(CXXLINK) -Bgcctestdir/ -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
dynamic_list_lib2.o: dynamic_list_lib2.cc
$(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@dynamic_list_lib2.so: gcctestdir/ld dynamic_list_lib2.o $(srcdir)/dynamic_list_2.t
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,-Bsymbolic-functions -Wl,--dynamic-list,$(srcdir)/dynamic_list_2.t dynamic_list_lib2.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@dynamic_list_lib2.o: dynamic_list_lib2.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<