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

Re: [PATCH] Config.mk: correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • Date: Thu, 8 Sep 2022 10:37:03 +0000
  • Accept-language: en-GB, en-US
  • 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=Z2Hfaqj4lRLqkKucv15USXRiZN+PUMQ48swob/UWc3Y=; b=Bab21K304+6mBGBgwj1M4tjSjoJmzfTdaZu0JDhog93M1rYrfanhNS3aaNs44qSmN7DuPPcDjzF7V4wcyN6a+4o1MnK8PLfDq0Tj0OIZ/N1DHe6UJM5S3ENdmJfYqlNdngc84f05RFZ08waf9xU+V/SmQvNEvi0OIwruTqC2j3nDB1bsKqRwvuawDWMXh8FhTMPq6g+DUFi1inq9gMqpOi6AgW2kN72i2rNzlFJfdDxCr7Wi5GaaXfL0Lqtvpu44fwDuT21VwGejiQgy7iG2EbZ90oIxxCFqfM0VPYPOWk/vlPDob3XNwnOIWyJpxgwisvAHJ2OlQgM0f6mBxocbCA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hEjABSNWzksLrP4szpDJzagfanM5LF2u3uXZo35murC4rc/PHeFs6nMQagUrxOb/HmqrzmI6aQ4n52sg9EGJHeXE7vgz3SuQSadBTxDsQs5mRHT6JQatsK+Y7MtEY+zTgM26DB/MPl7IJfrP0uRxxGqd3M/w3YOO42KHJeYHXBroukQZPuOnihROIjBt/Q+aXZdg51ET5LHv4cIXJWwUVtkQT2KjPsqSaZqMs0e5K8s60ZqDbWVbrzKpigU1SlgEZDLSaQM0/1l4DdvevGoLcan6l4FvbB13gU5UFU0L8doiGP96g7ytMA+OQcw4sRlEtj0ZrwdubXrrR/URGptKQQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 08 Sep 2022 10:37:12 +0000
  • Ironport-data: A9a23:TNjO6K2i6xokmx1WUPbDix16xa8BPHBdZdB5hdg8DyJ0ofsy17SWlPg9Dm+OpEbNEGCloGxUELxf12oI5UW6QaFr5uuB5u7b/R11eHcAu1UiAY0htHyPgKxaff2+K33U7uuNKlXwDMjRABC4dKNYs8K9gqpuHWUJGWxhvuGCSAPKRqGFqql8ZfQfDDiUskzsGe8CdQ15AD8CWdTKagDRyr5lqFm9Xv4jAuh0HjX1mxp3lwUx+e0gGvNvBKGpwXFvN5v/Vl5NU/tx9Sq9aeyPTKUBSk5vz0M9veEiNqSwXhgo1gi8u4eJDVmEBvnPN/4NJ/rjePDSf/JrX5JbEyVwCTu88q6usuZX7Z561C4RkmNsaUqt+C+M+mY5gkKLyuuG0MeX367+vva9IFsN22j6PjdabbjaK/JKiVL0693IZ/lvQ3BGv70MB63BOfjor11hi37I3CdqMMfPrcrgcWvJqMaEkWPn7Qb0af1Pa0zS/RZS0cIHmDtNA8riRFT/K7favzabDlb1HAWpIqpSxDiz9GiotQL4dkXgl5SNGYN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klJ9L3F6h1vrpAl2fVXjyIZk2kOsFdYk9PH9TW10UD+kY16h7rhpuAMGJi/E26xJKAAEnCkJ3S+bpXuPQpXDeQeXaDQA8t719LBJTEEuuA/rgUqtJSHOE8K60fJ1OYP+xEcv8BJBXZrxFzynNgOzGYexXPhE9uldpeZ2d1KX3CPCz3k3sQ7kQ9/GjaAEnd2v3o4yCpoWDlEmThFlSko0HtfvTsasrN/WrLhs/mVwH6xUTZXiWx/wMWlgSqlvcKrLf1CnFuWqdAFk0/QvjXYffOpJoFa27GBkv/7FCWTiNceCi2nGCGijn7RVk2VBbX7tCQrL18NU+TA/F3VEU0hO/QQ9hWBkE0/GnZRPTwWNdx4tL9StKkq8f1nc/QtAXOBQ4AFK6GcYoagC6wmEFcMoDdgekYDxb85YQfFGypUNwopDDrrF2LQTuIlKtJNH0gT+XNEARtJorQUVlhYgW8sPWz0VFFxMrLACRhwmU2PRAFWRjx250RGK3fsGF6CsBdDSl3nVRnDKGQx2SwPW+4HFvO7VZ2mbBVoF8t/VaiLvf6i9KRUUzt5PdWbqMW2TRauYwvG1t00NC9/OHrVOL+Fs9qUuejeHqSStDwKhBpFhvphYTzJIeXBIotfpGMkK2LbLbeTI5SrDuLwt+gsphdxcnn1xTBDP/A+worL7psbaBXNW2RHb3cWz4ichYg5uIE+t8/dWdO+hhXBrK3X2GkVOttIx9fIoOFSfljhQgADqN0QSC6Bsy5c3M9grt57D2/wVl4y5UMjLUH5h+4C2EFH7YVdP8CP6x+Gfm4omwn6aeRw/cfMaddjj1vCIq/EDfVj1y1QAGRxzB6DUvKjJIykqBafmzoySwA/WPJfC03DDOed22iBzUltStipnx+oAex6mQu0nFMUp8VtN3R9KFrA2ixC/qFEkOVpN19dxq6m7hLgx3Vx1A==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHYuFK+wB8KiYBTukKYWomgtSrgPa3UHOaAgAEF3ICAAEp1AA==
  • Thread-topic: [PATCH] Config.mk: correct PIE-related option(s) in EMBEDDED_EXTRA_CFLAGS

On 08/09/2022 07:10, Jan Beulich wrote:
> On 07.09.2022 16:33, Julien Grall wrote:
>> On 25/08/2022 08:17, Jan Beulich wrote:
>>> I haven't been able to find evidence of "-nopie" ever having been a
>>> supported compiler option. The correct spelling is "-no-pie".
>>> Furthermore like "-pie" this is an option which is solely passed to the
>>> linker. The compiler only recognizes "-fpie" / "-fPIE" / "-fno-pie", and
>>> it doesn't infer these options from "-pie" / "-no-pie".
>> OOI, how did you find out this issue?
> By reviewing Andrew's "x86/hvmloader: Don't build as PIC/PIE".

It was actually first discussed here:
https://lore.kernel.org/xen-devel/7b129a01-07c7-e856-fb5b-0c7b44a8dac5@xxxxxxxxxx/

The reason why I hadn't got back around to this patch yet is because the
commit message is wrong (not helped to some appalling GCC/Binutils
documentation).

The -f forms are to do with GCC code generation.  These are CFLAGS, but
they want want specifying (or not) together, and not split across
EMBEDDED_EXTRA_CFLAGS and something else like this.

The non-f forms are LDFLAGS but do behave as described.  Passing -no-pie
causes GCC to cancel passing -pie to LD; it does not pass -no-pie.  But
it does other things too, because different cr0 objects get passed. 
This matters for hosted binaries, but not for freestanding.

~Andrew

 


Rackspace

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