FRIDAY, APRIL 17, 2026
elf — Proposed
Add test for THP alignment of large load segments
This patch adds a test to verify that large executable PT_LOAD segments are THP-aligned when glibc.elf.thp=1 and THP is in 'always' mode.
This patch adds a new test to verify that large executable PT_LOAD segments are mapped at addresses aligned to the THP size when the glibc tunable glibc.elf.thp=1 is enabled and the system is configured to use THP in “always” mode. The test loads a shared object and checks /proc/self/maps for THP alignment. The test skips if THP size is unavailable or not in “always” mode.
Technical Tradeoffs
- The test is skipped if the THP size cannot be determined or if THP is not enabled in "always" mode.
- Adds a new test file and modifies the Makefile.