diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-26 22:48:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-26 22:48:08 +0000 |
commit | a5dc07065554d074ae0452b388cd9c80b2bc6504 (patch) | |
tree | ce2d8d5be0590dbf264053db8996e684b2fd26db /gold/options.h | |
parent | 5daa78cc6fc04e0367c11459bb2ae0531c8732ac (diff) | |
download | gdb-a5dc07065554d074ae0452b388cd9c80b2bc6504.zip gdb-a5dc07065554d074ae0452b388cd9c80b2bc6504.tar.gz gdb-a5dc07065554d074ae0452b388cd9c80b2bc6504.tar.bz2 |
From Craig Silverstein: rework handling of Script_options.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/gold/options.h b/gold/options.h index d7dc06c..14e1629 100644 --- a/gold/options.h +++ b/gold/options.h @@ -119,12 +119,12 @@ class General_options OBJECT_FORMAT_BINARY }; - General_options(Script_options*); + General_options(); // -e: set entry address. const char* entry() const - { return this->script_options_->entry(); } + { return this->entry_; } // -E: export dynamic symbols. bool @@ -255,11 +255,6 @@ class General_options sysroot() const { return this->sysroot_; } - // --version-script: The version script to apply if --shared is true. - const Version_script_info& - version_script() const - { return *this->script_options_->version_script_info(); } - // -Tbss: The address of the BSS segment uint64_t Tbss() const @@ -334,15 +329,6 @@ class General_options debug() const { return this->debug_; } - // Return the options which may be set from a linker script. - Script_options* - script_options() - { return this->script_options_; } - - const Script_options* - script_options() const - { return this->script_options_; } - private: // Don't copy this structure. General_options(const General_options&); @@ -384,7 +370,7 @@ class General_options void set_entry(const char* arg) - { this->script_options_->set_entry(arg, strlen(arg)); } + { this->entry_ = arg; } void set_export_dynamic(bool value) @@ -620,6 +606,7 @@ class General_options void add_sysroot(); + const char* entry_; bool export_dynamic_; const char* soname_; const char* dynamic_linker_; @@ -653,9 +640,6 @@ class General_options uint64_t max_page_size_; uint64_t common_page_size_; unsigned int debug_; - // Some options can also be set from linker scripts. Those are - // stored here. - Script_options* script_options_; }; // The current state of the position dependent options. @@ -940,7 +924,7 @@ class Command_line public: typedef Input_arguments::const_iterator const_iterator; - Command_line(Script_options*); + Command_line(); // Process the command line options. This will exit with an // appropriate error message if an unrecognized option is seen. @@ -993,14 +977,15 @@ class Command_line position_dependent_options() const { return this->position_options_; } - // Get the options which may be set from a linker script. - Script_options* + // Get the linker-script options. + Script_options& script_options() - { return this->options_.script_options(); } + { return this->script_options_; } - const Script_options* - script_options() const - { return this->options_.script_options(); } + // Get the version-script options: a convenience routine. + const Version_script_info& + version_script() const + { return *this->script_options_.version_script_info(); } // The number of input files. int @@ -1044,6 +1029,7 @@ class Command_line General_options options_; Position_dependent_options position_options_; + Script_options script_options_; Input_arguments inputs_; }; |