diff options
author | Ian Lance Taylor <iant@google.com> | 2007-11-30 00:35:27 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-11-30 00:35:27 +0000 |
commit | 9a0910c33e1a6962d475ee0a994fd1f5e446a888 (patch) | |
tree | f30e7b369cc05383699fbe4780ee0839b8dbcdde /gold/options.h | |
parent | 71195202dfb59bb7b61b35dc4cc5d202fab12020 (diff) | |
download | gdb-9a0910c33e1a6962d475ee0a994fd1f5e446a888.zip gdb-9a0910c33e1a6962d475ee0a994fd1f5e446a888.tar.gz gdb-9a0910c33e1a6962d475ee0a994fd1f5e446a888.tar.bz2 |
From Craig Silverstein: Add support for compressing .debug_str section.
Diffstat (limited to 'gold/options.h')
-rw-r--r-- | gold/options.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/gold/options.h b/gold/options.h index c7b08e8..b327aa9 100644 --- a/gold/options.h +++ b/gold/options.h @@ -150,8 +150,8 @@ class General_options strip_debug() const { return this->strip_ == STRIP_ALL || this->strip_ == STRIP_DEBUG; } - // -Sgdb: strip only debugging information that's not used by - // gdb (at least, for gdb versions <= 6.7). + // --strip-debug-gdb: strip only debugging information that's not + // used by gdb (at least, for gdb versions <= 6.7). bool strip_debug_gdb() const { return this->strip_debug() || this->strip_ == STRIP_DEBUG_UNUSED_BY_GDB; } @@ -167,6 +167,17 @@ class General_options symbolic() const { return this->symbolic_; } + // --compress-debug-sections: compress .debug_* sections in the + // output file using the given compression method. This is useful + // when the tools (such as gdb) support compressed sections. + bool + compress_debug_sections() const + { return this->compress_debug_sections_ != NO_COMPRESSION; } + + bool + zlib_compress_debug_sections() const + { return this->compress_debug_sections_ == ZLIB_COMPRESSION; } + // --demangle: demangle C++ symbols in our log messages. bool demangle() const @@ -288,6 +299,13 @@ class General_options EXECSTACK_NO }; + // What compression method to use + enum CompressionMethod + { + NO_COMPRESSION, + ZLIB_COMPRESSION, + }; + void set_export_dynamic() { this->export_dynamic_ = true; } @@ -342,6 +360,19 @@ class General_options set_symbolic() { this->symbolic_ = true; } + void set_compress_debug_symbols(const char* arg) + { + if (strcmp(arg, "none") == 0) + this->compress_debug_sections_ = NO_COMPRESSION; +#ifdef HAVE_ZLIB_H + else if (strcmp(arg, "zlib") == 0) + this->compress_debug_sections_ = ZLIB_COMPRESSION; +#endif + else + gold_fatal(_("Unsupported argument to --compress-debug-symbols: %s"), + arg); + } + void set_demangle() { this->demangle_ = true; } @@ -476,6 +507,7 @@ class General_options Strip strip_; bool allow_shlib_undefined_; bool symbolic_; + CompressionMethod compress_debug_sections_; bool demangle_; bool detect_odr_violations_; bool create_eh_frame_hdr_; |