Skip to content

Commit

Permalink
Check for KALLSYMS
Browse files Browse the repository at this point in the history
Check at ./configure time that the kernel was built with kallsyms
support.  If the kernel doesn't have CONFIG_KALLSYMS defined the
modules will still compile cleanly but will not be loadable.  So
we really want to catch this early during ./configure.  Note that
we do not require CONFIG_KALLSYMS_ALL but it may be safely defined.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#6
  • Loading branch information
behlendorf committed Jan 30, 2013
1 parent 3cbfd25 commit de081a2
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_KERN_PATH_PARENT_HEADER
SPL_AC_KERN_PATH_PARENT_SYMBOL
SPL_AC_KERN_PATH_LOCKED
SPL_AC_CONFIG_KALLSYMS
SPL_AC_CONFIG_ZLIB_INFLATE
SPL_AC_CONFIG_ZLIB_DEFLATE
SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
Expand Down Expand Up @@ -2129,6 +2130,26 @@ AC_DEFUN([SPL_AC_KERN_PATH_LOCKED], [
[])
])

dnl #
dnl # /proc/kallsyms support,
dnl # Verify the kernel has CONFIG_KALLSYMS support enabled.
dnl #
AC_DEFUN([SPL_AC_CONFIG_KALLSYMS], [
AC_MSG_CHECKING([whether CONFIG_KALLSYMS is defined])
SPL_LINUX_TRY_COMPILE([
#if !defined(CONFIG_KALLSYMS)
#error CONFIG_KALLSYMS not defined
#endif
],[ ],[
AC_MSG_RESULT([yes])
],[
AC_MSG_RESULT([no])
AC_MSG_ERROR([
*** This kernel does not include the required kallsyms support.
*** Rebuild the kernel with CONFIG_KALLSYMS=y set.])
])
])

dnl #
dnl # zlib inflate compat,
dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
Expand Down

0 comments on commit de081a2

Please sign in to comment.