diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-09-10 00:46:45 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-09-10 00:46:45 +0000 |
commit | be83844e4cf998dc60411c6802635caf7e8d94e7 (patch) | |
tree | 61d1f3ec219966205068876cb6a97c9920dfc636 | |
parent | 9c64d2a7ba6feb196099ee8b65bba163191008c0 (diff) | |
download | newlib-be83844e4cf998dc60411c6802635caf7e8d94e7.zip newlib-be83844e4cf998dc60411c6802635caf7e8d94e7.tar.gz newlib-be83844e4cf998dc60411c6802635caf7e8d94e7.tar.bz2 |
2002-09-09 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/machine/i386/crt0.c (_start): Remove
code that clears the .bss section.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/sys/linux/machine/i386/crt0.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index de3e80e..a0e0627 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,5 +1,10 @@ 2002-09-09 Jeff Johnston <jjohnstn@redhat.com> + * libc/sys/linux/machine/i386/crt0.c (_start): Remove + code that clears the .bss section. + +2002-09-09 Jeff Johnston <jjohnstn@redhat.com> + * libc/include/sys/_types.h (_mbstate_t): Changed to use unsigned char internally. * libc/sys/linux/sys/_types.h: Ditto. diff --git a/newlib/libc/sys/linux/machine/i386/crt0.c b/newlib/libc/sys/linux/machine/i386/crt0.c index 84ea043..4364f61 100644 --- a/newlib/libc/sys/linux/machine/i386/crt0.c +++ b/newlib/libc/sys/linux/machine/i386/crt0.c @@ -33,8 +33,12 @@ void _start(int args) environ = argv+argc+1; - /* clear bss */ - memset(&__bss_start,0,(&_end - &__bss_start)); + /* Note: do not clear the .bss section. When running with shared + * libraries, certain data items such __mb_cur_max or environ + * may get placed in the .bss, even though they are initialized + * to non-zero values. Clearing the .bss will end up zeroing + * out their initial values. The .bss is already initialized + * by this time by Linux. */ tzset(); /* initialize timezone info */ exit(main(argc,argv,environ)); |