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

[PATCH v2 2/2] x86: also mark assembler globals hidden


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 23 May 2023 13:31:16 +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=mDEoGHJAvvsFh3CMZf5yMvN6tsIrJvFiC/zCIanZdQw=; b=jnkD67kS9jXHgf+PXTnoKzlmKetMsj9M2js5d3Uzx7r+M4meQoncW02rOh7W/22yzKlIHrURINp2XnkB6HLCu0LzelMWBJ030JpoJ2f+HVSTag9N3xtFHr8SZzpbK2i/45Ht43IlaNKcNrzCM7Ypt0l6z4dvqC56IGIKdFzYXUStyqzD9NXIhPAp1IbTBOzH8bzO9f691JFpIIPsYVi0Gv6M97ZRC6EtTrGYtuy/m0kUtPhD3w+lJJcCMDygrrYjb/AVwHbDdXI7ke8gd+MM/6LpPw3cmSSA1SnyX6KnTen1aq6M7cFDWgLTIspsnY6dTJcGpqdxabIjStYC8DYf4g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RsUrY0M5tcQQeAN+INrKVUA+BLSmKWpLDG13sS2te5f+bXYoIl/NKU2aMmz/H2WcRH3IZW9t5zrVzYKIeekcxPl4m5+vNiqjL1XrqsFvhWzhk4BNP4qkSpARk0ze9GPgvG8+NvgkdiuDtBXfD1kSmHFFDWqLCHQMrs1gLBS/tIbPEFIEwcPc2PYXWNZQb72l0dNhXWSxehu+0i046PvAGnOi4aFrS8hLcrQDaPEmC4ek0FuVcCe4TNyboUO7ZelwWMkrbvHM55EN48ZpUXVN+nWyALuABoK8DaeFE8B7pjC9ad+zhV9MXCx8yKePvl12XcKV0EKRRiOiQT/2Lfwa6Q==
  • 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>
  • Delivery-date: Tue, 23 May 2023 11:31:28 +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>
---
v2: New.

--- a/xen/arch/x86/include/asm/asm_defns.h
+++ b/xen/arch/x86/include/asm/asm_defns.h
@@ -83,7 +83,7 @@ register unsigned long current_stack_poi
 
 #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 */
 
--- a/xen/arch/x86/include/asm/config.h
+++ b/xen/arch/x86/include/asm/config.h
@@ -45,11 +45,11 @@
 #ifdef __ASSEMBLY__
 #define ALIGN .align 16,0x90
 #define ENTRY(name)                             \
-  .globl name;                                  \
   ALIGN;                                        \
-  name:
+  GLOBAL(name)
 #define GLOBAL(name)                            \
   .globl name;                                  \
+  .hidden name;                                 \
   name:
 #endif
 




 


Rackspace

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