Add a testcase for PR ld/12356.
[deliverable/binutils-gdb.git] / gold / dwarf_reader.h
index 173e8c25495bb8bfde931f8c6d580e3e532532ad..8fe7898a55ab7e8e435276ecb397c358489de579 100644 (file)
@@ -1,6 +1,6 @@
 // dwarf_reader.h -- parse dwarf2/3 debug information for gold  -*- C++ -*-
 
-// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -46,7 +46,10 @@ struct Offset_to_lineno_entry
   int header_num;  // which file-list to use (i.e. which .o file are we in)
   int file_num;    // a pointer into files_
   int line_num;    // the line number in the source file
-  // Offsets are unique within a section, so that's a sufficient sort key.
+
+  // When we add entries to the table, we always use the last entry
+  // with a given offset.  Given proper DWARF info, this should ensure
+  // that the offset is a sufficient sort key.
   bool operator<(const Offset_to_lineno_entry& that) const
   { return this->offset < that.offset; }
 };
@@ -99,7 +102,7 @@ class Sized_dwarf_line_info : public Dwarf_line_info
   // Initializes a .debug_line reader for a given object file.
   // If SHNDX is specified and non-negative, only read the debug
   // information that pertains to the specified section.
-  Sized_dwarf_line_info(Object* object, off_t read_shndx = -1U);
+  Sized_dwarf_line_info(Object* object, unsigned int read_shndx = -1U);
 
  private:
   std::string
@@ -109,7 +112,7 @@ class Sized_dwarf_line_info : public Dwarf_line_info
   // If SHNDX is non-negative, only store debug information that
   // pertains to the specified section.
   void
-  read_line_mappings(Object*, off_t shndx);
+  read_line_mappings(Object*, unsigned int shndx);
 
   // Reads the relocation section associated with .debug_line and
   // stores relocation information in reloc_map_.
@@ -134,7 +137,7 @@ class Sized_dwarf_line_info : public Dwarf_line_info
   // discard all line information that doesn't pertain to the given
   // section.
   const unsigned char*
-  read_lines(const unsigned char* lineptr, off_t shndx);
+  read_lines(const unsigned char* lineptr, unsigned int shndx);
 
   // Process a single line info opcode at START using the state
   // machine at LSM.  Return true if we should define a line using the
@@ -178,6 +181,8 @@ class Sized_dwarf_line_info : public Dwarf_line_info
 
   // This has relocations that point into buffer.
   Track_relocs<size, big_endian> track_relocs_;
+  // The type of the reloc section in track_relocs_--SHT_REL or SHT_RELA.
+  unsigned int track_relocs_type_;
 
   // This is used to figure out what section to apply a relocation to.
   const unsigned char* symtab_buffer_;
This page took 0.024488 seconds and 4 git commands to generate.