Re: [PATCH] Move __this_module to xxx.mod.c

From: Kai Germaschewski (kai@tp1.ruhr-uni-bochum.de)
Date: Sun Feb 16 2003 - 20:57:04 EST


On Sun, 16 Feb 2003, Brian Gerst wrote:

> This patch moves the module structure to the generated .mod.c file,
> instead of compiling it into each object and relying on the linker to
> include it only once.

Yeah, it's something I though about doing, but I was not sure. I think
it's up to Rusty to comment ;)

It will need an associated change to module_init_tools.

Another comment:

diff -urN linux-2.5.61-bk1/scripts/modpost.c linux/scripts/modpost.c
--- linux-2.5.61-bk1/scripts/modpost.c 2003-02-16 10:06:35.000000000 -0500
+++ linux/scripts/modpost.c 2003-02-16 14:10:19.000000000 -0500
@@ -287,6 +287,10 @@
                 /* undefined symbol */
                 if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL)
                         break;
+
+ /* ignore __this_module */
+ if (!strcmp(symname, "__this_module"))
+ break;
                 
                 s = alloc_symbol(symname);
                 /* add to list */

Is that necessary? __this_module shouldn't be unresolved, so this case
should never be hit AFAICS.

--Kai

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Feb 23 2003 - 22:00:16 EST