From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id AD4FD3858D20 for ; Tue, 13 Aug 2024 22:20:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD4FD3858D20 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 AD4FD3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::22b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723587604; cv=none; b=GrDZT6VJxet9JrL0wlK8vVStA9p9QB8SebifJukYqJvs1KkNOk4xzP3wVwM727B0Mg6tM67bp3R/JOnNk87Gq+m2q/4/i4aH+W1ao8vbpcmG4HLovSkalhiqTS+k+EKgWmQlWIhNFa7N52xw1edROFpbc0XGdBHHj2OebuMaX2g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723587604; c=relaxed/simple; bh=w2I3wcqOAY64ze3+n5O3rGd1e4wwmVYUHuRir/XREo0=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=bgAG06I6EEEh8ScGRG1TAqV/Mty7HC+aIzO3urA/1+qbcbR4DOAZotgUf4vm6o0xpVcP0qBFwao2rbp/jZ4lDBeRFZVNE2Skz4xAjQ0ByQV4Qg9Hzu68/w1AvF3GvZD3HYWPbwOU5p6QUw8iP17qOONF6vGLaWaV41S/LOL30Fg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x22b.google.com with SMTP id 5614622812f47-3db16b2c1d2so4409534b6e.2 for ; Tue, 13 Aug 2024 15:20:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723587602; x=1724192402; darn=sourceware.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=ga+taupGwGUYpmdpf9C77JzYkh0D1xRkH7DoGfkutcg=; b=TyfTcrzToCf8r0KcUauWh3uL8rPWIt/mK+M6q+7cmXZFvCRLuwvLNLqQO5JVYrGOAO fj63Tjsb0fy3hhGwMd07Wckl3x79OHiPUHjzz0A5XDT3zJvatnID9+o/LXsfFEs/Y9Vj /gzox0AW5B0qw34HF1g0b5kJk0h+EPuRvHeiNlM87xfqOMcqGjaDPj1HbKASghwQT2cZ uelxiYO8mWct4ERWw+M1WWUWxcYfv82i/VyIzJhDfqILaXMUwkKxqWYBbUnmgoSX1QOR Pl5dB2YITW3D9pg6qNwOPCWfajJsMj6Ixuoyix7vt/osqARiP3ENqEOhu5EVP4qLAvED fYbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723587602; x=1724192402; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ga+taupGwGUYpmdpf9C77JzYkh0D1xRkH7DoGfkutcg=; b=QOAY02eo5H805aAKRlKlmK8MQ1mR2XHfcTcrooPylNROCuhaZR6wNd16mq3kl4mMJR OAFsNUaIwoeZB9ePmrrmwvw4Cs2A/yQsOS5B/pOJs0jb6Vtq+i1cXhEXp0LYqV370K6n kBdMNBt57roZ61OS23azXw7baRGNdI05grlSybX3lfr5xFHlGfsFNvz8pbmGJvgLTNZY rtahwMQk4v+PsPi57QpqSJnI8yTG9XdIIn0Ugb5e4jOtyUMqWcFLsxQbylTGOiMVHCLS thGgBXTQ/siWwdygCtEkJBxrzDxdW2FDu2+L9W3+tbUw1m/S+4M4uB4R1KjV0ae8LOD2 5pWQ== X-Gm-Message-State: AOJu0Yxxfsyyu2IllHfD29Ab5QkEDUXCtKavbE3RMe2im5MUNFdCkAFw x7lfbh1F5pB3ZMd9PdKea/6KPa3I4koIgUw9h76FLJ0diRtn30VS X-Google-Smtp-Source: AGHT+IGYfdFT+4gdz96cmCdGdgvWd0vNCeGH+TifuuPh+Do2we91kslF/qicf8rnvBw/vbTyUbjV5Q== X-Received: by 2002:a05:6808:1313:b0:3d9:3a3e:48b9 with SMTP id 5614622812f47-3dd29973468mr1065436b6e.45.1723587601828; Tue, 13 Aug 2024 15:20:01 -0700 (PDT) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:40b2:e49a:9e70:9971]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7c6979d3d64sm1948101a12.19.2024.08.13.15.20.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 15:20:01 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 09936114007F; Wed, 14 Aug 2024 07:49:58 +0930 (ACST) Date: Wed, 14 Aug 2024 07:49:58 +0930 From: Alan Modra To: "H.J. Lu" Cc: binutils@sourceware.org Subject: Re: [PATCH] elf: Never set non_ir_ref_regular for debug reference Message-ID: References: <20240813000105.1287316-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240813000105.1287316-1-hjl.tools@gmail.com> X-Spam-Status: No, score=-3032.3 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 List-Id: On Mon, Aug 12, 2024 at 05:01:05PM -0700, H.J. Lu wrote: > Never set non_ir_ref_regular for debug reference since references in > debug sections shouldn't impact LTO output. > > * elflink.c (elf_link_add_object_symbols): Don't check strip for > references in debug sections when setting non_ir_ref_regular. OK. > > Signed-off-by: H.J. Lu > --- > bfd/elflink.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/bfd/elflink.c b/bfd/elflink.c > index 2430d606c30..ed0bd71859b 100644 > --- a/bfd/elflink.c > +++ b/bfd/elflink.c > @@ -5718,9 +5718,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) > if ((s->flags & SEC_RELOC) == 0 > || s->reloc_count == 0 > || (s->flags & SEC_EXCLUDE) != 0 > - || ((info->strip == strip_all > - || info->strip == strip_debugger) > - && (s->flags & SEC_DEBUGGING) != 0)) > + || (s->flags & SEC_DEBUGGING) != 0) > continue; > > internal_relocs = _bfd_elf_link_info_read_relocs > -- > 2.46.0 -- Alan Modra