This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: _ioperm support for Arm
On Thu, May 30, 2019 at 6:25 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Wed, 29 May 2019, Phil Blundell wrote:
>
> > You're correct that it isn't practical for an ARMv4 machine to be
> > EABI conformant because the EABI mandates interworking and ARMv4
> > doesn't have BX/BLX, but last time I looked glibc did still have
> > all the right conditional guards in place to allow for compilation
> > on an ARMv4 platform. I haven't checked recently though and it's
>
> The EABI fully supports v4t (though I haven't tested glibc on v4t hardware
> for a few years), but not v4. There are two ways in which there can be
> some limited support for the EABI on v4:
>
> * --fix-v4bx can be passed to the assembler and linker (and GCC does so
> automatically for v4). When passed to the assembler, it results in
> R_ARM_V4BX relocations on BX instructions; when passed to the linker, it
> results in those instructions being rewritten into a form that works on v4
> (so the .o files are interworking-safe but can also be used on v4 if the
> linker option is used). This is mainly useful in bare-metal contexts with
> static linking only; it's not so good in a dynamic linking context where
> linked Arm code in an executable might later get run with Thumb code in a
> shared library on a newer processor.
I think this is what the remaining Linux users on StrongARM and FA526
platforms do, but I don't know if they use glibc or not. Those might
still use shared libraries, but it would be safe to assume that they are
never mixed with interworking ones, as these machines tend to run
a custom cross-built-from-source distro.
You can still buy new products using the FA526 ARMv4 CPU such
as the Moxa 'ART' SoC, and a notable user base on StrongARM based
PDAs and 'Cortina Gemini' SoC NAS boxes running modern code
on them.
I expect that the coming gcc-10 release will drop armv4 CPUs after
gcc-9 dropped armv3, but it should still be possible to build user
space with -march=armv4t and --fix-v4bx.
Arnd