[OpenAFS-devel] openafs linux-kernelmodule not buildable on
sparc
Derrick J Brashear
shadow@dementia.org
Mon, 26 Feb 2007 12:58:25 -0500 (EST)
On Sun, 25 Feb 2007, Derrick J Brashear wrote:
> Untested, might work, apply to your OpenAFS source and let us know.
> Basically "try harder to see if a module with a weak ref to sys_call_table
> will work before trying it.
It might be useful if more people were willing to test this so we could
roll it back in.
> Index: afs/LINUX/osi_probe.c
> ===================================================================
> RCS file: /cvs/openafs/src/afs/LINUX/osi_probe.c,v
> retrieving revision 1.1.2.20
> diff -u -r1.1.2.20 osi_probe.c
> --- afs/LINUX/osi_probe.c 13 Feb 2007 22:54:20 -0000 1.1.2.20
> +++ afs/LINUX/osi_probe.c 25 Feb 2007 14:34:09 -0000
> @@ -226,7 +226,9 @@
> ) __attribute__((weak));
> #endif
>
> +#ifdef LINUX_EXPORTS_SYS_CALL_TABLE
> extern SYSCALLTYPE sys_call_table[] __attribute__((weak));
> +#endif
> extern SYSCALLTYPE ia32_sys_call_table[] __attribute__((weak));
> extern SYSCALLTYPE sys_call_table32[] __attribute__((weak));
> extern SYSCALLTYPE sys_call_table_emu[] __attribute__((weak));
> @@ -499,7 +501,11 @@
> 0,
> #endif
>
> +#ifdef LINUX_EXPORTS_SYS_CALL_TABLE
> sys_call_table, /* weak symbol ref */
> +#else
> + 0,
> +#endif
> 0, 0, /* module parameter answers */
> #ifdef AFS_LINUX_sys_call_table
> AFS_LINUX_sys_call_table, /* compiled-in answer, if any */
> --- cf/linux-test4.m4 22 Feb 2007 21:49:02 -0000 1.20.2.28
> +++ cf/linux-test4.m4 25 Feb 2007 14:34:09 -0000
> @@ -110,9 +110,9 @@
> AC_CACHE_VAL([ac_cv_linux_exports_sys_call_table], [
> AC_TRY_KBUILD(
> [#include <linux/modversions.h>],
> -[#ifndef __ver_sys_call_table
> -#error sys_call_table not exported
> -#endif],
> +[
> +extern SYSCALLTYPE sys_call_table[] __attribute__((weak));
> +],
> ac_cv_linux_exports_sys_call_table=yes,
> ac_cv_linux_exports_sys_call_table=no)])
> AC_MSG_RESULT($ac_cv_linux_exports_sys_call_table)])
>
>
> Derrick
>
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>