Commit 42d4fbb0 by Sandra Loosemore Committed by Sandra Loosemore

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
parent a1a3812d
2016-01-20 Sandra Loosemore <sandra@codesourcery.com> 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 * common.opt (feliminate-dwarf2-dups): Replace references to
"DWARF 2" with just "DWARF". "DWARF 2" with just "DWARF".
* config/ia64/ia64.opt (mdwarf2-asm): Likewise. * config/ia64/ia64.opt (mdwarf2-asm): Likewise.
......
...@@ -9923,22 +9923,22 @@ is instrumented with checks of the pointer used for memory access against ...@@ -9923,22 +9923,22 @@ is instrumented with checks of the pointer used for memory access against
bounds associated with that pointer. bounds associated with that pointer.
Currently there 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. and @option{-mmpx} are required to enable this feature.
MPX-based instrumentation requires MPX-based instrumentation requires
a runtime library to enable MPX in hardware and handle bounds a runtime library to enable MPX in hardware and handle bounds
violation signals. By default when @option{-fcheck-pointer-bounds} violation signals. By default when @option{-fcheck-pointer-bounds}
and @option{-mmpx} options are used to link a program, the GCC driver and @option{-mmpx} options are used to link a program, the GCC driver
links against the @file{libmpx} runtime library and @file{libmpxwrappers} links against the @file{libmpx} and @file{libmpxwrappers} libraries.
library. It also passes '-z bndplt' to a linker in case it supports this Bounds checking on calls to dynamic libraries requires a linker
option (which is checked on libmpx configuration). Note that old versions with @option{-z bndplt} support; if GCC was configured with a linker
of linker may ignore option. Gold linker doesn't support '-z bndplt' without support for this option (including the Gold linker and older
option. With no '-z bndplt' support in linker all calls to dynamic libraries versions of ld), a warning is given if you link with @option{-mmpx}
lose passed bounds reducing overall protection level. It's highly without also specifying @option{-static}, since the overall effectiveness
recommended to use linker with '-z bndplt' support. In case such linker of the bounds checking protection is reduced.
is not available it is adviced to always use @option{-static-libmpxwrappers} See also @option{-static-libmpxwrappers}.
for better protection level or use @option{-static} to completely avoid
external calls to dynamic libraries. MPX-based instrumentation MPX-based instrumentation
may be used for debugging and also may be included in production code may be used for debugging and also may be included in production code
to increase program security. Depending on usage, you may to increase program security. Depending on usage, you may
have different requirements for the runtime library. The current version have different requirements for the runtime library. The current version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment