diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-17 20:39:35 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-19 19:01:49 +0200 |
commit | 03e815a91b1a1f94ce0cfd6ff64f50ae40ed740c (patch) | |
tree | a59b9b488e662be7635236fd5f0bf5586231eb99 /newlib | |
parent | 382550072b49430f8c69adee937a0ba07bd385e6 (diff) | |
download | newlib-03e815a91b1a1f94ce0cfd6ff64f50ae40ed740c.zip newlib-03e815a91b1a1f94ce0cfd6ff64f50ae40ed740c.tar.gz newlib-03e815a91b1a1f94ce0cfd6ff64f50ae40ed740c.tar.bz2 |
Use weak reference for _REENT_SMALL
Avoid a strong reference to __sfp[] for _impure_data. The __sfp[] is linked in
if __sinit() is used for example.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/reent/impure.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/reent/impure.c b/newlib/libc/reent/impure.c index f10665f..643a511 100644 --- a/newlib/libc/reent/impure.c +++ b/newlib/libc/reent/impure.c @@ -6,10 +6,14 @@ important to reduce image size for targets with very small amounts of memory. */ #ifdef _REENT_SMALL +#ifdef _REENT_GLOBAL_STDIO_STREAMS +extern __FILE __sf[3] _ATTRIBUTE ((weak)); +#else 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 +#endif struct _reent __ATTRIBUTE_IMPURE_DATA__ _impure_data = _REENT_INIT (_impure_data); #ifdef __CYGWIN__ |