src: add Intel CET properties to large_pages.S · nodejs/node@64ffde6

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,27 @@

11

#if defined(__ELF__)

22

.section .note.GNU-stack,"",%progbits

33

#endif

4+

// Add .note.gnu.property note for x86_64 to enable Intel CET

5+

// Based on: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

6+

// Refs: https://github.com/nodejs/node/issues/59084

7+

#if defined(__x86_64__) || defined(_M_X64)

8+

.section .note.gnu.property,"a"

9+

.align 8

10+

.long 1f - 0f

11+

.long 4f - 1f

12+

.long 5

13+

0:

14+

.string "GNU"

15+

1:

16+

.align 8

17+

.long 0xc0000002

18+

.long 3f - 2f

19+

2:

20+

.long 0x3

21+

3:

22+

.align 8

23+

4:

24+

#endif

425

.text

526

.align 0x2000

627

.global __node_text_start