[syslinux:elflink] elflink: change the main func of hello.c to static
syslinux-bot for Feng Tang
feng.tang at intel.com
Thu Aug 12 21:03:14 PDT 2010
Commit-ID: 2c3f9a53205e8a44a4b58f68e3cce2732225d05f
Gitweb: http://syslinux.zytor.com/commit/2c3f9a53205e8a44a4b58f68e3cce2732225d05f
Author: Feng Tang <feng.tang at intel.com>
AuthorDate: Thu, 17 Jun 2010 11:57:39 +0800
Committer: Feng Tang <feng.tang at intel.com>
CommitDate: Tue, 20 Jul 2010 11:10:03 +0800
elflink: change the main func of hello.c to static
Otherwise it will be global and can't be searched, still don't know
the real reason
---
com32/elflink/modules/hello.c | 3 +--
com32/include/sys/module.h | 19 +------------------
2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/com32/elflink/modules/hello.c b/com32/elflink/modules/hello.c
index 3db2353..cba63e2 100644
--- a/com32/elflink/modules/hello.c
+++ b/com32/elflink/modules/hello.c
@@ -14,8 +14,7 @@
#define NUM_COUNT 10
#define MAX_NUM 100
-//static int hello_main(int argc, char **argv)
-int hello_main(int argc, char **argv)
+static int hello_main(int argc, char **argv)
{
int *nums = NULL;
int i;
diff --git a/com32/include/sys/module.h b/com32/include/sys/module.h
index 055f540..783c841 100644
--- a/com32/include/sys/module.h
+++ b/com32/include/sys/module.h
@@ -15,8 +15,6 @@
#include <stdbool.h>
#include <linux/list.h>
-
-
/*
* The maximum length of the module file name (including path), stored
* in the struct module descriptor.
@@ -138,7 +136,7 @@ static inline dump_elf_module(struct elf_module *module)
{
mp("module name = %s", module->name);
printf("base_addr = 0x%p, module_size = %d\n", module->base_addr, module->module_size);
- //printf("hash tlb = 0x%p, ghash tbl = 0x%p\n", module->hash_table, module->ghash_table);
+ printf("hash tlb = 0x%p, ghash tbl = 0x%p\n", module->hash_table, module->ghash_table);
printf("str tbl = 0x%p, size = %d\n", module->str_table, module->strtable_size);
printf("sym tbl = 0x%p, entry = %d, size = %d\n", module->sym_table, module->syment_size, module->symtable_size);
/*
@@ -171,7 +169,6 @@ struct module_dep {
* This portion is included by dynamic (ELF) module source files.
*/
-#if 1
#define MODULE_INIT(fn) static module_init_t __module_init \
__used __attribute__((section(".ctors_modinit"))) = fn
@@ -183,20 +180,6 @@ struct module_dep {
#else
-#define MODULE_INIT(fn) static module_init_t __module_init \
- __attribute__((section(".ctors_modinit"))) = fn
-
-#define MODULE_EXIT(fn) static module_exit_t __module_exit \
- __attribute__((section(".dtors_modexit"))) = fn
-
-#define MODULE_MAIN(fn) static module_main_t __module_main \
- __attribute__((section(".ctors_modmain"))) = fn
-
-#endif
-
-
-#else
-
/*
* This portion is included by the core COM32 module.
*/
More information about the Syslinux-commits
mailing list