From patchwork Mon Apr 4 10:40:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12800105 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B570FC433EF for ; Mon, 4 Apr 2022 10:41:58 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.298244.508012 (Exim 4.92) (envelope-from ) id 1nbK9b-0006RN-OI; Mon, 04 Apr 2022 10:41:47 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 298244.508012; Mon, 04 Apr 2022 10:41:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9b-0006R1-KZ; Mon, 04 Apr 2022 10:41:47 +0000 Received: by outflank-mailman (input) for mailman id 298244; Mon, 04 Apr 2022 10:41:46 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1nbK9Z-00069z-St for xen-devel@lists.xenproject.org; Mon, 04 Apr 2022 10:41:46 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d0cd22be-b403-11ec-a405-831a346695d4; Mon, 04 Apr 2022 12:41:43 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d0cd22be-b403-11ec-a405-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1649068903; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=o1g3NtJRr/7LMB+Lp/Uv15Zh/4bOG2IVjPXu7yZ4VpI=; b=bs9iEoZuO3OphIcoltzx+pPyn3SSKUnUkRsipULGSimNe/YHj4BioXeB UUyL8qv+Kj5ECeftS39xJn4xa5zCJQRaOOvo4Ft196E08z7CHksIdOY7W Seqvby9ZS9NvMMHRbC5/dSp0G7Oded2N5wkgx8/4vZ4hNF7sm3A8N4Mzm g=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com X-SBRS: 5.1 X-MesageID: 67942405 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED 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= X-IronPort-AV: E=Sophos;i="5.90,234,1643691600"; d="scan'208";a="67942405" 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== 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-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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TrO0NN/XdxEk/kybKpxTDcn096Mdh/YZekVSRdkq44c=; b=gri2DVB7XH/wNkcO+ejUgwI+zJWzO52KiP0bMVn83inQw3K3RAaHdmgBTiDmWJvbFPXRqLMfwAanlaBmovpzh85BFCghDRxL2lmQGGQjHU8Du/VUma8U9GvtUX15GGfvEQ6iMXij9PzqPNEm/MYL+NmtC6YQ1Q8EoCsm3MtkPIU= From: Roger Pau Monne To: CC: Roger Pau Monne , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Anthony PERARD Subject: [PATCH v2 2/2] tools/firmware: do not add a .note.gnu.property section Date: Mon, 4 Apr 2022 12:40:44 +0200 Message-ID: <20220404104044.37652-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220404104044.37652-1-roger.pau@citrix.com> References: <20220404104044.37652-1-roger.pau@citrix.com> X-ClientProxiedBy: LO4P123CA0219.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::8) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e165241-ae3f-4fae-7a80-08da1627b20c X-MS-TrafficTypeDiagnostic: MN2PR03MB4669:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mWVignJRv1EZsK1YZ0gnQdC8wMNEn3j/Q2MoTWHmjBhdbTYMiw4/OiQi/J1tWeRk2n7qveDMgIJCoaxwHRPDhRgEgpVfRdG7MuqwXHB1IjpI7uIqBd2D6eYxYBqzBgxohNHqJ0lxy8EX6xCaU9nIRPI1UlcboOnKIXVM2+DnQuZ0Lx3IGUjcu76aylwoFQfKJttMlY0aOlYQ6/waA3FAm3p2z4bj7pumeAfdZwf2rcFQdjvuJdPq68zwJe8/vNdUWnWCHmVexHL0/wHqNYsF9Yu8HQmcR70up79CCPcTG53WK1AsDQbMCFZemY1wNMyEvYqYiL6S2OgRTM2///uBpDTEBRUBlI22fhAppmPidB1pm3vyfSLaelVJpHelezKhO2TTNQjdL4Dd1XEj5NQfUR5dyIZWYJbnx+3gnse/e87No2VvOBpJE38HShwd00dPB2U/xRjt7igWyaO95Jo5YdtaIAVPfoq/Oj+0gAyI1BattCzGw88+ZdUZvwAbN/E8w4otTIbIo0UkZRHww00g/rfx5ng+iViR3KwD+20t0bOmjJYqs38kOU0c8P7xINyIZVrJhD3uv+fp8CcJZm4cGTqFyZnFjuJkwfx4ea9687vuzP/IzUoUomWRSNAErsJOFDgH5LNH9Ro0PLLY9lINw43nj284ArftpzsC1qiuveP/MYuTYTSlngTMnCQoVsVYwyJqCM5DryvDUvHbIpUrXQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(6486002)(36756003)(2906002)(6512007)(66556008)(8676002)(4326008)(38100700002)(54906003)(508600001)(5660300002)(66946007)(66476007)(316002)(6916009)(6506007)(107886003)(6666004)(8936002)(1076003)(86362001)(2616005)(83380400001)(186003)(26005)(82960400001)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?2Nf1pbp8w0Io1XIo+R/jgWG4m1bA?= =?utf-8?q?ofTBPv5rSPk7pcPaP4ftzVIEMK8HzkWYstWyyzIPQYcvXO/cHGXyJF22XWUsywpRR?= =?utf-8?q?3Qjyv7KNlPWSJRZmgY7IjKEODLnsLXedxqs+tji0GC9OFBVUBWuNEKfsRZ9e/BCqy?= =?utf-8?q?urkf3/0cXCFKj1tBITbo6pKBevpVKGzab2N1kX4TolEaKRhce5W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YeNHlDKCFjK?= =?utf-8?q?FvQnFxcUMnuS8JNVgrnnPZOTJaaAMJD2ZhGIDioyf56dDZHMTCBbgXjIQaD1owZD0?= =?utf-8?q?Dzq8YVorC2IYEqJxbszOLVHw87A9BnQDsjrZr+XLWMp3ODe9FwuQaFSup05cIpfuQ?= =?utf-8?q?GpoziLk5XHv9gwzXjFAZkxTwYljGu5fyGmvlb3CjosxSsyH590gbn2NixF1MeyvQt?= =?utf-8?q?YSs9S+TVRvC+fC70dasPoTzsqrw3Ni+yLqqvav2a9/P8W7Htf/1dMe9aOxJnbfReU?= =?utf-8?q?jKHZsrcWlZnB2zNTmUswsnfH1eoMFbk/9AGAyWiSXhSi22b5NwABHeKAOGvGyKuWN?= =?utf-8?q?yJVNyXukiryBzWASKeJhQHINk0evtIZwBYWmkShymzmPl51V0okttHmypS0zZR+KT?= =?utf-8?q?s4yIe6kZ8qjmNgiLK1VbnXTWX/YuC4pvEvA6Fnk5uxJHRG2YffEFD9E8uFyln9AT1?= =?utf-8?q?Pyub/OP4bNXUbgOjzUArnYI4yMBvivmX5WQWTgQSIV2ltgpC8J1PzrQ2vWGIGSXJM?= =?utf-8?q?0Zlt2Bvc+A3rsZqsD4RFeaZYPbmrmqW7T29RvO5nP/iBIGgvmkP7W5kpQE7reXKhn?= =?utf-8?q?zI4QPX/0TbUnGnDdRH5FoALoGN21LOGlIFRAWqpCTsHbfl7ezr7kE=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 9e165241-ae3f-4fae-7a80-08da1627b20c X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2022 10:41:37.4606 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YVThAmDEYlrplitSsNTNHgagvpsPPjLRDZnkrgqQS7z5dL3sozZq6krIuS0fiLTi6qdvx/8lhOJQS+BA8w4FQg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR03MB4669 X-OriginatorOrg: citrix.com 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é Acked-by: Anthony PERARD --- 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