This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Attachment: push-state.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]