diff mbox series

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

Message ID 52f884cf-b88f-6fd9-e4d9-79da2bfde422@suse.com (mailing list archive)
State New, archived
Headers show
Series x86: annotate entry points with type and size | expand

Commit Message

Jan Beulich May 23, 2023, 11:31 a.m. UTC
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@suse.com>
---
v2: New.

Comments

Roger Pau Monné May 29, 2023, 1:38 p.m. UTC | #1
On Tue, May 23, 2023 at 01:31:16PM +0200, Jan Beulich wrote:
> 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@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
diff mbox series

Patch

--- 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