Unverified Commit 5b058709 authored by Felix (Ting Wang)'s avatar Felix (Ting Wang) Committed by GitHub
Browse files

[PowerPC] Support local-dynamic TLS relocation on AIX (#66316)



Supports TLS local-dynamic on AIX, generates below sequence of code:

```
.tc foo[TC],foo[TL]@ld # Variable offset, ld relocation specifier
.tc mh[TC],mh[TC]@ml # Module handle for the caller
lwz 3,mh[TC]\(2\) $$ For 64-bit: ld 3,mh[TC]\(2\)
bla .__tls_get_mod # Modifies r0,r3,r4,r5,r11,lr,cr0
#r3 = &TLS for module
lwz 4,foo[TC]\(2\) $$ For 64-bit: ld 4,foo[TC]\(2\)
add 5,3,4 # Compute &foo
.rename mh[TC], "\_$TLSML" # Symbol for the module handle must have the name "_$TLSML"
```

---------

Co-authored-by: default avatartingwang <tingwang@tingwangs-MBP.lan>
Co-authored-by: default avatartingwang <tingwang@tingwangs-MacBook-Pro.local>
parent 7d7d4752
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment