From: Thomas Huth <thuth@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org
Subject: Re: [PATCH] powerpc: Link with -z notext
Date: Mon, 16 Nov 2026 09:22:21 +0100 [thread overview]
Message-ID: <942375ef-cab9-4746-ab18-184b2761a8d1@redhat.com> (raw)
In-Reply-To: <4bcbdea1-b2a2-4f09-881c-c6d116b59127@redhat.com>
Am 13.11.26 um 13:03 schrieb Thomas Huth:
> Am 11.11.26 um 11:18 schrieb Amit Machhiwal:
>> Hi Thomas,
>>
>> On 2026/11/11 08:54 AM, Thomas Huth wrote:
>>> Am 10.11.26 um 16:44 schrieb Amit Machhiwal:
>>>> Building the powerpc tests with GNU ld 2.46.1 fails when linking the
>>>> test binaries:
>>>>
>>>> /usr/bin/ld.bfd: error: read-only segment has dynamic relocations
>>> Hi!
>>>
>>> This does not happen for me (using GNU ld version 2.46.1-1.fc44 from Fedora
>>> 44) ... which compiler and distro are you using?
>>
>> Thanks for checking!
>>
>> I'm also using the same GNU ld version on Fedora 44 PPC64LE host (more
>> details
>> are below). Are you cross compiling on an x86 host by any chance where
>> you are
>> not seeing this problem?
>
> Yes, I was cross-compiling, so that's likely the reason why I did not see
> the issue.
>
> Anyway, could you please check the following patch to see whether it fixes
> the issue for you, too:
>
> https://lore.kernel.org/kvm/20261113120101.145183-1-thuth@redhat.com/
>
> ... that compiles the powerpc code with "-fpie" in the CFLAGS, so I think it
> should cure the issue, too, and it's likely the better way instead of
> suppressing the warnings with "-z notext".
I was finally able to get access to a ppc64 machine, and my patch is
apparently causing other trouble there:
/usr/bin/ld.bfd: powerpc/cstart64.o: warning: relocation against
`stackptr' in read-only section `.init'
So I went ahead and pushed your patch with "-z notext" instead to have at
least a workaround 'til we figured out whether we can and want to push the
"-pie" flag to the cpu-specific folders or not.
Thomas
next prev parent reply other threads:[~2026-11-16 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 15:44 [PATCH] powerpc: Link with -z notext Amit Machhiwal
2026-11-11 7:54 ` Thomas Huth
2026-11-11 10:18 ` Amit Machhiwal
2026-11-13 12:03 ` Thomas Huth
2026-11-16 8:22 ` Thomas Huth [this message]
2026-11-11 8:30 ` Thomas Huth
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=942375ef-cab9-4746-ab18-184b2761a8d1@redhat.com \
--to=thuth@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lvivier@redhat.com \
--cc=maddy@linux.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox