parameter. Change all callers.
(Symbol::init_base_output_segment): Likewise.
(Symbol::init_base_constant): Likewise.
(Symbol::init_base_undefined): Likewise.
(Sized_symbol::init_output_data): Likewise.
(Sized_symbol::init_output_segment): Likewise.
(Sized_symbol::init_constant): Likewise.
(Sized_symbol::init_undefined): Likewise.
(Symbol_table::do_define_in_output_data): If the new symbol has a
version, mark it as the default.
(Symbol_table::do_define_in_output_segment): Likewise.
(Symbol_table::do_define_as_constant): Likewise.
* symtab.h (class Symbol): Update declarations.
(class Sized_symbol): Likewise.
* resolve.cc (Symbol::override_version): New function.
(Symbol::override_base: Call override_version.
(Symbol::override_base_with_special): Likewise.
* testsuite/ver_script_8.script: New file.
* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.
(ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define.
(ver_test_8_LDFLAGS, ver_test_8_LDADD): Define.
(ver_test_8_1.so, ver_test_8_2.so): New targets.
+2008-05-08 Ian Lance Taylor <iant@google.com>
+
+ * symtab.c (Symbol::init_base_output_data): Add version
+ parameter. Change all callers.
+ (Symbol::init_base_output_segment): Likewise.
+ (Symbol::init_base_constant): Likewise.
+ (Symbol::init_base_undefined): Likewise.
+ (Sized_symbol::init_output_data): Likewise.
+ (Sized_symbol::init_output_segment): Likewise.
+ (Sized_symbol::init_constant): Likewise.
+ (Sized_symbol::init_undefined): Likewise.
+ (Symbol_table::do_define_in_output_data): If the new symbol has a
+ version, mark it as the default.
+ (Symbol_table::do_define_in_output_segment): Likewise.
+ (Symbol_table::do_define_as_constant): Likewise.
+ * symtab.h (class Symbol): Update declarations.
+ (class Sized_symbol): Likewise.
+ * resolve.cc (Symbol::override_version): New function.
+ (Symbol::override_base: Call override_version.
+ (Symbol::override_base_with_special): Likewise.
+ * testsuite/ver_script_8.script: New file.
+ * testsuite/Makefile.am (check_PROGRAMS): Add ver_test_8.
+ (ver_test_8_SOURCES, ver_test_8_DEPENDENCIES): Define.
+ (ver_test_8_LDFLAGS, ver_test_8_LDADD): Define.
+ (ver_test_8_1.so, ver_test_8_2.so): New targets.
+
2008-05-06 Ian Lance Taylor <iant@google.com>
PR 6049
// Symbol methods used in this file.
+// This symbol is being overridden by another symbol whose version is
+// VERSION. Update the VERSION_ field accordingly.
+
+inline void
+Symbol::override_version(const char* version)
+{
+ if (version == NULL)
+ {
+ // This is the case where this symbol is NAME/VERSION, and the
+ // version was not marked as hidden. That makes it the default
+ // version, so we create NAME/NULL. Later we see another symbol
+ // NAME/NULL, and that symbol is overriding this one. In this
+ // case, since NAME/VERSION is the default, we make NAME/NULL
+ // override NAME/VERSION as well. They are already the same
+ // Symbol structure. Setting the VERSION_ field to NULL ensures
+ // that it will be output with the correct, empty, version.
+ this->version_ = version;
+ }
+ else
+ {
+ // This is the case where this symbol is NAME/VERSION_ONE, and
+ // now we see NAME/VERSION_TWO, and NAME/VERSION_TWO is
+ // overriding NAME. If VERSION_ONE and VERSION_TWO are
+ // different, then this can only happen when VERSION_ONE is NULL
+ // and VERSION_TWO is not hidden.
+ gold_assert(this->version_ == version || this->version_ == NULL);
+ this->version_ = version;
+ }
+}
+
// Override the fields in Symbol.
template<int size, bool big_endian>
{
gold_assert(this->source_ == FROM_OBJECT);
this->u_.from_object.object = object;
- if (version != NULL && this->version() != version)
- {
- gold_assert(this->version() == NULL);
- this->version_ = version;
- }
+ this->override_version(version);
this->u_.from_object.shndx = st_shndx;
this->is_ordinary_shndx_ = is_ordinary;
this->type_ = sym.get_st_type();
break;
}
- if (from->version_ != NULL && this->version_ != from->version_)
- {
- gold_assert(this->version_ == NULL);
- this->version_ = from->version_;
- }
-
+ this->override_version(from->version_);
this->type_ = from->type_;
this->binding_ = from->binding_;
this->visibility_ = from->visibility_;
// in an Output_data.
void
-Symbol::init_base_output_data(const char* name, Output_data* od,
- elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis,
- bool offset_is_from_end)
+Symbol::init_base_output_data(const char* name, const char* version,
+ Output_data* od, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis, bool offset_is_from_end)
{
- this->init_fields(name, NULL, type, binding, visibility, nonvis);
+ this->init_fields(name, version, type, binding, visibility, nonvis);
this->u_.in_output_data.output_data = od;
this->u_.in_output_data.offset_is_from_end = offset_is_from_end;
this->source_ = IN_OUTPUT_DATA;
// in an Output_segment.
void
-Symbol::init_base_output_segment(const char* name, Output_segment* os,
- elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis,
+Symbol::init_base_output_segment(const char* name, const char* version,
+ Output_segment* os, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis,
Segment_offset_base offset_base)
{
- this->init_fields(name, NULL, type, binding, visibility, nonvis);
+ this->init_fields(name, version, type, binding, visibility, nonvis);
this->u_.in_output_segment.output_segment = os;
this->u_.in_output_segment.offset_base = offset_base;
this->source_ = IN_OUTPUT_SEGMENT;
// as a constant.
void
-Symbol::init_base_constant(const char* name, elfcpp::STT type,
- elfcpp::STB binding, elfcpp::STV visibility,
- unsigned char nonvis)
+Symbol::init_base_constant(const char* name, const char* version,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis)
{
- this->init_fields(name, NULL, type, binding, visibility, nonvis);
+ this->init_fields(name, version, type, binding, visibility, nonvis);
this->source_ = IS_CONSTANT;
this->in_reg_ = true;
}
// symbol.
void
-Symbol::init_base_undefined(const char* name, elfcpp::STT type,
- elfcpp::STB binding, elfcpp::STV visibility,
- unsigned char nonvis)
+Symbol::init_base_undefined(const char* name, const char* version,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis)
{
- this->init_fields(name, NULL, type, binding, visibility, nonvis);
+ this->init_fields(name, version, type, binding, visibility, nonvis);
this->source_ = IS_UNDEFINED;
this->in_reg_ = true;
}
template<int size>
void
-Sized_symbol<size>::init_output_data(const char* name, Output_data* od,
- Value_type value, Size_type symsize,
- elfcpp::STT type, elfcpp::STB binding,
+Sized_symbol<size>::init_output_data(const char* name, const char* version,
+ Output_data* od, Value_type value,
+ Size_type symsize, elfcpp::STT type,
+ elfcpp::STB binding,
elfcpp::STV visibility,
unsigned char nonvis,
bool offset_is_from_end)
{
- this->init_base_output_data(name, od, type, binding, visibility, nonvis,
- offset_is_from_end);
+ this->init_base_output_data(name, version, od, type, binding, visibility,
+ nonvis, offset_is_from_end);
this->value_ = value;
this->symsize_ = symsize;
}
template<int size>
void
-Sized_symbol<size>::init_output_segment(const char* name, Output_segment* os,
- Value_type value, Size_type symsize,
- elfcpp::STT type, elfcpp::STB binding,
+Sized_symbol<size>::init_output_segment(const char* name, const char* version,
+ Output_segment* os, Value_type value,
+ Size_type symsize, elfcpp::STT type,
+ elfcpp::STB binding,
elfcpp::STV visibility,
unsigned char nonvis,
Segment_offset_base offset_base)
{
- this->init_base_output_segment(name, os, type, binding, visibility, nonvis,
- offset_base);
+ this->init_base_output_segment(name, version, os, type, binding, visibility,
+ nonvis, offset_base);
this->value_ = value;
this->symsize_ = symsize;
}
template<int size>
void
-Sized_symbol<size>::init_constant(const char* name, Value_type value,
- Size_type symsize, elfcpp::STT type,
- elfcpp::STB binding, elfcpp::STV visibility,
- unsigned char nonvis)
+Sized_symbol<size>::init_constant(const char* name, const char* version,
+ Value_type value, Size_type symsize,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis)
{
- this->init_base_constant(name, type, binding, visibility, nonvis);
+ this->init_base_constant(name, version, type, binding, visibility, nonvis);
this->value_ = value;
this->symsize_ = symsize;
}
template<int size>
void
-Sized_symbol<size>::init_undefined(const char* name, elfcpp::STT type,
- elfcpp::STB binding, elfcpp::STV visibility,
- unsigned char nonvis)
+Sized_symbol<size>::init_undefined(const char* name, const char* version,
+ elfcpp::STT type, elfcpp::STB binding,
+ elfcpp::STV visibility, unsigned char nonvis)
{
- this->init_base_undefined(name, type, binding, visibility, nonvis);
+ this->init_base_undefined(name, version, type, binding, visibility, nonvis);
this->value_ = 0;
this->symsize_ = 0;
}
if (sym == NULL)
return NULL;
- gold_assert(version == NULL || oldsym != NULL);
- sym->init_output_data(name, od, value, symsize, type, binding, visibility,
- nonvis, offset_is_from_end);
+ sym->init_output_data(name, version, od, value, symsize, type, binding,
+ visibility, nonvis, offset_is_from_end);
if (oldsym == NULL)
{
if (binding == elfcpp::STB_LOCAL
|| this->version_script_.symbol_is_local(name))
this->force_local(sym);
+ else if (version != NULL)
+ sym->set_is_default();
return sym;
}
if (sym == NULL)
return NULL;
- gold_assert(version == NULL || oldsym != NULL);
- sym->init_output_segment(name, os, value, symsize, type, binding,
+ sym->init_output_segment(name, version, os, value, symsize, type, binding,
visibility, nonvis, offset_base);
if (oldsym == NULL)
if (binding == elfcpp::STB_LOCAL
|| this->version_script_.symbol_is_local(name))
this->force_local(sym);
+ else if (version != NULL)
+ sym->set_is_default();
return sym;
}
if (sym == NULL)
return NULL;
- gold_assert(version == NULL || version == name || oldsym != NULL);
- sym->init_constant(name, value, symsize, type, binding, visibility, nonvis);
+ sym->init_constant(name, version, value, symsize, type, binding, visibility,
+ nonvis);
if (oldsym == NULL)
{
&& (binding == elfcpp::STB_LOCAL
|| this->version_script_.symbol_is_local(name)))
this->force_local(sym);
+ else if (version != NULL
+ && (name != version || value != 0))
+ sym->set_is_default();
return sym;
}
gold_assert(oldsym == NULL);
- sym->init_undefined(name, elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
+ sym->init_undefined(name, version, elfcpp::STT_NOTYPE, elfcpp::STB_GLOBAL,
elfcpp::STV_DEFAULT, 0);
++this->saw_undefined_;
}
// Initialize fields for an Output_data.
void
- init_base_output_data(const char* name, Output_data*, elfcpp::STT,
- elfcpp::STB, elfcpp::STV, unsigned char nonvis,
- bool offset_is_from_end);
+ init_base_output_data(const char* name, const char* version, Output_data*,
+ elfcpp::STT, elfcpp::STB, elfcpp::STV,
+ unsigned char nonvis, bool offset_is_from_end);
// Initialize fields for an Output_segment.
void
- init_base_output_segment(const char* name, Output_segment* os,
- elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis,
+ init_base_output_segment(const char* name, const char* version,
+ Output_segment* os, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis,
Segment_offset_base offset_base);
// Initialize fields for a constant.
void
- init_base_constant(const char* name, elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis);
+ init_base_constant(const char* name, const char* version, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
// Initialize fields for an undefined symbol.
void
- init_base_undefined(const char* name, elfcpp::STT type, elfcpp::STB binding,
- elfcpp::STV visibility, unsigned char nonvis);
+ init_base_undefined(const char* name, const char* version, elfcpp::STT type,
+ elfcpp::STB binding, elfcpp::STV visibility,
+ unsigned char nonvis);
// Override existing symbol.
template<int size, bool big_endian>
void
override_base_with_special(const Symbol* from);
+ // Override symbol version.
+ void
+ override_version(const char* version);
+
// Allocate a common symbol by giving it a location in the output
// file.
void
// Initialize fields for an Output_data.
void
- init_output_data(const char* name, Output_data*, Value_type value,
- Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis, bool offset_is_from_end);
+ init_output_data(const char* name, const char* version, Output_data*,
+ Value_type value, Size_type symsize, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis,
+ bool offset_is_from_end);
// Initialize fields for an Output_segment.
void
- init_output_segment(const char* name, Output_segment*, Value_type value,
- Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis, Segment_offset_base offset_base);
+ init_output_segment(const char* name, const char* version, Output_segment*,
+ Value_type value, Size_type symsize, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis,
+ Segment_offset_base offset_base);
// Initialize fields for a constant.
void
- init_constant(const char* name, Value_type value, Size_type symsize,
- elfcpp::STT, elfcpp::STB, elfcpp::STV, unsigned char nonvis);
+ init_constant(const char* name, const char* version, Value_type value,
+ Size_type symsize, elfcpp::STT, elfcpp::STB, elfcpp::STV,
+ unsigned char nonvis);
// Initialize fields for an undefined symbol.
void
- init_undefined(const char* name, elfcpp::STT, elfcpp::STB, elfcpp::STV,
- unsigned char nonvis);
+ init_undefined(const char* name, const char* version, elfcpp::STT,
+ elfcpp::STB, elfcpp::STV, unsigned char nonvis);
// Override existing symbol.
template<bool big_endian>
ver_test_7.syms: ver_test_7.so
$(TEST_READELF) -s $< >$@ 2>/dev/null
+check_PROGRAMS += ver_test_8
+ver_test_8_SOURCES = two_file_test_main.cc
+ver_test_8_DEPENDENCIES = gcctestdir/ld ver_test_8_1.so ver_test_8_2.so
+ver_test_8_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+ver_test_8_LDADD = ver_test_8_1.so ver_test_8_2.so
+ver_test_8_1.so: two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so
+ver_test_8_2.so: two_file_test_2_pic.o $(srcdir)/ver_test_8.script gcctestdir/ld
+ $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_8.script two_file_test_2_pic.o
+
check_PROGRAMS += protected_1
protected_1_SOURCES = \
protected_main_1.cc protected_main_2.cc protected_main_3.cc
# Test symbol versioning.
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__append_19 = ver_test ver_test_2 \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 protected_1 \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2 script_test_1 \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_2 justsyms \
-@GCC_TRUE@@NATIVE_LINKER_TRUE@ binary_test script_test_3
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6 ver_test_8 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1 protected_2 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1 script_test_2 \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ justsyms binary_test \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_3
@GCC_FALSE@script_test_1_DEPENDENCIES = libgoldtest.a ../libgold.a \
@GCC_FALSE@ ../../libiberty/libiberty.a $(am__DEPENDENCIES_1) \
@GCC_FALSE@ $(am__DEPENDENCIES_1)
@GCC_TRUE@@NATIVE_LINKER_TRUE@am__EXEEXT_15 = ver_test$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6$(EXEEXT) \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_8$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_2$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ script_test_1$(EXEEXT) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_6_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ ver_test_6.$(OBJEXT)
ver_test_6_OBJECTS = $(am_ver_test_6_OBJECTS)
+am__ver_test_8_SOURCES_DIST = two_file_test_main.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@am_ver_test_8_OBJECTS = \
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ two_file_test_main.$(OBJEXT)
+ver_test_8_OBJECTS = $(am_ver_test_8_OBJECTS)
am__weak_alias_test_SOURCES_DIST = weak_alias_test_main.cc
@GCC_TRUE@@NATIVE_LINKER_TRUE@am_weak_alias_test_OBJECTS = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ weak_alias_test_main.$(OBJEXT)
$(two_file_static_test_SOURCES) two_file_strip_test.c \
$(two_file_test_SOURCES) $(ver_test_SOURCES) \
$(ver_test_2_SOURCES) $(ver_test_6_SOURCES) \
- $(weak_alias_test_SOURCES) $(weak_test_SOURCES) \
- $(weak_undef_nonpic_test_SOURCES) $(weak_undef_test_SOURCES)
+ $(ver_test_8_SOURCES) $(weak_alias_test_SOURCES) \
+ $(weak_test_SOURCES) $(weak_undef_nonpic_test_SOURCES) \
+ $(weak_undef_test_SOURCES)
DIST_SOURCES = $(libgoldtest_a_SOURCES) basic_pic_test.c \
basic_static_pic_test.c basic_static_test.c basic_test.c \
$(am__binary_test_SOURCES_DIST) $(binary_unittest_SOURCES) \
$(am__two_file_static_test_SOURCES_DIST) two_file_strip_test.c \
$(am__two_file_test_SOURCES_DIST) $(am__ver_test_SOURCES_DIST) \
$(am__ver_test_2_SOURCES_DIST) $(am__ver_test_6_SOURCES_DIST) \
+ $(am__ver_test_8_SOURCES_DIST) \
$(am__weak_alias_test_SOURCES_DIST) \
$(am__weak_test_SOURCES_DIST) \
$(am__weak_undef_nonpic_test_SOURCES_DIST) \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_6_DEPENDENCIES = gcctestdir/ld ver_test_2.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_6_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_6_LDADD = ver_test_2.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_SOURCES = two_file_test_main.cc
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_DEPENDENCIES = gcctestdir/ld ver_test_8_1.so ver_test_8_2.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_LDADD = ver_test_8_1.so ver_test_8_2.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1_SOURCES = \
@GCC_TRUE@@NATIVE_LINKER_TRUE@ protected_main_1.cc protected_main_2.cc protected_main_3.cc
ver_test_6$(EXEEXT): $(ver_test_6_OBJECTS) $(ver_test_6_DEPENDENCIES)
@rm -f ver_test_6$(EXEEXT)
$(LINK) $(ver_test_6_LDFLAGS) $(ver_test_6_OBJECTS) $(ver_test_6_LDADD) $(LIBS)
+ver_test_8$(EXEEXT): $(ver_test_8_OBJECTS) $(ver_test_8_DEPENDENCIES)
+ @rm -f ver_test_8$(EXEEXT)
+ $(CXXLINK) $(ver_test_8_LDFLAGS) $(ver_test_8_OBJECTS) $(ver_test_8_LDADD) $(LIBS)
weak_alias_test$(EXEEXT): $(weak_alias_test_OBJECTS) $(weak_alias_test_DEPENDENCIES)
@rm -f weak_alias_test$(EXEEXT)
$(CXXLINK) $(weak_alias_test_LDFLAGS) $(weak_alias_test_OBJECTS) $(weak_alias_test_LDADD) $(LIBS)
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXCOMPILE) -c -fpic -o $@ $<
@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_7.syms: ver_test_7.so
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(TEST_READELF) -s $< >$@ 2>/dev/null
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_1.so: two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so gcctestdir/ld
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ver_test_8_2.so: two_file_test_2_pic.o $(srcdir)/ver_test_8.script gcctestdir/ld
+@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_8.script two_file_test_2_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@protected_1.so: gcctestdir/ld protected_1_pic.o protected_2_pic.o protected_3_pic.o
@GCC_TRUE@@NATIVE_LINKER_TRUE@ $(CXXLINK) -Bgcctestdir/ -shared protected_1_pic.o protected_2_pic.o protected_3_pic.o
--- /dev/null
+## ver_test_8.script -- a test case for gold
+
+## Copyright 2008 Free Software Foundation, Inc.
+## Written by Ian Lance Taylor <iant@google.com>
+
+## This file is part of gold.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3 of the License, or
+## (at your option) any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+## MA 02110-1301, USA.
+
+VER_TEST_8 {
+ global:
+ *;
+};