aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2010-06-18 16:17:35 +0800
committerFeng Tang <feng.tang@intel.com>2010-07-20 11:10:04 +0800
commit873e2887a7febc3e5b96375aae35549d7aad5149 (patch)
treeedc1209438c64559fd7e2d9876444aaedc101ee0
parent8ab0286fee4bd8c4e8a47f624b394f6860f48545 (diff)
downloadsyslinux-873e2887a7febc3e5b96375aae35549d7aad5149.tar.gz
syslinux-873e2887a7febc3e5b96375aae35549d7aad5149.tar.xz
syslinux-873e2887a7febc3e5b96375aae35549d7aad5149.zip
elflink: We can see menu.c32 working!
-rw-r--r--com32/lib/malloc.c2
-rwxr-xr-xcom32/lib/sys/module/elf_module.c2
-rw-r--r--com32/lib/sys/module/exec.c3
-rw-r--r--core/diskstart.inc6
-rw-r--r--core/elflink/load_env32.c2
5 files changed, 11 insertions, 4 deletions
diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c
index 6cc9681f..c78d210d 100644
--- a/com32/lib/malloc.c
+++ b/com32/lib/malloc.c
@@ -80,7 +80,7 @@ static void __constructor init_memory_arena(void)
//mp("enter");
- mp("skip this init as core has a mem_init");
+// mp("skip this init as core has a mem_init");
return;
start = (size_t) ARENA_ALIGN_UP(__mem_end);
diff --git a/com32/lib/sys/module/elf_module.c b/com32/lib/sys/module/elf_module.c
index 26705df7..d04230ea 100755
--- a/com32/lib/sys/module/elf_module.c
+++ b/com32/lib/sys/module/elf_module.c
@@ -151,10 +151,12 @@ static int load_segments(struct elf_module *module, Elf32_Ehdr *elf_hdr) {
}
}
+ /*
DBG_PRINT("Loadable segment of size 0x%08x copied from vaddr 0x%08x at 0x%08x\n",
cr_pht->p_filesz,
cr_pht->p_vaddr,
(Elf32_Addr)module_get_absolute(cr_pht->p_vaddr, module));
+ */
}
}
diff --git a/com32/lib/sys/module/exec.c b/com32/lib/sys/module/exec.c
index 8204ee42..30a61c06 100644
--- a/com32/lib/sys/module/exec.c
+++ b/com32/lib/sys/module/exec.c
@@ -72,7 +72,8 @@ int load_library(const char *name)
if (module->init_func != NULL) {
res = (*(module->init_func))();
- DBG_PRINT("Initialization function returned: %d\n", res);
+ if (res)
+ DBG_PRINT("Initialization error! function returned: %d\n", res);
} else {
DBG_PRINT("No initialization function present.\n");
}
diff --git a/core/diskstart.inc b/core/diskstart.inc
index 34ac20cc..3ffae852 100644
--- a/core/diskstart.inc
+++ b/core/diskstart.inc
@@ -616,8 +616,10 @@ verify_checksum:
jnz .checksum
pop ds
+ push eax
mov si,cbios_name
call writestr_early
+ pop eax
and eax,eax ; Should be zero
jz all_read ; We're cool, go for it!
@@ -706,6 +708,8 @@ SectorPtrsEnd equ $
; ----------------------------------------------------------------------------
section .text16
+test_string db 'test', 0 ; temp add by feng
+
all_read:
;
; Let the user (and programmer!) know we got this far. This used to be
@@ -714,7 +718,7 @@ all_read:
;mov si,copyright_str
;call writestr_early
- mov si,ebios_name
+ mov si,test_string
call writestr_early
;
; Insane hack to expand the DOS superblock to dwords
diff --git a/core/elflink/load_env32.c b/core/elflink/load_env32.c
index da7c6045..663c82ef 100644
--- a/core/elflink/load_env32.c
+++ b/core/elflink/load_env32.c
@@ -94,7 +94,7 @@ void start_ui(char *config_file)
mp("enter, config file = %s", config_file);
- //parse_configs(argv);
+ parse_configs(argv);
/* run the default menu if found */
/*
if (default_menu) {