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

Re: [PATCH] build/xen: fix symbol generation with LLVM LD


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 6 May 2022 15:31:12 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aDXZa8VyqidZWzbaEeMMnoyqNAhOgGA7+An6ZwKWWDg=; b=fpiOY0U5F8nxtvHzTAr9IVqb8jphmsxChE7yEtP3DC4fQyuN8G3mPw5USuUCePvzogW+k4h5j6r6Ic2+GJl7Q16pXfOk/v2xW+SD61a9eqj870Kvyu3PIrT/4KC36qQTfz5mlWHgOX0CpUKRfDWWYq3tio53KVJjVLN0B+QzNHzBwdckEThH7jKSoyxWzgULVSffdOi+iRISXxYinZfmlZ9En5U4C3qqJWzGaHeo3DEfy+eCzfvPk+9qoel4l7Ze2I3aGWYBJ8PjmIpiUNl9r+EI9moMpZZ/KIt48F+cY+uu+Ht0GjLaB1pvREHkO0m+r7reB+LNOmNwgaeZb+cMXA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OT/G/s9qPZFrVSdzuIGui5IYP7hzCDa+VtzYNwlU9x8hW5er73Y3VJK+WFFMa9UYdhlv8E6DJerJmNSk07iJorbWAbwIv3Jm+6Z80/cynsD4WRHlrfxm0tx/qNr0HhrhR4UmqvTlmeiGooIBp1giSDqgDEtPTUUaJNNm6v0+AZtw8qI3Z/XRlqQ7TWIYyH3F06FSTeCplq+5Mlm9wYH65XrTSerAQ8qLie2LHQ1dSbhDwXG+CphuFGTa3byKDSH1T+M7q8TytFtMVP3M5f7iD/1m5i/wGx40+DNpofU/wBjHzIO2gmrhmzrKgGiWb1eLkE61i+hCg7cgN/CvSCd7GQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 06 May 2022 13:31:32 +0000
  • Ironport-data: A9a23:3aob4a0nZ4Yd115JG/bD5c5wkn2cJEfYwER7XKvMYLTBsI5bpzxSx mMeX2CAOqrbM2P8e9pwPIXl8ENQ65aHzNAwHgBspC1hF35El5HIVI+TRqvS04J+DSFhoGZPt Zh2hgzodZhsJpPkjk7xdOCn9xGQ7InQLlbGILes1htZGEk1EU/NtTo5w7Rj2tMw34Dga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /0WpZ61WxwxZZbzhdtADz8HERFuGYFvreqvzXiX6aR/zmXgWl60n7BEKhFzOocVvOFqHWtJ6 PoUbigXaQyOjP63x7T9TfRwgsMkL4/gO4Z3VnNIlGmFS6p5B8+fBfmRjTNb9G5YasRmB/HRa tBfcTNyRB/BfwdOKhEcD5dWcOKA2SCmL2AI+Qz9SawfunXV7xRp9YXXIdPQOcWXeulXlFmkn zeTl4j+KlRAXDCF8hKH+H+xgu7EnQvgRZkfUra/85ZCgkCXx2EVIA0bUx28u/bRolWlR9tVJ kgQ+ywvhas/7kqmSp/6RRLQiGGAlg4RXZxXCeJSwBGAzO/Y7hiUAkAATyVdc5o2uckuXzso2 1SV2dTzClRSXKa9THuc8vKeq2O0MC1NfWsaP3dYFk0C/sXpp5w1glTXVNF/HaWpj9rzXzbt3 zSNqyt4jLIW5SIW65iGEZn8q2rEjvD0osQdum07gkrNAttFWbOY
  • Ironport-hdrordr: A9a23:lv2Ql6mI+qQJeV04qdf1fRIBwp/pDfOwimdD5ihNYBxZY6Wkfp +V8cjzhCWftN9OYhodcLC7V5Voj0mskKKdxbNhRYtKPTOWwVdASbsP0WKM+V3d8kHFh41gPO JbAtND4b7LfCRHZKTBkW6F+r8bqbHokZxAx92uqUuFJTsaFp2IhD0JbjpzfHcGJjWvUvECZe ChD4d81kydUEVSSv7+KmgOXuDFqdGOvJX6YSQeDxpizAWVlzun5JPzDhDdh34lInty6IZn1V KAvx3y562lvf3+4hjA11XL55ATvNf60NNMCOGFl8BQADTxjQSDYphnRtS5zXkIidDqzGxvvM jHoh8mMcg2w3TNflutqR+o4AXk2CZG0Q6W9XaoxV/Y5eDpTjMzDMRMwahDdAHC1kYmtNZglI pWwmOwrfNsfF/9tRW4w+KNewBhl0Kyr3Znu/UUlWZjXYwXb6IUhZAD/XlSDIwLEEvBmc0a+d FVfY/hDcttABKnhyizhBgu/DXsZAV4Iv6+eDlMhiTPuAIm30yQzCMjtb4idzk7hdAAoqJ/lp r525RT5c5zp/AtHNNA7cc6ML+K4z/2MGXx2Fz7GyWWKIg3f1TwlrXQ3JIZoMmXRb1g9upApH 2GaiISiVIP
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Fri, May 06, 2022 at 02:56:56PM +0200, Jan Beulich wrote:
> On 05.05.2022 16:21, Roger Pau Monne wrote:
> > --- a/xen/include/xen/compiler.h
> > +++ b/xen/include/xen/compiler.h
> > @@ -125,10 +125,11 @@
> >  #define __must_be_array(a) \
> >    BUILD_BUG_ON_ZERO(__builtin_types_compatible_p(typeof(a), typeof(&a[0])))
> >  
> > -#ifdef CONFIG_CC_HAS_VISIBILITY_ATTRIBUTE
> > -/* Results in more efficient PIC code (no indirections through GOT or 
> > PLT). */
> > -#pragma GCC visibility push(hidden)
> > -#endif
> > +/*
> > + * Results in more efficient PIC code (no indirections through GOT or PLT)
> > + * and is also required by some of the assembly constructs.
> > + */
> > +#pragma GCC visibility push(protected)
> >  
> >  /* Make the optimizer believe the variable can be manipulated arbitrarily. 
> > */
> >  #define OPTIMIZER_HIDE_VAR(var) __asm__ ( "" : "+g" (var) )
> 
> This has failed my pre-push build test, with massive amounts of errors
> about asm() constraints in the alternative call infrastructure. This
> was with gcc 11.3.0.

Hm, great. I guess I will have to use protected with clang and hidden
with gcc then, for lack of a better solution.

I'm slightly confused as to why my godbolt example:

https://godbolt.org/z/chTnMWxeP

Seems to work with gcc 11 then.  I will have to investigate a bit I
think.

Thanks, and sorry for the trouble.



 


Rackspace

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