aboutsummaryrefslogtreecommitdiff
path: root/gold/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/options.h')
-rw-r--r--gold/options.h36
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_;