aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-12-15 22:20:25 +0000
committerIan Lance Taylor <ian@airs.com>2009-12-15 22:20:25 +0000
commit0e0d5469b8093e5b5a88507fb07ea1a0a24bed60 (patch)
tree6f9af9888d02e968ecb47e157ae36b315de56745 /gold/layout.cc
parent53aa04a0be7a385042cb52ac88587a53c9729b6b (diff)
downloadgdb-0e0d5469b8093e5b5a88507fb07ea1a0a24bed60.zip
gdb-0e0d5469b8093e5b5a88507fb07ea1a0a24bed60.tar.gz
gdb-0e0d5469b8093e5b5a88507fb07ea1a0a24bed60.tar.bz2
* layout.cc (Layout::create_shstrtab): Only write out after input
sections if we are compressing debug sections.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index a7f8185..914de92 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -2694,10 +2694,14 @@ Layout::create_shstrtab()
Output_section* os = this->make_output_section(name, elfcpp::SHT_STRTAB, 0,
false, false);
- // We can't write out this section until we've set all the section
- // names, and we don't set the names of compressed output sections
- // until relocations are complete.
- os->set_after_input_sections();
+ if (strcmp(parameters->options().compress_debug_sections(), "none") != 0)
+ {
+ // We can't write out this section until we've set all the
+ // section names, and we don't set the names of compressed
+ // output sections until relocations are complete. FIXME: With
+ // the current names we use, this is unnecessary.
+ os->set_after_input_sections();
+ }
Output_section_data* posd = new Output_data_strtab(&this->namepool_);
os->add_output_section_data(posd);