ld.so: Remove internal_function attribute from various functions

These functions are invoked from other DSOs and should therefore
use the standard calling convention.
This commit is contained in:
Florian Weimer 2017-08-13 21:11:54 +02:00
parent 52bcdf267b
commit 3012cfb0d2
7 changed files with 23 additions and 22 deletions

View File

@ -1,3 +1,17 @@
2017-08-13 Florian Weimer <fweimer@redhat.com>
* elf/dl-addr.c (_dl_addr): Remove internal_function.
* elf/dl-error-skeleton.c (_dl_signal_error, _dl_signal_cerror)
(_dl_catch_error, _dl_receive_error): Likewise.
* elf/dl-open.c (_dl_find_dso_for_object): Likewise.
* elf/dl-tls.c (_dl_allocate_tls_init, _dl_allocate_tls)
(_dl_deallocate_tls): Likewise.
* include/dlfcn.h (_dl_addr): Likewise.
* sysdeps/generic/ldsodefs.h (_dl_signal_error, _dl_signal_cerror)
(_dl_catch_error, _dl_receive_error, _dl_find_dso_for_object)
(_dl_allocate_tls_init, _dl_allocate_tls, _dl_deallocate_tls):
Likewise.
2017-08-13 Florian Weimer <fweimer@redhat.com> 2017-08-13 Florian Weimer <fweimer@redhat.com>
* include/stdlib.h: (__strtof_nan, __strtod_nan, __strtold_nan) * include/stdlib.h: (__strtof_nan, __strtod_nan, __strtold_nan)

View File

