Remove arch_get_caller
Use the gcc builtin instead, which generates more efficient code (it saves a function call) and means less platform specific code to write for us. Change-Id: I1d55b5703027b2ea4ecde2438ea306bd4850eb32 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1859 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
09fafe4c95
commit
016cc66803
@ -50,7 +50,6 @@ bigtime_t __arch_get_system_time_offset(struct real_time_data *data);
|
||||
bigtime_t __get_system_time_offset();
|
||||
void __init_pwd_backend(void);
|
||||
void __reinit_pwd_backend_after_fork(void);
|
||||
void* __arch_get_caller(void);
|
||||
int32 __arch_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
int32 skipFrames, addr_t stackBase, addr_t stackEnd);
|
||||
|
||||
|
@ -18,10 +18,3 @@ get_stack_frame(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
@ -15,10 +15,3 @@ get_stack_frame(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
@ -15,10 +15,3 @@ get_stack_frame(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
@ -15,11 +15,3 @@ get_stack_frame(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -15,11 +15,3 @@ get_stack_frame(void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
__arch_get_caller(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -12,10 +12,3 @@ FUNCTION(get_stack_frame):
|
||||
ret
|
||||
FUNCTION_END(get_stack_frame)
|
||||
|
||||
|
||||
/* void* __arch_get_caller(void); */
|
||||
FUNCTION(__arch_get_caller):
|
||||
mov 4(%ebp), %eax
|
||||
ret
|
||||
FUNCTION_END(__arch_get_caller)
|
||||
|
||||
|
@ -13,10 +13,3 @@ FUNCTION(get_stack_frame):
|
||||
ret
|
||||
FUNCTION_END(get_stack_frame)
|
||||
|
||||
|
||||
/* void* __arch_get_caller(void); */
|
||||
FUNCTION(__arch_get_caller):
|
||||
movq 8(%rbp), %rax
|
||||
ret
|
||||
FUNCTION_END(__arch_get_caller)
|
||||
|
||||
|
@ -40,8 +40,9 @@ dlsym(void *handle, char const *name)
|
||||
status_t status;
|
||||
void* caller = NULL;
|
||||
|
||||
if (handle == RTLD_NEXT)
|
||||
caller = __arch_get_caller();
|
||||
if (handle == RTLD_NEXT) {
|
||||
caller = __builtin_return_address(0);
|
||||
}
|
||||
|
||||
status = __gRuntimeLoader->get_library_symbol(handle, caller, name,
|
||||
&location);
|
||||
|
@ -608,7 +608,6 @@ void __acosl() {}
|
||||
void __acr() {}
|
||||
void __add() {}
|
||||
void __allocate_pthread() {}
|
||||
void __arch_get_caller() {}
|
||||
void __arch_get_stack_trace() {}
|
||||
void __arch_get_system_time_offset() {}
|
||||
void __arch_init_time() {}
|
||||
|
@ -418,7 +418,6 @@ void __acoshl() {}
|
||||
void __acosl() {}
|
||||
void __adjust_heap__H3ZPQ217EnvironmentFilter5EntryZlZQ217EnvironmentFilter5Entry_X01X11X11X21_v() {}
|
||||
void __allocate_pthread() {}
|
||||
void __arch_get_caller() {}
|
||||
void __arch_get_stack_trace() {}
|
||||
void __arch_get_system_time_offset() {}
|
||||
void __arch_init_time() {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user