aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-03-11 11:30:14 +0800
committerFeng Tang <feng.tang@intel.com>2010-03-11 15:53:07 +0800
commit39170ddadf50bd21b225ac9dafcd7b0adb2928b6 (patch)
tree6bf70228010f3167efc6b9219196f068643ea4d8
parent587f32d2a82c5ca8ce1fd2823b9ba7dae75b3fb3 (diff)
downloadbak.git-elflink-ugly.tar.gz
bak.git-elflink-ugly.tar.xz
bak.git-elflink-ugly.zip
elflink: remove those preloading of libraries in load_env32()elflink-ugly
Now all the library will be loaded only when needed, say dynamic loading
-rw-r--r--core/elflink/cli.c3
-rw-r--r--core/elflink/execute.c1
-rw-r--r--core/elflink/load_env32.c23
3 files changed, 2 insertions, 25 deletions
diff --git a/core/elflink/cli.c b/core/elflink/cli.c
index 0ce97fb5..2e223ae0 100644
--- a/core/elflink/cli.c
+++ b/core/elflink/cli.c
@@ -359,7 +359,6 @@ void process_command(const char *cmd)
module_name = strtok(cmd, COMMAND_DELIM);
len_mn = strlen(module_name);
-
printf("\n");
mp("enter, cmd = %s, module_name = %s",cmd, module_name);
@@ -379,7 +378,7 @@ void process_command(const char *cmd)
break;
} while (argc < MAX_COMMAND_ARGS);
argv[argc] = NULL;
- //module_load_dependencies(module_name, MODULES_DEP);
+ module_load_dependencies(module_name, MODULES_DEP);
spawn_load(module_name, argv);
} else if (!strcmp(module_name + len_mn - 2, ".0")) {
execute(cmd, KT_PXE);
diff --git a/core/elflink/execute.c b/core/elflink/execute.c
index 88d8ba38..1a7ce797 100644
--- a/core/elflink/execute.c
+++ b/core/elflink/execute.c
@@ -55,6 +55,7 @@ void execute(const char *cmdline, enum kernel_type type)
if (type == KT_COM32) {
/* new entry for elf format c32 */
spawn_load_param[0] = args;
+ module_load_dependencies(kernel, "modules.dep");
spawn_load(kernel, spawn_load_param);
} else if (type <= KT_KERNEL) {
/* Need add one item for kernel load, as we don't use
diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c
index c2c940e6..40041624 100644
--- a/core/elflink/load_env32.c
+++ b/core/elflink/load_env32.c
@@ -124,28 +124,5 @@ void load_env32(com32sys_t * regs)
printf("Starting 32 bit elf module subsystem...\n");
init_module_subsystem(&core_module);
- /*
- printf("Str table address: %d\n", core_module.str_table);
- printf("Sym table address: %d\n", core_module.sym_table);
- printf("Str table size: %d\n", core_module.strtable_size);
- printf("Sym table size: %d\n", core_module.symtable_size);
- */
-
- /* load most of the libraries */
- printf("Loading sort.c32, ret = %d\n",load_library("sort.c32"));
- printf("Loading ansiraw.c32, ret = %d\n", load_library("ansiraw.c32"));
- printf("Loading background.c32, ret = %d\n",load_library("background.c32"));
- printf("Loading printmsg.c32, ret = %d\n",load_library("printmsg.c32"));
- printf("Loading drain.c32, ret = %d\n",load_library("drain.c32"));
- printf("Loading sha1hash.c32\n%d\n",load_library("sha1hash.c32"));
- printf("Loading unbase64.c32\n%d\n",load_library("unbase64.c32"));
- printf("Loading sha512crypt\n%d\n",load_library("sha512crypt.c32"));
- printf("Loading sha256crypt\n%d\n",load_library("sha256crypt.c32"));
- printf("Loading md5.c32\n%d\n",load_library("md5.c32"));
- printf("Loading crypt-md5.c32\n%d\n",load_library("crypt-md5.c32"));
- printf("Loading passwd.c32\n%d\n",load_library("passwd.c32"));
- printf("Loading get_key.c32\n%d\n",load_library("get_key.c32"));
- printf("Loading menumain.c32\n%d\n",load_library("menumain.c32"));
-
start_ui(NULL);
}