aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2016-01-20 20:03:42 -0500
committerSandra Loosemore <sandra@gcc.gnu.org>2016-01-20 20:03:42 -0500
commit42d4fbb0f4c012f9cb9d2f95de91d143dac3a3a1 (patch)
tree216c84a150a4cf1cff75570f6667e5e4a049f9b9
parenta1a3812dd30da3f270a71c629ce1c7c1927b48dc (diff)
downloadgcc-42d4fbb0f4c012f9cb9d2f95de91d143dac3a3a1.zip
gcc-42d4fbb0f4c012f9cb9d2f95de91d143dac3a3a1.tar.gz
gcc-42d4fbb0f4c012f9cb9d2f95de91d143dac3a3a1.tar.bz2
invoke.texi (Instrumentation Options): Clarify -mmpx linking requirements.
2016-01-20 Sandra Loosemore <sandra@codesourcery.com> gcc/ * doc/invoke.texi (Instrumentation Options): Clarify -mmpx linking requirements. From-SVN: r232648
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/invoke.texi22
2 files changed, 16 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 724681d..82cb6d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2016-01-20 Sandra Loosemore <sandra@codesourcery.com>
+ * doc/invoke.texi (Instrumentation Options): Clarify -mmpx linking
+ requirements.
+
+2016-01-20 Sandra Loosemore <sandra@codesourcery.com>
+
* common.opt (feliminate-dwarf2-dups): Replace references to
"DWARF 2" with just "DWARF".
* config/ia64/ia64.opt (mdwarf2-asm): Likewise.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index c00746f..d281975 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9923,22 +9923,22 @@ is instrumented with checks of the pointer used for memory access against
bounds associated with that pointer.
Currently there
-is only an implementation for Intel MPX available, thus x86 target
+is only an implementation for Intel MPX available, thus x86 GNU/Linux target
and @option{-mmpx} are required to enable this feature.
MPX-based instrumentation requires
a runtime library to enable MPX in hardware and handle bounds
violation signals. By default when @option{-fcheck-pointer-bounds}
and @option{-mmpx} options are used to link a program, the GCC driver
-links against the @file{libmpx} runtime library and @file{libmpxwrappers}
-library. It also passes '-z bndplt' to a linker in case it supports this
-option (which is checked on libmpx configuration). Note that old versions
-of linker may ignore option. Gold linker doesn't support '-z bndplt'
-option. With no '-z bndplt' support in linker all calls to dynamic libraries
-lose passed bounds reducing overall protection level. It's highly
-recommended to use linker with '-z bndplt' support. In case such linker
-is not available it is adviced to always use @option{-static-libmpxwrappers}
-for better protection level or use @option{-static} to completely avoid
-external calls to dynamic libraries. MPX-based instrumentation
+links against the @file{libmpx} and @file{libmpxwrappers} libraries.
+Bounds checking on calls to dynamic libraries requires a linker
+with @option{-z bndplt} support; if GCC was configured with a linker
+without support for this option (including the Gold linker and older
+versions of ld), a warning is given if you link with @option{-mmpx}
+without also specifying @option{-static}, since the overall effectiveness
+of the bounds checking protection is reduced.
+See also @option{-static-libmpxwrappers}.
+
+MPX-based instrumentation
may be used for debugging and also may be included in production code
to increase program security. Depending on usage, you may
have different requirements for the runtime library. The current version