[PATCH 02/12] x86-defs.m4: Use X86_GNU_PROPERTY and X86_ENDBR

H.J. Lu hjl.tools at gmail.com
Thu Jan 30 14:08:27 UTC 2020


1. Add X86_ENDBR to PROLOGUE_cpu to place "endbr32" at function entry.
2. Add X86_GNU_PROPERTY to ASM_END for .note.gnu.property section.

	* mpn/x86/x86-defs.m4 (PROLOGUE_cpu): Add X86_ENDBR.
	(ASM_END): Add X86_GNU_PROPERTY.
---
 mpn/x86/x86-defs.m4 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mpn/x86/x86-defs.m4 b/mpn/x86/x86-defs.m4
index 81309b224..4aaac3bf5 100644
--- a/mpn/x86/x86-defs.m4
+++ b/mpn/x86/x86-defs.m4
@@ -123,6 +123,7 @@ m4_assert_defined(`WANT_PROFILING')
 	TYPE($1,`function')
 	COFF_TYPE($1)
 $1:
+	X86_ENDBR
 ifelse(WANT_PROFILING,`prof',      `	call_mcount')
 ifelse(WANT_PROFILING,`gprof',     `	call_mcount')
 ifelse(WANT_PROFILING,`instrument',`	call_instrument(enter)')
@@ -992,7 +993,10 @@ L(movl_eip_`'substr($2,1)):
 
 dnl ASM_END
 
-define(`ASM_END',`load_eip')
+define(`ASM_END',
+`load_eip
+X86_GNU_PROPERTY
+')
 
 define(`load_eip', `')		dnl updated in LEA/LEAL
 
-- 
2.24.1



More information about the gmp-devel mailing list