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

Re: [PATCH v3 9/8] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 18 Jul 2023 14:28:38 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=E8bPWAHfb+LPyIbI/ckJfh9FRrzz4ViytW7wCxnj1PM=; b=d3hDoItIc84Gevsc+qmzzXOCSn9nCq06KY2kbJP3BbBKzYUdUwKcJNE7r310qlU+Oa3hKDPtcoYo4Y8t26ciaLFmQ3zhTIcyKp3sZXXtybab6xdYX+Aw0Cf7RHu2HNMECuiZi7PbeVjMp8D/bEh+EgxUo/0u36XjVegc+kit2x20WGmnt6kCzp7Fg6cGUFcuxW2vakNtg8CCYCz5UvQwDp3HnfzJnbX1/S/Be5OyCZDcKk3t98hzuTsubT0cldSbnkeZ8Jhmh4QtlPCOw8M/8+j5KMF/rg5G/FfqiDWMfNVJGBfev8P6bzwitouVqUaRThhW3czaqqLNgRety0I5lA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S0xJj81S/j8On/MwJ7FfTXURIHQziS38iCRVPTZnBO2SUm9xbuTOEEqH/kM1odAbhlNuSrkuEkz7QKq1w1m9Kab/OPIFXeEPCIWKwVhRdM2r6BXxFTnEkIbxk94/AxFvDKFjEZMmgI9kC+g+RHVc/1hdwXlHjdux75B6p8aGFWfSL5x9WAz28MTzQzS016mqq6pWYuYOPSS8+hU5krDHArQovM/tVdv9jfucYhya08DWpFrku0yGbt5vvbVcGhkm+cLrNVi9aOJjep8BQprLwqKC5aJdaSLrdO4Tgg7cK71xFvsajii5pXlUhCZOuYN9q97mmckn6hD+FVh9oeI+gA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Bobby Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 18 Jul 2023 12:28:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.07.2023 16:18, Jan Beulich wrote:
> Leverage the new infrastructure in xen/linkage.h to also switch to per-
> function sections (when configured), deriving the specific name from the
> "base" section in use at the time FUNC() is invoked.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

This additional change

--- a/Config.mk
+++ b/Config.mk
@@ -115,7 +115,7 @@ cc-option = $(shell if test -z "`echo 'v
 # Usage: $(call cc-option-add CFLAGS,CC,-march=winchip-c6)
 cc-option-add = $(eval $(call cc-option-add-closure,$(1),$(2),$(3)))
 define cc-option-add-closure
-    ifneq ($$(call cc-option,$$($(2)),$(3),n),n)
+    ifneq ($$(call cc-option,$$($(2)),$(firstword $(3)),n),n)
         $(1) += $(3)
     endif
 endef

is needed for ...

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -399,6 +399,9 @@ AFLAGS += -D__ASSEMBLY__
>  
>  $(call cc-option-add,AFLAGS,CC,-Wa$(comma)--noexecstack)
>  
> +# Check to see whether the assmbler supports the --sectname-subst option.
> +$(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--sectname-subst 
> -DHAVE_AS_SECTNAME_SUBST)

... the pair of options passed in one go here to work (when old
gas is in use). Of course something with the same overall effect,
but less impactful might do. E.g. $(filter-out -D%,$(3)) instead
of $(firstword (3)). Thoughts anyone?

Jan



 


Rackspace

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