2013-07-15 Shawn Landden <shawnlandden@gmail.com>
authorCary Coutant <ccoutant@google.com>
Mon, 15 Jul 2013 16:49:20 +0000 (16:49 +0000)
committerCary Coutant <ccoutant@google.com>
Mon, 15 Jul 2013 16:49:20 +0000 (16:49 +0000)
gold/
PR gold/15070
* fileread.h (File_read::get_view): Clarify comment about ALIGNED.
* nacl.h (Sniff_file::View::View): Request aligned view.

gold/ChangeLog
gold/fileread.h
gold/nacl.h

index 0322e0328b8c0e143a0745cc4cd26b10bd21fa38..7f859b7f1ba38134950291b802712d81a95fbc44 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-15  Shawn Landden  <shawnlandden@gmail.com>
+
+       PR gold/15070
+       * fileread.h (File_read::get_view): Clarify comment about ALIGNED.
+       * nacl.h (Sniff_file::View::View): Request aligned view.
+
 2013-07-11  Cary Coutant  <ccoutant@google.com>
 
        * powerpc.cc (Target_powerpc::write_branch_lookup_table): Use
index 08a4583943c7eb5cecd7a6d3cc386433af7039b3..74aeec94caa2e744d5c135cf7a823ad5e8024c63 100644 (file)
@@ -141,12 +141,13 @@ class File_read
   // SIZE bytes.  OFFSET is the offset into the input file for the
   // file we are reading; this is zero for a normal object file,
   // non-zero for an object file in an archive.  ALIGNED is true if
-  // the data must be naturally aligned; this only matters when OFFSET
-  // is not zero.  The pointer will remain valid until the File_read
-  // is unlocked.  It is an error if we can not read enough data from
-  // the file.  The CACHE parameter is a hint as to whether it will be
-  // useful to cache this data for later accesses--i.e., later calls
-  // to get_view, read, or get_lasting_view which retrieve the same
+  // the data must be naturally aligned (i.e., aligned to the size
+  // of a target word); this only matters when OFFSET is not zero.
+  // The pointer will remain valid until the File_read is unlocked.
+  // It is an error if we can not read enough data from the file.
+  // The CACHE parameter is a hint as to whether it will be useful
+  // to cache this data for later accesses--i.e., later calls to
+  // get_view, read, or get_lasting_view which retrieve the same
   // data.
   const unsigned char*
   get_view(off_t offset, off_t start, section_size_type size, bool aligned,
index bf5853d4d65862d7876afb21c3a4597aa49aac75..323f8043ea28ceeb9ba8be4584cf5c0279ad0142 100644 (file)
@@ -60,7 +60,7 @@ class Sniff_file
   {
    public:
     View(File_read& file, off_t file_offset, off_t data_size)
-      : data_(file.get_view(0, file_offset, data_size, false, false))
+      : data_(file.get_view(0, file_offset, data_size, true, false))
     { }
 
     const unsigned char* data()
This page took 0.03199 seconds and 4 git commands to generate.