[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Mon, 4 Apr 2022 12:40:44 +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=TrO0NN/XdxEk/kybKpxTDcn096Mdh/YZekVSRdkq44c=; b=DVp4izW/EOEMmDayCcfwOQvhEF074lHa6eEKT70LHJzjCVolk0sFO9sAdPOM/cym66OJ99Mp1RH91SI+W3M6H7UoSebv0W6MqSR4J2EllLf7HW2q1S4D/pEgM4fDd5KLGXw2jdr+a/XCgJRD6GUxkpZkrByLtk/xzYi7kT9GSCaPcT6S+2+zKdrDG69npJlfWmzt1+wv9wE4Emglp4NlokTIUkjZxJoM2hCKDn7VVpGsHwVUY59qvI7EAFf1u7PjWlCsnREr89Nzg+o3j11xKcXKUQP4HUzbFt21oUIqHwpgXYUIJYn55Hv6Z2toInK6epFpoTuqYLbimpwrxsUBPA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AOJPakCu2Bj0j+8C0O1aJ+vPtqQvyeMsPi+btR7FlwG2eZR2awSuUKjS27rX73fXPGAwXhgQGLHM1UhDkz3HIkXjabrx5v4f72T35seklbvefWrCfo2AEldCBWB4l+pd+aLo95b/jeekIIDe9eFL4/uyfIOIpFcz8GsIz9rSJpPI94ZDOSztri4mSygJ2CugoKW0dYuRU89bwGObMLxXOgtXWekVVM6kKSUG29LiU4pPDRNCf9n7VhYkA3+1J6GEiGGSDHrMQRjEp/0vobaxNZ1cvqsXhYHMnfX6JyGQFPHiR4uJ7PjssmbWbDx0YdVlIdO8NGX6iM5+2cMVOU2hWA==
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Delivery-date: Mon, 04 Apr 2022 10:41:47 +0000
- Ironport-data: A9a23:EI5KJ69JniOtPiSklmR2DrUDv36TJUtcMsCJ2f8bNWPcYEJGY0x3y GsZXGqHb/2ONjf8fNEjOt60oU8EvseEz982S1M6rHg8E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si+Fa+Sn9T8mvU2xbuKU5NTsY0idfic5DnZ54f5fs7Rh2NQw3YDlW1rlV e7a+KUzBnf0g1aYDUpMg06zgEsHUCPa4W5wUvQWPJinjXeG/5UnJMt3yZKZdhMUdrJ8DO+iL 9sv+Znilo/vE7XBPfv++lrzWhVirrc/pmFigFIOM0SpqkAqSiDfTs/XnRfTAKtao2zhojx/9 DlCncXqYAl4PIOTou4mYRdxEC90Z4pr/6CSdBBTseTLp6HHW37lwvEoB0AqJ4wIvO1wBAmi9 9RBdmpLNErawbvrnvTrEYGAhex6RCXvFJkYtXx6iynQEN4tQIzZQrWM7thdtNs1rp4RTKqEO 5JEAdZpRDjpTgdGJVETMbYFgPqhgynRKB1k8HvA8MLb5ECMlVcsgdABKuH9YceWTM9YmkKZo GPu/GnjBBwectuFxlKt7XaEluLJ2yThV+o6FqC89/NsqE2ewCoUEhJ+fUu2p7y1h1CzX/pbK lcI4Ww+oK4q7kupQ9LhGRqirxasvBQRRt5RGO0S8xyWx+zf5APxO4QfZmcfMpp87pZwHGF0k A/S9z/0OdBxmOTPYHzM9JnLlzmJCyY8LmEIPwgpShRQtrEPv7oPph7IS99iFou8gdv0BSz8z li2kcQuu1kApZVVjvvmpDgrlxrp/8GUFVBtum07S0r/tmtEiJiZi5tEALQxxdJJN86nQ1aIp xDocODOvblVXflheMFgKdjh/Y1FBd7Ya1UwYnY1RvHNEghBHVb5IOi8BxkkeS9U3j4sI2OBX aMqkVo5CGVvFHWrd7RrRIm6Ft4ny6Ptffy8CKyFNoAWPsUtL1PblM2LWaJ29zqw+KTLufthU ap3jO72VSpKYUiZ5GTeqxghPU8DmXllmDK7qWHTxBW7y7uODEN5up9eWGZimtsRtfveyC2Mq o43H5LTl313Db2vCgGKoNV7BQ1bchAG6WXe9pU/mhireVE9RgnMypb5nNscRmCSt/8OybeQp yHkBRcwJZiWrSSvFDhmo0tLMdvHdZ1+sWg6LWorO1Op0GIkeoGh8OEUcJ5fQFXt3LYLISJcJ xXdR/i9Pw==
- Ironport-hdrordr: A9a23:Rag1/6jLX4IF0K118yichH1wU3BQXiAji2hC6mlwRA09TyX5ra 2TdTogtSMc6QxhPE3I/OrrBEDuexzhHPJOj7X5Xo3SOTUO2lHYT72KhLGKq1Hd8kXFndK1vp 0QEZSWZueQMbB75/yKnTVREbwbsaW6GHbDv5ag859vJzsaFZ2J921Ce2Gm+tUdfng8OXI+fq DsgPZvln6bVlk8SN+0PXUBV/irnaywqHq3CSR2fiLO8WO1/EuV1II=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Prevent the assembler from creating a .note.gnu.property section on
the output objects, as it's not useful for firmware related binaries,
and breaks the resulting rombios image.
This requires modifying the cc-option Makefile macro so it can test
assembler options (by replacing the usage of the -S flag with -c) and
also stripping the -Wa, prefix if present when checking for the test
output.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
Changes since v1:
- Add the option to CFLAGS.
---
Config.mk | 2 +-
tools/firmware/Rules.mk | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/Config.mk b/Config.mk
index f56f7dc334..82832945e5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -91,7 +91,7 @@ PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
#
# Usage: cflags-y += $(call cc-option,$(CC),-march=winchip-c6,-march=i586)
cc-option = $(shell if test -z "`echo 'void*p=1;' | \
- $(1) $(2) -S -o /dev/null -x c - 2>&1 | grep -- $(2) -`"; \
+ $(1) $(2) -c -o /dev/null -x c - 2>&1 | grep --
$(2:-Wa$(comma)%=%) -`"; \
then echo "$(2)"; else echo "$(3)"; fi ;)
# cc-option-add: Add an option to compilation flags, but only if supported.
diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk
index c227fe2524..278cca01e4 100644
--- a/tools/firmware/Rules.mk
+++ b/tools/firmware/Rules.mk
@@ -17,6 +17,10 @@ $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
$(call cc-option-add,CFLAGS,CC,-fcf-protection=none)
+# Do not add the .note.gnu.property section to any of the firmware objects: it
+# breaks the rombios binary and is not useful for firmware anyway.
+$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)-mx86-used-note=no)
+
# Extra CFLAGS suitable for an embedded type of environment.
CFLAGS += -ffreestanding -msoft-float
--
2.35.1
|