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