* dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
authorIan Lance Taylor <ian@airs.com>
Fri, 9 Oct 2009 23:05:21 +0000 (23:05 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 9 Oct 2009 23:05:21 +0000 (23:05 +0000)
Change read_shndx type to unsigned int.
(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
int.
(Sized_dwarf_line_info::read_line_mappings): Likewise.
* dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
Change read_shndx type to unsigned int.
(Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
int.
(Sized_dwarf_line_info::read_line_mappings): Likewise.
* layout.cc (Layout::create_symtab_sections): Cast the result of
local_symcount * symsize to off_t in the gold_assert.

gold/ChangeLog
gold/dwarf_reader.cc
gold/dwarf_reader.h
gold/layout.cc

index a8939ee0f3e648b4561cc1d8819a2f70d9fc09b0..05320fa91529a3d569c56cfc5f90c6abad229f8a 100644 (file)
@@ -1,3 +1,18 @@
+2009-10-09  Andrew Pinski  <andrew_pinski@playstation.sony.com>
+
+       * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info):
+       Change read_shndx type to unsigned int.
+       (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
+       int.
+       (Sized_dwarf_line_info::read_line_mappings): Likewise.
+       * dwarf_reader.h (Sized_dwarf_line_info::Sized_dwarf_line_info):
+       Change read_shndx type to unsigned int.
+       (Sized_dwarf_line_info::read_lines): Change shndx type to unsigned
+       int.
+       (Sized_dwarf_line_info::read_line_mappings): Likewise.
+       * layout.cc (Layout::create_symtab_sections): Cast the result of
+       local_symcount * symsize to off_t in the gold_assert.
+
 2009-10-09  Viktor Kutuzov  <vkutuzov@accesssoftek.com>
 
        * arm.cc (Target_arm::relocate::reloc_is_non_pic): Return true for
index 3d0f65a4b5a1cfb4ad6469b3ba3116e63fba431c..d142586a60754bddad182118f2580ebf96e7dfda 100644 (file)
@@ -1,6 +1,6 @@
 // dwarf_reader.cc -- parse dwarf2/3 debug information
 
-// Copyright 2007, 2008 Free Software Foundation, Inc.
+// Copyright 2007, 2008, 2009 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -129,7 +129,7 @@ ResetLineStateMachine(struct LineStateMachine* lsm, bool default_is_stmt)
 
 template<int size, bool big_endian>
 Sized_dwarf_line_info<size, big_endian>::Sized_dwarf_line_info(Object* object,
-                                                               off_t read_shndx)
+                                                               unsigned int read_shndx)
   : data_valid_(false), buffer_(NULL), symtab_buffer_(NULL),
     directories_(), files_(), current_header_index_(-1)
 {
@@ -508,7 +508,7 @@ Sized_dwarf_line_info<size, big_endian>::process_one_opcode(
 template<int size, bool big_endian>
 unsigned const char*
 Sized_dwarf_line_info<size, big_endian>::read_lines(unsigned const char* lineptr,
-                                                    off_t shndx)
+                                                    unsigned int shndx)
 {
   struct LineStateMachine lsm;
 
@@ -595,7 +595,7 @@ Sized_dwarf_line_info<size, big_endian>::read_relocs(Object* object)
 template<int size, bool big_endian>
 void
 Sized_dwarf_line_info<size, big_endian>::read_line_mappings(Object* object,
-                                                           off_t shndx)
+                                                           unsigned int shndx)
 {
   gold_assert(this->data_valid_ == true);
 
index c9d760ce53ff04c74917ef1aee868aa663e9022b..c18ed8951b0312139710cb2288089921bc24a1f0 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 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -105,7 +105,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
@@ -115,7 +115,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_.
@@ -140,7 +140,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
index 1b836de5fda4d137e0acdc1f303c39acc591170d..e7d63777f896c7f5c22d55d65acee82466a39d7b 100644 (file)
@@ -2542,7 +2542,7 @@ Layout::create_symtab_sections(const Input_objects* input_objects,
     }
 
   unsigned int local_symcount = local_symbol_index;
-  gold_assert(local_symcount * symsize == off - startoff);
+  gold_assert(static_cast<off_t>(local_symcount * symsize) == off - startoff);
 
   off_t dynoff;
   size_t dyn_global_index;
This page took 0.031974 seconds and 4 git commands to generate.