summaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-07-15 16:49:20 +0000
committerCary Coutant <ccoutant@google.com>2013-07-15 16:49:20 +0000
commit1ebdbeebde28a5e96eed8218dc39d3514938a351 (patch)
tree98ee317ce74702757994f0f7555c46928d66d0c4 /gold
parenta75104cff9da193c52be0416e0b8639d3d3ddc3e (diff)
downloadbinutils-redhat-1ebdbeebde28a5e96eed8218dc39d3514938a351.tar.gz
2013-07-15 Shawn Landden <shawnlandden@gmail.com>
gold/ PR gold/15070 * fileread.h (File_read::get_view): Clarify comment about ALIGNED. * nacl.h (Sniff_file::View::View): Request aligned view.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog6
-rw-r--r--gold/fileread.h13
-rw-r--r--gold/nacl.h2
3 files changed, 14 insertions, 7 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 0322e0328b..7f859b7f1b 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
diff --git a/gold/fileread.h b/gold/fileread.h
index 08a4583943..74aeec94ca 100644
--- a/gold/fileread.h
+++ b/gold/fileread.h
@@ -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,
diff --git a/gold/nacl.h b/gold/nacl.h
index bf5853d4d6..323f8043ea 100644
--- a/gold/nacl.h
+++ b/gold/nacl.h
@@ -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()