Hello All,
the appended patch places impure pointers in the .sdata section
for MIPS, this allows reliable builds with GP optimisation.
(Currently a build fails when the distance of such a pointer
reference exceeds the 16bit immediate.)
Thiemo
2006-08-01 Thiemo Seufer <ths@mips.com>
Nigel Stephens <nigel@mips.com>
* libc/include/sys/config.h (__ATTRIBUTE_IMPURE_PTR__): For MIPS
define this to force _impure_ptr to live in the .sdata section.
Index: newlib/libc/include/sys/config.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/config.h,v
retrieving revision 1.42
diff -u -p -r1.42 config.h
--- newlib/libc/include/sys/config.h 31 Jan 2006 19:33:56 -0000 1.42
+++ newlib/libc/include/sys/config.h 31 Jul 2006 14:10:52 -0000
@@ -94,6 +94,10 @@
#endif
#endif
+#ifdef __mips__
+#define __ATTRIBUTE_IMPURE_PTR__ __attribute__((__section__(".sdata")))
+#endif
+
#ifdef __xstormy16__
#define __SMALL_BITFIELDS
#undef INT_MAX