I got it working, kind of. I just needed to use a different ndk version. There's a lot of problems with the NDK, the latest one doesn't appear to have the bfd linker anymore. Does anyone know why the bfd linker is needed and why the gold linker doesn't work for the emulated TLS?