This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Force _impure_ptr in .sdata section for MIPS


Checked in. Thanks.

-- Jeff J.

Thiemo Seufer wrote:
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]