SUNDAY, APRIL 19, 2026 GLIBC DIGEST · OPEN-SOURCE SYSTEMS DAILY VOL. 1 · NO. 109
Late Edition · APRIL 19, 2026 · VOL. 1 · NO. 109
The glibc Digest
— A Daily Record of the GNU C Library —
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.
Filed Under: elfTHPalignmenttestingPT_LOAD