aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 0ef13af..a52d35c 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -4536,6 +4536,17 @@ Layout::symtab_section_offset() const
return 0;
}
+// Return the section index of the normal symbol table. It may have
+// been stripped by the -s/--strip-all option.
+
+unsigned int
+Layout::symtab_section_shndx() const
+{
+ if (this->symtab_section_ != NULL)
+ return this->symtab_section_->out_shndx();
+ return 0;
+}
+
// Write out the Output_sections. Most won't have anything to write,
// since most of the data will come from input sections which are
// handled elsewhere. But some Output_sections do have Output_data.