From patchwork Thu Dec 28 14:58:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tatsuyuki Ishi X-Patchwork-Id: 183746 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp2040616dyb; Thu, 28 Dec 2023 06:58:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqr9C224ODhwVk9TIb3YhKqBxK/rPKKBcUVPeRFnbNiuszEjmEJoN40ya/IP0OqCEJ6f0r X-Received: by 2002:a05:620a:6112:b0:781:5f1e:412a with SMTP id oq18-20020a05620a611200b007815f1e412amr2927132qkn.40.1703775499206; Thu, 28 Dec 2023 06:58:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703775499; cv=pass; d=google.com; s=arc-20160816; b=UBsd3EANOCGbFFbExbyAHAS7N8aBXVKSpxJPau4/GKCwGHW3QZmNXmia51izxxpGS0 8ldtlYCz934z3NPqBoVNPKw2JMgqokk0GjcVR8O0F/JtPORSgPTcZtWSTlJeCFH+jYPt g8s/91g7QxteavRDVR5808mqJ4NVp8JHSozTgKmmCmS38V19xekkkXux55kIihkMZMfM u295yQz2bRg44GpIm97pQT35zUkC/hHkCQS3TTpE+uB6MFCoXZk6xzL2ZjU/uIDbPHjL J5xBo2K2ig4b5l9aOW7+cb3qKRVsRGYF6K6yNvvXhtKJzGvTwO/e1wb4Qdt/tTKr3trY 1Gkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=ZEpVBOOaPkMvPAJO94cKt53yHsIt2C/JASHRIVC2m3g=; fh=668u74SvSvArSqc7noKmensIZFIe0zihgHJnrvcGugg=; b=lUMB92RYMZ0rc1QPZrwHSpjmiBgljwriLf9jCJozSE/E90BxFcbDdxd3fMZVHIIgLL NopfRkHNHM5wPnqRwIp8KeeaJemuvLGhj5SiGExfXk7bmxmiQhbJhxchOaUFicUpA7NA Jw+oY29FgPT4yWiSs4GXB99nUikQIaDUpnn99QUJn/9/GnF9HXcV/i+elAY4FN9Ch0+1 eplXe2YdeL9Jp+37vvFG+sdSOy3KNIzXCHNsTkx8lu53/bs/aKk8S2WCkOZPsiTDC0cc XGZigUrJXuEYbZn+bQ5j4G0jGPG6cisdytAuDPsrHTZsYn19WrzPAdqX11oRXVtkaqJD peoQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WqQqsXaJ; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id h27-20020a05620a13fb00b00780fd9c0032si15887459qkl.276.2023.12.28.06.58.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 06:58:19 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WqQqsXaJ; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB4CE38582B6 for ; Thu, 28 Dec 2023 14:58:18 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by sourceware.org (Postfix) with ESMTPS id 926053858434 for ; Thu, 28 Dec 2023 14:58:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 926053858434 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 926053858434 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::52b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703775489; cv=none; b=TO1V9G4eZZgXdbrlEP37Lp9cgrmFANSSdWM66crdvbNdMi/fCiTCJZuYtW45NjiImwAJgvO9rRzngPrOUQF0gMEVUIo+NaWZoXWVRat8LvJaOFdMZWaORa+NJDqpwZEAQfCJeyFO8Kvmz3xDmms/P778a5ETEpFVho4L6Hchih4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703775489; c=relaxed/simple; bh=P0Fy2hy2EuhrphjIFQ4A80dYmQ5WRuUPoUGVeo5DMXk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Dk/x4hTfoAeeB7ohM6qs3vrT0giJsH15jeDwL33pf23y+HsfbxYSX0Ndd3wAe7YJ13PlnasniWvcmPxV/+b7EJo4SQVPKGByiRHkhsDR2EYrMAO3wuKqdWzEmUdQl0cTMz+aEmeFyVKGVJwdVoeQiMMiBZKbmm3hGCo+UHkvf90= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pg1-x52b.google.com with SMTP id 41be03b00d2f7-5cdf90e5cdeso807566a12.1 for ; Thu, 28 Dec 2023 06:58:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703775485; x=1704380285; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZEpVBOOaPkMvPAJO94cKt53yHsIt2C/JASHRIVC2m3g=; b=WqQqsXaJ/+TT2UGnjBxstgvs7XmI3W/z5iTjvZZl0tu/cn5uzpxd6eGXxIfb9um8Dl Eiq7tRsvpgWEUZGWqAhTcrZB/xNA2J+Qq/MtcBA5curvW8MVHhl2Jt1D0YV8PHSKQ3uN 8L7+x5nUa6bESO7Aq8fUBCQCdjtcxSF+6EDl1yiSzCjpjF79KLB91QpD0svN1G3hzPlE OdnIHEwx/tQqxm9aJpjOqht3G5b+crJEgVRzJvr0aMzg7vG84xESd+MQEObdEGqdUcD9 xjPLwJZtswXnJKyk5HqLNOPtfdYm/K4x4tGDpvCMj7lqWpNxfaiDsl6XBY2Cu5qCIjcJ iqGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703775485; x=1704380285; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZEpVBOOaPkMvPAJO94cKt53yHsIt2C/JASHRIVC2m3g=; b=g7KKHeV9sl/kZde0VhlNl2lgmjePdF8EayjqAopNcfXuaEYwKk9iB3mDI+nClW4l9L +0AeAlNc06tTvfkvQe2fXob6Um7uJzg/rpCC2atwDpj8EA2ABbBHrP0fSh4kx1p0WOOt y9xxAgMVzd2wyC2h0/lHFIBp21TyXBq5T+/D+dw66jwgt2eyEdIJ/W+RbxF0Te/xXftQ yxPtILbKhrQPS4t+glH03DPw/MB6sSVMBmozsF6RtBkUt6uQYlze+o5LUKU9jm+PM3hP FUkYpwDTxOhTGlW1aFwXyzXzl232RQdK3wRYm6zRFBRdTt48WtP2JtnokpwMAfzC/Nym lTow== X-Gm-Message-State: AOJu0YwBwSDCqjubersbXbMCRoFsR8jkBEqEUU0cvZZ/TT1JifVmJ0xG FuwQon+BC/sIaytYfDXjNx/Hq2+sfiA8hgFS X-Received: by 2002:a05:6a21:819b:b0:196:16b0:c554 with SMTP id pd27-20020a056a21819b00b0019616b0c554mr5366177pzb.5.1703775485473; Thu, 28 Dec 2023 06:58:05 -0800 (PST) Received: from localhost (zz20184013906F627101.userreverse.dion.ne.jp. [111.98.113.1]) by smtp.gmail.com with ESMTPSA id bd33-20020a056a0027a100b006d9a96b7d0dsm9258812pfb.208.2023.12.28.06.58.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 06:58:04 -0800 (PST) From: Tatsuyuki Ishi To: binutils@sourceware.org Cc: cailulu@loongson.cn, chenglulu@loongson.cn, hejinyang@loongson.cn, i.swmail@xen0n.name, liuzhensong@loongson.cn, luweining@loongson.cn, maskray@google.com, mengqinggang@loongson.cn, nickc@redhat.com, wanglei@loongson.cn, xry111@xry111.site, xuchenghua@loongson.cn, Tatsuyuki Ishi Subject: [PATCH] LoongArch: Do not add DF_STATIC_TLS for TLS LE Date: Thu, 28 Dec 2023 23:58:00 +0900 Message-ID: <20231228145802.74719-1-ishitatsuyuki@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786538097621740036 X-GMAIL-MSGID: 1786538097621740036 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))