diff options
author | Craig Silverstein <csilvers@google.com> | 2008-11-06 07:23:31 +0000 |
---|---|---|
committer | Craig Silverstein <csilvers@google.com> | 2008-11-06 07:23:31 +0000 |
commit | c82fbeee5970971ab2988ab7fda3439719df09ab (patch) | |
tree | e3d01b8663155d445595c3a0a9e410e4d82bc3d2 /gold/options.h | |
parent | e0bb29a5842200725829ebdb21dfa1f3c692b223 (diff) | |
download | gdb-c82fbeee5970971ab2988ab7fda3439719df09ab.zip gdb-c82fbeee5970971ab2988ab7fda3439719df09ab.tar.gz gdb-c82fbeee5970971ab2988ab7fda3439719df09ab.tar.bz2 |
* options.cc (General_options::parse_dynamic_list): New function.
* options.h (General_options): New flags dynamic_list,
dynamic_list_data, dynamic_list_cpp_new, and
dynamic_list_cpp_typeinfo. New variable dynamic_list_.
(General_options::in_dynamic_list): New function.
* script.cc (Lex::Mode): New enum DYNAMIC_LIST.
(Lex::can_start_name): Add support for DYNAMIC_LIST mode.
(Lex::can_continue_name): Likewise.
(yylex): Likewise.
(read_script_file): New parameter script_options.
(read_dynamic_list): New function.
(Script_options::define_dynamic_list): New function.
(dynamic_list_keyword_parsecodes): New variable.
(dynamic_list_keywords): New variable.
* script.h (Script_options::define_dynamic_list): New function
prototype.
(read_dynamic_list): New function prototype.
* symtab.cc (strprefix): New macro.
(Symbol::should_add_dynsym_entry): Support dynamic_list,
dynamic_list_data, dynamic_list_cpp_new, and
dynamic_list_cpp_typeinfo.
* yyscript.y (PARSING_DYNAMIC_LIST): New token.
(dynamic_list_expr): New rule.
(dynamic_list_nodes): Likewise.
(dynamic_list_node): Likewise.
* testsuite/Makefile.am (dynamic_list): New test.
* testsuite/Makefile.in: Regenerated.
* testsuite/dynamic_list.t: New file.
* testsuite/dynamic_list.sh: New file.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h index 167e58a..be08d99 100644 --- a/gold/options.h +++ b/gold/options.h @@ -620,6 +620,18 @@ class General_options N_("Try to detect violations of the One Definition Rule"), NULL); + DEFINE_bool(dynamic_list_data, options::TWO_DASHES, '\0', false, + N_("Add data symbols to dynamic symbols"), NULL); + + DEFINE_bool(dynamic_list_cpp_new, options::TWO_DASHES, '\0', false, + N_("Add C++ operator new/delete to dynamic symbols"), NULL); + + DEFINE_bool(dynamic_list_cpp_typeinfo, options::TWO_DASHES, '\0', false, + N_("Add C++ typeinfo to dynamic symbols"), NULL); + + DEFINE_special(dynamic_list, options::TWO_DASHES, '\0', + N_("Read a list of dynamic symbols"), N_("FILE")); + DEFINE_string(entry, options::TWO_DASHES, 'e', NULL, N_("Set program start address"), N_("ADDRESS")); @@ -933,6 +945,11 @@ class General_options plugins() const { return this->plugins_; } + // True iff SYMBOL was found in the file specified by dynamic-list. + bool + in_dynamic_list(const char* symbol) const + { return this->dynamic_list_.version_script_info()->symbol_is_local(symbol); } + private: // Don't copy this structure. General_options(const General_options&); @@ -982,6 +999,10 @@ class General_options bool do_demangle_; // List of plugin libraries. Plugin_manager* plugins_; + // The parsed output of --dynamic-list files. For convenience in + // script.cc, we store this as a Script_options object, even though + // we only use a single Version_tree from it. + Script_options dynamic_list_; }; // The position-dependent options. We use this to store the state of |