Re: [PATCH 1/3] crypto: X25519 low-level primitives for ppc64le.

From: Segher Boessenkool
Date: Thu May 16 2024 - 15:52:43 EST


Hi!

On Thu, May 16, 2024 at 10:06:58PM +1000, Michael Ellerman wrote:
> Andy Polyakov <appro@xxxxxxxxxxxxxx> writes:
> >>> +.abiversion 2
> >>
> >> I'd prefer that was left to the compiler flags.
> >
> > Problem is that it's the compiler that is responsible for providing this
> > directive in the intermediate .s prior invoking the assembler. And there
> > is no assembler flag to pass through -Wa.
>
> Hmm, right. But none of our existing .S files include .abiversion
> directives.
>
> We build .S files with gcc, passing -mabi=elfv2, but it seems to have no
> effect.

Yup. You coulds include some header file, maybe? Since you run the
assembler code through the C preprocessor anyway, for some weird reason :-)

> But the actual code follows ELFv2, because we wrote it that way, and I
> guess the linker doesn't look at the actual ABI version of the .o ?

It isn't a version. It is an actual different ABI.

GNU LD allows linking together whatever, yes.

> Is .abiversion documented anywhere? I can't see it in the manual.

Yeah me neither. https://sourceware.org/bugzilla/enter_bug.cgi ?
A commandline flag (to GAS) would seem best?


Segher