Commit 17ee20ae authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix unix module

From: Rusty Russell <rusty@rustcorp.com.au>

# lsmod
Module                  Size  Used by
1                      26060  6
#

The compiler #define's unix to 1: we use -DKBUILD_MODNAME=unix.  We used to
#undef unix at the top of af_unix.c, but now the name is inserted by
modpost, that doesn't help.

#undef unix in modpost.c's generated C file.
parent 26214e32
......@@ -82,8 +82,6 @@
* with BSD names.
*/
#undef unix /* KBUILD_MODNAME */
#include <linux/module.h>
#include <linux/config.h>
#include <linux/kernel.h>
......
......@@ -487,6 +487,7 @@ add_header(struct buffer *b)
buf_printf(b, "\n");
buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
buf_printf(b, "\n");
buf_printf(b, "#undef unix\n"); /* We have a module called "unix" */
buf_printf(b, "struct module __this_module\n");
buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
buf_printf(b, " .name = __stringify(KBUILD_MODNAME),\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment