Thread (8 messages) 8 messages, 3 authors, 2025-03-28

Re: [main-line]Build warnings on PowerPC system

From: Madhavan Srinivasan <maddy@linux.ibm.com>
Date: 2025-03-27 15:07:12
Also in: lkml
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds


On 3/27/25 7:31 PM, Venkat Rao Bagalkote wrote:
On 27/03/25 7:22 pm, Madhavan Srinivasan wrote:
quoted
On 3/27/25 12:33 AM, Venkat Rao Bagalkote wrote:
quoted
Greetings!!!

I see below build warnings while compiling mainline kernel on IBM Power9 system.

Repo Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/

Head Commit: f6e0150b2003fb2b9265028a618aa1732b3edc8f

Attached is the .config.

Machine: IBM Power9

gcc version 11.5.0
What is the ld version in your system.
Please find the ld version below.

GNU ld version 2.35.2-59.el9

ah ok that explains. Kindly can you try with this patch and let us know whether 
this fixes the warning in your setup

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 1db60fe13802..09ceb5a42d81 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -235,7 +235,7 @@ fi
 # suppress some warnings in recent ld versions
 nowarn="-z noexecstack"
 if ! ld_is_lld; then
-       if [ "$LD_VERSION" -ge "$(echo 2.39 | ld_version)" ]; then
+       if [ "$LD_VERSION" -ge "$(echo 2.35 | ld_version)" ]; then
                nowarn="$nowarn --no-warn-rwx-segments"
        fi
 fi


Regards,

Venkat.
quoted
Reason for asking is that currently with

commit  579aee9fc594a ("powerpc: suppress some linker warnings in recent linker versions")

ld version greater than >2.39, this warning is being suppressed.

Maddy
quoted
Warnings:

ld: warning: arch/powerpc/boot/zImage.epapr has a LOAD segment with RWX permissions
ld: warning: arch/powerpc/boot/zImage.pseries has a LOAD segment with RWX permissions


If you happen to fix this, please add below tag.


Reported-by: Venkat Rao Bagalkote <redacted>


Regards,

Venkat.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help