On Sun, Nov 05, 2017 at 10:15:57PM +0000, Stuart Henderson wrote: > On 2017/11/05 21:08, Charles Collicutt wrote: > > I have a program that uses Thread-Local Storage (TLS) with the 'Local Exec' > > access model [1] on AMD64. This looks like it should work on OpenBSD and, > > indeed, it mostly does. > > OpenBSD doesn't have real thread-local storage yet.
What does 'real' mean here? OpenBSD looks like it has everything needed for 'Local Exec' thread-local storage. You've got TLS block setup in ld.so(1), _csu_finish, and pthread_create(3). You've got the binutils linker, ld(1), which can handle R_x_TPOFF32 relocations. You don't need anything else for local exec TLS. This is mainly interesting to me because the Go runtime uses local exec TLS to store a pointer to the current goroutine. I know people use Go on OpenBSD: if you're saying that isn't actually expected to work, that would be good to know. -- Charles