Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp183277pxy; Sat, 14 Aug 2021 04:13:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz83rMjBSTRaoYPs+4djNTczu1hGrGTVjtGFU1iUJnJy49zklk+x23by6YjDGgqCgXG8YJf X-Received: by 2002:aa7:c4cd:: with SMTP id p13mr8385421edr.251.1628939622963; Sat, 14 Aug 2021 04:13:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628939622; cv=none; d=google.com; s=arc-20160816; b=qJ+GMKOX1NxmR6ZAMqi/uVCq8XcoSuzv9rL/B4Wf7gTAiSOhVLb/QMZdDH4idyW8F2 bg07UXsBXXfjsfpWB7YnZHhVrGejKLVTLmRHt9e/uIPwBbyJdjm614bhHBpXogYNy/56 q77bVcyZTyUwlG0OYdIcgt2hQMCfQQVkbqSYV+XaBc1NZ4+5tkibJWkpYsBugR7DJ6mG KZf4LMYQM1xdqjp2DGWooKdlxp8z3ujRV0Vzy2YnrmADcDORbb+u00NaeKobi5P24hT1 3HF+/z7IhHobvQqmroIH28fLOlPPGdHvqVrYRFSaiAC/QYy5ymhvkSzdboduZhfp/1Rq e1kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=MS5++P/2/O+kfNY+7JJ7s6WR+uuPBa6VUdyJm209goo=; b=wwjCsCIGP+35HM5hVRq2W5JPKIJHwxybSK0KS7f+Icpfj46ZKFc+sUcuogcrU2FClc qNhUG3FrndKPvdXOwv1sFHIxXOu+llBxR/mnoVpQDvZ84JSABZl48WroastoSvw0nKZP Cl7m/WTOYUMfhRBzf4ABsRh5BovAjJZ+WR6TebkCU0ehU2nvEnmftXCFIysnl6S+/SUs ZeSgWL+ymVp476yhUBIDclBOKEEM4+7XXZgIFfVuDwDdrDIvgRbc9eLd13Kg1jEzkiHy NlIQhaDcdTG1OQ+PeWyZ7cNdlYpxkivU2FqfwMv/wQNh4bUjRF2JPhUgmYIdVxhXjs4J DTJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si4696425edv.391.2021.08.14.04.13.20; Sat, 14 Aug 2021 04:13:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238211AbhHNLJx (ORCPT + 99 others); Sat, 14 Aug 2021 07:09:53 -0400 Received: from gate.crashing.org ([63.228.1.57]:53349 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238067AbhHNLJw (ORCPT ); Sat, 14 Aug 2021 07:09:52 -0400 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 17EB1pvM008610; Sat, 14 Aug 2021 06:01:51 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 17EB1o3c008609; Sat, 14 Aug 2021 06:01:50 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Sat, 14 Aug 2021 06:01:50 -0500 From: Segher Boessenkool To: Nick Desaulniers Cc: Bill Wendling , Fangrui Song , LKML , Nathan Chancellor , clang-built-linux , Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Daniel Axtens Subject: Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic Message-ID: <20210814110150.GB1583@gate.crashing.org> References: <20210812204951.1551782-1-morbo@google.com> <87sfzde8lk.fsf@linkitivity.dja.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 13, 2021 at 11:59:21AM -0700, Nick Desaulniers wrote: > Or we can dig through why there are relocations in read only sections, > fix those, then enable `-z text` for all linkers. My recommendation > would be get the thing building, then go digging time permitting. It is not always a bug. You can get much more efficient code if you have text relocations than if you don't. This "read-only" memory is perfectly writable until after relocation, a la relro. But you no doubt will find some non-optimalities (or even straight out bugs) if you build with -ztext sometimes :-) Segher