diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-10 19:02:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-10 19:02:56 +0000 |
commit | 9e2dcb779c27737af88468b29aa1d2a15b0b770f (patch) | |
tree | 70f6ac5955fb7855d0773850f9763675f0c4a0d4 /gold/options.h | |
parent | 7500260a55897928017d06874240074c282dbb4a (diff) | |
download | gdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.zip gdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.tar.gz gdb-9e2dcb779c27737af88468b29aa1d2a15b0b770f.tar.bz2 |
Implement -s and -S options which strip symbols.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 30 |
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_; |