diff options
author | Ian Lance Taylor <iant@google.com> | 2007-09-28 06:36:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-09-28 06:36:25 +0000 |
commit | b3b74ddc6e208b58108b0900b4896034f84bb6be (patch) | |
tree | ce562c3e12599c8d8f40e9ec75f6e729b272b62e /gold/parameters.cc | |
parent | fe6fbf8b6eff80d3df998ab8b0e14ac984e3e265 (diff) | |
download | gdb-b3b74ddc6e208b58108b0900b4896034f84bb6be.zip gdb-b3b74ddc6e208b58108b0900b4896034f84bb6be.tar.gz gdb-b3b74ddc6e208b58108b0900b4896034f84bb6be.tar.bz2 |
Use parameters to track whether we are doing a static link. Fix up
final_value_is_known for weak undefined symbols. Pointed out by Cary
Coutant.
Diffstat (limited to 'gold/parameters.cc')
-rw-r--r-- | gold/parameters.cc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/gold/parameters.cc b/gold/parameters.cc index db377f8..0c38ef7 100644 --- a/gold/parameters.cc +++ b/gold/parameters.cc @@ -31,7 +31,8 @@ namespace gold // Initialize the parameters from the options. Parameters::Parameters(const General_options* options) - : is_size_and_endian_valid_(false), size_(0), is_big_endian_(false), + : is_doing_static_link_valid_(false), doing_static_link_(false), + is_size_and_endian_valid_(false), size_(0), is_big_endian_(false), optimization_level_(options->optimization_level()) { if (options->is_shared()) @@ -42,6 +43,15 @@ Parameters::Parameters(const General_options* options) this->output_file_type_ = OUTPUT_EXECUTABLE; } +// Set whether we are doing a static link. + +void +Parameters::set_doing_static_link(bool doing_static_link) +{ + this->doing_static_link_ = doing_static_link; + this->is_doing_static_link_valid_ = true; +} + // Set the size and endianness. void @@ -76,6 +86,16 @@ initialize_parameters(const General_options* options) parameters = static_parameters = new Parameters(options); } +// Set whether we are doing a static link. + +void +set_parameters_doing_static_link(bool doing_static_link) +{ + static_parameters->set_doing_static_link(doing_static_link); +} + +// Set the size and endianness. + void set_parameters_size_and_endianness(int size, bool is_big_endian) { |