diff mbox series

[v3,06/29] arm: Add <bits/pagesize.h>

Message ID e297f66c0046821adf1598b6694d3ee87893e2b5.1727624528.git.fweimer@redhat.com
State New
Headers show
Series Teach glibc about possible page sizes and handle gaps in ld.so | expand

Commit Message

Florian Weimer Sept. 29, 2024, 4 p.m. UTC
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?

---
 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 mbox series

Patch

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)