diff --git a/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s b/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s --- a/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s +++ b/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s @@ -4,13 +4,13 @@ sub $0x8, %rsp movq $0, (%rsp) push %rsp - jmp _nonstandard_stub + jmp nonstandard_stub # Takes a single pointer argument via the stack, which is nonstandard for x64. # Executing 'thread step-out' here will initially attempt to write a # breakpoint to that stack address, but should fail because of the executable # memory check. -_nonstandard_stub: +nonstandard_stub: mov (%rsp), %rdi mov (%rdi), %rsi add $1, %rsi @@ -18,3 +18,7 @@ add $0x10, %rsp ret + +#ifdef __linux__ + .section .note.GNU-stack,"",@progbits +#endif diff --git a/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test b/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test --- a/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test +++ b/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test @@ -1,7 +1,7 @@ # Test that `thread step-out` fails when the "return address" # points to non-executable memory. -# REQUIRES: target-x86_64, system-darwin +# REQUIRES: target-x86_64 # RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/thread-step-out-ret-addr-check.s -o %t # RUN: %lldb %t -s %s -b 2>&1 | FileCheck %s