[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC 6/7] arm: Introduce dummy empty functions for data only C files


  • To: "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, "julien.grall.oss@xxxxxxxxx" <julien.grall.oss@xxxxxxxxx>
  • From: Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>
  • Date: Thu, 14 Nov 2019 13:32:29 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eBv0JHOvIwx9rMz93hpDD4buYet4jMbedJ9uft4fa8c=; b=AXju4T8zz1/93pkkggq9h4R9VnBscvMRZ9/fLXrGTgIeG6ULm/x27Z3+UwfwJNizDWwDkZwnBIbhD7cr4iXdkUL5FRY91k74mWnFU1yJh8Ko5KsW4Hgyeg6EnEX0Zrbb1XKfh1aXz4GoGcQ5uQqUoGCaod9AqnFU7Su0oLC/ZPDG4SxU7jZIxQQts2KiTkP08pknsqA1BcQiu9djyYU9JdTaQdva69QUU8AlaE8jdHiWfZ9CQ4gJScNN/qCdZPfMOTn1+gdpkfQxTp9fmIJhRM4+6DJvio9ShnkFuImCf7dNjicSdzSsEkrYE/9IxCxndsisGIahEnIOGWqyDAMsLA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=agHpPvt1tzW/tqhRLEuGWvwWuGr2fFucB4sJI975wA8sdCTBZbM4uL2e9kF7H1FwLmDSJ+0IFk6+9Oy5AUlZnHijW/nAKDSlhHYH/MXlCIuEvQD2jQrwVUj6uG/EAJWAudXWQxP+kBgQZrTPHnH8zC1OM7sW5WTcTapWe9YNzLNTXm+fKZ1pJU65XcGDqchVMVsd+YRk98liq/k68oMahq69el+TwVzTLy3L5RH96/ysZua+qWV9av37+pAhJDsodk0lJFzmL91au5GOnQonjb9aNMTnm97G16xELmAl5js+oVlWQTi5JLUODZVYjTtnoZAIVpoc2egRV2P/wV/SEA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Artem_Mygaiev@xxxxxxxx;
  • Cc: Andrii Anisov <Andrii_Anisov@xxxxxxxx>, "dgdegra@xxxxxxxxxxxxx" <dgdegra@xxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "andrii.anisov@xxxxxxxxx" <andrii.anisov@xxxxxxxxx>
  • Delivery-date: Thu, 14 Nov 2019 13:32:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVlINwh2rGH6T4VEiM7lz8gLkeEaeGfC4AgANH8oCAAPLWAA==
  • Thread-topic: [Xen-devel] [RFC 6/7] arm: Introduce dummy empty functions for data only C files

Hello Julien

On Thu, 2019-11-14 at 08:03 +0900, Julien Grall wrote:
> 
> 
> On Tue, 12 Nov 2019, 05:57 Stefano Stabellini, <
> sstabellini@xxxxxxxxxx> wrote:
> > On Wed, 6 Nov 2019, Andrii Anisov wrote:
> > > From: Andrii Anisov <andrii_anisov@xxxxxxxx>
> > > 
> > > ARM Compiler 6 has a proven bug: it compiles data only C files
> > with
> > > SoftVFP attributes. This leads to a failed linkage afterwards
> > with
> > > an error:
> > > 
> > > Error: L6242E: Cannot link object built_in.o as its attributes
> > are incompatible with the image attributes.
> > > ... A64 clashes with SoftVFP.
> > > 
> > > The known workaround is introducing some code into the affected
> > file,
> > > e.g. an empty (non-static) function is enough.
> > 
> > Oh man, this is truly horrible.
> > 
> > If we really have to do this please:
> > 
> > - use the same dummy function name in all files
> > - the function should be static
> > - hiding the function within a #ifdef ARMCC block
> > - potentially hide the whole horrible hack behind a #define so that
> > it
> >   would become at the call site:
> > 
> >  +ARMCC_DUMMY_FUNC_HACK()
> 
> 
> The risk here is we may introduce new file in the future possibly in
> common code with similar issues. So I would prefer if we can find an
> automatic way to do this. Some ideas:
>     - Add the function at compile time (via makefile). This would be
> done for all the files but that's should not be a major issues.
>     - Force disable softfvp either via command line, new line in the
> code or rewriting the attribute of the object.
> 
> But before spending time trying to workaround a buggy compiler.
> What's the plan with it? Is it going to be used in production or just
> a demo?

This is not intended for a production program at the moment, and it
obviously require lot of further work. I would not try to upstream ugly
workarounds for issues like the one above, it would be much better to
somehow persuade Arm tools team to properly fix them.

This RFC series has following goals:
1) prove that we can use safety-certified tools for Xen and avoid
possible arguments on compiler/linker certification path
2) research possible issues when using non-standard compiler/linker and
try to see if it is easy to adjust Xen to use them

In the end, it would be great to make Xen build system flexible enough
to use with non-standard compilers without overcomplicating it or changing it 
significantly, causing too much disruption to community.

> Cheers,
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxxx
> 
> https://urldefense.com/v3/__https://lists.xenproject.org/mailman/listinfo/xen-devel__;!K6dmGCEab4ueJg!kCpXu2prtUxCHZV8aCvxYk9E82KnsHuNftyCeG745Ei3vhO2VP_SYXDnItHeZZCwdw$
>  
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.