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

[PATCH v3 4/8] x86: also mark assembler globals hidden


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 10 Jul 2023 10:54:30 +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=bxqTYAMqHDtwTsaXt5W2izXbr1PoTAZ70AuZ6hPpGqA=; b=LCbJERBr5cTIVelRRPx1rC/Q/EUP6VoSWbj+zFwt3qI4QPwyvqye+/bQVAUWc+n5UXXet9mQWWrmxXU2/QYQKJCR7+Qmtti1K6mKE0P3fJ5d6PtLUKByTjsZt8PJGYQl3i2MUWUvpSJjvd3NlCsjXZ0kbVK9ToWRDGo6DoEZLbggq9dNpSNBEuI3Zh8x92XGi4EYYijxmpkGru2yvhNf7vsbm/cFSc6njrNwn2A/KTGL1P73mcM8w6+qJ2Hy9LejKnoDiwClFUstjvV+FPjEqAj5bfgu197GIYDz0VdsqUU51Chvim3gLq0BIbJsIiBo5AFzOSqmE0bro4BmPxts6w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bp25ct+6Dnx6fYLb/4Niw5AR8CDyB9SDE32sSvRAhBVxklJfR5L5jrOAntIxHV4KjKOVjpwQZEdmMaDWjmz7QlXnjiQbtS+eZ/BHSw/nGRLRlP6hcxK9RAQFGqE0u+HkUprGaXI6ndjD0Djqo6Myf2aB4EczR4yrqlgadp6lCcMX61PL5it1K6Y0zixPC4C+5+8h/lLVDB8f3RkwX0ZW9/t1XcqwBcVKWwZ0ExUhwnURkpajPjKd1TtJY4qlC3k8m0Cmq4JzuY5bfH+l2agAWyXawMF0eoAs5FOr9naGf2r3OT9GOHX/k4G1XH9XLZ2h8vfKg0itXajkZtvx6mNrFg==
  • 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>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Mon, 10 Jul 2023 08:54:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Let's have assembler symbols be consistent with C ones. In principle
there are (a few) cases where gas can produce smaller code this way,
just that for now there's a gas bug causing smaller code to be emitted
even when that shouldn't be the case.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
v3: Re-base over generalization of the annotations.
v2: New.

--- a/xen/arch/x86/include/asm/config.h
+++ b/xen/arch/x86/include/asm/config.h
@@ -47,11 +47,11 @@
 #define CODE_FILL 0x90
 #define ALIGN .align CODE_ALIGN, CODE_FILL
 #define ENTRY(name)                             \
-  .globl name;                                  \
   ALIGN;                                        \
-  name:
+  GLOBAL(name)
 #define GLOBAL(name)                            \
   .globl name;                                  \
+  .hidden name;                                 \
   name:
 #endif
 
--- a/xen/include/xen/linkage.h
+++ b/xen/include/xen/linkage.h
@@ -21,7 +21,7 @@
 
 #define SYM_ALIGN(algn...) .balign algn
 
-#define SYM_L_GLOBAL(name) .globl name
+#define SYM_L_GLOBAL(name) .globl name; .hidden name
 #define SYM_L_WEAK(name)   .weak name
 #define SYM_L_LOCAL(name)  /* nothing */
 




 


Rackspace

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