mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Build correctly with IBT and Shadow Stack (#1289)
Add .gnu.property notes to indicate support for IBT and shadow stacks when libsodium is built with it. There's no stack switching code in here, so this should not need any other codegen changes.
This commit is contained in:
committed by
Frank Denis
parent
22b9c35f28
commit
a4832a91b1
@@ -10,6 +10,24 @@
|
||||
#include "ladder.S"
|
||||
|
||||
#if defined(__linux__) && defined(__ELF__)
|
||||
#if defined(__CET__)
|
||||
.section .note.gnu.property,"a"
|
||||
.p2align 3
|
||||
.long 1f - 0f
|
||||
.long 4f - 1f
|
||||
.long 5
|
||||
0:
|
||||
.string "GNU"
|
||||
1:
|
||||
.p2align 3
|
||||
.long 0xc0000002
|
||||
.long 3f - 2f
|
||||
2:
|
||||
.long __CET__
|
||||
3:
|
||||
.p2align 3
|
||||
4:
|
||||
#endif
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#endif
|
||||
|
||||
|
||||
@@ -961,5 +961,23 @@ jmp ._bytesbetween1and255
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && defined(__ELF__)
|
||||
#if defined(__CET__)
|
||||
.section .note.gnu.property,"a"
|
||||
.p2align 3
|
||||
.long 1f - 0f
|
||||
.long 4f - 1f
|
||||
.long 5
|
||||
0:
|
||||
.string "GNU"
|
||||
1:
|
||||
.p2align 3
|
||||
.long 0xc0000002
|
||||
.long 3f - 2f
|
||||
2:
|
||||
.long __CET__
|
||||
3:
|
||||
.p2align 3
|
||||
4:
|
||||
#endif
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user