Implement the Initial-Executable model and its relaxation to the Local-Executable one.
Diff Detail
Unit Tests
Time | Test | |
---|---|---|
160 ms | x64 debian > lld.ELF::sparcv9-tls-ie.s | |
330 ms | x64 windows > lld.ELF::sparcv9-tls-ie.s |
Event Timeline
Fix test formatting.
Force use of rela over rel, forgot to commit this change with the previous patch.
lld/ELF/Driver.cpp | ||
---|---|---|
929 ↗ | (On Diff #347177) | This _is_ related to TLS as, without this change, the R_SPARC_TLS_TPOFF64 would end up in REL form and the resulting program be rejected by ld.so. |
Reserve 3 slots in the GOT, this detail was well-hidden in the documentation.
Address some stylistic nits.
lld/ELF/Driver.cpp | ||
---|---|---|
929 ↗ | (On Diff #347177) | Why is R_SPARC_TLS_TPOFF64 special? Surely that's true of any dynamic relocation. |
lld/ELF/Driver.cpp | ||
---|---|---|
929 ↗ | (On Diff #347177) | It's not special, it's only the first dynamic relocation that's covered by a test (for the SPARC target, that is). Splitting this patch into many interdependent pieces is going to be a pain, especially since I already have other patches rebased on top of this. |
lld/ELF/Driver.cpp | ||
---|---|---|
929 ↗ | (On Diff #347177) | So this is a bug fix for the fact that LLD already emits ABI-violating binaries (e.g. just have static int x; static int *p = &x; and link that as a shared object, then you'll get an R_SPARC_RELATIVE as rel rather than rela). Hence why this should be decoupled. It's a trivial one-line patch to commit. |