Commit 7651042e by Sandra Loosemore Committed by Sandra Loosemore

invoke.texi (-fcheck-pointer-bounds): Copy-edit, add additional index entries and cross-references.

2015-03-21  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* doc/invoke.texi (-fcheck-pointer-bounds): Copy-edit, add
	additional index entries and cross-references.
	(-fchkp-check-incomplete-type): Likewise.
	(-fchkp-first-field-has-own-bounds): Likewise.
	(-fchkp-narrow-to-innermost-array): Likewise.
	(-fchkp-use-fast-string-functions): Likewise.
	(-fchkp-use-nochk-string-functions): Likewise.
	(-fchkp-use-static-const-bounds): Likewise.
	(-fchkp-treat-zero-dynamic-size-as-infinite): Likewise.
	(-fchkp-instrument-marked-only): Likewise.
	(-fchkp-use-wrappers): Likewise.
	(-static-libmpx): Likewise.
	(-static-libmpxwrappers): Likewise.
	* doc/extend.texi (bnd_legacy): Likewise.
	(bnd_instrument): Likewise.
	(bnd_variable_size): Likewise.
	(Pointer Bounds Checker builtins): Likewise.

From-SVN: r221558
parent 844d9a76
2015-03-21 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (-fcheck-pointer-bounds): Copy-edit, add
additional index entries and cross-references.
(-fchkp-check-incomplete-type): Likewise.
(-fchkp-first-field-has-own-bounds): Likewise.
(-fchkp-narrow-to-innermost-array): Likewise.
(-fchkp-use-fast-string-functions): Likewise.
(-fchkp-use-nochk-string-functions): Likewise.
(-fchkp-use-static-const-bounds): Likewise.
(-fchkp-treat-zero-dynamic-size-as-infinite): Likewise.
(-fchkp-instrument-marked-only): Likewise.
(-fchkp-use-wrappers): Likewise.
(-static-libmpx): Likewise.
(-static-libmpxwrappers): Likewise.
* doc/extend.texi (bnd_legacy): Likewise.
(bnd_instrument): Likewise.
(bnd_variable_size): Likewise.
(Pointer Bounds Checker builtins): Likewise.
2015-03-21 Tom de Vries <tom@codesourcery.com> 2015-03-21 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/65458 PR tree-optimization/65458
......
...@@ -5843,31 +5843,42 @@ is usable even in freestanding environments. ...@@ -5843,31 +5843,42 @@ is usable even in freestanding environments.
@item -fcheck-pointer-bounds @item -fcheck-pointer-bounds
@opindex fcheck-pointer-bounds @opindex fcheck-pointer-bounds
@opindex fno-check-pointer-bounds @opindex fno-check-pointer-bounds
@cindex Pointer Bounds Checker options
Enable Pointer Bounds Checker instrumentation. Each memory reference Enable Pointer Bounds Checker instrumentation. Each memory reference
is instrumented with checks of pointer used for memory access against is instrumented with checks of the pointer used for memory access against
bounds associated with that pointer. Generated instrumentation may bounds associated with that pointer.
be controlled by various @option{-fchkp-*} options. Currently there
is only Intel MPX based implementation available, thus i386 target Currently there
and @option{-mmpx} are required. MPX based instrumentation requires is only an implementation for Intel MPX available, thus x86 target
a runtime library to enable MPX in a hardware and handle bounds 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} 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 @option{libmpx} runtime library. MPX based instrumentation links against the @file{libmpx} runtime library. MPX-based instrumentation
may be used for a debugging and also it may be included into a release may be used for debugging and also may be included in production code
version to increase program security. Depending on usage you may to increase program security. Depending on usage, you may
put different requirements to runtime library. Current version have different requirements for the runtime library. The current version
of MPX runtime library is more oriented to be used as a debugging of the MPX runtime library is more oriented for use as a debugging
tool. MPX runtime library usage implies @option{-lpthread}. See tool. MPX runtime library usage implies @option{-lpthread}. See
also @option{-static-libmpx}. The runtime library behavior can be also @option{-static-libmpx}. The runtime library behavior can be
influenced using various @env{CHKP_RT_*} environment variables. See influenced using various @env{CHKP_RT_*} environment variables. See
@uref{https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler} @uref{https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler}
for more details. for more details.
Generated instrumentation may be controlled by various
@option{-fchkp-*} options and by the @code{bnd_variable_size}
structure field attribute (@pxref{Type Attributes}) and
@code{bnd_legacy}, and @code{bnd_instrument} function attributes
(@pxref{Function Attributes}). GCC also provides a number of built-in
functions for controlling the Pointer Bounds Checker. @xref{Pointer
Bounds Checker builtins}, for more information.
@item -fchkp-check-incomplete-type @item -fchkp-check-incomplete-type
@opindex fchkp-check-incomplete-type @opindex fchkp-check-incomplete-type
@opindex fno-chkp-check-incomplete-type @opindex fno-chkp-check-incomplete-type
Generate pointer bounds checks for variables with incomplete type. Generate pointer bounds checks for variables with incomplete type.
Enabled by default Enabled by default.
@item -fchkp-narrow-bounds @item -fchkp-narrow-bounds
@opindex fchkp-narrow-bounds @opindex fchkp-narrow-bounds
...@@ -5880,15 +5891,15 @@ and @option{-fchkp-first-field-has-own-bounds}. Enabled by default. ...@@ -5880,15 +5891,15 @@ and @option{-fchkp-first-field-has-own-bounds}. Enabled by default.
@item -fchkp-first-field-has-own-bounds @item -fchkp-first-field-has-own-bounds
@opindex fchkp-first-field-has-own-bounds @opindex fchkp-first-field-has-own-bounds
@opindex fno-chkp-first-field-has-own-bounds @opindex fno-chkp-first-field-has-own-bounds
Forces Pointer Bounds Checker to use narrowed bounds for address of the Forces Pointer Bounds Checker to use narrowed bounds for the address of the
first field in the structure. By default pointer to the first field has first field in the structure. By default a pointer to the first field has
the same bounds as pointer to the whole structure. the same bounds as a pointer to the whole structure.
@item -fchkp-narrow-to-innermost-array @item -fchkp-narrow-to-innermost-array
@opindex fchkp-narrow-to-innermost-array @opindex fchkp-narrow-to-innermost-array
@opindex fno-chkp-narrow-to-innermost-array @opindex fno-chkp-narrow-to-innermost-array
Forces Pointer Bounds Checker to use bounds of the innermost arrays in Forces Pointer Bounds Checker to use bounds of the innermost arrays in
case of nested static arryas access. By default it is disabled and case of nested static array access. By default this option is disabled and
bounds of the outermost array are used. bounds of the outermost array are used.
@item -fchkp-optimize @item -fchkp-optimize
...@@ -5900,13 +5911,13 @@ optimization levels @option{-O}, @option{-O2}, @option{-O3}. ...@@ -5900,13 +5911,13 @@ optimization levels @option{-O}, @option{-O2}, @option{-O3}.
@item -fchkp-use-fast-string-functions @item -fchkp-use-fast-string-functions
@opindex fchkp-use-fast-string-functions @opindex fchkp-use-fast-string-functions
@opindex fno-chkp-use-fast-string-functions @opindex fno-chkp-use-fast-string-functions
Allow to use @code{*_nobnd} versions of string functions (not copying bounds) Enables use of @code{*_nobnd} versions of string functions (not copying bounds)
by Pointer Bounds Checker. Disabled by default. by Pointer Bounds Checker. Disabled by default.
@item -fchkp-use-nochk-string-functions @item -fchkp-use-nochk-string-functions
@opindex fchkp-use-nochk-string-functions @opindex fchkp-use-nochk-string-functions
@opindex fno-chkp-use-nochk-string-functions @opindex fno-chkp-use-nochk-string-functions
Allow to use @code{*_nochk} versions of string functions (not checking bounds) Enables use of @code{*_nochk} versions of string functions (not checking bounds)
by Pointer Bounds Checker. Disabled by default. by Pointer Bounds Checker. Disabled by default.
@item -fchkp-use-static-bounds @item -fchkp-use-static-bounds
...@@ -5918,16 +5929,17 @@ bounds of static variables. Enabled by default. ...@@ -5918,16 +5929,17 @@ bounds of static variables. Enabled by default.
@item -fchkp-use-static-const-bounds @item -fchkp-use-static-const-bounds
@opindex fchkp-use-static-const-bounds @opindex fchkp-use-static-const-bounds
@opindex fno-chkp-use-static-const-bounds @opindex fno-chkp-use-static-const-bounds
Use statically initialized bounds for constant bounds instead of Use statically-initialized bounds for constant bounds instead of
generating them each time it is required. By default enabled when generating them each time they are required. By default enabled when
@option{-fchkp-use-static-bounds} is enabled. @option{-fchkp-use-static-bounds} is enabled.
@item -fchkp-treat-zero-dynamic-size-as-infinite @item -fchkp-treat-zero-dynamic-size-as-infinite
@opindex fchkp-treat-zero-dynamic-size-as-infinite @opindex fchkp-treat-zero-dynamic-size-as-infinite
@opindex fno-chkp-treat-zero-dynamic-size-as-infinite @opindex fno-chkp-treat-zero-dynamic-size-as-infinite
With this option zero size obtained dynamically for objects with With this option, objects with incomplete type whose
incomplete type will be treated as infinite by Pointer Bounds dynamically-obtained size is zero are treated as having infinite size
Checker. It may be helpful if program is linked with a library instead by Pointer Bounds
Checker. This option may be helpful if a program is linked with a library
missing size information for some symbols. Disabled by default. missing size information for some symbols. Disabled by default.
@item -fchkp-check-read @item -fchkp-check-read
...@@ -5958,15 +5970,16 @@ Enabled by default. ...@@ -5958,15 +5970,16 @@ Enabled by default.
@opindex fchkp-instrument-marked-only @opindex fchkp-instrument-marked-only
@opindex fno-chkp-instrument-marked-only @opindex fno-chkp-instrument-marked-only
Instructs Pointer Bounds Checker to instrument only functions Instructs Pointer Bounds Checker to instrument only functions
marked with @code{bnd_instrument} attribute. Disabled by default. marked with the @code{bnd_instrument} attribute
(@pxref{Function Attributes}). Disabled by default.
@item -fchkp-use-wrappers @item -fchkp-use-wrappers
@opindex fchkp-use-wrappers @opindex fchkp-use-wrappers
@opindex fno-chkp-use-wrappers @opindex fno-chkp-use-wrappers
Allows Pointer Bounds Checker to replace calls to built-in function Allows Pointer Bounds Checker to replace calls to built-in functions
with calls to wrapper functions. When the @option{-fchkp-use-wrappers} with calls to wrapper functions. When @option{-fchkp-use-wrappers}
is used to link a program, the GCC driver automatically links is used to link a program, the GCC driver automatically links
agains @option{libmpxwrappers}. See also @option{-static-libmpxwrappers}. against @file{libmpxwrappers}. See also @option{-static-libmpxwrappers}.
Enabled by default. Enabled by default.
@item -fdump-final-insns@r{[}=@var{file}@r{]} @item -fdump-final-insns@r{[}=@var{file}@r{]}
...@@ -11278,9 +11291,9 @@ other libraries statically. ...@@ -11278,9 +11291,9 @@ other libraries statically.
@item -static-libmpx @item -static-libmpx
@opindex static-libmpx @opindex static-libmpx
When @option{-fcheck-pointer bounds} and @option{-mmpx} options are When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are
used to link a program, the GCC driver automatically links against used to link a program, the GCC driver automatically links against
@option{libmpx}. If @file{libmpx} is available as a shared library, @file{libmpx}. If @file{libmpx} is available as a shared library,
and the @option{-static} option is not used, then this links against and the @option{-static} option is not used, then this links against
the shared version of @file{libmpx}. The @option{-static-libmpx} the shared version of @file{libmpx}. The @option{-static-libmpx}
option directs the GCC driver to link @file{libmpx} statically, option directs the GCC driver to link @file{libmpx} statically,
...@@ -11288,9 +11301,9 @@ without necessarily linking other libraries statically. ...@@ -11288,9 +11301,9 @@ without necessarily linking other libraries statically.
@item -static-libmpxwrappers @item -static-libmpxwrappers
@opindex static-libmpxwrappers @opindex static-libmpxwrappers
When @option{-fcheck-pointer bounds}, @option{-mmpx} options are used and When the @option{-fcheck-pointer bounds} and @option{-mmpx} options are used
@option{-fno-chkp-use-wrappers} option is not used to link a program, the to link a program without also using @option{-fno-chkp-use-wrappers}, the
GCC driver automatically links against @option{libmpxwrappers}. If GCC driver automatically links against @file{libmpxwrappers}. If
@file{libmpxwrappers} is available as a shared library, and the @file{libmpxwrappers} is available as a shared library, and the
@option{-static} option is not used, then this links against the shared @option{-static} option is not used, then this links against the shared
version of @file{libmpxwrappers}. The @option{-static-libmpxwrappers} version of @file{libmpxwrappers}. The @option{-static-libmpxwrappers}
......
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