am 65104ba5
: am 9805f3ec
: am 23148470
: Merge "AArch64: Fix uses of stack size for 32/64bit libc builds"
* commit '65104ba5332381bdafb3dd3ddcaad7752cd45e02': AArch64: Fix uses of stack size for 32/64bit libc builds
This commit is contained in:
commit
ecf42a5dec
@ -29,7 +29,7 @@
|
|||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
// void _exit_with_stack_teardown(void* stackBase, int stackSize, int status)
|
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize, int status)
|
||||||
ENTRY(_exit_with_stack_teardown)
|
ENTRY(_exit_with_stack_teardown)
|
||||||
mov lr, r2
|
mov lr, r2
|
||||||
ldr r7, =__NR_munmap
|
ldr r7, =__NR_munmap
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
// void _exit_with_stack_teardown(void * stackBase, int stackSize, int status)
|
// void _exit_with_stack_teardown(void * stackBase, size_t stackSize, int status)
|
||||||
|
|
||||||
.type _exit_with_stack_teardown, @function
|
.type _exit_with_stack_teardown, @function
|
||||||
.global _exit_with_stack_teardown
|
.global _exit_with_stack_teardown
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
// void _exit_with_stack_teardown(void* stackBase, int stackSize, int status)
|
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize, int status)
|
||||||
ENTRY(_exit_with_stack_teardown)
|
ENTRY(_exit_with_stack_teardown)
|
||||||
// We can trash %ebx here since this call should never return.
|
// We can trash %ebx here since this call should never return.
|
||||||
// We can also take advantage of the fact that the linux syscall trap
|
// We can also take advantage of the fact that the linux syscall trap
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <machine/asm.h>
|
#include <machine/asm.h>
|
||||||
|
|
||||||
// void _exit_with_stack_teardown(void* stackBase, int stackSize, int status)
|
// void _exit_with_stack_teardown(void* stackBase, size_t stackSize, int status)
|
||||||
ENTRY(_exit_with_stack_teardown)
|
ENTRY(_exit_with_stack_teardown)
|
||||||
// We take advantage of the fact that the linux syscall trap
|
// We take advantage of the fact that the linux syscall trap
|
||||||
// handler saves all the registers, so we don't need to save
|
// handler saves all the registers, so we don't need to save
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
#include "pthread_internal.h"
|
#include "pthread_internal.h"
|
||||||
|
|
||||||
extern "C" abort_msg_t** __abort_message_ptr;
|
extern "C" abort_msg_t** __abort_message_ptr;
|
||||||
extern "C" unsigned __get_sp(void);
|
extern "C" uintptr_t __get_sp(void);
|
||||||
extern "C" int __system_properties_init(void);
|
extern "C" int __system_properties_init(void);
|
||||||
|
|
||||||
// Not public, but well-known in the BSDs.
|
// Not public, but well-known in the BSDs.
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
extern void pthread_debug_mutex_lock_check(pthread_mutex_t *mutex);
|
extern void pthread_debug_mutex_lock_check(pthread_mutex_t *mutex);
|
||||||
extern void pthread_debug_mutex_unlock_check(pthread_mutex_t *mutex);
|
extern void pthread_debug_mutex_unlock_check(pthread_mutex_t *mutex);
|
||||||
|
|
||||||
extern void _exit_with_stack_teardown(void * stackBase, int stackSize, int status);
|
extern void _exit_with_stack_teardown(void * stackBase, size_t stackSize, int status);
|
||||||
extern void _exit_thread(int status);
|
extern void _exit_thread(int status);
|
||||||
|
|
||||||
int __futex_wake_ex(volatile void *ftx, int pshared, int val)
|
int __futex_wake_ex(volatile void *ftx, int pshared, int val)
|
||||||
@ -87,7 +87,7 @@ void pthread_exit(void * retval)
|
|||||||
{
|
{
|
||||||
pthread_internal_t* thread = __get_thread();
|
pthread_internal_t* thread = __get_thread();
|
||||||
void* stack_base = thread->attr.stack_base;
|
void* stack_base = thread->attr.stack_base;
|
||||||
int stack_size = thread->attr.stack_size;
|
size_t stack_size = thread->attr.stack_size;
|
||||||
int user_stack = (thread->attr.flags & PTHREAD_ATTR_FLAG_USER_STACK) != 0;
|
int user_stack = (thread->attr.flags & PTHREAD_ATTR_FLAG_USER_STACK) != 0;
|
||||||
sigset_t mask;
|
sigset_t mask;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user