]> git.lizzy.rs Git - rust.git/blobdiff - src/rt/arch/x86_64/morestack.S
auto merge of #15999 : Kimundi/rust/fix_folder, r=nikomatsakis
[rust.git] / src / rt / arch / x86_64 / morestack.S
index d248d79d12147b623fc4d008e33de4c4d5b1bc6b..c82da57c12847af48603e9bbc1660d0a57a4e36f 100644 (file)
 
 #if defined(__APPLE__)
 #define EXHAUSTED               _rust_stack_exhausted
-#elif defined(__linux__) || defined(__FreeBSD__)
+#elif defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
 #define EXHAUSTED               rust_stack_exhausted@PLT
 #else
 #define EXHAUSTED               rust_stack_exhausted
 #endif
 
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(__DragonFly__)
        .hidden MORESTACK
 #else
 #if defined(__APPLE__)
@@ -43,6 +43,15 @@ MORESTACK:
        // bytes greater than a normal frame, to allow the unwinder
        // to skip the partial frame of the original function.
        .cfi_def_cfa_offset 24
+
+#if defined(__APPLE__)
+       // The pattern of the return address being saved twice to the same location
+       // tells the OS X linker that it should not attempt to convert the DWARF
+       // unwind information to the compact format.
+       .cfi_offset %rip, -8
+       .cfi_offset %rip, -8
+#endif
+
        // %rbp is -24 bytes from the CFA
        .cfi_offset %rbp, -24
        movq %rsp, %rbp