Problem with p_align and AT_PAGESZ check

H. J. Lu hjl@lucon.org
Sat Jun 14 15:18:00 GMT 2003


The current ld.so assumes p_align & (GL(dl_pagesize) - 1) == 0. I don't
believe it is currect for all platforms. p_align is specified by psABI.
On i386, it has to be 4KB no matter what value is passed by AT_PAGESZ
from kernel. The p_align and GL(dl_pagesize) check should be platform
dependent. On i386, it should be

	if (p_align != 0x1000
	    || ((GL(dl_pagesize) & (p_align - 1)) != 0)
	    error

or
	if (p_align != 0x1000)
	    error

When GL(dl_pagesize) > p_align, there may be one page with mixed text
and data segments. 

H.J.



More information about the Libc-alpha mailing list