@ -121,7 +121,6 @@ determine_info (const ElfW(Addr) addr, struct link_map *match, Dl_info *info,
int int
internal_function
_dl_addr (const void *address, Dl_info *info, _dl_addr (const void *address, Dl_info *info,
struct link_map **mapp, const ElfW(Sym) **symbolp) struct link_map **mapp, const ElfW(Sym) **symbolp)
{ {

View File

@ -104,7 +104,6 @@ _dl_signal_exception (int errcode, struct dl_exception *exception,
libc_hidden_def (_dl_signal_exception) libc_hidden_def (_dl_signal_exception)
void void
internal_function
_dl_signal_error (int errcode, const char *objname, const char *occation, _dl_signal_error (int errcode, const char *objname, const char *occation,
const char *errstring) const char *errstring)
{ {
@ -150,7 +149,6 @@ _dl_signal_cexception (int errcode, struct dl_exception *exception,
} }
void void
internal_function
_dl_signal_cerror (int errcode, const char *objname, const char *occation, _dl_signal_cerror (int errcode, const char *objname, const char *occation,
const char *errstring) const char *errstring)
{ {
@ -210,7 +208,6 @@ _dl_catch_exception (struct dl_exception *exception,
libc_hidden_def (_dl_catch_exception) libc_hidden_def (_dl_catch_exception)
int int
internal_function
_dl_catch_error (const char **objname, const char **errstring, _dl_catch_error (const char **objname, const char **errstring,
bool *mallocedp, void (*operate) (void *), void *args) bool *mallocedp, void (*operate) (void *), void *args)
{ {
@ -225,7 +222,6 @@ libc_hidden_def (_dl_catch_error)
#if DL_ERROR_BOOTSTRAP #if DL_ERROR_BOOTSTRAP
void void
internal_function
_dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args) _dl_receive_error (receiver_fct fct, void (*operate) (void *), void *args)
{ {
struct catch *old_catch = catch_hook; struct catch *old_catch = catch_hook;

View File

@ -162,7 +162,6 @@ add_to_global (struct link_map *new)
address ADDR. Returns the pointer to the link map of the matching DSO, or address ADDR. Returns the pointer to the link map of the matching DSO, or
NULL if a match is not found. */ NULL if a match is not found. */
struct link_map * struct link_map *
internal_function
_dl_find_dso_for_object (const ElfW(Addr) addr) _dl_find_dso_for_object (const ElfW(Addr) addr)
{ {
struct link_map *l; struct link_map *l;

View File

@ -439,7 +439,6 @@ _dl_resize_dtv (dtv_t *dtv)
void * void *
internal_function
_dl_allocate_tls_init (void *result) _dl_allocate_tls_init (void *result)
{ {
if (result == NULL) if (result == NULL)
@ -532,7 +531,6 @@ _dl_allocate_tls_init (void *result)
rtld_hidden_def (_dl_allocate_tls_init) rtld_hidden_def (_dl_allocate_tls_init)
void * void *
internal_function
_dl_allocate_tls (void *mem) _dl_allocate_tls (void *mem)
{ {
return _dl_allocate_tls_init (mem == NULL return _dl_allocate_tls_init (mem == NULL
@ -543,7 +541,6 @@ rtld_hidden_def (_dl_allocate_tls)
void void
internal_function
_dl_deallocate_tls (void *tcb, bool dealloc_tcb) _dl_deallocate_tls (void *tcb, bool dealloc_tcb)
{ {
dtv_t *dtv = GET_DTV (tcb); dtv_t *dtv = GET_DTV (tcb);

View File

@ -43,8 +43,7 @@ libc_hidden_proto (__libc_dlclose)
/* Locate shared object containing the given address. */ /* Locate shared object containing the given address. */
#ifdef ElfW #ifdef ElfW
extern int _dl_addr (const void *address, Dl_info *info, extern int _dl_addr (const void *address, Dl_info *info,
struct link_map **mapp, const ElfW(Sym) **symbolp) struct link_map **mapp, const ElfW(Sym) **symbolp);
internal_function;
libc_hidden_proto (_dl_addr) libc_hidden_proto (_dl_addr)
#endif #endif

View File

@ -782,7 +782,7 @@ libc_hidden_proto (_dl_signal_exception)
/* Like _dl_signal_exception, but creates the exception first. */ /* Like _dl_signal_exception, but creates the exception first. */
extern void _dl_signal_error (int errcode, const char *object, extern void _dl_signal_error (int errcode, const char *object,
const char *occasion, const char *errstring) const char *occasion, const char *errstring)
internal_function __attribute__ ((__noreturn__)); __attribute__ ((__noreturn__));
libc_hidden_proto (_dl_signal_error) libc_hidden_proto (_dl_signal_error)
/* Like _dl_signal_exception, but may return when called in the /* Like _dl_signal_exception, but may return when called in the
@ -806,7 +806,7 @@ _dl_signal_cexception (int errcode, struct dl_exception *exception,
#if IS_IN (rtld) #if IS_IN (rtld)
extern void _dl_signal_cerror (int errcode, const char *object, extern void _dl_signal_cerror (int errcode, const char *object,
const char *occasion, const char *errstring) const char *occasion, const char *errstring)
internal_function attribute_hidden; attribute_hidden;
#else #else
__attribute__ ((always_inline)) __attribute__ ((always_inline))
static inline void static inline void
@ -822,8 +822,7 @@ _dl_signal_cerror (int errcode, const char *object,
function returns. function returns.
ARGS is passed as argument to OPERATE. */ ARGS is passed as argument to OPERATE. */
extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *), extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
void *args) void *args) attribute_hidden;
internal_function attribute_hidden;
/* Call OPERATE, catching errors from `_dl_signal_error' and related /* Call OPERATE, catching errors from `_dl_signal_error' and related
functions. If there is no error, *ERRSTRING is set to null. If functions. If there is no error, *ERRSTRING is set to null. If
@ -836,8 +835,7 @@ extern void _dl_receive_error (receiver_fct fct, void (*operate) (void *),
the returned string is allocated using the libc's malloc. */ the returned string is allocated using the libc's malloc. */
extern int _dl_catch_error (const char **objname, const char **errstring, extern int _dl_catch_error (const char **objname, const char **errstring,
bool *mallocedp, void (*operate) (void *), bool *mallocedp, void (*operate) (void *),
void *args) void *args);
internal_function;
libc_hidden_proto (_dl_catch_error) libc_hidden_proto (_dl_catch_error)
/* Call OPERATE (ARGS). If no error occurs, set *EXCEPTION to zero. /* Call OPERATE (ARGS). If no error occurs, set *EXCEPTION to zero.
@ -1077,7 +1075,7 @@ void __pthread_initialize_minimal (void) weak_function;
#endif #endif
/* Allocate memory for static TLS block (unless MEM is nonzero) and dtv. */ /* Allocate memory for static TLS block (unless MEM is nonzero) and dtv. */
extern void *_dl_allocate_tls (void *mem) internal_function; extern void *_dl_allocate_tls (void *mem);
rtld_hidden_proto (_dl_allocate_tls) rtld_hidden_proto (_dl_allocate_tls)
/* Get size and alignment requirements of the static TLS block. */ /* Get size and alignment requirements of the static TLS block. */
@ -1091,11 +1089,11 @@ extern void _dl_allocate_static_tls (struct link_map *map)
only used within rtld.c itself at startup time. */ only used within rtld.c itself at startup time. */
extern void *_dl_allocate_tls_storage (void) extern void *_dl_allocate_tls_storage (void)
internal_function attribute_hidden; internal_function attribute_hidden;
extern void *_dl_allocate_tls_init (void *) internal_function; extern void *_dl_allocate_tls_init (void *);
rtld_hidden_proto (_dl_allocate_tls_init) rtld_hidden_proto (_dl_allocate_tls_init)
/* Deallocate memory allocated with _dl_allocate_tls. */ /* Deallocate memory allocated with _dl_allocate_tls. */
extern void _dl_deallocate_tls (void *tcb, bool dealloc_tcb) internal_function; extern void _dl_deallocate_tls (void *tcb, bool dealloc_tcb);
rtld_hidden_proto (_dl_deallocate_tls) rtld_hidden_proto (_dl_deallocate_tls)
extern void _dl_nothread_init_static_tls (struct link_map *) attribute_hidden; extern void _dl_nothread_init_static_tls (struct link_map *) attribute_hidden;
@ -1145,8 +1143,7 @@ extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr)
extern void _dl_show_scope (struct link_map *new, int from) extern void _dl_show_scope (struct link_map *new, int from)
attribute_hidden; attribute_hidden;
extern struct link_map *_dl_find_dso_for_object (const ElfW(Addr) addr) extern struct link_map *_dl_find_dso_for_object (const ElfW(Addr) addr);
internal_function;
rtld_hidden_proto (_dl_find_dso_for_object) rtld_hidden_proto (_dl_find_dso_for_object)
/* Initialization which is normally done by the dynamic linker. */ /* Initialization which is normally done by the dynamic linker. */