From owner-freebsd-arm@FreeBSD.ORG Tue Feb 27 11:49:08 2007 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 403C316A400 for ; Tue, 27 Feb 2007 11:49:08 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (cognet.ci0.org [80.65.224.102]) by mx1.freebsd.org (Postfix) with ESMTP id 58CC213C4B3 for ; Tue, 27 Feb 2007 11:49:06 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l1RBxmuD017694; Tue, 27 Feb 2007 12:59:48 +0100 (CET) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.13.8/8.13.8/Submit) id l1RBxmfc017693; Tue, 27 Feb 2007 12:59:48 +0100 (CET) (envelope-from mlfbsd) Date: Tue, 27 Feb 2007 12:59:47 +0100 From: Olivier Houchard To: Pascal Hofstee Message-ID: <20070227115947.GA17619@ci0.org> References: <1172565447.1394.20.camel@chekov> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1172565447.1394.20.camel@chekov> User-Agent: Mutt/1.4.1i Cc: freebsd-arm@freebsd.org Subject: Re: __aeabi_read_tp missing symbol X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2007 11:49:08 -0000 Hi Pascal, On Tue, Feb 27, 2007 at 09:37:27AM +0100, Pascal Hofstee wrote: > Hi, > > I just finished writing a small application for my job on FreeBSD/i386 > making sure everything compiles WARNS=9 clean. Now comes the task to > move this code over to our embedded platform which is an Intel XScale > (Linksys NSLU2) at the moment i have not been able to test out cognet@'s > FreeBSD/arm work yet .. so we're using a Linux (Debian/Etch) to do our > embedded development on, so i apologise if this tunrs out to be a Linux > problem and i am asking the wrong people for assistence :) > > The problem i am encountering is that during the link stage i get a lot > of the following link errors: > > datastream.o: In function `deleteSynchronisedData': > ...../datastream.c:909: undefined reference to `__aeabi_read_tp' > Yes it is definitively a linux problem :-) See below. > Googling so far has taught me that this is GCC's work and well the > following: > > `-mtp=NAME' > Specify the access model for the thread local storage pointer. > The valid models are `soft', which generates calls to > `__aeabi_read_tp', `cp15', which fetches the thread pointer from > `cp15' directly (supported in the arm6k architecture), and `auto', > which uses the best available method for the selected processor. > The default setting is `auto'. > > Obviously GCC is of the opinion that it should use the "soft" access model for > thread local storage (which i am indeed using a lot in this source file). But > somehow the link stage fails to find these symbols. > > Where should these symbols be coming from normally and how would i go about > fixing my link stage ... It seems as if the compiler is of the opinion that > TLS is supported. > > Once again i know this is currently on a Linux platform but i have much bigger > trust in the FreeBSD community to provide sensible answers in this regard. > Latest revisions of gcc/binutils have support for TLS. And using EABI is the right thing to do on linux. You're just using the wrong libc, eabi_read_tp and friends come from the glibc. If changing your glibc is not an option, you'll have to play with -mabi, and set it to something else than eabi, however if you need TLS I think you're doomed with this version of gcc, you'll have to find a matching glibc. I could be wrong on this one, I'm not a linux/arm specialist. Cheers, Olivier > -- > Pascal Hofstee > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"