This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: V3 static data in classes vs AIX


>>>>> Benjamin Kosnik writes:

Ben> There's got to be a way to rig the headers so that the library 
Ben> definitions are used.

	Without ".weak" there is no way to match the semantics of merging
the storage allocations because AIX shared libraries are bound locally.
G++ could emit the reference without the common storage (which is what my
manual change accoimplished), but that does not provide a common
definition if no other definition exists.  If the BSS storage is
allocated, there is no way to merge them across shared objects.

Ben> What are the exact symbols?

ld: 0711-224 WARNING: Duplicate symbol: std::_Format_cache<char>::_S_pword_ix
ld: 0711-224 WARNING: Duplicate symbol: std::_Format_cache<wchar_t>::_S_pword_ix
ld: 0711-224 WARNING: Duplicate symbol: std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_S_empty_rep_storage
ld: 0711-224 WARNING: Duplicate symbol: std::collate<char>::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::id
ld: 0711-224 WARNING: Duplicate symbol: std::numpunct<char>::id
ld: 0711-224 WARNING: Duplicate symbol: std::numpunct<wchar_t>::id
ld: 0711-224 WARNING: Duplicate symbol: std::string::_S_empty_rep_storage


	Those are just the ones referenced in the testcases.  All of the
variables declared static in V3/include/bits/*.h are problems, but the two
I listed in the first message

      static locale::id id;
      static int                _S_pword_ix; 

are the biggest problems.

Thanks, David


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]