mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 11:43:34 +08:00
* elf/dl-open.c (_dl_sysdep_start): Wrap weak_extern decl in BP_SYM ().
* include/libc-symbols.h (weak_extern): Add extra level of expansion. (symbol_version, default_symbol_version): Factor redundant definitions out of conditional. * linuxthreads/sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak extern declarations of pthread functions that have pointers in their return+arg signatures. 2000-06-27 Greg McGary <greg@mcgary.org> * elf/dl-open.c (_dl_sysdep_start): Wrap weak_extern decl in BP_SYM (). * include/libc-symbols.h (weak_extern): Add extra level of expansion. (symbol_version, default_symbol_version): Factor redundant definitions out of conditional. * linuxthreads/sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak extern declarations of pthread functions that have pointers in their return+arg signatures.
This commit is contained in:
parent
36e3c1195f
commit
ebdf53a7fc
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2000-06-27 Greg McGary <greg@mcgary.org>
|
||||||
|
|
||||||
|
* elf/dl-open.c (_dl_sysdep_start): Wrap weak_extern decl in BP_SYM ().
|
||||||
|
* include/libc-symbols.h (weak_extern): Add extra level of expansion.
|
||||||
|
(symbol_version, default_symbol_version): Factor redundant
|
||||||
|
definitions out of conditional.
|
||||||
|
* linuxthreads/sysdeps/pthread/bits/libc-lock.h:
|
||||||
|
Wrap BP_SYM () around weak extern declarations of pthread
|
||||||
|
functions that have pointers in their return+arg signatures.
|
||||||
|
|
||||||
2000-06-27 Jakub Jelinek <jakub@redhat.com>
|
2000-06-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* libio/obprintf.c (_IO_obstack_vprintf): Call obstack_make_room,
|
* libio/obprintf.c (_IO_obstack_vprintf): Call obstack_make_room,
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <bits/libc-lock.h>
|
#include <bits/libc-lock.h>
|
||||||
#include <ldsodefs.h>
|
#include <ldsodefs.h>
|
||||||
|
#include <bp-sym.h>
|
||||||
|
|
||||||
#include <dl-dst.h>
|
#include <dl-dst.h>
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
|
|||||||
void (*dl_main) (const ElfW(Phdr) *phdr,
|
void (*dl_main) (const ElfW(Phdr) *phdr,
|
||||||
ElfW(Word) phnum,
|
ElfW(Word) phnum,
|
||||||
ElfW(Addr) *user_entry));
|
ElfW(Addr) *user_entry));
|
||||||
weak_extern (_dl_sysdep_start)
|
weak_extern (BP_SYM (_dl_sysdep_start))
|
||||||
|
|
||||||
/* This function is used to unload the cache file if necessary. */
|
/* This function is used to unload the cache file if necessary. */
|
||||||
extern void _dl_unload_cache (void);
|
extern void _dl_unload_cache (void);
|
||||||
|
@ -97,10 +97,11 @@
|
|||||||
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
|
extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
|
||||||
|
|
||||||
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
|
/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
|
||||||
|
# define weak_extern(symbol) _weak_extern (symbol)
|
||||||
# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
|
# ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
|
||||||
# define weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
|
# define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
|
||||||
# else
|
# else
|
||||||
# define weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
|
# define _weak_extern(symbol) asm (".weak " __SYMBOL_PREFIX #symbol);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# else
|
# else
|
||||||
@ -267,22 +268,18 @@
|
|||||||
#endif /* Have GNU ld. */
|
#endif /* Have GNU ld. */
|
||||||
|
|
||||||
#if DO_VERSIONING
|
#if DO_VERSIONING
|
||||||
# ifdef __ASSEMBLER__
|
# define symbol_version(real, name, version) \
|
||||||
# define symbol_version(real, name, version) \
|
|
||||||
_symbol_version(real, name, version)
|
_symbol_version(real, name, version)
|
||||||
|
# define default_symbol_version(real, name, version) \
|
||||||
|
_default_symbol_version(real, name, version)
|
||||||
|
# ifdef __ASSEMBLER__
|
||||||
# define _symbol_version(real, name, version) \
|
# define _symbol_version(real, name, version) \
|
||||||
.symver real, name##@##version
|
.symver real, name##@##version
|
||||||
# define default_symbol_version(real, name, version) \
|
|
||||||
_default_symbol_version(real, name, version)
|
|
||||||
# define _default_symbol_version(real, name, version) \
|
# define _default_symbol_version(real, name, version) \
|
||||||
.symver real, name##@##@##version
|
.symver real, name##@##@##version
|
||||||
# else
|
# else
|
||||||
# define symbol_version(real, name, version) \
|
|
||||||
_symbol_version(real, name, version)
|
|
||||||
# define _symbol_version(real, name, version) \
|
# define _symbol_version(real, name, version) \
|
||||||
__asm__ (".symver " #real "," #name "@" #version)
|
__asm__ (".symver " #real "," #name "@" #version)
|
||||||
# define default_symbol_version(real, name, version) \
|
|
||||||
_default_symbol_version(real, name, version)
|
|
||||||
# define _default_symbol_version(real, name, version) \
|
# define _default_symbol_version(real, name, version) \
|
||||||
__asm__ (".symver " #real "," #name "@@" #version)
|
__asm__ (".symver " #real "," #name "@@" #version)
|
||||||
# endif
|
# endif
|
||||||
|
@ -246,53 +246,54 @@ extern int __pthread_atfork (void (*__prepare) (void),
|
|||||||
/* Make the pthread functions weak so that we can elide them from
|
/* Make the pthread functions weak so that we can elide them from
|
||||||
single-threaded processes. */
|
single-threaded processes. */
|
||||||
#ifndef __NO_WEAK_PTHREAD_ALIASES
|
#ifndef __NO_WEAK_PTHREAD_ALIASES
|
||||||
|
# include <bp-sym.h>
|
||||||
# ifdef weak_extern
|
# ifdef weak_extern
|
||||||
weak_extern (__pthread_mutex_init)
|
weak_extern (BP_SYM (__pthread_mutex_init))
|
||||||
weak_extern (__pthread_mutex_destroy)
|
weak_extern (BP_SYM (__pthread_mutex_destroy))
|
||||||
weak_extern (__pthread_mutex_lock)
|
weak_extern (BP_SYM (__pthread_mutex_lock))
|
||||||
weak_extern (__pthread_mutex_trylock)
|
weak_extern (BP_SYM (__pthread_mutex_trylock))
|
||||||
weak_extern (__pthread_mutex_unlock)
|
weak_extern (BP_SYM (__pthread_mutex_unlock))
|
||||||
weak_extern (__pthread_mutexattr_init)
|
weak_extern (BP_SYM (__pthread_mutexattr_init))
|
||||||
weak_extern (__pthread_mutexattr_destroy)
|
weak_extern (BP_SYM (__pthread_mutexattr_destroy))
|
||||||
weak_extern (__pthread_mutexattr_settype)
|
weak_extern (BP_SYM (__pthread_mutexattr_settype))
|
||||||
weak_extern (__pthread_rwlock_init)
|
weak_extern (BP_SYM (__pthread_rwlock_init))
|
||||||
weak_extern (__pthread_rwlock_destroy)
|
weak_extern (BP_SYM (__pthread_rwlock_destroy))
|
||||||
weak_extern (__pthread_rwlock_rdlock)
|
weak_extern (BP_SYM (__pthread_rwlock_rdlock))
|
||||||
weak_extern (__pthread_rwlock_tryrdlock)
|
weak_extern (BP_SYM (__pthread_rwlock_tryrdlock))
|
||||||
weak_extern (__pthread_rwlock_wrlock)
|
weak_extern (BP_SYM (__pthread_rwlock_wrlock))
|
||||||
weak_extern (__pthread_rwlock_trywrlock)
|
weak_extern (BP_SYM (__pthread_rwlock_trywrlock))
|
||||||
weak_extern (__pthread_rwlock_unlock)
|
weak_extern (BP_SYM (__pthread_rwlock_unlock))
|
||||||
weak_extern (__pthread_key_create)
|
weak_extern (BP_SYM (__pthread_key_create))
|
||||||
weak_extern (__pthread_setspecific)
|
weak_extern (BP_SYM (__pthread_setspecific))
|
||||||
weak_extern (__pthread_getspecific)
|
weak_extern (BP_SYM (__pthread_getspecific))
|
||||||
weak_extern (__pthread_once)
|
weak_extern (BP_SYM (__pthread_once))
|
||||||
weak_extern (__pthread_initialize)
|
weak_extern (__pthread_initialize)
|
||||||
weak_extern (__pthread_atfork)
|
weak_extern (__pthread_atfork)
|
||||||
weak_extern (_pthread_cleanup_push_defer)
|
weak_extern (BP_SYM (_pthread_cleanup_push_defer))
|
||||||
weak_extern (_pthread_cleanup_pop_restore)
|
weak_extern (BP_SYM (_pthread_cleanup_pop_restore))
|
||||||
# else
|
# else
|
||||||
# pragma weak __pthread_mutex_init
|
# pragma weak BP_SYM (__pthread_mutex_init)
|
||||||
# pragma weak __pthread_mutex_destroy
|
# pragma weak BP_SYM (__pthread_mutex_destroy)
|
||||||
# pragma weak __pthread_mutex_lock
|
# pragma weak BP_SYM (__pthread_mutex_lock)
|
||||||
# pragma weak __pthread_mutex_trylock
|
# pragma weak BP_SYM (__pthread_mutex_trylock)
|
||||||
# pragma weak __pthread_mutex_unlock
|
# pragma weak BP_SYM (__pthread_mutex_unlock)
|
||||||
# pragma weak __pthread_mutexattr_init
|
# pragma weak BP_SYM (__pthread_mutexattr_init)
|
||||||
# pragma weak __pthread_mutexattr_destroy
|
# pragma weak BP_SYM (__pthread_mutexattr_destroy)
|
||||||
# pragma weak __pthread_mutexattr_settype
|
# pragma weak BP_SYM (__pthread_mutexattr_settype)
|
||||||
# pragma weak __pthread_rwlock_destroy
|
# pragma weak BP_SYM (__pthread_rwlock_destroy)
|
||||||
# pragma weak __pthread_rwlock_rdlock
|
# pragma weak BP_SYM (__pthread_rwlock_rdlock)
|
||||||
# pragma weak __pthread_rwlock_tryrdlock
|
# pragma weak BP_SYM (__pthread_rwlock_tryrdlock)
|
||||||
# pragma weak __pthread_rwlock_wrlock
|
# pragma weak BP_SYM (__pthread_rwlock_wrlock)
|
||||||
# pragma weak __pthread_rwlock_trywrlock
|
# pragma weak BP_SYM (__pthread_rwlock_trywrlock)
|
||||||
# pragma weak __pthread_rwlock_unlock
|
# pragma weak BP_SYM (__pthread_rwlock_unlock)
|
||||||
# pragma weak __pthread_key_create
|
# pragma weak BP_SYM (__pthread_key_create)
|
||||||
# pragma weak __pthread_setspecific
|
# pragma weak BP_SYM (__pthread_setspecific)
|
||||||
# pragma weak __pthread_getspecific
|
# pragma weak BP_SYM (__pthread_getspecific)
|
||||||
# pragma weak __pthread_once
|
# pragma weak BP_SYM (__pthread_once)
|
||||||
# pragma weak __pthread_initialize
|
# pragma weak __pthread_initialize
|
||||||
# pragma weak __pthread_atfork
|
# pragma weak __pthread_atfork
|
||||||
# pragma weak _pthread_cleanup_push_defer
|
# pragma weak BP_SYM (_pthread_cleanup_push_defer)
|
||||||
# pragma weak _pthread_cleanup_pop_restore
|
# pragma weak BP_SYM (_pthread_cleanup_pop_restore)
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user