]> sourceware.org Git - newlib-cygwin.git/commitdiff
2009-04-21 Sandra Loosemore <sandra@codesourcery.com>
authorJeff Johnston <jjohnstn@redhat.com>
Tue, 21 Apr 2009 18:38:53 +0000 (18:38 +0000)
committerJeff Johnston <jjohnstn@redhat.com>
Tue, 21 Apr 2009 18:38:53 +0000 (18:38 +0000)
        * libc/reent/impure.c (__sf_fake_stdin, __sf_fake_stdout)
        (__sf_fake_stderr): Declare locally with weak attribute.

newlib/ChangeLog
newlib/libc/reent/impure.c

index 8997c2099ea4d40e4abb908ee445f4c3ca8871f3..bdfbc0fa156045eaa07a5e61bb201fe6ecb9e112 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-21  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * libc/reent/impure.c (__sf_fake_stdin, __sf_fake_stdout)
+       (__sf_fake_stderr): Declare locally with weak attribute.
+
 2009-04-21  Mark Mitchell  <mark@codesourcery.com>
 
        * libc/include/_ansi.h: Move C++ defines to top of file.
index 12ee7177b3bb3089eeeddb25c93a973227f0b3c5..f5918c88fb716a99898b4257866322fce4e1e7cc 100644 (file)
@@ -9,6 +9,17 @@
 #define __ATTRIBUTE_IMPURE_DATA__
 #endif
 
+/* Redeclare these symbols locally as weak so that the file containing
+   their definitions (along with a lot of other stuff) isn't sucked in
+   unless they are actually used by other compilation units.  This is
+   important to reduce image size for targets with very small amounts
+   of memory.  */
+#ifdef _REENT_SMALL
+extern const struct __sFILE_fake __sf_fake_stdin _ATTRIBUTE ((weak));
+extern const struct __sFILE_fake __sf_fake_stdout _ATTRIBUTE ((weak));
+extern const struct __sFILE_fake __sf_fake_stderr _ATTRIBUTE ((weak));
+#endif
+
 static struct _reent __ATTRIBUTE_IMPURE_DATA__ impure_data = _REENT_INIT (impure_data);
 #ifdef __CYGWIN__
 extern struct _reent reent_data __attribute__ ((alias("impure_data")));
This page took 0.046644 seconds and 5 git commands to generate.