[ Date Prev][ Date Next][ Thread Prev][ Thread Next][ Date Index][ Thread Index]
dso_handle elimination
- To: cxx-abi-dev@xxxxxxxxxxxxxxxx
- Subject: dso_handle elimination
- From: Mark Mitchell <mark@xxxxxxxxxxxxxxxx>
- Date: 09 Jun 2003 08:42:34 -0700
I checked in the attached patch to correct the problem Scott Douglas
found, namely that the ABI referenced the type "dso_handle" which was
never defined.
If there are any objections, please let me know.
--
Mark Mitchell
CodeSourcery, LLC
mark@xxxxxxxxxxxxxxxx
Index: abi.html
===================================================================
RCS file: /usr/local/Repository/cxx-abi/abi.html,v
retrieving revision 1.66
diff -c -5 -p -r1.66 abi.html
*** abi.html 18 May 2003 21:31:17 -0000 1.66
--- abi.html 9 Jun 2003 15:36:25 -0000
*************** All references are via the API described
*** 3585,3595 ****
<p>
After constructing a global (or local static) object,
that will require destruction on exit,
a termination function is <i>registered</i> as follows:
<center><code>
! extern "C" int __cxa_atexit ( void (*f)(void *), void *p, dso_handle d );
</code></center>
This registration, e.g. <code>__cxa_atexit(f,p,d)</code>,
is intended to cause the call <code>f(p)</code> when DSO <code>d</code> is unloaded,
before all such termination calls registered before this one.
It returns zero if registration is successful, nonzero on failure.
--- 3585,3595 ----
<p>
After constructing a global (or local static) object,
that will require destruction on exit,
a termination function is <i>registered</i> as follows:
<center><code>
! extern "C" int __cxa_atexit ( void (*f)(void *), void *p, void *d );
</code></center>
This registration, e.g. <code>__cxa_atexit(f,p,d)</code>,
is intended to cause the call <code>f(p)</code> when DSO <code>d</code> is unloaded,
before all such termination calls registered before this one.
It returns zero if registration is successful, nonzero on failure.
*************** with a value which is an address in one
*** 3622,3632 ****
(It does not matter what address,
as long as they are different in different DSOs.)
It should also include a call to the following function in the FINI
list (to be executed first):
<center><code>
! extern "C" void __cxa_finalize ( dso_handle d );
</code></center>
The parameter passed should be <code>&__dso_handle</code>.
<p>
Note that the above can be accomplished either by explicitly providing
--- 3622,3632 ----
(It does not matter what address,
as long as they are different in different DSOs.)
It should also include a call to the following function in the FINI
list (to be executed first):
<center><code>
! extern "C" void __cxa_finalize ( void *d );
</code></center>
The parameter passed should be <code>&__dso_handle</code>.
<p>
Note that the above can be accomplished either by explicitly providing
*************** unwind table location.
*** 4899,4908 ****
--- 4899,4912 ----
<p> <hr> <p>
<a name=revisions>
<h2> Appendix R: Revision History </h2>
<p> <hr> <p>
+
+ <p>
+ <font color=blue>[030609]</font>
+ Use <code>void*<code> instead of <code>dso_handle</code>.
<p>
<font color=blue>[030518]</font>
Specify behavior of <code>__cxa_vec_new2</code> and
<code>__cxa_vec_new3</code> when the deallocation function throws an
|