On Tue, Aug 26, 2008 at 03:53:18PM +0200, Carmelo AMOROSO wrote: > Takashi Yoshii wrote: > >For SH, init/fini function prologue is defined in > >libc/sysdeps/linux/sh/crti.S > >as follows. > > > >| (frame entry) > >|#ifndef __HAVE_SHARED__ > >| (GOT pointer initialization) > >|#endif > > > >I think this should be "ifdef", but "ifndef". > >Or, are there any reason that GOT should be used (only)in NON-shared case ? > > > Well, this change has been committed by lethal at > http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/uClibc/libc/sysdeps/linux/sh/crti.S?rev=16426&view=diff&r1=16426&r2=16425&p1=trunk/uClibc/libc/sysdeps/linux/sh/crti.S&p2=/trunk/uClibc/libc/sysdeps/linux/sh/crti.S > > so, unless there something I'm not understanding too, I suppose it was a > typo by Paul (aka lethal). > Paul, my you give some lights on this change ? > I had to think about this briefly. It was part of the SH-2 work done by Mark Shinwell (added to Cc). The disabling of GOT related code in the non-shared case was intentional, but I don't immediately recall what the rationale was.
Original thread here: http://www.uclibc.org/lists/uclibc/2006-October/016617.html I expect that it's related to the ABI, in that we also don't have the GOT references in the FDPIC case, so it should likely be conditionalized for the targets that actually emit _GLOBAL_OFFSET_TABLE_, rather than depending on __HAVE_SHARED__. While I hit this on FDPIC, I would wager that Mark hit this on shared FLAT (which we don't have support in-tree for anyways) on his internal libc. _______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc