From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH 19/34] xen/arm: Provide eabi wrapper for __aeabi_mem* functions Date: Wed, 26 Mar 2014 16:16:03 +0000 Message-ID: <5332FD43.5030001@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> <1395766541-23979-20-git-send-email-julien.grall@linaro.org> <1395768302.22808.5.camel@kazak.uk.xensource.com> <5331C725.10003@linaro.org> <1395830364.22808.43.camel@kazak.uk.xensource.com> <5332F47F.3030000@linaro.org> <1395848877.22909.10.camel@kazak.uk.xensource.com> <5332F9DB.4030605@linaro.org> <1395850277.22909.19.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSqUo-0007Ko-VO for xen-devel@lists.xenproject.org; Wed, 26 Mar 2014 16:16:07 +0000 Received: by mail-ee0-f44.google.com with SMTP id e49so1844852eek.31 for ; Wed, 26 Mar 2014 09:16:05 -0700 (PDT) In-Reply-To: <1395850277.22909.19.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 03/26/2014 04:11 PM, Ian Campbell wrote: > On Wed, 2014-03-26 at 16:01 +0000, Julien Grall wrote: >> On 03/26/2014 03:47 PM, Ian Campbell wrote: >>> On Wed, 2014-03-26 at 15:38 +0000, Julien Grall wrote: >>>> On 03/26/2014 10:39 AM, Ian Campbell wrote: >>>>> On Tue, 2014-03-25 at 18:12 +0000, Julien Grall wrote: >>>>>> Hi Ian, >>>>>> >>>>>> On 03/25/2014 05:25 PM, Ian Campbell wrote: >>>>>>> On Tue, 2014-03-25 at 16:55 +0000, Julien Grall wrote: >>>>>>>> Clang doesn't provide function __aebai_mem*, implement generically as a wrapper >>>>>>>> for mem* function provided by Xen. >>>>>>> >>>>>>> Where are the references to these functions coming from if not from the >>>>>>> compiler? >>>>>> >>>>>> Theses functions are called by the code generated by the compiler. >>>>> >>>>> And who normally provides them when building with clang? Some sort of >>>>> libclang I guess? >>>> >>>> I've tried to compile a same compilation unit with gcc and clang. gcc is >>>> inlining the call to __aebi_*. >>> >>> That is orthogonal to the question I asked. >>> >>> What in a clang based system normally provides __aeabi_*? >>> >>> Your choices are "a libclang thing", "the libc", "something else". >> >> Sorry I spent the last couple of hours to try to find who is providing >> the __aebi_* functions. >> >> For userspace binary it's providing by the glibc. > > Are we not telling clang not to use with libc (via --nostdlib or > similar)? I thought we did for gcc too but I can't actually see the > code. Actually maybe I wouldn't expect it to suppress this sort of > thing. We directly use ld to link the binary. So no need of --nosdtlib --nolibgcc (see arch/arm/Makefile $(TARGET)-syms). > I see __eabi_memset even in a gcc based glibc, so I think this isn't > clang specific, just differences in the optmisers/inliners etc. > > Anyhow, it looks like this is actually part of the ABI spec: > http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0043d/index.html > > The correct wording for the commit message would therefore be something > like "Provide __aeabi_memset et al which are required by EABI and which > compilers expect to be provided by the libc implementation", or > something like that. Thanks I will rework the commit message. -- Julien Grall