public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Fangrui Song <maskray@google.com>,
	Tatsuyuki Ishi <ishitatsuyuki@gmail.com>
Cc: binutils@sourceware.org, Lulu Cai <cailulu@loongson.cn>,
	 chenglulu@loongson.cn, hejinyang@loongson.cn,
	i.swmail@xen0n.name,  liuzhensong@loongson.cn,
	luweining@loongson.cn, mengqinggang <mengqinggang@loongson.cn>,
	nickc@redhat.com, wanglei@loongson.cn,  xuchenghua@loongson.cn
Subject: Re: [PATCH] LoongArch: Do not add DF_STATIC_TLS for TLS LE
Date: Mon, 22 Jan 2024 14:51:10 +0800	[thread overview]
Message-ID: <6d4075f0f8831c30407bdb2c6a8a36c1de681cee.camel@xry111.site> (raw)
In-Reply-To: <CAFP8O3J5qpQatqFx6xSNNQiNWK=_h7vS5fbvCX2yUCDmG_HShg@mail.gmail.com>

On Sun, 2024-01-21 at 21:48 -0800, Fangrui Song wrote:
> On Sun, Jan 21, 2024 at 9:45 PM Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
> > 
> > > On Dec 28, 2023, at 23:58, Tatsuyuki Ishi <ishitatsuyuki@gmail.com> wrote:
> > > 
> > > TLS LE is exclusively for executables, while DF_STATIC_TLS is for DLLs.
> > > DF_STATIC_TLS should only be set for TLS IE (and when it's DLL), not LE.
> > > ---
> > > bfd/elfnn-loongarch.c | 2 --
> > > 1 file changed, 2 deletions(-)
> > > 
> > > diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
> > > index bd448cda453..64c34e99261 100644
> > > --- a/bfd/elfnn-loongarch.c
> > > +++ b/bfd/elfnn-loongarch.c
> > > @@ -862,8 +862,6 @@ loongarch_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
> > >         if (!bfd_link_executable (info))
> > >           return false;
> > > 
> > > -       info->flags |= DF_STATIC_TLS;
> > > -
> > >         if (!loongarch_elf_record_tls_and_got_reference (abfd, info, h,
> > >                                                          r_symndx,
> > >                                                          GOT_TLS_LE))
> > > --
> > > 2.40.1
> > > 
> > > 
> > 
> > Any interest in reviewing / merging this and the other two patches sent together?
> > The DF_STATIC_TLS change is pretty short, the formatting patch is trivial.
> > As for the last patch introducing a comment change, I’m not sure what Mengqing’s stance is, but my intention for the comment change is to provide a better context for the reader rather than comparing to a solution that is not currently implemented in the codebase.
> > 
> > Tatsuyuki.
> 
> I think this is correct and should be applied.

Will this cause a breakage in practice?  If so we need to apply it for 2.42 branch too.

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

  reply	other threads:[~2024-01-22  6:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-28 14:58 Tatsuyuki Ishi
2023-12-28 14:58 ` [PATCH] LoongArch: Use tab to indent assembly in TLSDESC test suite Tatsuyuki Ishi
2024-01-22  9:47   ` mengqinggang
2023-12-28 14:58 ` [PATCH] LoongArch: Update comment about bottom bit usage in TLS GOT construction Tatsuyuki Ishi
2023-12-29  8:50   ` mengqinggang
2023-12-29  9:11     ` Tatsuyuki Ishi
2023-12-29  9:59       ` mengqinggang
2024-01-22  5:45 ` [PATCH] LoongArch: Do not add DF_STATIC_TLS for TLS LE Tatsuyuki Ishi
2024-01-22  5:48   ` Fangrui Song
2024-01-22  6:51     ` Xi Ruoyao [this message]
2024-01-22  7:11       ` Fangrui Song
2024-01-22  8:27   ` mengqinggang
2024-01-22  9:46 ` mengqinggang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d4075f0f8831c30407bdb2c6a8a36c1de681cee.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=binutils@sourceware.org \
    --cc=cailulu@loongson.cn \
    --cc=chenglulu@loongson.cn \
    --cc=hejinyang@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=ishitatsuyuki@gmail.com \
    --cc=liuzhensong@loongson.cn \
    --cc=luweining@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=nickc@redhat.com \
    --cc=wanglei@loongson.cn \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).