diff options
author | Cary Coutant <ccoutant@gmail.com> | 2015-06-04 20:58:08 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2015-06-04 20:58:08 -0700 |
commit | cd3c333f43f03d6e41668a82a68a99c14000a681 (patch) | |
tree | 111fa29f0aff6318e7df16f84d90003775adc8f0 /gold/options.cc | |
parent | dc302c00611b6973fbc55e9fdd643ad24c370bd1 (diff) | |
download | gdb-cd3c333f43f03d6e41668a82a68a99c14000a681.zip gdb-cd3c333f43f03d6e41668a82a68a99c14000a681.tar.gz gdb-cd3c333f43f03d6e41668a82a68a99c14000a681.tar.bz2 |
Change default to discard temporary local symbols in merge sections.
Add --discard-none to keep all local symbols.
gold/
PR gold/17498
* object.cc (Sized_relobj_file::do_count_local_symbols): Discard
temporary locals in merge sections.
* options.cc (General_options::parse_discard_all): New method.
(General_options::parse_discard_locals): New method.
(General_options::parse_discard_none): New method.
(General_options::General_options): Initialize discard_locals_.
* options.h (--discard-all): Convert to special option.
(--discard-locals): Likewise.
(--discard-none): New option.
(General_options::discard_all): New method.
(General_options::discard_locals): New method.
(General_options::discard_sec_merge): New method.
(General_options::Discard_locals): New enum.
(General_options::discard_locals_): New data member.
Diffstat (limited to 'gold/options.cc')
-rw-r--r-- | gold/options.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/gold/options.cc b/gold/options.cc index 39dc311..c42623f 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -346,6 +346,27 @@ General_options::parse_defsym(const char*, const char* arg, } void +General_options::parse_discard_all(const char*, const char*, + Command_line*) +{ + this->discard_locals_ = DISCARD_ALL; +} + +void +General_options::parse_discard_locals(const char*, const char*, + Command_line*) +{ + this->discard_locals_ = DISCARD_LOCALS; +} + +void +General_options::parse_discard_none(const char*, const char*, + Command_line*) +{ + this->discard_locals_ = DISCARD_NONE; +} + +void General_options::parse_incremental(const char*, const char*, Command_line*) { @@ -927,7 +948,8 @@ General_options::General_options() symbols_to_retain_(), section_starts_(), fix_v4bx_(FIX_V4BX_NONE), - endianness_(ENDIANNESS_NOT_SET) + endianness_(ENDIANNESS_NOT_SET), + discard_locals_(DISCARD_SEC_MERGE) { // Turn off option registration once construction is complete. gold::options::ready_to_register = false; |