diff --git a/specification/ch_3.xml b/specification/ch_3.xml index 0eef88a..78cc0b8 100644 --- a/specification/ch_3.xml +++ b/specification/ch_3.xml @@ -4871,6 +4871,90 @@ my_func: S + A – P + + + R_PPC64_TPREL34 + + + 146 + + + prefix34* + + + @tprel + + + + + R_PPC64_DTPREL34 + + + 147 + + + prefix34* + + + @dtprel + + + + + R_PPC64_GOT_TLSGD34 + + + 148 + + + prefix34* + + + @got@tlsgd + + + + + R_PPC64_GOT_TLSLD34 + + + 149 + + + prefix34* + + + @got@tlsld + + + + + R_PPC64_GOT_TPREL34 + + + 150 + + + prefix34* + + + @got@tprel + + + + + R_PPC64_GOT_DTPREL34 + + + 151 + + + prefix34* + + + @got@dtprel + + R_PPC64_REL16_HIGH @@ -5600,7 +5684,9 @@ extern void *__tls_get_addr (tls_index *ti); Given the following code fragment, to determine the address of a thread-local variable x, the __tls_get_addr( ) function is called with one parameter. That parameter is a pointer to a data object of type - tls_index. + tls_index. Note that different + code generation is used for PC-relative addressing, but the GOT + entry relocations are identical. extern __thread unsigned int x; &x; @@ -5685,6 +5771,66 @@ extern void *__tls_get_addr (tls_index *ti);
+ + PC-Relative General Dynamic Initial Relocations + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + pla r3, x@got@tlsgd@pcrel + + + R_PPC64_GOT_TLSGD34 + + + x + + + + + bl __tls_get_addr(x@tlsgd) + + + R_PPC64_TLSGD + + + x + + + + + R_PPC64_REL24_NOTOC + + + __tls_get_addr + + + + +
+ General Dynamic GOT Entry Relocations @@ -5805,7 +5951,7 @@ static __thread unsigned int x3; - + bl __tls_get_addr(x1@tlsld) @@ -5816,9 +5962,6 @@ static __thread unsigned int x3; - - - R_PPC64_REL24 @@ -5939,9 +6082,12 @@ static __thread unsigned int x3;
- - - Local Dynamic GOT Entry Relocations + + Once again, there are alternative sequences for PC-relative addressing. + +
+ PC-Relative Local Dynamic Initial Relocations @@ -5968,21 +6114,40 @@ static __thread unsigned int x3; - GOT[n] + pla r3, x1@got@tlsld@pcrel - R_PPC64_DTPMOD64 + R_PPC64_GOT_TLSLD34 x1 + + bl __tls_get_addr(x1@tlsld) + - GOT[n+1] + R_PPC64_TLSLD - 0 + x1 + + + + + R_PPC64_REL24_NOTOC + + + __tls_get_addr + + + + + ... + + + @@ -5990,30 +6155,75 @@ static __thread unsigned int x3; - GOT[m] + paddi r9, r3, x1@dtprel - R_PPC64_DTPREL64 + R_PPC64_DTPREL34 + + + x1 + + + + + ... + + + + + + + + + + + paddi r9, r3, x2@dtprel + + + R_PPC64_DTPREL34 + + + x2 + + + + + ... + + + + + + + + + + + pld r9, x3@got@dtprel@pcrel + + + R_PPC64_GOT_DTPREL34 x3 + + + add r9, r9, r3 + + + + + + + +
- The relocation specifier @got@tlsld in the first instruction causes - the link editor to generate a tls_index data object in the GOT with a - fixed 0 offset. The following code assumes that x1 is in the first 64 KB - of the thread storage block. The x2 symbol is not within the first 64 KB - but is within the first 2 GB, and x3 is outside the 2 GB area. To load - the values of x1, x2, and x3 instead of their addresses, replace the - latter part of - with the following code - sequence. - - - Local Dynamic Relocations with Values Loaded +
+ Local Dynamic GOT Entry Relocations @@ -6040,10 +6250,21 @@ static __thread unsigned int x3; - ... + GOT[n] - + R_PPC64_DTPMOD64 + + + x1 + + + + + GOT[n+1] + + + 0 @@ -6051,105 +6272,1809 @@ static __thread unsigned int x3; - lwz r0, x1@dtprel(r3) + GOT[m] - R_PPC64_DTPREL16 + R_PPC64_DTPREL64 + + + x3 + + + + +
+ The relocation specifier @got@tlsld in the first instruction causes + the link editor to generate a tls_index data object in the GOT with a + fixed 0 offset. The following code assumes that x1 is in the first 64 KB + of the thread storage block. The x2 symbol is not within the first 64 KB + but is within the first 2 GB, and x3 is outside the 2 GB area. To load + the values of x1, x2, and x3 instead of their addresses, replace the + latter part of + with the following code + sequence. + + Local Dynamic Relocations with Values Loaded + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + ... + + + + + + + + + + + lwz r0, x1@dtprel(r3) + + + R_PPC64_DTPREL16 + + + x1 + + + + + ... + + + + + + + + + + + addis r9, r3, x2@dtprel@ha + + + R_PPC64_DTPREL16_HA + + + x2 + + + + + lwz r0, x2@dtprel@l(r9) + + + R_PPC64_DTPREL16_LO + + + x2 + + + + + ... + + + + + + + + + + + addis r9, r2, x3@got@dtprel@ha + + + R_PPC64_GOT_DTPREL16_HA + + + x3 + + + + + ld r9, x3@got@dtprel@l(r9) + + + R_PPC64_GOT_DTPREL16_LO_DS + + + x3 + + + + + lwzx r0, r3, r9 + + + + + + + + + + +
+ + For PC-relative addressing, replace the latter part of + with the following code + sequence. + + Local Dynamic Relocations with Values Loaded + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + ... + + + + + + + + + + + lwz r0, x1@dtprel(r3) + + + R_PPC64_DTPREL16 + + + x1 + + + + + ... + + + + + + + + + + + plwz r0, x2@dtprel@pcrel(r3) + + + R_PPC64_DTPREL34 + + + x2 + + + + + ... + + + + + + + + + + + pld r9, x3@got@dtprel@pcrel(r3) + + + R_PPC64_GOT_DTPREL34 + + + x3 + + + + + lwzx r0, r3, r9 + + + + + + + + + + +
+ +
+ Initial Exec TLS Model + Given the following code fragment, the relocation sequence in + is used for the Initial Exec + TLS Model: + extern __thread unsigned int x; +&x; + + Initial Exec Initial Relocations + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r9, r2, x@got@tprel@ha + + + R_PPC64_GOT_TPREL16_HA + + + x + + + + + ld r9, x@got@tprel@l(r9) + + + R_PPC64_GOT_TPREL16_LO_DS + + + x + + + + + add r9, r9, x@tls + + + R_PPC64_TLS + + + x + + + + +
+ + With PC-relative addressing, the relocation sequence in + is used instead: + + + PC-Relative Initial Exec Initial Relocations + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + pld r9, x@got@tprel@pcrel + + + R_PPC64_GOT_TPREL34 + + + x + + + + + add r9, r9, x@tls@pcrel + + + R_PPC64_TLS with one-byte displacement + + + x + + + + +
+ + Initial Exec GOT Entry Relocations + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[n] + + + R_PPC64_TPREL64 + + + x + + + + +
+ The relocation specifier @got@tprel in the first instruction causes + the link editor to generate a GOT entry with a relocation that the + dynamic linker will replace with the offset for x relative to the thread + pointer. The relocation specifier x@tls tells the assembler to use an r13 + form of the instruction. That is, add r9,r9,r13 in this case, and tag the + instruction with a relocation that indicates it belongs to a TLS + sequence. This relocation specifier can be used later by the link editor + when optimizing TLS code. + + To read the contents of the variable instead of calculating its + address, the add r9, r9, x@tls instruction + + in + + might be replaced with lwzx r0, r9, x@tls. + + The add r9, r9, x@tls@pcrel instruction in might likewise be replaced + with lwzx r0, r9, x@tls@pcrel. + + + + Note that both the x@tls and x@tls@pcrel assembly forms are + annotated with R_PPC64_TLS relocations. To distinguish + between the two, the second of these has a field value + displaced by one byte from the beginning of the instruction. + +
+
+ Local Exec TLS Model + Given the following code fragment, three different relocation + sequences may be used, depending on the size of the offset to the + variable. The sequence in + handles offsets within 60 KB + relative to the end of the TCB (where r13 points 28 KB past the end of + the TCB, which is immediately before the first TLS block). The sequence + in + handles offsets past 60 KB and + less than 2 GB + 28 KB relative to the end of the TCB. The third sequence + is identical to the Initial Exec sequence shown in + . + static __thread unsigned int x; +&x; + illustrates which sequence is + used. + +
+ Local Exec TLS Model Sequences + + + + + +
+ + Local Exec Initial Relocations (Sequence 1) + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addi r9, r13, x1@tprel + + + R_PPC_TPREL16 + + + x + + + + +
+ + Local Exec Initial Relocations (Sequence 2) + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r9, r13, x2@tprel@ha + + + R_PPC64_TPREL16_HA + + + x + + + + + addi r9, r9, x2@tprel@l + + + R_PPC64_TPREL16_LO + + + x + + + + +
+ + PC-Relative Local Exec Initial Relocations (Sequences 1 + and 2) + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + paddi r9, r13, x1@tprel + + + R_PPC_TPREL34 + + + x + + + + +
+
+ +
+ TLS Link Editor Optimizations + In some cases, the link editor may be able to optimize TLS code + sequences, provided the compiler emits code sequences as + described. + The following TLS link editor transformations are provided as + optimizations to convert between specific TLS access models: + + + General Dynamic to Initial Exec + + + General Dynamic to Local Exec + + + Local Dynamic to Local Exec + + + Initial Exec to Local Exec + + + + through describe TLS link editor + transformations using a TOC addressing model, and through describe TLS link editor + transformations using a PC-relative addressing model. + +
+ General Dynamic to Initial Exec <phrase + revisionflag="added">(TOC)</phrase> + + General-Dynamic-to-Initial-Exec Initial Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r3, r2, x@got@tlsgd@ha + + + R_PPC64_GOT_TLSGD16_HA + + + x + + + + + addi r3, r3, x@got@tlsgd@l + + + R_PPC64_GOT_TLSGD16_LO + + + x + + + + + bl __tls_get_addr(x@tlsgd) + + + R_PPC64_TLSGD + + + x + + + + + R_PPC64_REL24 + + + __tls_get_addr + + + + + nop + + + + + + + + + + +
+ + General-Dynamic-to-Initial-Exec GOT Entry Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[n] + + + R_PPC64_DTPMOD64 + + + x + + + + + GOT[n+1] + + + R_PPC64_DTPREL64 + + + x + + + + +
+ The preceding code and global offset table entries are replaced by + the following code and global offset table entries. + + General-Dynamic-to-Initial-Exec Replacement Initial + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r3, r2, x@got@tprel@ha + + + R_PPC64_GOT_TPREL16_HA + + + x + + + + + ld r3, x@got@tprel@l(r3) + + + R_PPC64_GOT_TPREL16_LO_DS + + + x + + + + + nop + + + + + + + + + + + add r3, r3, r13 + + + + + + + + + + +
+ + General-Dynamic-to-Initial-Exec Replacement GOT Entry + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[n] + + + R_PPC64_TPREL64 + + + x + + + + +
+
+
+ General Dynamic to Local Exec <phrase + revisionflag="added">(TOC)</phrase> + + General-Dynamic-to-Local-Exec Initial Relocations + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r3, r2, x@got@tlsgd@ha + + + R_PPC64_GOT_TLSGD16_HA + + + x + + + + + addi r3, r3, x@got@tlsgd@l + + + R_PPC64_GOT_TLSGD16_LO + + + x + + + + + bl __tls_get_addr(x@tlsgd) + + + R_PPC64_TLSGD + + + x + + + + + R_PPC64_REL24 + + + __tls_get_addr + + + + + nop + + + + + + + + + + +
+ + General-Dynamic-to-Local-Exec GOT Entry Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[n] + + + R_PPC64_DTPMOD64 + + + x + + + + + GOT[n+1] + + + R_PPC64_DTPREL64 + + + x + + + + +
+ The preceding code and global offset table entries are replaced by + the following code, which makes no reference to GOT entries. The GOT + entries in + can be removed from the GOT by + the linker when performing this code transformation. + To further optimize the code in + , a linker may reschedule the + sequence to exploit fusion by generating a sequence that may be fused + by Power processors: + nop +addis r3, r13, x@tprel@ha +addi r3, r3, x@tprel@l +nop + + + General-Dynamic-to-Local-Exec Replacement Initial + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + nop + + + + + + + + + + + addis r3, r13, x@tprel@ha + + + R_PPC64_TPREL16_HA + + + x + + + + + nop + + + + + + + + + + + addi r3, r3, x@tprel@l + + + R_PPC64_TPREL16_LO + + + x + + + + +
+
+
+ Local Dynamic to Local Exec + <phrase revisionflag="added">(TOC)</phrase> + + Under this TLS linker optimization, the function call is replaced + with an equivalent code sequence. However, as shown in the following code + examples, the dtprel sequences are left unchanged. + + Local-Dynamic-to-Local-Exec Initial Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r3, r2, x1@got@tlsld@ha + + + R_PPC64_GOT_TLSLD16_HA + + + x1 + + + + + addi r3, r3, x1@got@tlsld@l + + + R_PPC64_GOT_TLSLD16_LO + + + x1 + + + + + bl __tls_get_addr(x1@tlsld) + + + R_PPC64_TLSLD + + + x1 + + + + + + + + R_PPC64_REL24 + + + __tls_get_addr + + + + + nop + + + + + + + + + + + ... + + + + + + + + + + + addi r9, r3, x1@dtprel + + + R_PPC64_DTPREL16 + + + x1 + + + + + ... + + + + + + + + + + + addis r9, r3, x2@dtprel@ha + + + R_PPC64_DTPREL16_HA + + + x2 + + + + + addi r9, r9, x2@dtprel@l + + + R_PPC64_DTPREL16_LO + + + x2 + + + + + ... + + + + + + + + + + + addis r9, r2, x3@got@dtprel@ha + + + R_PPC64_GOT_DTPREL16_HA + + + x3 + + + + + ld r9, x3@got@dtprel@l(r9) + + + R_PPC64_GOT_DTPREL16_LO_DS + + + x3 + + + + + add r9, r9, r3 + + + + + + + + + + +
+ + Local-Dynamic-to-Local-Exec GOT Entry Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[n] + + + R_PPC64_DTPMOD64 + + + x1 + + + + + GOT[n+1] + + + + + + + + + + + ... + + + + + + + + + + + GOT[m] + + + R_PPC64_DTPREL64 + + + x3 + + + + +
+ The preceding code and global offset table entries are replaced by + the following code and global offset table entries. + + Local-Dynamic-to-Local-Exec Replacement Initial + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + nop + + + + + + + + + + + addis r3, r13, L@tprel@ha + + + R_PPC64_TPREL16_HA + + + link editor generated local symbol + + + + + nop + + + + + + + + + + + addi r3, r3, L@tprel@l + + + R_PPC64_TPREL16_LO + + + link editor generated local symbol + The linker may prefer to schedule the addis and addi + to be adjacent to take advantage of fusion as a + microarchitecture optimization opportunity. + + + + + + .. + + + + + + + + + + + addi r9, r3, x1@dtprel + + + R_PPC64_DTPREL16 + + + x1 + + + + + .. + + + + + + + + + + + addis r9, r3, x2@dtprel@ha + + + R_PPC64_DTPREL16_HA + + + x2 + + + + + addi r9, r9, x2@dtprel@l + + + R_PPC64_DTPREL16_LO + + + x2 + + + + + ... + + + + + + + + + + + addis r9, r2, x3@got@dtprel@ha + + + R_PPC64_GOT_DTPREL16_HA + + + x3 + + + + + ld r9, x3@got@dtprel@l(r9) + + + R_PPC64_GOT_DTPREL16_LO_DS + + + x3 + + + + + add r9, r9, r3 + + + + + + + + + + +
+ The GOT[n] and GOT[n+1] entries can be removed by the linker after + the code transformation as shown in + . + + Local-Dynamic-to-Local-Exec Replacement GOT Entry + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + GOT[m] + + + R_PPC64_DTPREL64 + + + x3 + + + + +
+ The local symbol generated by the link editor points to the start + of the thread storage block plus 0x7000 bytes. In practice, a section + symbol with a suitable offset will be used. +
+
+ Initial Exec to Local Exec + <phrase revisionflag="added">(TOC)</phrase> + + This transformation is only performed by the linker when the symbol + is within 2 GB + 28 KB of the thread pointer. + + Initial-Exec-to-Local-Exec Initial Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + + + + + Code Sequence + + + + + Relocation + + + + + Symbol + + + + + + + + addis r9, r2, x@got@tprel@ha + + + R_PPC64_GOT_TPREL16_HA + + + x + + + + + ld r9, x@got@tprel@l(r9) + + + R_PPC64_GOT_TPREL16_LO_DS - x1 + x - ... + add r9, r9, x@tls - + R_PPC64_TLS - + x + + +
+ + Initial-Exec-to-Local-Exec GOT Entry Relocations + <phrase revisionflag="added">(TOC)</phrase> + + + + + + - addis r9, r3, x2@dtprel@ha + + Code Sequence + - R_PPC64_DTPREL16_HA + + Relocation + - x2 + + Symbol + + + - lwz r0, x2@dtprel@l(r9) + GOT[n] - R_PPC64_DTPREL16_LO + R_PPC64_TPREL64 - x2 + x + + +
+ The preceding code and global offset table entries are replaced by + the following code and global offset table entries. + + Initial-Exec-to-Local-Exec Replacement Initial + Relocations <phrase revisionflag="added">(TOC)</phrase> + + + + + + - ... + Code Sequence - + Relocation - + Symbol - addis r9, r2, x3@got@dtprel@ha + nop - R_PPC64_GOT_DTPREL16_HA + - x3 + - ld r9, x3@got@dtprel@l(r9) + addis r9, r13, x@tprel@ha - R_PPC64_GOT_DTPREL16_LO_DS + R_PPC64_TPREL16_HA - x3 + x - lwzx r0, r3, r9 + addi r9, r9, x@tprel@l - + R_PPC64_TPREL16_LO - + x
-
-
- Initial Exec TLS Model - Given the following code fragment, the relocation sequence in - is used for the Initial Exec - TLS Model: - extern __thread unsigned int x; -&x; - - Initial Exec Initial Relocations + Other sizes and types of thread-local variables may use any of the + X-form indexed load or store instructions. + + shows how to access the + contents of a variable using the X-form indexed load and store + instructions. +
+ Initial-Exec-to-Local-Exec X-form Initial Relocations + <phrase revisionflag="added">(TOC)</phrase> + @@ -6198,7 +8123,29 @@ static __thread unsigned int x3; - add r9, r9, x@tls + lbzx r10, r9, x@tls + + + R_PPC64_TLS + + + x + + + + + addi r10, r10, 1 + + + + + + + + + + + stbx r10, r9, x@tls R_PPC64_TLS @@ -6210,9 +8157,10 @@ static __thread unsigned int x3;
- - Initial Exec GOT Entry Relocations + Initial-Exec-to-Local-Exec X-form GOT Entry Relocations + <phrase revisionflag="added">(TOC)</phrase> + @@ -6251,47 +8199,12 @@ static __thread unsigned int x3;
- The relocation specifier @got@tprel in the first instruction causes - the link editor to generate a GOT entry with a relocation that the - dynamic linker will replace with the offset for x relative to the thread - pointer. The relocation specifier x@tls tells the assembler to use an r13 - form of the instruction. That is, add r9,r9,r13 in this case, and tag the - instruction with a relocation that indicates it belongs to a TLS - sequence. This relocation specifier can be used later by the link editor - when optimizing TLS code. - To read the contents of the variable instead of calculating its - address, the add r9, r9, x@tls instruction might be replaced with lwzx - r0, r9, x@tls. -
-
- Local Exec TLS Model - Given the following code fragment, three different relocation - sequences may be used, depending on the size of the offset to the - variable. The sequence in - handles offsets within 60 KB - relative to the end of the TCB (where r13 points 28 KB past the end of - the TCB, which is immediately before the first TLS block). The sequence - in - handles offsets past 60 KB and - less than 2 GB + 28 KB relative to the end of the TCB. The third sequence - is identical to the Initial Exec sequence shown in - . - static __thread unsigned int x; -&x; - illustrates which sequence is - used. - -
- Local Exec TLS Model Sequences - - - - - -
- - Local Exec Initial Relocations (Sequence 1) + The preceding code and global offset table entries are replaced by + the following code and global offset table entries. +
+ Initial-Exec-to-Local-Exec X-form Replacement Initial + Relocations <phrase revisionflag="added">(TOC)</phrase> + @@ -6318,51 +8231,32 @@ static __thread unsigned int x3; - addi r9, r13, x1@tprel + nop - R_PPC_TPREL16 + - x + - - -
- - - Local Exec Initial Relocations (Sequence 2) - - - - - - - Code Sequence - + addis r9, r13, x@tprel@ha - - Relocation - + R_PPC64_TPREL16_HA - - Symbol - + x - - - addis r9, r13, x2@tprel@ha + lbz r10, x@tprel@l(r9) - R_PPC64_TPREL16_HA + R_PPC64_TPREL16_LO x @@ -6370,7 +8264,18 @@ static __thread unsigned int x3; - addi r9, r9, x2@tprel@l + addi r10, r10, 1 + + + + + + + + + + + stb r10, x@tprel@l(r9) R_PPC64_TPREL16_LO @@ -6383,33 +8288,11 @@ static __thread unsigned int x3;
-
-
- TLS Link Editor Optimizations - In some cases, the link editor may be able to optimize TLS code - sequences, provided the compiler emits code sequences as - described. - The following TLS link editor transformations are provided as - optimizations to convert between specific TLS access models: - - - General Dynamic to Initial Exec - - - General Dynamic to Local Exec - - - Local Dynamic to Local Exec - - - Initial Exec to Local Exec - - -
- General Dynamic to Initial Exec - +
+ General Dynamic to Initial Exec (PC-Relative) - General-Dynamic-to-Initial-Exec Initial Relocations + General-Dynamic-to-Initial-Exec Initial Relocations + (PC-Relative) @@ -6489,9 +8372,10 @@ static __thread unsigned int x3;
- - General-Dynamic-to-Initial-Exec GOT Entry Relocations + General-Dynamic-to-Initial-Exec GOT Entry Relocations + (PC-Relative) + @@ -6543,10 +8427,10 @@ static __thread unsigned int x3;
The preceding code and global offset table entries are replaced by the following code and global offset table entries. - General-Dynamic-to-Initial-Exec Replacement Initial - Relocations + Relocations (PC-Relative) + @@ -6621,7 +8505,7 @@ static __thread unsigned int x3;
General-Dynamic-to-Initial-Exec Replacement GOT Entry - Relocations + Relocations (PC-Relative) @@ -6661,11 +8545,11 @@ static __thread unsigned int x3;
-
- General Dynamic to Local Exec - +
+ General Dynamic to Local Exec (PC-Relative) - General-Dynamic-to-Local-Exec Initial Relocations + General-Dynamic-to-Local-Exec Initial Relocations + (PC-Relative) @@ -6745,9 +8629,9 @@ static __thread unsigned int x3;
- - - General-Dynamic-to-Local-Exec GOT Entry Relocations +
+ General-Dynamic-to-Local-Exec GOT Entry Relocations + (PC-Relative) @@ -6801,7 +8685,7 @@ static __thread unsigned int x3; the following code, which makes no reference to GOT entries. The GOT entries in can be removed from the GOT by - the linker when performing this code transformation. + the linker when performing this code transformation. To further optimize the code in , a linker may reschedule the sequence to exploit fusion by generating a sequence that may be fused @@ -6811,10 +8695,9 @@ addis r3, r13, x@tprel@ha addi r3, r3, x@tprel@l nop -
General-Dynamic-to-Local-Exec Replacement Initial - Relocations + Relocations (PC-Relative) @@ -6887,14 +8770,14 @@ nop
-
- Local Dynamic to Local Exec +
+ Local Dynamic to Local Exec (PC-Relative) Under this TLS linker optimization, the function call is replaced with an equivalent code sequence. However, as shown in the following code examples, the dtprel sequences are left unchanged. - - - Local-Dynamic-to-Local-Exec Initial Relocations +
+ Local-Dynamic-to-Local-Exec Initial Relocations + (PC-Relative) @@ -7076,10 +8959,9 @@ nop
- - - Local-Dynamic-to-Local-Exec GOT Entry Relocations + Local-Dynamic-to-Local-Exec GOT Entry Relocations + (PC-Relative) @@ -7151,13 +9033,11 @@ nop
- The preceding code and global offset table entries are replaced by the following code and global offset table entries. - Local-Dynamic-to-Local-Exec Replacement Initial - Relocations + Relocations (PC-Relative) @@ -7335,9 +9215,9 @@ nop The GOT[n] and GOT[n+1] entries can be removed by the linker after the code transformation as shown in . -
+
Local-Dynamic-to-Local-Exec Replacement GOT Entry - Relocations + Relocations (PC-Relative) @@ -7380,11 +9260,10 @@ nop of the thread storage block plus 0x7000 bytes. In practice, a section symbol with a suitable offset will be used. -
- Initial Exec to Local Exec +
+ Initial Exec to Local Exec (PC-Relative) This transformation is only performed by the linker when the symbol is within 2 GB + 28 KB of the thread pointer. -
Initial-Exec-to-Local-Exec Initial Relocations @@ -7447,9 +9326,9 @@ nop
- - Initial-Exec-to-Local-Exec GOT Entry Relocations + Initial-Exec-to-Local-Exec GOT Entry Relocations + (PC-Relative) @@ -7490,10 +9369,9 @@ nop
The preceding code and global offset table entries are replaced by the following code and global offset table entries. - Initial-Exec-to-Local-Exec Replacement Initial - Relocations + Relocations (PC-Relative) @@ -7552,9 +9430,9 @@ nop shows how to access the contents of a variable using the X-form indexed load and store instructions. - -
- Initial-Exec-to-Local-Exec X-form Initial Relocations +
+ Initial-Exec-to-Local-Exec X-form Initial Relocations + (PC-Relative) @@ -7637,9 +9515,9 @@ nop
- - Initial-Exec-to-Local-Exec X-form GOT Entry Relocations + Initial-Exec-to-Local-Exec X-form GOT Entry Relocations + (PC-Relative) @@ -7680,10 +9558,9 @@ nop
The preceding code and global offset table entries are replaced by the following code and global offset table entries. - Initial-Exec-to-Local-Exec X-form Replacement Initial - Relocations + Relocations (PC-Relative)