Re: __cxa_thread_atexit

2017-12-05 Thread Mark Kettenis
cc picks up our implementation. __cxa_thread_atexit becomes a weak > > alias such that static linking succeeds. I rebuilt the gcc 4.9 port > > with this diff and verified that it does indeed run the new code. > > Per our discussion on the trail to the Lower Elk lake overl

Re: __cxa_thread_atexit

2017-12-04 Thread Philip Guenther
On Mon, 4 Dec 2017, Mark Kettenis wrote: > The ld.so bits have been committed last week. So here is a new version > of the diff. This version exports __cxa_thread_atexit_impl such that > gcc picks up our implementation. __cxa_thread_atexit becomes a weak > alias such that st

__cxa_thread_atexit

2017-12-04 Thread Mark Kettenis
The ld.so bits have been committed last week. So here is a new version of the diff. This version exports __cxa_thread_atexit_impl such that gcc picks up our implementation. __cxa_thread_atexit becomes a weak alias such that static linking succeeds. I rebuilt the gcc 4.9 port with this diff and

Re: Implement __cxa_thread_atexit

2017-11-22 Thread Joerg Sonnenberger
k Kettenis wrote: > > > > Here is an update diff that implements __cxa_thread_atexit which is > > > > emitted by clang (and modern gcc) to implement certain aspects of > > > > C++11 thread_local. > > > > > > Note that without

Re: Implement __cxa_thread_atexit

2017-11-20 Thread Mark Kettenis
> Date: Sun, 19 Nov 2017 23:13:05 +0100 > From: Joerg Sonnenberger > > On Sun, Nov 19, 2017 at 11:05:31PM +0100, Joerg Sonnenberger wrote: > > On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > > > Here is an update diff that implements __cxa_thread_atexi

Re: Implement __cxa_thread_atexit

2017-11-19 Thread Joerg Sonnenberger
On Sun, Nov 19, 2017 at 11:05:31PM +0100, Joerg Sonnenberger wrote: > On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > > Here is an update diff that implements __cxa_thread_atexit which is > > emitted by clang (and modern gcc) to implement certain aspects of > &g

Re: Implement __cxa_thread_atexit

2017-11-19 Thread Joerg Sonnenberger
On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > Here is an update diff that implements __cxa_thread_atexit which is > emitted by clang (and modern gcc) to implement certain aspects of > C++11 thread_local. Note that without providing __cxa_thread_atexit, gcc will not

Implement __cxa_thread_atexit

2017-11-19 Thread Mark Kettenis
Here is an update diff that implements __cxa_thread_atexit which is emitted by clang (and modern gcc) to implement certain aspects of C++11 thread_local. Compared to the previous function this now also prevents unloading of shared libraries that call __cxa_thread_atexit. As before uou'll ne

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Joerg Sonnenberger
On Fri, Aug 11, 2017 at 04:31:44PM +0200, Mark Kettenis wrote: > The diff below implements __cxa_thread_atexit(). Calls to this > function are emitted by the compiler to schedule running desctructors > for thread_local objects when a thread terminates or calls exit(3). > The Linux im

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
On Fri, 11 Aug 2017, Todd C. Miller wrote: > On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > > > I've chosen to implement __cxa_thread_atexit() directly instead of > > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > > don't need

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Todd C. Miller
On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > I've chosen to implement __cxa_thread_atexit() directly instead of > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > don't need to make changes to libc++ for this to start working. It > loo

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
On Fri, 11 Aug 2017, Mark Kettenis wrote: > The diff below implements __cxa_thread_atexit(). Calls to this function > are emitted by the compiler to schedule running desctructors for > thread_local objects when a thread terminates or calls exit(3). The > Linux implementation preven

Implement __cxa_thread_atexit

2017-08-11 Thread Mark Kettenis
The diff below implements __cxa_thread_atexit(). Calls to this function are emitted by the compiler to schedule running desctructors for thread_local objects when a thread terminates or calls exit(3). The Linux implementation prevents unloading of shared libraries that registered such destructors