versioning hacks, aliasing

Benjamin Kosnik bkoz@redhat.com
Tue Oct 8 22:08:00 GMT 2002


I'd like to clean up src/globals.cc. Mistakenly, these symbols are
being exported.

Ideally, what I'd like to do is transform this goo:

namespace std 
{
 // Standard "C" locale.
  typedef char fake_locale[sizeof(locale)]
  __attribute__ ((aligned(__alignof__(locale))));
  fake_locale c_locale
}

into even more complicated goo:

namespace __gnu_cxx
{
  using namespace std;
  
  // Standard "C" locale.
  typedef char fake_locale[sizeof(locale)]
  __attribute__ ((aligned(__alignof__(locale))));
  fake_locale c_locale __asm__(".symver _ZN9__gnu_cxx8c_localeE,_ZSt8c_locale@GLIBCPP_3.2");
}

Or, something like it that works. 

In a nutshell: take the symbol _ZSt8c_locale@GLIBCPP_3.2 and alias
_ZN9__gnu_cxx8c_localeE (non-exported) to it.

??

-benjamin



More information about the Libstdc++ mailing list