This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Variable page size support for MIPS/Linux


On Sat, 27 Dec 2003, Roland McGrath wrote:

> What makes you think changes are required?  
> _dl_non_dynamic_init takes care of this already.

 As Linux uses the auxiliary vector to report the page size,
_dl_non_dynamic_init() is not used for initializing _dl_pagesize;
_dl_aux_init() is used instead.  Then _dl_aux_init() is only called for a
statically linked executable (as is _dl_non_dynamic_init()).  When such a
binary calls dlopen() and ld.so is loaded as a result, then this loader's
_dl_pagesize remains uninitialized, because its _dl_sysdep_start()
function (which is the one to initialize _dl_pagesize from the auxiliary
vector for ld.so) isn't called.  At this point the auxiliary vector might
have already been overwritten (as its located at the process's stack), so
there is no point trying to fetch any values from it.  So the page size
needs to be read from the static executable's _dl_pagesize and explicitly
passed to ld.so being loaded.  This is what the code does.  This is
nothing discovering -- IA64 uses the same approach.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]