diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-22 17:36:46 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-02-22 17:36:46 +0000 |
commit | 8a8708c9464bfe85e43459cca200425a3d4bdff5 (patch) | |
tree | ca7fcd93a52a8ca4f6f4ed548a4c90d4547cdf96 /include | |
parent | 7dee304b27ed53812986bbd6143dc458a7ee1f9b (diff) |
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
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56209 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/module.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asterisk/module.h b/include/asterisk/module.h index 4ced03fa9..0fe4ccf57 100644 --- a/include/asterisk/module.h +++ b/include/asterisk/module.h @@ -300,7 +300,9 @@ static void __restore_globals(void) } #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, \ |