From b3a9676ba0da054d953b0f11a441702659ba1bfb Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 13 Aug 2002 00:11:51 +0000 Subject: [PATCH] 2002-08-12 Jeff Johnston * libc/sys/linux/machine/i386/crt0.c (__bss_start,_end): Declare as extern chars and use the address operator to properly use values set in linker script. --- newlib/ChangeLog | 6 ++++++ newlib/libc/sys/linux/machine/i386/crt0.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 40f773f4f..c80475143 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2002-08-12 Jeff Johnston + + * libc/sys/linux/machine/i386/crt0.c (__bss_start,_end): + Declare as extern chars and use the address operator to + properly use values set in linker script. + 2002-08-09 Jason Tishler * libc/stdlib/mallocr.c: Include . diff --git a/newlib/libc/sys/linux/machine/i386/crt0.c b/newlib/libc/sys/linux/machine/i386/crt0.c index cc9cb9249..84ea0435b 100644 --- a/newlib/libc/sys/linux/machine/i386/crt0.c +++ b/newlib/libc/sys/linux/machine/i386/crt0.c @@ -16,8 +16,8 @@ extern char **environ; extern int main(int argc,char **argv,char **envp); -extern void *_end; -extern void *__bss_start; +extern char _end; +extern char __bss_start; void _start(int args) { @@ -34,7 +34,7 @@ void _start(int args) environ = argv+argc+1; /* clear bss */ - memset(__bss_start,0,((char *)_end - (char *)__bss_start)); + memset(&__bss_start,0,(&_end - &__bss_start)); tzset(); /* initialize timezone info */ exit(main(argc,argv,environ));