aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
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 159e7b2..1e850cf 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -134,6 +134,16 @@ class General_options
is_relocatable() const
{ return this->is_relocatable_; }
+ // -s: Strip all symbols.
+ bool
+ strip_all() const
+ { return this->strip_ == STRIP_ALL; }
+
+ // -S: Strip debugging information.
+ bool
+ strip_debug() const
+ { return this->strip_ == STRIP_ALL || this->strip_ == STRIP_DEBUG; }
+
// --eh-frame-hdr: Whether to generate an exception frame header.
bool
create_eh_frame_hdr() const
@@ -172,6 +182,17 @@ class General_options
friend class Command_line;
friend class options::Command_line_options;
+ // Which symbols to strip.
+ enum Strip
+ {
+ // Don't strip any symbols.
+ STRIP_NONE,
+ // Strip all symbols.
+ STRIP_ALL,
+ // Strip debugging information.
+ STRIP_DEBUG
+ };
+
void
set_export_dynamic()
{ this->export_dynamic_ = true; }
@@ -201,6 +222,14 @@ class General_options
{ this->is_relocatable_ = true; }
void
+ set_strip_all()
+ { this->strip_ = STRIP_ALL; }
+
+ void
+ set_strip_debug()
+ { this->strip_ = STRIP_DEBUG; }
+
+ void
set_create_eh_frame_hdr()
{ this->create_eh_frame_hdr_ = true; }
@@ -238,6 +267,7 @@ class General_options
int optimization_level_;
const char* output_file_name_;
bool is_relocatable_;
+ Strip strip_;
bool create_eh_frame_hdr_;
Dir_list rpath_;
Dir_list rpath_link_;