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]
Other format: [Raw text]

Re: New AIX libstdc++ testsuite regression20_util/allocator_members


>>>>> "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


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