path: root/tools
diff options
authorRich Felker <>2012-06-06 11:21:28 -0400
committerRich Felker <>2012-06-06 11:21:28 -0400
commitf7d15dcc543c3b65c751064a5e51a0ec462f3cdb (patch)
tree1380d48118767c352e1f4604d46519226e2c6bd5 /tools
parent908bed20cd877a6c0c290c0c56cc7057ecc00296 (diff)
treat failure of mprotect in map_library as a fatal load failure
the error will propagate up and be printed to the user at program start time; at runtime, dlopen will just fail and leave a message for dlerror. previously, if mprotect failed, subsequent attempts to perform relocations would crash the program. this was resulting in an increasing number of false bug reports on grsec systems where rwx permission is not possible in cases where users were wrongly attempting to use non-PIC code in shared libraries. supporting that usage is in theory possible, but the x86_64 toolchain does not even support textrels, and the cost of keeping around the necessary information to handle textrels without rwx permissions is disproportionate to the benefit (which is essentially just supporting broken library setups on grsec machines). also, i unified the error-out code in map_library now that there are 3 places from which munmap might have to be called.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions