From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEEF9C4338F for ; Sat, 14 Aug 2021 11:09:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8BF5760EFE for ; Sat, 14 Aug 2021 11:09:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238087AbhHNLJy (ORCPT ); Sat, 14 Aug 2021 07:09:54 -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