commit | 5135b3ae6ebc460418f7917bd36b368340e48d5a | [log] [tgz] |
---|---|---|
author | Nick Kralevich <nnk@google.com> | Fri Aug 10 21:08:42 2012 -0700 |
committer | Nick Kralevich <nnk@google.com> | Mon Aug 13 08:50:11 2012 -0700 |
tree | 9352c1ef42d3972e8e202eeabd0e7bfb73799b95 | |
parent | 0bf5cf87c6b7d3de8962ba132ecfb6f0e4b84f06 [diff] |
linker: don't perform unnecessary mprotects The linker only needs to mark the text segment as writable iff the file has text relocations. Unnecessarily calling mprotect when it isn't necessary is slow, and some security enhanced kernels don't like it. Pages which are simultaneously writable and executable are considered a no-no. The vast majority of executables / shared libraries on Android do NOT have text relocations. Change-Id: Ic38ce30a99b7e33ecf21efd9c108547a58eafa35