From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernd Zeimetz Date: Fri, 09 Nov 2007 17:59:15 +0000 Subject: Re: klibc sparc trouble with gcc > 4.0 Message-Id: <47349FF3.9010402@bzed.de> List-Id: References: <20071105135545.GA11201@stro.at> In-Reply-To: <20071105135545.GA11201@stro.at> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: sparclinux@vger.kernel.org Oleg Verych wrote: > = Mon, Nov 05, 2007 at 02:55:45PM +0100, maximilian attems = > [] >> titan:~# strace -vfF /usr/lib/klibc/bin/fstype >> execve("/usr/lib/klibc/bin/fstype", ["/usr/lib/klibc/bin/fstype"], >> ["SHELL=/bin/bash", "TERM=xterm", "SSH_CLIENT=[myip] 39403"..., >> "SSH_TTY=/dev/pts/0", "USER=root", >> "LS_COLORS=no:fi:di;34:l"..., >> "PATH=/usr/local/sbin:/usr/local/"..., "MAIL=/var/mail/root", >> "PWD=/root", "LANG=en_US.UTF-8", "PS1=\\h:\\w\\$ ", "HOME=/root", >> "SHLVL=2", "LS_OPTIONS=--color=auto", "LOGNAME=root", >> "SSH_CONNECTION=[myip] 3"..., "_=/usr/bin/strace", "OLDPWD=/"]) = 0 >> --- SIGSEGV (Segmentation fault) @ 0 (0) --- >> +++ killed by SIGSEGV +++ > > gdb doesn't work/help? (gdb) where #0 0x8000faac in ?? () #1 0x8000facc in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) Not sure if this is a gdb problem, though - never even tried to debug klibc. With the mentioned patch klibc compiles, but all utils just segfault, strace is as short as seen above. > > [] >> +++ b/usr/klibc/libgcc/__clzdi2.c >> @@ -0,0 +1,23 @@ >> +/* >> + * __clzdi2 - Returns the leading number of 0 bits in the argument >> + */ >> + without this patch it doesn't compile at all: KLIBCLD usr/klibc/libc.so ld: sparc architecture of input file `/usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a(_clzdi2.o)' is incompatible with sparc:v9 output ld: sparc architecture of input file `/usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a(_clz.o)' is incompatible with sparc:v9 output /usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a(_clzdi2.o): In function `__clzdi2': (.text+0xc): undefined reference to `_GLOBAL_OFFSET_TABLE_' /usr/lib/gcc/sparc-linux-gnu/4.2.3/libgcc.a(_clzdi2.o): In function `__clzdi2': (.text+0x14): undefined reference to `_GLOBAL_OFFSET_TABLE_' make[3]: *** [usr/klibc/libc.so] Error 1 make[2]: *** [all] Error 2 make[1]: *** [klibc] Error 2 make[1]: Leaving directory `/root/klibc-1.5.7' -- Bernd Zeimetz