[PATCH v10] elf: Add test for THP alignment of large load segments
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Mon Apr 20 11:23:40 GMT 2026
Hi Rui,
> Add 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 with a sufficiently large executable
> segment via dlopen and inspects /proc/self/maps to check that the
> mapping address is aligned to the THP page size reported by the kernel.
>
> The test is skipped if the THP size cannot be determined or if THP is
> not enabled in "always" mode.
>
> Signed-off-by: WANG Rui <wangrui@loongson.cn>
LGTM - it now says UNSUPPORTED if THP is not [always]. Committed.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Cheers,
Wilco
More information about the Libc-alpha
mailing list