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

[PATCH v4 3/8] x86: also mark assembler globals hidden


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 4 Aug 2023 08:27:57 +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=Hzeq8KGKWMKgaTZq4tO5BLrEPSwV0dIW3/04kJUAfiVN0ClNJz67iP4Asv4UfjBaRUpuC7NpIKZ7C+bTmcAuKFv5zCUa858worpdhMN+g36GPba88ul/aTDp+/wGcNdXutNFpdcPJHNu0tbLIbD1/r4/wc4HeNjJrQSEoO7lZThbKRFMI+O+u8BHGuEdfV9h6/DCLbScONIcUEKOGIGB9iL7DWDOmw5pI3scE5lAi6c6uA8dgrvF5wIyv7EjyYovPptO0M86a/w+8N0miH2wk/d2FRTC+xG4zKB2paBLwEMjsJdzrhf7IZOjqqgWc9MrJ11jATOQ3b32gfr/HSfAzQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OmXQcmb5VAeeXY7500tmOnrHEZ7BMb0QH1HdJ1bZJBb7B6L1uarMCpYCjdVO1nk7m4qm9B1OH+ySoFy2mQ3Ca+oGaI+/6hIijYtbE/hLMUZNjhyVUYJePIAlLk1uo+OFIZoaBfLf5FEVnESmoYHHkJFWQILM6fMIqqD9aHbKjEdqtVqn7JmOkZEv3EO7vZyNoeQoHY7jZRqZml9XIOjVNVwvB2dEglHWpO30TxmKpRMfbgd5Kol0yh01DlrWM4j8fXHjCj4tH0gGMne4dvgWcw9w9CO6vaxG0Xe+5cvUDo2thZqHuyCzkrSApHfucJBLs3WGzfthwndPm7/KXYHsNw==
  • 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: Fri, 04 Aug 2023 06:28:05 +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®.