File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change
1
+ //===-- assembly.h - libc assembler support macros based on compiler-rt's -===//
2
+ //
3
+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
+ // See https://llvm.org/LICENSE.txt for license information.
5
+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
+ //
7
+ //===----------------------------------------------------------------------===//
8
+ #ifndef LLVM_LIBC_SRC___SUPPORT_ASSEMBLY_H
9
+ #define LLVM_LIBC_SRC___SUPPORT_ASSEMBLY_H
10
+
11
+ #ifndef __ASSEMBLER__
12
+ #error "No not include assembly.h in non-asm sources"
13
+ #endif
14
+
15
+ #if defined(ELF ) && (defined(__GNU__ ) || defined(__FreeBSD__ ) || \
16
+ defined(__Fuchsia__ ) || defined(__linux__ ))
17
+ #define NO_EXEC_STACK_DIRECTIVE .section.note.GNU - stack, "", % progbits
18
+ #else
19
+ #define NO_EXEC_STACK_DIRECTIVE
20
+ #endif
21
+
22
+ #endif // LLVM_LIBC_SRC___SUPPORT_ASSEMBLY_H
Original file line number Diff line number Diff line change 6
6
//
7
7
//=== ---------------------------------------------------------------------- ===//
8
8
9
+ #include "src/__support/assembly.h"
10
+
9
11
#define paste(ns) _ZN22 ## ns ## 6setjmpEP9__jmp_buf
10
12
#define expand(x) paste(x)
11
13
#define LIBC_NAMESPACE_setjump expand(LIBC_NAMESPACE)
@@ -47,4 +49,4 @@ LIBC_NAMESPACE_setjump:
47
49
.size setjump , . - setjump
48
50
.size LIBC_NAMESPACE_setjump , . - LIBC_NAMESPACE_setjump
49
51
50
- . section .note.GNU - stack , "" , @progbits
52
+ NO_EXEC_STACK_DIRECTIVE
You can’t perform that action at this time.
0 commit comments