Follow-up to D82899. Note, we need to disable R_DTPREL relaxation
because ARM psABI does not define TLS relaxation.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks, will take a look over the weekend. Would like to make sure all is well running some TLS test cases on a native Arm machine, fully expect it to be OK.
LGTM, it looks like it is difficult to generate local dynamic from clang, although it is possible with GCC. I was able to make a test application, that also had the advantage of working for shared libraries and PIE as R_ABS does not in that case.
lld/ELF/Relocations.cpp | ||
---|---|---|
241 | I've noticed that canRelax is always used with && !config->shared now. bool canRelax = !config->shared && config->emachine != EM_ARM && config->emachine != EM_HEXAGON && config->emachine != EM_RISCV; |
lld/ELF/Relocations.cpp | ||
---|---|---|
241 | I agree. canRelax does not capture the meaning precisely now. It actually means whether we can transit a TLS model for shared objects (general/local dynamic) to a TLS model for executables (initial/local exec). If we are going to rename the variable, that does not belong this change. I'll do that separately. |
I've noticed that canRelax is always used with && !config->shared now.
So can it be: