* gold/layout.cc (Layout::symtab_section_offset): New function.
authorCary Coutant <ccoutant@google.com>
Thu, 14 Apr 2011 23:29:41 +0000 (23:29 +0000)
committerCary Coutant <ccoutant@google.com>
Thu, 14 Apr 2011 23:29:41 +0000 (23:29 +0000)
* gold/layout.h (Layout::symtab_section_offset): New function.
* gold/reloc.cc (Sized_relobj::do_relocate): Call it.

gold/ChangeLog
gold/layout.cc
gold/layout.h
gold/reloc.cc

index bb29127f9e3a8563fb9de63bdecf15d14cdcf6c2..38d528c8b18eb68eabdb7c412589cb186b7378a2 100644 (file)
@@ -1,3 +1,9 @@
+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
index 26ac130d4793a0cf0647bc7842feb93e4741321f..7afb21f2c4d5c2f3d5db82b25a96da36135bf5ac 100644 (file)
@@ -4371,6 +4371,16 @@ Layout::make_output_segment(elfcpp::Elf_Word type, elfcpp::Elf_Word flags)
   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.
index 917856e2beafdf9926d899149602a47956fd6829..907181f0a34f350b24b3c6ce3938751614ba26f3 100644 (file)
@@ -685,6 +685,10 @@ class Layout
     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
index 7103572766b5b0447c1f1cc367f73dccbd3e5b88..c58e42b5a549e12451908d2250d1c7cca296c7a4 100644 (file)
@@ -691,7 +691,7 @@ Sized_relobj<size, big_endian>::do_relocate(const Symbol_table* symtab,
   // 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.
This page took 0.035412 seconds and 4 git commands to generate.