diff options
author | Ulrich Drepper <drepper@gmail.com> | 2014-08-08 20:26:41 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2014-08-08 20:26:41 -0400 |
commit | 26278bb8717a16139b3a4da9ba1cd2aed435f1ee (patch) | |
tree | 8eede31c3d86f0e483c69163df79ea57009c185c /ld/ld.texinfo | |
parent | 236bbb83885fbdf108e714fb0bcf9355d84dbd20 (diff) | |
download | gdb-26278bb8717a16139b3a4da9ba1cd2aed435f1ee.zip gdb-26278bb8717a16139b3a4da9ba1cd2aed435f1ee.tar.gz gdb-26278bb8717a16139b3a4da9ba1cd2aed435f1ee.tar.bz2 |
* ldlang.h (struct lang_input_statement_flags): Add pushed
member.
* ldlex.h (enum option_values): Add OPTION_PUSH_STATE and
OPTION_POP_STATE.
* lexsup.c (ld_options): Add entries for --push-state and
--pop-state.
(parse_args): Handle OPTION_PUSH_STATE and OPTION_POP_STATE.
* ld.texinfo: Document --push-state and --pop-state.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index 5762dc6..b559b4f 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -827,6 +827,34 @@ the linker may make more use of this option. Also currently there is no difference in the linker's behaviour for different non-zero values of this option. Again this may change with future releases. +@kindex --push-state +@cindex push state governing input file handling +@item --push-state +The @option{--push-state} allows to preserve the current state of the +flags which govern the input file handling so that they can all be +restored with one corresponding @option{--pop-state} option. + +The option which are covered are: @option{-Bdynamic}, @option{-Bstatic}, +@option{-dn}, @option{-dy}, @option{-call_shared}, @option{-non_shared}, +@option{-static}, @option{-N}, @option{-n}, @option{--whole-archive}, +@option{--no-whole-archive}, @option{-r}, @option{-Ur}, +@option{--copy-dt-needed-entries}, @option{--no-copy-dt-needed-entries}, +@option{--as-needed}, @option{--no-as-needed}, and @option{-a}. + +One target for this option are specifications for @file{pkg-config}. When +used with the @option{--libs} option all possibly needed libraries are +listed and then possibly linked with all the time. It is better to return +something as follows: + +@smallexample +-Wl,--push-state,--as-needed -libone -libtwo -Wl,--pop-state +@end smallexample + +@kindex --pop-state +@cindex pop state governing input file handling +Undoes the effect of --push-state, restores the previous values of the +flags governing input file handling. + @kindex -q @kindex --emit-relocs @cindex retain relocations in final executable |