From: hpa Date: Fri, 17 Dec 2004 19:44:36 +0000 (+0000) Subject: Additional fixes for the proper argc/argv parsing X-Git-Tag: syslinux-3.11~287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a145fec7f8057933fa0fd9df24aa14ac5a7159e;p=profile%2Fivi%2Fsyslinux.git Additional fixes for the proper argc/argv parsing --- diff --git a/com32/lib/Makefile b/com32/lib/Makefile index 148cc2d..5f7551d 100644 --- a/com32/lib/Makefile +++ b/com32/lib/Makefile @@ -16,7 +16,8 @@ LIBOBJS = abort.o atexit.o atoi.o atol.o atoll.o calloc.o creat.o \ vsscanf.o libgcc/__ashldi3.o libgcc/__udivdi3.o \ libgcc/__negdi2.o libgcc/__ashrdi3.o libgcc/__lshrdi3.o \ libgcc/__muldi3.o libgcc/__udivmoddi4.o libgcc/__umoddi3.o \ - libgcc/__divdi3.o libgcc/__moddi3.o sys/entry.o sys/exit.o \ + libgcc/__divdi3.o libgcc/__moddi3.o \ + sys/entry.o sys/exit.o sys/argv.o \ sys/fileinfo.o sys/opendev.o sys/read.o sys/write.o \ sys/close.o sys/open.o sys/fileread.o sys/fileclose.o \ sys/isatty.o sys/openconsole.o sys/line_input.o \ diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c index 4efd89c..e7a1cdc 100644 --- a/com32/lib/malloc.c +++ b/com32/lib/malloc.c @@ -22,6 +22,7 @@ struct free_arena_header __malloc_head = /* This is extern so it can be overridden by the user application */ extern size_t __stack_size; +extern void *__mem_end; /* Produced after argv parsing */ static inline size_t sp(void) { @@ -32,11 +33,10 @@ static inline size_t sp(void) static void __constructor init_memory_arena(void) { - extern char _end[]; /* Symbol created by the linker */ struct free_arena_header *fp; size_t start, total_space; - start = (size_t)ARENA_ALIGN_UP(_end); + start = (size_t)ARENA_ALIGN_UP(__mem_end); total_space = sp() - start; if ( __stack_size == 0 || __stack_size > total_space >> 1 ) diff --git a/dos/crt0.S b/dos/crt0.S index f567177..1052100 100644 --- a/dos/crt0.S +++ b/dos/crt0.S @@ -47,6 +47,3 @@ exit: 1: hlt jmp 1b .size exit,.-exit - - .section ".bss","aw" -argv: .space 4*128