Re: [PATCH] ppc: add "-z notext" flag to disable diagnostic
From: Segher Boessenkool
Date: Sat Aug 14 2021 - 07:09:27 EST
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