* gold/layout.h (Layout::symtab_section_offset): New function.
* gold/reloc.cc (Sized_relobj::do_relocate): Call it.
+2011-04-14 Cary Coutant <ccoutant@google.com>
+
+ * gold/layout.cc (Layout::symtab_section_offset): New function.
+ * gold/layout.h (Layout::symtab_section_offset): New function.
+ * gold/reloc.cc (Sized_relobj::do_relocate): Call it.
+
2011-04-12 Ian Lance Taylor <iant@google.com>
* configure.ac: Check for sys/mman.h and mmap. Check for mremap
return oseg;
}
+// Return the file offset of the normal symbol table.
+
+off_t
+Layout::symtab_section_offset() const
+{
+ if (this->symtab_section_ != NULL)
+ return this->symtab_section_->offset();
+ 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.
return this->symtab_section_;
}
+ // Return the file offset of the normal symbol table.
+ off_t
+ symtab_section_offset() const;
+
// Return the dynamic symbol table.
Output_section*
dynsym_section() const
// Write out the local symbols.
this->write_local_symbols(of, layout->sympool(), layout->dynpool(),
layout->symtab_xindex(), layout->dynsym_xindex(),
- layout->symtab_section()->offset());
+ layout->symtab_section_offset());
}
// Sort a Read_multiple vector by file offset.