aboutsummaryrefslogtreecommitdiff
path: root/gold/parameters.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-09-26 07:01:35 +0000
committerIan Lance Taylor <iant@google.com>2007-09-26 07:01:35 +0000
commit9025d29d14ae287d2bc338ef1b0bfa043799e15c (patch)
tree7802e1942ac6c30223c2bd6b077dc3a64e1d9280 /gold/parameters.h
parentcc941dee4852b197c1437b2eb28eafb0c9ccaff9 (diff)
downloadgdb-9025d29d14ae287d2bc338ef1b0bfa043799e15c.zip
gdb-9025d29d14ae287d2bc338ef1b0bfa043799e15c.tar.gz
gdb-9025d29d14ae287d2bc338ef1b0bfa043799e15c.tar.bz2
Put size and endianness in parameters.
Diffstat (limited to 'gold/parameters.h')
-rw-r--r--gold/parameters.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gold/parameters.h b/gold/parameters.h
index cfbf953..fafd345 100644
--- a/gold/parameters.h
+++ b/gold/parameters.h
@@ -56,11 +56,32 @@ class Parameters
output_is_object() const
{ return this->output_file_type_ == OUTPUT_OBJECT; }
+ // The size of the output file we are generating. This should
+ // return 32 or 64.
+ int
+ get_size() const
+ {
+ gold_assert(this->is_size_and_endian_valid_);
+ return this->size_;
+ }
+
+ // Whether the output is big endian.
+ bool
+ is_big_endian() const
+ {
+ gold_assert(this->is_size_and_endian_valid_);
+ return this->is_big_endian_;
+ }
+
// The general linker optimization level.
int
optimization_level() const
{ return this->optimization_level_; }
+ // Set the size and endianness.
+ void
+ set_size_and_endianness(int size, bool is_big_endian);
+
private:
// The types of output files.
enum Output_file_type
@@ -75,6 +96,12 @@ class Parameters
// The type of the output file.
Output_file_type output_file_type_;
+ // 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.
+ int size_;
+ // Whether the output file is big endian.
+ bool is_big_endian_;
// The optimization level.
int optimization_level_;
};
@@ -85,6 +112,9 @@ extern const Parameters* parameters;
// Initialize the global variable.
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);
+
} // End namespace gold.
#endif // !defined(GOLD_PARAMATERS_H)