projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86: Add ENDBR at function entries
[mesa.git]
/
src
/
mapi
/
entry_x86_tls.h
diff --git
a/src/mapi/entry_x86_tls.h
b/src/mapi/entry_x86_tls.h
index 58a27cef18ed539d41e2790af45531c93aafa2d9..bdaa97374ba6bc4a8715f60f499a2910d19256ff 100644
(file)
--- a/
src/mapi/entry_x86_tls.h
+++ b/
src/mapi/entry_x86_tls.h
@@
-27,6
+27,12
@@
#include <string.h>
#include <string.h>
+#ifdef __CET__
+#define ENDBR "endbr32\n\t"
+#else
+#define ENDBR
+#endif
+
#ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define HIDDEN __attribute__((visibility("hidden")))
#else
#ifdef HAVE_FUNC_ATTRIBUTE_VISIBILITY
#define HIDDEN __attribute__((visibility("hidden")))
#else
@@
-59,6
+65,7
@@
__asm__(".balign 16\n"
func ":"
#define STUB_ASM_CODE(slot) \
func ":"
#define STUB_ASM_CODE(slot) \
+ ENDBR \
"call 1f\n" \
"1:\n\t" \
"popl %eax\n\t" \
"call 1f\n" \
"1:\n\t" \
"popl %eax\n\t" \