From 3f2e6a2da5d9348efaa98eb06c430bec5fbe596b Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 25 Jun 2008 17:10:08 +0000 Subject: 2008-06-25 Cary Coutant * fileread.cc (File_read::make_view): Assert on zero-length view. * object.cc (Sized_relobj::do_read_symbols): Don't try to read symbol table when there are no symbols to read. --- gold/fileread.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gold/fileread.cc') diff --git a/gold/fileread.cc b/gold/fileread.cc index 6cb056f..cfe0ee6 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -327,6 +327,8 @@ File_read::View* File_read::make_view(off_t start, section_size_type size, unsigned int byteshift, bool cache) { + gold_assert(size > 0); + off_t poff = File_read::page_offset(start); section_size_type psize = File_read::pages(size + (start - poff)); -- cgit v1.1