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