From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 5FB9E3858D3C for ; Mon, 22 Jan 2024 06:51:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5FB9E3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5FB9E3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=89.208.246.23 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705906287; cv=none; b=VYzH9EHSgiyiAoPJeEkYdYSW2Wuxip7697JyU3D84yS/8HPiieXK14Fgo1L7am8Mwge2AY2xD7+4Rjlcq4jC7rAc/vEy+8xWJ3U/66fpFbSi980PYerDYe+paKK5iBm+eyHf9uKXZvLgml+93kilKBwd+EGXBxapIcNrhR04Z94= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705906287; c=relaxed/simple; bh=q86yCej5xVT9xU3EQZNLZJW+CJWGXXUQvLCfjMUPt00=; h=DKIM-Signature:Message-ID:Subject:From:To:Date:MIME-Version; b=F1wneKsJZ4u7eS3X4NQpil07S6rwVoXPyLgC8pE//eCEcA/FcDTI7ePx59Nt9q8zm5cHru9WV8EykVPnV1OKynUjb/lRcXBHq79Sd/yKR4Mnja6zb9BKlNxlzPRbgy9umwV3MmOScRoTyCgt3nUMhplKfuY0f0xffJr1iT6SXqo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1705906282; bh=q86yCej5xVT9xU3EQZNLZJW+CJWGXXUQvLCfjMUPt00=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=i1qLbV3n9j7Aw1ujvRoWh270dGg3i3O0OnCI1PnCsdKhNWVHLgKX8R+8Orc7Li+aE 2F8qPqzYpVn5cKhnGHGHnuq1xo5CBPQaH92QhL3Tc1mGm6cdG0WC/IlchK4ggpwA4Y KSt3fRQIv9j5O2ySaebuqJUkNIrwwloXU93oNw7k= Received: from [IPv6:240e:358:119a:ce00:dc73:854d:832e:2] (unknown [IPv6:240e:358:119a:ce00:dc73:854d:832e:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id AA35D66FF7; Mon, 22 Jan 2024 01:51:15 -0500 (EST) Message-ID: <6d4075f0f8831c30407bdb2c6a8a36c1de681cee.camel@xry111.site> Subject: Re: [PATCH] LoongArch: Do not add DF_STATIC_TLS for TLS LE From: Xi Ruoyao To: Fangrui Song , Tatsuyuki Ishi Cc: binutils@sourceware.org, Lulu Cai , chenglulu@loongson.cn, hejinyang@loongson.cn, i.swmail@xen0n.name, liuzhensong@loongson.cn, luweining@loongson.cn, mengqinggang , nickc@redhat.com, wanglei@loongson.cn, xuchenghua@loongson.cn Date: Mon, 22 Jan 2024 14:51:10 +0800 In-Reply-To: References: <20231228145802.74719-1-ishitatsuyuki@gmail.com> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 MIME-Version: 1.0 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sun, 2024-01-21 at 21:48 -0800, Fangrui Song wrote: > On Sun, Jan 21, 2024 at 9:45=E2=80=AFPM Tatsuyuki Ishi wrote: > >=20 > > > On Dec 28, 2023, at 23:58, Tatsuyuki Ishi w= rote: > > >=20 > > > TLS LE is exclusively for executables, while DF_STATIC_TLS is for DLL= s. > > > 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(-) > > >=20 > > > 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, > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!bfd_link_executable (= info)) > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return false; > > >=20 > > > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 info->flags |=3D DF_STATIC_TLS; > > > - > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 if (!loongarch_elf_record_= tls_and_got_reference (abfd, info, h, > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r_symndx, > > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GOT_TLS_LE)) > > > -- > > > 2.40.1 > > >=20 > > >=20 > >=20 > > 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 trivi= al. > > As for the last patch introducing a comment change, I=E2=80=99m not sur= e what Mengqing=E2=80=99s stance is, but my intention for the comment chang= e is to provide a better context for the reader rather than comparing to a = solution that is not currently implemented in the codebase. > >=20 > > Tatsuyuki. >=20 > 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. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University