[cxx-abi-dev] Typo in ABI document
Mark Mitchell
mark at codesourcery.com
Fri Apr 12 07:50:12 UTC 2002
> This is correct as it stands, though it may be confusing. I'll explain
> more carefully what I meant in case that's the only problem. The "value"
> of a linker symbol is the same thing as the address of a variable with
> that name. The first requirement is simply that the linker associate a
> symbol (named __dso_handle) with some address in the object's data space.
> It therefore appears to C code that there is a variable named
> __dso_handle at the selected address, though there isn't any relevant
> data at that address. When calling __cxa_finalize, we need to pass the
> address associated with __dso_handle, not the data at that address.
> We accomplish that by passing &__dso_handle. The value of the resulting
> pointer parameter is what __cxa_finalize needs -- it doesn't need to
> dereference the pointer, as there's no data of interest at that address.
>
> Does that help?
Sort of. :-)
It makes sense -- it's just something that we got subtly wrongish in
G++. I don't believe a conforming implementation can actually tell
the different at the DSO level, but you can at the .o level.
I'll try to get this fixed in G++ 3.1.
--
Mark Mitchell mark at codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the cxx-abi-dev
mailing list