OSDN Git Service

* fileread.cc (File_read::~File_read): Don't delete whole_file_view_.
authorccoutant <ccoutant>
Thu, 11 Mar 2010 02:37:11 +0000 (02:37 +0000)
committerccoutant <ccoutant>
Thu, 11 Mar 2010 02:37:11 +0000 (02:37 +0000)
commit968fc832122f3e6819f42b85336f0b5205cc0048
tree0ea3decf8e64d6f006c0b538fa2ac6d02b12af0b
parente0285ac2a3daff4e741d944cf658a92d686500a2
* fileread.cc (File_read::~File_read): Don't delete whole_file_view_.
(File_read::open[1]): Remove initial mapping of whole_file_view_.
(File_read::open[2]): Add whole_file_view_ to list of views.
(File_read::make_view): Remove test of whole_file_view_.
(File_read::find_or_make_view): Create whole_file_view_ if
necessary.
(File_read::clear_views): Replace bool parameter with enum;
adjust all callers.  Don't delete views with permanent data;
do delete cached views and views from archives if
--no-keep-files-mapped is set.  Set whole_file_view_ to NULL
if clearing the corresponding view.
* fileread.h (File_read::Clear_views_mode): New enum.
(File_read::View::is_permanent_view): New method.
(File_read::clear_views): Replace bool parameter
with enum; adjust all callers.
* options.h (General_options): Change keep_files_mapped option;
add map_whole_files.
* readsyms.cc (Add_symbols::run): Delete sd_ object before
releasing the file.
* reloc.cc (Scan_relocs::run): Delete rd_ object before releasing
the file.
gold/ChangeLog
gold/fileread.cc
gold/fileread.h
gold/options.h
gold/readsyms.cc
gold/reloc.cc