diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-26 22:10:32 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-26 22:10:32 +0000 |
commit | cd72c291808dbf72aad1603f3c60cd72de62c8f8 (patch) | |
tree | 5d4a74840823d0d0ec9cf10d01bf13d4d2fa17cb /gold/target.h | |
parent | 45aa233bdcc27243a2b3e2c699ad0ab59f83901b (diff) | |
download | gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.zip gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.tar.gz gdb-cd72c291808dbf72aad1603f3c60cd72de62c8f8.tar.bz2 |
From Craig Silverstein: implement -z max-page-size and -z
common-page-size.
Diffstat (limited to 'gold/target.h')
-rw-r--r-- | gold/target.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gold/target.h b/gold/target.h index c05c821..fa18fc7 100644 --- a/gold/target.h +++ b/gold/target.h @@ -34,6 +34,7 @@ #define GOLD_TARGET_H #include "elfcpp.h" +#include "parameters.h" namespace gold { @@ -103,12 +104,24 @@ class Target // Return the ABI specified page size. uint64_t abi_pagesize() const - { return this->pti_->abi_pagesize; } + { + if (parameters->max_page_size() > 0) + return parameters->max_page_size(); + else + return this->pti_->abi_pagesize; + } // Return the common page size used on actual systems. uint64_t common_pagesize() const - { return this->pti_->common_pagesize; } + { + if (parameters->common_page_size() > 0) + return std::min(parameters->common_page_size(), + this->abi_pagesize()); + else + return std::min(this->pti_->common_pagesize, + this->abi_pagesize()); + } // If we see some object files with .note.GNU-stack sections, and // some objects files without them, this returns whether we should |