aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-02-06 09:05:35 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-02-06 09:05:57 -0800
commit2aec968d4df313f893f239a1a69aef2392a16b85 (patch)
treec6545b73df74130e9c2ff0a078c7af099ee1c6c7 /ld/configure.ac
parentd6c146e9ea09e050e6f05fa00312de3fe763e811 (diff)
downloadbinutils-2aec968d4df313f893f239a1a69aef2392a16b85.zip
binutils-2aec968d4df313f893f239a1a69aef2392a16b85.tar.gz
binutils-2aec968d4df313f893f239a1a69aef2392a16b85.tar.bz2
Use mmap and cache the view buffer for get_view
This patch uses mmap if it is available and works. It also caches the view buffer for get_view. * configure.ac: Add AC_FUNC_MMAP. * config.in: Regenerated. * configure: Likewise. * plugin.c: Include <sys/mman.h>. (MAP_FAILED): New. Defined if not defined. (PROT_READ): Likewise. (MAP_PRIVATE): Likewise. (view_buffer_t): New. (plugin_input_file_t): Add view_buffer. (get_view): Try mmap and cache the view buffer. (plugin_maybe_claim): Initialize view_buffer.
Diffstat (limited to 'ld/configure.ac')
-rw-r--r--ld/configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/configure.ac b/ld/configure.ac
index 043c597..e926c03 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -195,6 +195,9 @@ AC_CHECK_FUNCS(glob mkstemp realpath sbrk setlocale waitpid)
AC_CHECK_FUNCS(open lseek close)
AC_HEADER_DIRENT
+dnl AC_CHECK_HEADERS(sys/mman.h)
+AC_FUNC_MMAP
+
AC_SEARCH_LIBS([dlopen], [dl])
AM_CONDITIONAL([ENABLE_PLUGINS], [test x$plugins = xyes])