This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Solaris: Document -mimpure-text
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 28 Nov 2002 01:15:35 +0100
- Subject: Solaris: Document -mimpure-text
The error message "relocations remain against allocatable but
non-writable sections" is not clearly explained anywere (the ld(1)
manpage even says that the "-z text" option is not the default!). As
a result, people regularly use "-mimpure-text" without justification.
The documentation below tries to address this problem.
Okay for mainline?
2002-11-28 Florian Weimer <fw@deneb.enyo.de>
* doc/invoke.texi (SPARC Options): Document -mimpure-text.
--- invoke.texi.~1.202.~ Sat Nov 23 10:41:00 2002
+++ invoke.texi Thu Nov 28 01:10:47 2002
@@ -5503,6 +5503,22 @@
Generate output containing quad-word (long double) floating point
instructions.
+@item -mimpure-text
+@opindex mimpure-text
+@option{-mimpure-text}, used in addition to @option{-shared}, tells
+the compiler to not pass @option{-z text} to the linker when linking a
+shared object. Using this option, you can link position-dependent
+code into a shared object.
+
+@option{-mimpure-text} supresses the ``relocations remain against
+allocatable but non-writable sections'' linker error message.
+However, the necessary relocations will trigger copy-on-write, and the
+shared object is not actually shared across processes. Instead of
+using @option{-mimpure-text}, you should compile all source code with
+@option{-fpic} or @option{-fPIC}.
+
+This option is only available on SunOS and Solaris.
+
@item -msoft-quad-float
@opindex msoft-quad-float
Generate output containing library calls for quad-word (long double)