This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: mips: -G0 vs __dso_handle


How about this?  Tested under mipsisa64-elf with no regressions.  The
other two I found by inspection; they're the only other two that have
.sdata and use -G 0.

2006-05-09  DJ Delorie  <dj@redhat.com>

	* crtstuff.c: Ensure that __dso_handle is placed in .sdata for
	mips, iq2000, and m32r targets.

Index: crtstuff.c
===================================================================
--- crtstuff.c	(revision 113691)
+++ crtstuff.c	(working copy)
@@ -225,6 +225,9 @@
    in one DSO or the main program is not used in another object.  The
    dynamic linker takes care of this.  */
 
+#if defined(__mips__) || defined(__iq2000__) || defined(__m32r__)
+extern void *__dso_handle __attribute__ ((__section__ (".sdata")));
+#endif
 #ifdef HAVE_GAS_HIDDEN
 extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
 #endif


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