summaryrefslogtreecommitdiffstats
path: root/gold/options.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-23 05:05:48 +0000
committerIan Lance Taylor <iant@google.com>2007-10-23 05:05:48 +0000
commit35cdfc9a874553807400007ffa36cf2884ba40f6 (patch)
tree2cb1c5ca78a50b21d20e709d9d066fad27f1f6e5 /gold/options.h
parent5cab6006497314f0d6785c5a5898be9f28713c72 (diff)
downloadppe42-binutils-35cdfc9a874553807400007ffa36cf2884ba40f6.tar.gz
ppe42-binutils-35cdfc9a874553807400007ffa36cf2884ba40f6.zip
Add support for PT_GNU_STACK.
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/gold/options.h b/gold/options.h
index f9782cc999..dad1c90180 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -47,6 +47,7 @@ namespace options {
class Command_line_options;
struct One_option;
+struct One_z_option;
} // End namespace gold::options.
@@ -214,6 +215,15 @@ class General_options
thread_count_final() const
{ return this->thread_count_final_; }
+ // -z execstack, -z noexecstack
+ bool
+ is_execstack_set() const
+ { return this->execstack_ != EXECSTACK_FROM_INPUT; }
+
+ bool
+ is_stack_executable() const
+ { return this->execstack_ == EXECSTACK_YES; }
+
private:
// Don't copy this structure.
General_options(const General_options&);
@@ -233,6 +243,17 @@ class General_options
STRIP_DEBUG
};
+ // Whether to mark the stack as executable.
+ enum Execstack
+ {
+ // Not set on command line.
+ EXECSTACK_FROM_INPUT,
+ // Mark the stack as executable.
+ EXECSTACK_YES,
+ // Mark the stack as not executable.
+ EXECSTACK_NO
+ };
+
void
set_export_dynamic()
{ this->export_dynamic_ = true; }
@@ -364,6 +385,18 @@ class General_options
ignore(const char*)
{ }
+ void
+ set_execstack()
+ { this->execstack_ = EXECSTACK_YES; }
+
+ void
+ set_noexecstack()
+ { this->execstack_ = EXECSTACK_NO; }
+
+ // Handle the -z option.
+ void
+ handle_z_option(const char*);
+
// Apply any sysroot to the directory lists.
void
add_sysroot();
@@ -388,6 +421,7 @@ class General_options
int thread_count_initial_;
int thread_count_middle_;
int thread_count_final_;
+ Execstack execstack_;
};
// The current state of the position dependent options.
OpenPOWER on IntegriCloud