This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: New AIX libstdc++ testsuite regression 20_util/allocator_members
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: bkoz at redhat dot com
- Cc: Mark Mitchell <mark at codesourcery dot com>, libstdc++ at gcc dot gnu dot org
- Date: Mon, 22 Apr 2002 20:32:49 -0400
- Subject: Re: New AIX libstdc++ testsuite regression 20_util/allocator_members
>>>>> Benjamin Kosnik writes:
>> So, I suggest just #ifdef'ing this on whether or not we're on AIX, if
>> that fixes the problem. It's really an AIX-specific issue -- more
>> than, say, a support-for-weak-symbols issue -- in that it's got to do
>> with how the names are bound in the linker and such.
Ben> Gaaaaah. Please don't. I'd rather add AIX hacks to the testsuite, not
Ben> the library.
The issue is that this is not just a testsuite problem. We are
avoiding generating the duplicate code in the application, but the
existence of the code in the application is exactly what allows the alloc
code to find the local, overriden definitions of new and delete.
Because the C++ ABI mangles the names to have a leading
underscore, the AIX -bexpall linker option (which explicitly avoids
symbols with leading underscores) does not work. There is no simple AIX
linker option to export these functions.
The only thing I can think of if hacking up collect2 so that it
explicitly exports the mangled new and delete if it sees those symbol
names in the main application. But this just becomes an ever-increasing
list of useful mangled names to possibly export.
Thanks, David