aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-06-17 11:57:39 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:03 +0800
commit2c3f9a53205e8a44a4b58f68e3cce2732225d05f (patch)
tree166b168863285e7c2629c3a6065f14ba118f123f
parent601b091ac3403817d839e99ab83d399af4e8dbe9 (diff)
downloadsyslinux-2c3f9a53205e8a44a4b58f68e3cce2732225d05f.tar.gz
syslinux-2c3f9a53205e8a44a4b58f68e3cce2732225d05f.tar.xz
syslinux-2c3f9a53205e8a44a4b58f68e3cce2732225d05f.zip
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
-rw-r--r--com32/elflink/modules/hello.c3
-rw-r--r--com32/include/sys/module.h19
2 files changed, 2 insertions, 20 deletions
diff --git a/com32/elflink/modules/hello.c b/com32/elflink/modules/hello.c
index 3db23536..cba63e2e 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 055f540e..783c8419 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.
*/