Preventing dynamic loader from replacing code

Wayne Johnson wdtj@yahoo.com
Tue Nov 22 18:06:00 GMT 2011


I am creating a module to load with an Apache web server on Linux.  The module uses PCRE to process some regular expressions.  I static link PCRE into the module to make sure it has the right version of PCRE.  The problem is that when Apache loads the module, it replaces my copy of PCRE with the one Apache has loaded.  Unfortunately the Apache one is incompatible.  


On Solaris, I used the -Breduce option to hide the PCRE sections from the dynamic linker.  Is there an similar way to do this with the GNU linker?  Any other ideas?



More information about the Binutils mailing list