-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bionic/: implement TLSDESC (Documented in psabi; implemented in llvm) #3
Comments
What is the current status of TLS support? Recently, llvm received a fix for emulate_tls on RISC-V. But in AOSP emulate_tls is currently disabled on RISC-V, it seems the traditional GD/LD TLS mode is being used; and it appears that someone in the community has started to support TLS DESC in llvm so all that's needed going forward is to update the tools and enable relocation support in Bionic once llvm support is available? |
correct. we don't want to use emutls for rv64 --- we'll use the best option available, which is currently the one you mention.
yeah, i'm excited to see some progress on that. the bionic work will be easy+quick once the details are fixed. (i'm assuming the same will be true for llvm too, given that other architectures already support it.) but for now we're blocked on the TLS DESC psabi proposal. |
Reference to sourceware implementation: https://inbox.sourceware.org/binutils/DS7PR12MB576522B309E27EBA26708A85CB1BA@DS7PR12MB5765.namprd12.prod.outlook.com/T/ |
riscv-non-isa/riscv-elf-psabi-doc#94 was merged. Bug: google/android-riscv64#3 Test: treehugger Change-Id: Ifc0c4d7408367f0372cec969d4ee6f84699bee30
Support for RISC-V TLSDESC Relocations has landed in llvm: llvm/llvm-project#66916 Thanks to @ilovepi and @MaskRay |
@appujee --- is there anything left to do here? do we have a prebuilt clang where this is on by default? |
Yes the patch is in the current clang-r530567 |
And enabled by default for Android targets in llvm/llvm-project#81198 |
Yeah, TLSDESC should be on by default in Clang for all Android RISC-V targets. I don't think there's anything left to do, since we've resolved all the psABI issues, updated the compiler and linker, and bionic. |
yeah, and the only CTS test i can think of for arm64 already includes riscv64, so i don't think there's any extra tests to be written either? thanks all! |
risc-v is the first Android ABI to ship after we added ELF TLS support. emutls doesn't even seem to work (with LLVM at least) for risc-v, but we can't go straight to using TLSDESC relocations because they haven't been standardized for risc-v yet. blocked on riscv-non-isa/riscv-elf-psabi-doc#94 getting some traction.
The text was updated successfully, but these errors were encountered: