This patch adds the target call back relaxTlsGdToLe to support TLS relaxation from global dynamic to local exec model.
Details
Diff Detail
Event Timeline
| lld/ELF/Arch/PPC64.cpp | ||
|---|---|---|
| 172 | minor nit: Could use a ternary here instead of an if. | |
| lld/ELF/Relocations.cpp | ||
| 937–939 | This comment should be updated to reflect that we are only skipping the non-tls hints since the tls hints need the following processing. | |
| lld/ELF/Relocations.h | ||
| 47 | I think we are better off to call it R_TLSGD_HINT and add it with the other General dynamic relocation below. | |
| lld/ELF/Arch/PPC64.cpp | ||
|---|---|---|
| 162 | I found this comment a bit confusing. Does this mean the first instruction is one of addis r3, r2, a@got@tlsgd@ha [R_PPC64_GOT_TLSGD16_HA] addi r3, r3, a@got@tlsgd@l [R_PPC64_GOT_TLSGD16_LO] bl __tls_get_addr(a@tlsgd) [R_PPC64_TLSGD] followed by a nop? Or, do we expect the following four instructions? addis r3, r2, a@got@tlsgd@ha [R_PPC64_GOT_TLSGD16_HA] addi r3, r3, a@got@tlsgd@l [R_PPC64_GOT_TLSGD16_LO] bl __tls_get_addr(a@tlsgd) [R_PPC64_TLSGD] nop | |
LGTM
| lld/ELF/Arch/PPC64.cpp | ||
|---|---|---|
| 187–188 | I believe clang-format would vertically align these comments. | |
I found this comment a bit confusing. Does this mean the first instruction is one of
followed by a nop? Or, do we expect the following four instructions?