On Sun, Jan 20, 2013 at 8:43 AM, Saul Tamari <stamari@xxxxxxxxx> wrote: > > In a previous post you said "Putting code not compiled with -fPIC in a > shared library will slow down program startup, and make the program > less secure because the text segment will be writable." > Now, If I decide to use -ftls-model, instead of -fpic, is there a way > to set the library's text segments read-only like I was using -fpic? No. If you put code compiled without -fpic into a shared library, the text segments will not be read-only at program startup time. Ian