1#include <private/bionic_asm.h>
2
3// void _exit_with_stack_teardown(void* stackBase, size_t stackSize)
4ENTRY_PRIVATE(_exit_with_stack_teardown)
5  // We can trash registers because this function never returns.
6  mov 4(%esp), %ebx             // stackBase
7  mov 8(%esp), %ecx             // stackSize
8  mov $__NR_munmap, %eax
9  int $0x80
10  // If munmap failed, we ignore the failure and exit anyway.
11
12  mov $0, %ebx                  // status
13  movl $__NR_exit, %eax
14  int $0x80
15  // The exit syscall does not return.
16END(_exit_with_stack_teardown)
17