This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones


------- Additional Comments From macro at linux-mips dot org  2006-07-24 14:53 -------
 The dl_pagesize variable is in the RELRO segment.  At the point
_dl_static_init() is called this segment has already been write-protected.
Therefore to initialize the variable, the segment has to be made writable
beforehand and then reset to read-only afterwards.  I have chosen to reuse
_dl_protect_relro() for fiddling with the permissions as it already has
all the necessary bits, except from the ability to specify permissions
different to currently hardcoded PROT_READ.

 If you would rather prefer another function, say _dl_unprotect_relro(),
doing the same what _dl_protect_relro() does, except from hardcoding
PROT_READ | PROT_WRITE instead, that is easily doable, but of questionable
gain.

 My understanding is IA64 currently goes away without hitting the problem,
because ld does not create the RELRO segment for this architecture as
COMMONPAGESIZE is unset.  It looks like the intent is to enable the
setting eventually (see emulparams/elf64_ia64.sh for details), which will
result in the same issue that hit me when implementing initialization of
dl_pagesize for MIPS.

 I hope this is clear enough now.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=1048

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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