This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
- From: "macro at linux-mips dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 24 Jul 2006 14:53:50 -0000
- Subject: [Bug ports/1048] MIPS page size support for shared objects dlopen()ed from static ones
- References: <20050704153558.1048.macro@linux-mips.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- 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.