New AIX libstdc++ testsuite regression 20_util/allocator_members
Jason Merrill
jason@redhat.com
Tue Apr 23 13:52:00 GMT 2002
>>>>> "David" == David Edelsohn <dje@watson.ibm.com> writes:
>>>>> 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.
So the testcase happened to work. But it was already basically broken;
overridden new and delete override all uses, not just uses within the local
object. The right fix, it seems to me, is to always export everything from
the executable in C++.
> 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.
Well, that's annoying.
> 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.
It would be simpler to just export everything, wouldn't it?
Jason
More information about the Libstdc++
mailing list