From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 2C8FC3858C50 for ; Mon, 22 Jan 2024 05:48:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2C8FC3858C50 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2C8FC3858C50 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::534 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705902524; cv=none; b=vFk7dEx2pVZXyZtHs9whSd+kx/Eb1ewgH0wnTql1mWhVHtywddfs/wXx0oYDKFFKOqhQgLWZqrinHotM5lLiwHhXdtnsHAt4rcM78xRTRxHdR3B37GeQZRHKcYSwt8UuhmSYMtayp3IvtkPLrtz1lfuIx1/qVF5o0KYkhPcohMk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705902524; c=relaxed/simple; bh=a1kTFUYjm6veHU3yTm349Jr9ANejO0F7ZSC/+SN/kok=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=BYkURqdMiXdfQunChrHvLZ2iSZv4QPj8/5ebSDRM53waxWLAivVVJXLEn59MqU6Ji6esXOX/8qZyU77Dd7koEveB1jlo2Wzqh3mtOxJvupbuameB//282TzuCYHmtP/Z7mAAkgPbGDBZY4m8Cc1EwMElQzJwimejLGr5kR/3gb4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-55a62fad701so7936a12.1 for ; Sun, 21 Jan 2024 21:48:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705902521; x=1706507321; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nhe5S2i2wMKIFO3ULZ0Jls8DNO+piQCl7xkLVYZD77E=; b=afr4FQttxSFvJBMEkOSGIc0PBG0dyqk5kelQB0j2Jkufz3CEYu43wDV60DsszQZKSp wEKl1uvRIKt6VfS8Jn0SiuQ3f9hXNMEC4NvobltR3BYL1GMzneOzzDJ15k+SmoSfzqFB 9gt82FDtuSvRRXYhFRgEdyySURiKqpGn9eBS+3QIu/20+JB1StQeitr7Sl8FDSo+stk9 xC4s5iv+4bbhLexd6ryAZr09bzmDAe3a8OVr5DeVSLZFPVPRighYTgKsk3RzptyjKk2o c9M2S9PPWedpZqoeqrEvTOVwJ5gpnhrxMQVKKRrNl/zF1oE1lsUxd2BTn6ouQc7eMqbR rGeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705902521; x=1706507321; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nhe5S2i2wMKIFO3ULZ0Jls8DNO+piQCl7xkLVYZD77E=; b=qtaoSFc/9bvgoeUEfzGy29/4lrJgX5B6LV9O8ULtyUKDdayCvnu63mdkLUaM3YBeT3 OAcwZTbSKJZ36i6Z7dgiPZRkfOQRuD+mXOSFF5XdioORG5krpEjrAQd38pEufK1kJmbA 2XDbx8/fPbVfEt3jXbM/RUFyvnts7KqjvX8u3kPJjBF5V+1u9UYkddcXEj7HGsSLlo4u KtMo/0+vrgssaO3FWY4K5R8FHYPbIvX7Ur0KSvDCqnRLBK0oivdYKHafd5eTtyWG20nB zsLVgVRPTXYbfIvlaDRpiDo9WGsPf51JYLOIXg7dOs9JVRodh7L51XxvwlecCIGjEHBO 2bow== X-Gm-Message-State: AOJu0YxS/UbzqKr4XLPP/qBUNp26rHIKXvzsrEnLKPJvGdXL+6xoRZjg IzKnIQXudnY7nnGs/PpFRXuoWcmxlJNJtaF8UlstFCaBPhED X-Google-Smtp-Source: AGHT+IF1zgfqaGApI4h27hIZVFLpDCoIajAGBLRkb80qnJPl2XqhEhdGRWkpNoqqVszHOmCmbGFTQQq2rLcVyo8bUyE= X-Received: by 2002:a05:6402:947:b0:558:8096:5c2f with SMTP id h7-20020a056402094700b0055880965c2fmr151112edz.1.1705902521483; Sun, 21 Jan 2024 21:48:41 -0800 (PST) MIME-Version: 1.0 References: <20231228145802.74719-1-ishitatsuyuki@gmail.com> In-Reply-To: From: Fangrui Song Date: Sun, 21 Jan 2024 21:48:28 -0800 Message-ID: Subject: Re: [PATCH] LoongArch: Do not add DF_STATIC_TLS for TLS LE To: 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, xry111@xry111.site, xuchenghua@loongson.cn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-23.5 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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, Jan 21, 2024 at 9:45=E2=80=AFPM Tatsuyuki Ishi wrote: > > > On Dec 28, 2023, at 23:58, Tatsuyuki Ishi wro= te: > > > > 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_l= ink_info *info, > > if (!bfd_link_executable (info)) > > return false; > > > > - info->flags |=3D 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 t= ogether? > The DF_STATIC_TLS change is pretty short, the formatting patch is trivial= . > As for the last patch introducing a comment change, I=E2=80=99m not sure = what Mengqing=E2=80=99s stance is, but my intention for the comment change = is to provide a better context for the reader rather than comparing to a so= lution that is not currently implemented in the codebase. > > Tatsuyuki. I think this is correct and should be applied. --=20 =E5=AE=8B=E6=96=B9=E7=9D=BF