On Fri, 2024-01-26 at 16:59 +0800, chenglulu wrote: > > 在 2024/1/26 下午4:49, Xi Ruoyao 写道: > > On Fri, 2024-01-26 at 15:37 +0800, Lulu Cheng wrote: > > > v3 -> v4: > > > 1. Add macro support for TLS symbols > > > 2. Added support for loading __get_tls_addr symbol address using > > > call36. > > > 3. Merge template got_load_tls_{ld/gd/le/ie}. > > > 4. Enable explicit reloc for extreme TLS GD/LD with > > > -mexplicit-relocs=auto. > > I've rebased and attached the patch to fix the bad split in -mexplicit- > > relocs={always,auto} -mcmodel=extreme on top of this series. I've not > > tested it seriously though (only tested the added and modified test > > cases). > > > OK, I'll test the spec for correctness.
I suppose this still won't work yet because Binutils is not fully fixed. GAS has been changed not to emit R_LARCH_RELAX for "la.tls.ie a0, t0, foo", but ld is still not checking if an R_LARCH_RELAX is after R_LARCH_TLS_IE_PC_{HI20,LO12} properly. Thus an invalid "partial" TLS transition can still happen. -- Xi Ruoyao <xry...@xry111.site> School of Aerospace Science and Technology, Xidian University