aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-26 22:10:32 +0000
committerIan Lance Taylor <iant@google.com>2008-02-26 22:10:32 +0000
commitcd72c291808dbf72aad1603f3c60cd72de62c8f8 (patch)
tree5d4a74840823d0d0ec9cf10d01bf13d4d2fa17cb /gold/options.h
parent45aa233bdcc27243a2b3e2c699ad0ab59f83901b (diff)
downloadfsf-binutils-gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.zip
fsf-binutils-gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.tar.gz
fsf-binutils-gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.tar.bz2
From Craig Silverstein: implement -z max-page-size and -z
common-page-size.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index 5932560..d7dc06c 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -319,6 +319,16 @@ class General_options
is_stack_executable() const
{ return this->execstack_ == EXECSTACK_YES; }
+ // -z max-page-size
+ uint64_t
+ max_page_size() const
+ { return this->max_page_size_; }
+
+ // -z common-page-size
+ uint64_t
+ common_page_size() const
+ { return this->common_page_size_; }
+
// --debug
unsigned int
debug() const
@@ -577,6 +587,24 @@ class General_options
{ this->execstack_ = EXECSTACK_NO; }
void
+ set_max_page_size(const char* arg)
+ {
+ char* endptr;
+ this->max_page_size_ = strtoull(arg, &endptr, 0);
+ if (*endptr != '\0' || this->max_page_size_ == 0)
+ gold_fatal(_("invalid max-page-size: %s"), arg);
+ }
+
+ void
+ set_common_page_size(const char* arg)
+ {
+ char* endptr;
+ this->common_page_size_ = strtoull(arg, &endptr, 0);
+ if (*endptr != '\0' || this->common_page_size_ == 0)
+ gold_fatal(_("invalid common-page-size: %s"), arg);
+ }
+
+ void
set_debug(unsigned int flags)
{ this->debug_ = flags; }
@@ -622,6 +650,8 @@ class General_options
int thread_count_middle_;
int thread_count_final_;
Execstack execstack_;
+ 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.