From: Ian Lance Taylor Date: Thu, 10 Mar 2011 01:10:19 +0000 (+0000) Subject: * fileread.cc (File_read::clear_views): Don't delete the whole X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a19fefdc57f5eafcb682175f2b2bcd8f6f366c90;p=binutils-gdb.git * fileread.cc (File_read::clear_views): Don't delete the whole file view. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index c02a174494e..bbb8185b473 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2011-03-09 Ian Lance Taylor + + * fileread.cc (File_read::clear_views): Don't delete the whole + file view. + 2011-03-08 Ian Lance Taylor PR gold/12525 diff --git a/gold/fileread.cc b/gold/fileread.cc index 654e47b4249..36485a915be 100644 --- a/gold/fileread.cc +++ b/gold/fileread.cc @@ -717,7 +717,9 @@ File_read::clear_views(Clear_views_mode mode) should_delete = false; else if (mode == CLEAR_VIEWS_ALL) should_delete = true; - else if (p->second->should_cache() && keep_files_mapped) + else if ((p->second->should_cache() + || p->second == this->whole_file_view_) + && keep_files_mapped) should_delete = false; else if (this->object_count_ > 1 && p->second->accessed()