diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-06-23 07:04:10 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-06-23 07:04:10 +0000 |
commit | f7c8a183e8d2c83eddadddb3b473338abf30a1d5 (patch) | |
tree | d2bceeacff8a0d85d0dac1baff52cd9c84548ede /gold/stringpool.h | |
parent | e6a307bae3aac48d98d01f51308e238aeabbdfd4 (diff) | |
download | gdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.zip gdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.tar.gz gdb-f7c8a183e8d2c83eddadddb3b473338abf30a1d5.tar.bz2 |
PR 10133
* stringpool.h (class Stringpool_template): Add optimize_ field.
(Stringpool_template::set_optimize): New function.
* stringpool.cc (Stringpool_template::Stringpool_template):
Initialize optimize_ field.
(Stringpool_template::set_string_offsets): Test local optimize
fild rather than parameter.
* layout.cc (Layout::Layout): Call set_optimize on the section
name stringpool.
Diffstat (limited to 'gold/stringpool.h')
-rw-r--r-- | gold/stringpool.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/stringpool.h b/gold/stringpool.h index 6fe2066..906ceaa 100644 --- a/gold/stringpool.h +++ b/gold/stringpool.h @@ -176,6 +176,12 @@ class Stringpool_template set_no_zero_null() { this->zero_null_ = false; } + // Indicate that this string pool should be optimized, even if not + // running with -O2. + void + set_optimize() + { this->optimize_ = true; } + // Add the string S to the pool. This returns a canonical permanent // pointer to the string in the pool. If COPY is true, the string // is copied into permanent storage. If PKEY is not NULL, this sets @@ -364,6 +370,8 @@ class Stringpool_template section_size_type strtab_size_; // Whether to reserve offset 0 to hold the null string. bool zero_null_; + // Whether to optimize the string table. + bool optimize_; }; // The most common type of Stringpool. |