|
1 | 1 | #if defined(__ELF__) |
2 | 2 | .section .note.GNU-stack,"",%progbits |
3 | 3 | #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 |
4 | 25 | .text |
5 | 26 | .align 0x2000 |
6 | 27 | .global __node_text_start |
|