[git commit ldso-future] Fix nommu handling of DT_TEXTREL

Bernd Schmidt bernds at codesourcery.com
Tue Apr 12 11:23:14 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=56ea76b6bf190bffdc07aba90e4b25dfc096027b
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/ldso-future

We have a problem with DT_TEXTREL shared libraries on nommu machines.
The dynamic linker's strategy is to map the text segment read-only
first, then look for DT_TEXTREL, and use mprotect to change protections
if necessary. This fails on nommu, since a nommu kernel can decide to
share the memory for private read-only file mappings, and mprotect
doesn't (can't) do anything about this sharing. Existing nommu targets
apparently have no need for this, but on C6X, we may need to assign
library indices at run-time if no --dsbt-index option was passed to the
linker at build time.

Hence, the following patch, which instead of using mprotect, redoes the
mapping with PF_W set.

Signed-off-by: Bernd Schmidt <bernds at codesourcery.com>

Patch is too large, so refusing to show it


More information about the uClibc-cvs mailing list