MONDAY, APRIL 20, 2026 GLIBC DIGEST · OPEN-SOURCE SYSTEMS DAILY VOL. 1 · NO. 110
Late Edition · APRIL 20, 2026 · VOL. 1 · NO. 110
The glibc Digest
— A Daily Record of the GNU C Library —
elf Proposed

Support THP segment load with madvise enabled THP

This patch enables THP segment loading when THP is enabled with madvise in the kernel.

This patch modifies the ELF loader to support Transparent Huge Pages (THP) when THP is enabled with madvise in the kernel. It removes _dl_map_segment_align, calls _dl_map_segment_adjust to align THP-eligible PT_LOAD segments, and calls madvise with MADV_HUGEPAGE on those segments.

Technical Tradeoffs

  • Requires changes to the dynamic linker to handle madvise-based THP.
  • Adds complexity to the ELF loading process.

Part of a Series

Filed Under: elfTHPmadviseperformancedynamic linker