PATCH to support __cxa_atexit and __cxa_finalize
Andreas Jaeger
aj@suse.de
Fri Dec 17 09:58:00 GMT 1999
>>>>> Mark Mitchell writes:
>>>>> "Andreas" == Andreas Jaeger <aj@suse.de> writes:
Mark> Thanks for your questions.
And thanks for your answers. Ulrich has the final word on it but I
propose to add your patch together with my appended patch for Versions
to glibc 2.1.3 and 2.2.
Andreas> Just for clarification: Is this only needed for IA64 or
Andreas> is it needed for all platforms? Should this go into
Mark> Yes, it is needed for all platforms. G++ will be using the IA64 C++
Mark> ABI (with appropriate processor-specific modifications) on all
Mark> platforms.
Ok, in that case your patch looks fine.
Andreas> glibc 2.1.3 or only in glibc 2.2?
Mark> I don't know. That's a decision for you to make, perhaps; I don't
Mark> really know much about the current libc development cycle. The next
Mark> major release of GCC (for which there is not yet a target date) will
Mark> use __cxa_atexit.
Since glibc might be long around, we should include it in the next release.
Andreas> Does __cxa_finalize and __cxa_atexit need to be declared
Andreas> with external scope? In that case you need to add it to
Andreas> the Versions file, e.g.
Andreas> GLIBC_2.1.3 { __cxa_atexit; __cxa_finalize; }
Mark> Thanks for the hint. What does "with external scope" mean? Is that
Mark> like external linkage, i.e., does it mean that user code ought to be
Mark> able to link to it? If so, yes these functions should be callable
Mark> from user code; g++ will insert the calls automatically.
That's what I meant. In glibc we can use symbol versioning to make
some kind of private global symbols. All symbols that user code might
need have to be exported explicitly.
Mark> Do you need a revised patch, or would you be willing to add that bit
Mark> yourself?
I'm adding the trivial patch below - Ulrich is the one how has to
apply it.
Andreas
1999-12-17 Andreas Jaeger <aj@suse.de>
* stdlib/Versions: Export __cxa_atexit and __cxa_finalize.
============================================================
Index: stdlib/Versions
--- stdlib/Versions 1999/02/07 12:40:47 1.2
+++ stdlib/Versions 1999/12/17 17:50:27
@@ -90,4 +90,8 @@
# i*
imaxabs; imaxdiv;
}
+ GLIBC_2.1.3 {
+ # used by new G++ ABI
+ __cxa_atexit; __cxa_finalize;
+ }
}
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
More information about the Libc-alpha
mailing list