[PATCH v2 0/5] LoongArch tls le model linker relaxation support.

Xi Ruoyao xry111@xry111.site
Mon Dec 4 09:42:25 GMT 2023


On Mon, 2023-12-04 at 17:37 +0800, Xi Ruoyao wrote:
> On Mon, 2023-12-04 at 17:25 +0800, 常佳琛 wrote:
> > > How can I get your gcc (or patches)? I tried to compare access to 
> > > non-thread var with old gcc.
> > Reply :
> > There are still some issues with gcc that need to be worked out.
> > As for gcc patch, it will be shipped on Tuesday or Wednesday of this
> > week, you may have to wait for a while.
> 
> Let's not add huge thunks of new features into GCC at the moment because
> we are in stage 3 (general bugfixing) of GCC 14 development.  So we
> should concentrate on fixing bugs and avoid from potentially introducing
> new bugs.
> 
> You may still post the GCC patch for a review though.

FWIW if you want this for GCC 14, IMO you can just remove SYMBOL_TLS_LE
from loongarch_explicit_relocs_p in GCC (so GCC will always generate
la.tls.le instead of the real instruction sequence to load address of a
LE TLS symbol, unless -mexplicit-relocs=always) and expand la.tls.le as
you wish in GAS.  This will be a one-line change in GCC and it's more
acceptable than a huge diff in stage 3.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Binutils mailing list