From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id AEEF73858D32 for ; Thu, 10 Aug 2023 23:02:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AEEF73858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6874d1c8610so1153994b3a.0 for ; Thu, 10 Aug 2023 16:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691708578; x=1692313378; 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=tTeUhHI24JX00Db95Erb314J9Iu/kne6bIlVlOYRtDM=; b=jfqSIsVlUeEswn3p3xsgManp2xmRIopyg6ZibMhG+vjDO4CARQdo49CwCyxvYuPOJk 1itFLfCMV3KQv7ojjI7ezlYshxLMO6NoWs/vV0jCm26Y3bxGMcGRWAd2ty+TllvNLMST /lyVvNLyFCjpYBBIAMInFhYnZKXUxtax9Jv22kvYTrJ/j6Gn6IwoztmQIBowA5NW8bxX mw2uDoDgHzbMXCj9GfIaD1OJ8hkk8ulsdftXo1ONJEntvTaerV/7QR77kyXS1/EtuFpm 4WViP6F1xttvdqwkRcZgOtWIW7ztDfP4kv8AJYrOFRbMC02iw/zrbRxexGcmuHVslNsJ iryQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691708578; x=1692313378; 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=tTeUhHI24JX00Db95Erb314J9Iu/kne6bIlVlOYRtDM=; b=bVzH3/sLl1U1pJkqQc6N2X0IuGaaXglZfC6BUEn4hbezsCIO5XPk7+frrq1Z3hHCwx eKwQceeBEVeSlNxK5cskFamIUOnXEapb9nHJfb2PGSjjnKZUuSasmEv/SoGVT8Kqxy2b b/fc/jx8EuTa7AlBS1clzYFlR6ktj9IO25TwntqmQis7AtHfcdvCXkClnWRaQaErD4J2 biozbqs/64ft6sWdq/VrmpUwAq+ArFV5rvo0xF8vs1P6COSzZ1NFeUj5zTmwcJBCRtI5 1hFDqLOUeMHjxPGzL4RNr6rb/4U03NxCf4AS0gb4/+x/XLUaGdXixUtZF0fgkhhHrPHe Sgqw== X-Gm-Message-State: AOJu0Yw18AaQA9TceQjIBLz+dVDzNUQxnuiS76CGkwEEfsdukr9R+kuR nrHg6rEKMUFQrX/urXzkERJyi/fcqy8= X-Google-Smtp-Source: AGHT+IEnfhn6n8gYVQeFk35P19qyvWNGkklBArCo58aIjqKiw8DrcdaUZF7/as/f9bnoHqIn23/h9g== X-Received: by 2002:a17:90a:8d08:b0:263:f435:ef2d with SMTP id c8-20020a17090a8d0800b00263f435ef2dmr21623pjo.10.1691708577607; Thu, 10 Aug 2023 16:02:57 -0700 (PDT) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id ei23-20020a17090ae55700b00262e604724dsm3889203pjb.50.2023.08.10.16.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 16:02:56 -0700 (PDT) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 9454B1142442; Fri, 11 Aug 2023 08:32:53 +0930 (ACST) Date: Fri, 11 Aug 2023 08:32:53 +0930 From: Alan Modra To: Jan Beulich Cc: Jinyang He , mengqinggang , binutils@sourceware.org, Xing Li , Xi Ruoyao Subject: Re: [PATCH] Make sure DW_CFA_advance_loc4 is in the same frag Message-ID: References: <8771969c-b332-c008-3e35-c37c6c420c6e@loongson.cn> <17e42638-1b32-b7d5-7d85-3417b9375ba8@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17e42638-1b32-b7d5-7d85-3417b9375ba8@suse.com> X-Spam-Status: No, score=-3028.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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 Thu, Aug 10, 2023 at 02:55:20PM +0200, Jan Beulich wrote: > On 10.08.2023 14:36, Jinyang He wrote: > > On /Thu Aug 10 07:55:58 GMT 2023 /Jan Beulich wrote: > > > >> On 10.08.2023 04:21, Jinyang He wrote: > >>> /The DW_CFA_advance_loc4 may be in different frags. Then fr_fix />/may caused something wrong. Referenced by commit b9d8f5601bcf />/("Re: Optimise away eh_frame advance_loc 0"). / > >> I'm afraid I don't understand that earlier fix: frag_more(1) there > >> ought to guarantee fr_fix (once the frag is closed) to be >= 1. > >> It would then seem to me that ... > > > > I'm not familiar with it. Please point out my mistakes. Thanks in advance. > > Well, Alan has approved your change. Maybe it's me who is wrong here. The idea behind commit b9d8f5601bcf was that when a DW_CFA_advance_loc4 of zero is seen in eh_frame_relax_frag and eh_frame_convert_frag we want to remove the opcode entirely, not just convert to a nop. If the opcode was split over two frags then the size adjustment would need to be done to the first frag, not the second as is correct for other cases with split frags. This would complicate the eh relaxation. It's easier to ensure the frag is not split. -- Alan Modra Australia Development Lab, IBM