[gold commit] Implement --push-state/--pop-state

Cary Coutant ccoutant@gmail.com
Fri Dec 2 00:47:00 GMT 2016


This patch implements the --push-state and --pop-state options.

Unlike Gnu ld, gold implements this as a true stack: push and pop may
be nested to any depth.

The -r , -n, and -N options are listed in the Gnu linker manual among
the saved options, but they are not position-dependent options, and
have nothing to do with the treatment of input files. I have not
included them in the list of options saved. The position-dependent
options saved by --push-state in gold are:

    --as-needed/--no-as-needed
    -Bdynamic/-Bstatic/-dy/-dn
    --format
    --whole-archive/--no-whole-archive
    --incremental-changed/-unchanged/-unknown

-cary


2016-12-01  Cary Coutant  <ccoutant@gmail.com>

gold/
        PR gold/18989
        * options.cc (General_options::object_format_to_string): New function.
        (General_options::copy_from_posdep_options): New function.
        (General_options::parse_push_state): New function.
        (General_options::parse_pop_state): New function.
        * options.h (--push-state, --pop-state): New options.
        (General_options::object_format_to_string): New method.
        (General_options::set_incremental_disposition): New method.
        (General_options::copy_from_posdep_options): New method.
        (General_options::options_stack_): New data member.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: push-state.patch
Type: application/octet-stream
Size: 4707 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20161202/260a43ad/attachment.obj>


More information about the Binutils mailing list