Unmap the buffer if plugin didn't claim the file
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 11 Feb 2015 01:01:17 +0000 (17:01 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 11 Feb 2015 01:03:59 +0000 (17:03 -0800)
commit386047969d9d36980fd6c4129b372e4a400114e0
treeda07658b16a2f011e944e9a65707f3f06ebeff7e
parente7d52ed30408677f63c121e88a1493e6300b80ba
Unmap the buffer if plugin didn't claim the file

If plugin didn't claim the file, unmap the buffer.

* plugin.c (plugin_input_file_t): Add use_mmap.
(plugin_pagesize): New.
(get_view): Use plugin_pagesize.  Set use_mmap if mmap is used.
(plugin_load_plugins): Initialize plugin_pagesize.
(plugin_maybe_claim): Unmap the buffer if plugin didn't claim the
file.
ld/ChangeLog
ld/plugin.c