[PATCH v3 06/29] arm: Add <bits/pagesize.h>
Florian Weimer
fweimer@redhat.com
Mon May 12 12:55:30 GMT 2025
* Florian Weimer:
> While Linux only use HAVE_PAGE_SIZE_4KB in arch/arm/Kconfig, 32-bit
> Arm binaries can run on AArch64 kernels in compat mode, so they
> can observe the full range of page sizes that are possible on
> AArch64. The toolchain defaults do not reflect this, so xfail
> the future elf/tst-load-alignment test.
>
> Note: Alternatively, we could fix the page size at 4 KiB and tell people
> to use a 4 KiB kernel if running on AArch64. Maybe that's the right
> approach here?
Adhemerval, Wilco, any preferences here? I'm now tending towards the 4K
page size only approach (define both macros to 12).
Thanks,
Florian
> sysdeps/arm/bits/pagesize.h | 2 ++
> sysdeps/unix/sysv/linux/arm/Makefile | 3 +++
> 2 files changed, 5 insertions(+)
> create mode 100644 sysdeps/arm/bits/pagesize.h
>
> diff --git a/sysdeps/arm/bits/pagesize.h b/sysdeps/arm/bits/pagesize.h
> new file mode 100644
> index 0000000000..cd688d3fb0
> --- /dev/null
> +++ b/sysdeps/arm/bits/pagesize.h
> @@ -0,0 +1,2 @@
> +#define __GLIBC_PAGE_SHIFT_MIN 12
> +#define __GLIBC_PAGE_SHIFT_MAX 16
> diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
> index a73c897f43..5f9e03978d 100644
> --- a/sysdeps/unix/sysv/linux/arm/Makefile
> +++ b/sysdeps/unix/sysv/linux/arm/Makefile
> @@ -1,5 +1,8 @@
> ifeq ($(subdir),elf)
> sysdep-rtld-routines += aeabi_read_tp libc-do-syscall
> +# The toolchain defaults to 4K pages even though compat mode on 64-bit
> +# kernels may require larger page sizes.
> +test-xfail-tst-load-alignment = yes
> endif
>
> ifeq ($(subdir),misc)
More information about the Libc-alpha
mailing list