[K42-discussion] Cause of cxa_atexit/dso_handle reference
Donour Sizemore
donour at cs.unm.edu
Fri Aug 25 03:11:58 EST 2006
Bryan S Rosenburg wrote:
>
> I'm sorry for not being more responsive. As Orran said, we're really
> busy working toward an internal milestone for the next few weeks.
>
> I'm still in favor of avoiding global objects on general principles, but
> not if it involves solving too many case-by-case problems. I think the
> particular DeletedObject case can be solved with a dynamic allocation
> using the "primitive" memory allocator. I've attached a patch below.
> The patch compiles, but I haven't tested it, and I certainly haven't
> verified that it avoids the cxa_atexit requirement.
>
> If there are too many cases, or if there are cases that can't be easily
> resolved, I'd fall back on providing a cxa_atexit() that doesn't do
> anything. There's really no point in recording the cleanup functions
> when there's no code that will ever call them.
>
> Here's the patch for dynamically allocating theDeletedObj:
>
I just tried this patch, but gcc still emits the __cxa_atexit symbol. I
have a solution that adds the aforementioned empty atexit function,
along with the necessary changes to makefiles. I'll post it shortly.
donour
More information about the K42-discussion
mailing list