diff --git a/src/internal/task/task_stack_amd64.S b/src/internal/task/task_stack_amd64.S index 44b5f065..f9182d49 100644 --- a/src/internal/task/task_stack_amd64.S +++ b/src/internal/task/task_stack_amd64.S @@ -72,3 +72,8 @@ tinygo_swapTask: // Return into the new task, as if tinygo_swapTask was a regular call. ret + +#ifdef __MACH__ // Darwin +// allow these symbols to stripped as dead code +.subsections_via_symbols +#endif diff --git a/src/runtime/gc_amd64.S b/src/runtime/gc_amd64.S index fa89479f..c0ad7bc8 100644 --- a/src/runtime/gc_amd64.S +++ b/src/runtime/gc_amd64.S @@ -27,3 +27,8 @@ _tinygo_scanCurrentStack: // were only pushed to be discoverable by the GC. addq $56, %rsp retq + +#ifdef __MACH__ // Darwin +// allow these symbols to stripped as dead code +.subsections_via_symbols +#endif