aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-28 06:36:25 +0000
committerIan Lance Taylor <iant@google.com>2007-09-28 06:36:25 +0000
commitb3b74ddc6e208b58108b0900b4896034f84bb6be (patch)
treece562c3e12599c8d8f40e9ec75f6e729b272b62e /gold/parameters.h
parentfe6fbf8b6eff80d3df998ab8b0e14ac984e3e265 (diff)
downloadgdb-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.h')
-rw-r--r--gold/parameters.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gold/parameters.h b/gold/parameters.h
index fafd345..2a21607 100644
--- a/gold/parameters.h
+++ b/gold/parameters.h
@@ -56,6 +56,16 @@ class Parameters
output_is_object() const
{ return this->output_file_type_ == OUTPUT_OBJECT; }
+ // Whether we are doing a static link--a link in which none of the
+ // input files are shared libraries. This is only known after we
+ // have seen all the input files.
+ bool
+ doing_static_link() const
+ {
+ gold_assert(this->is_doing_static_link_valid_);
+ return this->doing_static_link_;
+ }
+
// The size of the output file we are generating. This should
// return 32 or 64.
int
@@ -78,6 +88,10 @@ class Parameters
optimization_level() const
{ return this->optimization_level_; }
+ // Set whether we are doing a static link.
+ void
+ set_doing_static_link(bool doing_static_link);
+
// Set the size and endianness.
void
set_size_and_endianness(int size, bool is_big_endian);
@@ -96,6 +110,10 @@ class Parameters
// The type of the output file.
Output_file_type output_file_type_;
+ // Whether the doing_static_link_ field is valid.
+ bool is_doing_static_link_valid_;
+ // Whether we are doing a static link.
+ bool doing_static_link_;
// Whether the size_ and is_big_endian_ fields are valid.
bool is_size_and_endian_valid_;
// The size of the output file--32 or 64.
@@ -115,6 +133,9 @@ extern void initialize_parameters(const General_options*);
// Set the size and endianness of the global parameters variable.
extern void set_parameters_size_and_endianness(int size, bool is_big_endian);
+// Set whether we are doing a static link.
+extern void set_parameters_doing_static_link(bool doing_static_link);
+
} // End namespace gold.
#endif // !defined(GOLD_PARAMATERS_H)