Re: [PATCH] alpha: Fix personality flag propagation across an exec
From: Maciej W. Rozycki
Date: Thu Jan 09 2025 - 15:10:59 EST
On Thu, 9 Jan 2025, Eric W. Biederman wrote:
> > So, this would be the 100% correct for alpha then which would not loose
> > any functionality even for 32-bit binaries?
>
> I don't think it is correct to think about 32-bit binaries on alpha.
>
> Alpha never had a 32bit instruction set. But at some point it looks
> like binaries that could not handle more than 31 bits of address
> space got ported and someone implemented a work-around. I guess this
> is the --taso option that Arnd mentioned.
This also saves some code space in non-PIE and plain static executables
as it takes fewer machine instructions to load a 64-bit address that is
known beforehand to be a sign-extended 32-bit value.
This is similar to the MIPS n32 ABI, which also implies a 32-bit address
space while still using 64-bit registers for everything, starting from
stack slots (it's also ILP32 with the `long long' C data type only making
proper use of the full width of the CPU registers, while Alpha's --taso
ABI is I believe IP32 (?) with the plain `long' C data type still 64-bit,
just as with the regular LP64 ABI).
This saving turned out quite important for some MIPS applications; less
so for the Alpha, where indeed it was mainly a portability matter at the
time when going beyond 32 bits (and writing clean code in the first place)
was a big thing for some people.
Maciej