@mknyszek I see you've added the help wanted label. I've never done any work in the Golang runtime or compiler, but I'm happy to have a go at fixing this if someone can give me some pointers on where to start and a reasonable approach to take - is this something you can help me with?
This is happening because go is producing shared libraries with initial-exec accesses to TLS objects defined in them. As the name implies, the initial-exec access model is only valid for accessing TLS objects present at initial exec time, not ones dynamically loaded later. So shared libraries can use it only if they are loaded at program load time as a dependency or via LD_PRELOAD, not if they will be loaded (directly or indirectly as dependencies) via dlopen. My understanding is that the golang compiler does not yet implement the dynamic TLS access models, so if that's still the case, fixing this bug depends on implementing that.