]> git.ipfire.org Git - thirdparty/gcc.git/blob - libsanitizer/sanitizer_common/sanitizer_linux_x86_64.S
Merge from upstream 345033.
[thirdparty/gcc.git] / libsanitizer / sanitizer_common / sanitizer_linux_x86_64.S
1 // This file is dual licensed under the MIT and the University of Illinois Open
2 // Source Licenses. See LICENSE.TXT for details.
3
4 // Avoid being marked as needing an executable stack:
5 #if defined(__linux__) && defined(__ELF__)
6 .section .note.GNU-stack,"",%progbits
7 #endif
8
9 // Further contents are x86_64-only:
10 #if defined(__linux__) && defined(__x86_64__)
11
12 #include "../builtins/assembly.h"
13
14 // If the "naked" function attribute were supported for x86 we could
15 // do this via inline asm.
16 .text
17 .balign 4
18 DEFINE_COMPILERRT_FUNCTION(internal_sigreturn)
19 mov $0xf, %eax // 0xf == SYS_rt_sigreturn
20 mov %rcx, %r10
21 syscall
22 ret // Won't normally reach here.
23 END_COMPILERRT_FUNCTION(internal_sigreturn)
24
25 #endif // defined(__linux__) && defined(__x86_64__)