[asterisk-commits] kpfleming: trunk r56209 - /trunk/include/asterisk/module.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 22 10:36:47 MST 2007


Author: kpfleming
Date: Thu Feb 22 11:36:46 2007
New Revision: 56209

URL: http://svn.digium.com/view/asterisk?view=rev&rev=56209
Log:
move the ast_module_info structure into the special section as well, otherwise when restore_globals() is called it will lose its pointer to the ast_module structure that the loader put there

Modified:
    trunk/include/asterisk/module.h

Modified: trunk/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/module.h?view=diff&rev=56209&r1=56208&r2=56209
==============================================================================
--- trunk/include/asterisk/module.h (original)
+++ trunk/include/asterisk/module.h Thu Feb 22 11:36:46 2007
@@ -300,7 +300,9 @@
 }
 
 #define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)	\
-	static struct ast_module_info __mod_info = {		\
+	static struct ast_module_info 				\
+		 __attribute__((section(".embed_module")))	\
+		__mod_info = {					\
 		.backup_globals = __backup_globals,		\
 		.restore_globals = __restore_globals,		\
 		.name = AST_MODULE,				\



More information about the asterisk-commits mailing list