All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Fangrui Song <maskray@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Paul Mackerras <paulus@samba.org>,
	Bill Wendling <morbo@google.com>,
	linuxppc-dev@lists.ozlabs.org, Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic
Date: Sat, 14 Aug 2021 06:01:50 -0500	[thread overview]
Message-ID: <20210814110150.GB1583@gate.crashing.org> (raw)
In-Reply-To: <CAKwvOd=rN9s5YBtt-AMnaqXhYCsAT=6yp29_oomRvTaev6Q6zw@mail.gmail.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Bill Wendling <morbo@google.com>,
	Fangrui Song <maskray@google.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>,
	Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org, Daniel Axtens <dja@axtens.net>
Subject: Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic
Date: Sat, 14 Aug 2021 06:01:50 -0500	[thread overview]
Message-ID: <20210814110150.GB1583@gate.crashing.org> (raw)
In-Reply-To: <CAKwvOd=rN9s5YBtt-AMnaqXhYCsAT=6yp29_oomRvTaev6Q6zw@mail.gmail.com>

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

  reply	other threads:[~2021-08-14 11:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 20:49 [PATCH] ppc: add "-z notext" flag to disable diagnostic Bill Wendling
2021-08-12 20:53 ` Nick Desaulniers
2021-08-12 20:53   ` Nick Desaulniers
2021-08-13 14:13 ` Daniel Axtens
2021-08-13 18:24   ` Bill Wendling
2021-08-13 18:24     ` Bill Wendling
2021-08-13 18:59     ` Nick Desaulniers
2021-08-13 18:59       ` Nick Desaulniers
2021-08-14 11:01       ` Segher Boessenkool [this message]
2021-08-14 11:01         ` Segher Boessenkool
2021-08-14 11:59     ` Michael Ellerman
2021-08-14 11:59       ` Michael Ellerman
2021-08-13 20:05   ` Fangrui Song
2021-08-13 20:05     ` Fangrui Song
2021-08-14 12:58     ` Segher Boessenkool
2021-08-14 12:58       ` Segher Boessenkool
2021-08-14 19:34       ` Fāng-ruì Sòng
2021-08-14 19:34         ` Fāng-ruì Sòng
2021-08-27 14:40         ` Segher Boessenkool
2021-08-27 14:40           ` Segher Boessenkool
2021-08-13 20:05 ` [PATCH v2] " Bill Wendling
2021-08-13 20:05   ` Bill Wendling
2021-08-27 13:15   ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210814110150.GB1583@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=dja@axtens.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maskray@google.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.