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/[email protected]/

... 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".

 Thomas


Reply via email to