From 4449c8af71166c30e3f0a28aae74b35acd7a4ac3 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 10 Apr 2007 05:37:55 +0000 Subject: =?UTF-8?q?2007-04-10=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libcsupport/src/newlibc.c: Add __ATTRIBUTE_IMPURE_PTR__ (Fixes "relocation truncated to fit: R_MIPS_GPREL16" against _impure_ptr bug). Fix abuse of _REENT_INIT(). --- cpukit/ChangeLog | 7 +++++++ cpukit/libcsupport/src/newlibc.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 6adf54e937..e4143c90c4 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,10 @@ +2007-04-10 Ralf Corsépius + + * libcsupport/src/newlibc.c: Add __ATTRIBUTE_IMPURE_PTR__ + (Fixes "relocation truncated to fit: R_MIPS_GPREL16" against + _impure_ptr bug). + Fix abuse of _REENT_INIT(). + 2007-04-02 Joel Sherrill * libcsupport/src/printk.c: Add %p support. diff --git a/cpukit/libcsupport/src/newlibc.c b/cpukit/libcsupport/src/newlibc.c index ef151c6e81..35fa3ee1b5 100644 --- a/cpukit/libcsupport/src/newlibc.c +++ b/cpukit/libcsupport/src/newlibc.c @@ -51,7 +51,7 @@ int _fwalk(struct _reent *ptr, int (*function) (FILE *) ); int libc_reentrant; /* do we think we are reentrant? */ -struct _reent libc_global_reent; +struct _reent libc_global_reent __ATTRIBUTE_IMPURE_PTR__ = _REENT_INIT(libc_global_reent); /* * CYGNUS newlib routine that does atexit() processing and flushes @@ -305,7 +305,7 @@ libc_init(int reentrant) rtems_status_code rc; rtems_id extension_id; - libc_global_reent = (struct _reent) _REENT_INIT((libc_global_reent)); +/* libc_global_reent = _REENT_INIT(libc_global_reent); */ _REENT = &libc_global_reent; if (reentrant) { -- cgit v1.2.3