From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc: Implement ARCH_HAS_CC_CAN_LINK
Date: Sat, 3 Jan 2026 08:06:42 -0600 [thread overview]
Message-ID: <aVkico3Uno03-rkz@gate> (raw)
In-Reply-To: <f51557ff-412b-46e4-b968-78b4e4d9872d@kernel.org>
Hi!
On Sat, Jan 03, 2026 at 11:39:12AM +0100, Christophe Leroy (CS GROUP) wrote:
> Le 30/12/2025 à 08:06, Thomas Weißschuh a écrit :
> > The generic CC_CAN_LINK detection does not handle different byte orders.
> > This may lead to userprogs which are not actually runnable on the target
> > kernel.
>
> Isn't the kernel supposed to handle any userland endianess ? Macro
> SET_ENDIAN() is there for that as far as I understand.
Yes, the kernel does not get much data out of data structures in memory
in the first place :-)
> And if you want to be complete, I think you should also check whether the
> ELF ABI is v1 or v2.
ELFv2 is version 1 of ELF, as wel as version 1 of its particular ABI.
It is just a cutesy name. The thing now called "ELFv1" was called
"PowerOpen", or simply "PowerPC 64-bit ELF", or one of a hundred other
names :-)
All of the ABIs we use with PowerPC (in trunk, anyway) work with either
endianness (well, you need a userland built for it of course, and maybe
AIX and/or Darwin have not actually been designed to work with wrong-
endian as well).
But powerpc-{elf,linux} and powerpcle-{elf,linux} work equivalently
well, and so do both BE and LE versions of ELFv2 (yes, BE of that exists
just as well, and some distros even ship it!)
powerpc64-linux and powerpc64le-linux use different ABIs though (BE
ELFv1 and LE ELFv2, resp.)
Segher
next prev parent reply other threads:[~2026-01-03 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 7:06 [PATCH] powerpc: Implement ARCH_HAS_CC_CAN_LINK Thomas Weißschuh
2026-01-03 10:39 ` Christophe Leroy (CS GROUP)
2026-01-03 14:06 ` Segher Boessenkool [this message]
2026-01-05 9:01 ` Thomas Weißschuh
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=aVkico3Uno03-rkz@gate \
--to=segher@kernel.crashing.org \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=thomas.weissschuh@linutronix.de \
/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