Blame SOURCES/ia-new-macro-entry_p2align.patch

190885
From ed5f8e29601a35c955183ed218c78438596ed824 Mon Sep 17 00:00:00 2001
190885
From: Noah Goldstein <goldstein.w.n@gmail.com>
190885
Date: Tue, 21 Sep 2021 18:31:49 -0500
190885
Subject: [PATCH] x86: Modify ENTRY in sysdep.h so that p2align can be
190885
 specified
190885
190885
No bug.
190885
190885
This change adds a new macro ENTRY_P2ALIGN which takes a second
190885
argument, log2 of the desired function alignment.
190885
190885
The old ENTRY(name) macro is just ENTRY_P2ALIGN(name, 4) so this
190885
doesn't affect any existing functionality.
190885
190885
Signed-off-by: Noah Goldstein <goldstein.w.n@gmail.com>
190885
(cherry picked from commit fc5bd179ef3a953dff8d1655bd530d0e230ffe71)
190885
---
190885
 sysdeps/x86/sysdep.h | 7 +++++--
190885
 1 file changed, 5 insertions(+), 2 deletions(-)
190885
190885
diff --git a/sysdeps/x86/sysdep.h b/sysdeps/x86/sysdep.h
190885
index 01bac0f6..a70bb3a2 100644
190885
--- a/sysdeps/x86/sysdep.h
190885
+++ b/sysdeps/x86/sysdep.h
190885
@@ -78,15 +78,18 @@ enum cf_protection_level
190885
 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
190885
 
190885
 /* Define an entry point visible from C.  */
190885
-#define	ENTRY(name)							      \
190885
+#define	ENTRY_P2ALIGN(name, alignment)					      \
190885
   .globl C_SYMBOL_NAME(name);						      \
190885
   .type C_SYMBOL_NAME(name),@function;					      \
190885
-  .align ALIGNARG(4);							      \
190885
+  .align ALIGNARG(alignment);						      \
190885
   C_LABEL(name)								      \
190885
   cfi_startproc;							      \
190885
   _CET_ENDBR;								      \
190885
   CALL_MCOUNT
190885
 
190885
+/* Common entry 16 byte aligns.  */
190885
+#define ENTRY(name) ENTRY_P2ALIGN (name, 4)
190885
+
190885
 #undef	END
190885
 #define END(name)							      \
190885
   cfi_endproc;								      \
190885
-- 
190885
GitLab
190885