This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GOLD] Do not generate .gnu.version* if no symbol versioning is used.
2009/10/16 Ian Lance Taylor <iant@google.com>:
>> @@ -1422,6 +1435,9 @@ Versions::add_def(const Symbol* sym, con
>> ? ? ? gold_error(_("symbol %s has undefined version %s"),
>> ? ? ? ? ? ? ? ? ?sym->demangled_name().c_str(), version);
>>
>> + ? ? ?// We only insert a base version for shared library.
>> + ? ? ?gold_assert(!this->needs_base_version_);
>
> If using -shared, this will give an error and then an assertion. ?We
> should only give the error; the gold_assert should be in an else
> clause.
needs_base_version_ is initialized in the constructor:
Versions::Versions(const Version_script_info& version_script,
Stringpool* dynpool)
: defs_(), needs_(), version_table_(),
is_finalized_(false), version_script_(version_script),
needs_base_version_(parameters->options().shared())
Something is seriously wrong if -shared is given and the assertion
triggers. Anyway, I will modify the code as suggested.
-Doug