diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-10-28 06:44:41 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-10-28 06:44:41 +0000 |
commit | 78fbd00f39d48592d55bd4a022a909c9577b21db (patch) | |
tree | 2bf24b213e2eeb96c06422c63ed4108db191e78e /include | |
parent | eb0a3d0cab507fecefe390a340f74ab8e5cf7831 (diff) | |
download | glibc-78fbd00f39d48592d55bd4a022a909c9577b21db.zip glibc-78fbd00f39d48592d55bd4a022a909c9577b21db.tar.gz glibc-78fbd00f39d48592d55bd4a022a909c9577b21db.tar.bz2 |
* configure.in: Require assembler support for visibility, compiler
support for visibility and aliases, linker support for various -z
options.
* Makeconfig: Remove conditional code which now is unnecessary.
* config.h.in: Likewise.
* config.make.in: Likewise.
* dlfcn/Makefile: Likewise.
* elf/Makefile: Likewise.
* elf/dl-load.c: Likewise.
* elf/rtld.c: Likewise.
* include/libc-symbols.h: Likewise.
* include/stdio.h: Likewise.
* io/Makefile: Likewise.
* io/fstat.c: Likewise.
* io/fstat64.c: Likewise.
* io/fstatat.c: Likewise.
* io/fstatat64.c: Likewise.
* io/lstat.c: Likewise.
* io/lstat64.c: Likewise.
* io/mknod.c: Likewise.
* io/mknodat.c: Likewise.
* io/stat.c: Likewise.
* io/stat64.c: Likewise.
* libio/stdio.c: Likewise.
* nscd/Makefile: Likewise.
* stdlib/Makefile: Likewise.
* stdlib/atexit.c: Likewise.
* sysdeps/generic/ldsodefs.h: Likewise.
* sysdeps/i386/dl-machine.h: Likewise.
* sysdeps/i386/sysdep.h: Likewise.
* sysdeps/i386/i686/memcmp.S: Likewise.
* sysdeps/powerpc/powerpc32/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c: Likewise.
Diffstat (limited to 'include')
-rw-r--r-- | include/libc-symbols.h | 34 | ||||
-rw-r--r-- | include/stdio.h | 1 |
2 files changed, 13 insertions, 22 deletions
diff --git a/include/libc-symbols.h b/include/libc-symbols.h index da46f5e..9eabcbd 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -114,6 +114,13 @@ # define _weak_alias(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))); +/* Same as WEAK_ALIAS, but mark symbol as hidden. */ +# define weak_hidden_alias(name, aliasname) \ + _weak_hidden_alias (name, aliasname) +# define _weak_hidden_alias(name, aliasname) \ + extern __typeof (name) aliasname \ + __attribute__ ((weak, alias (#name), __visibility__ ("hidden"))); + /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */ # define weak_extern(symbol) _weak_extern (weak symbol) # define _weak_extern(expr) _Pragma (#expr) @@ -121,6 +128,7 @@ # else # define weak_alias(name, aliasname) strong_alias(name, aliasname) +# define weak_hidden_alias(name, aliasname) strong_alias(name, aliasname) # define weak_extern(symbol) /* Nothing. */ # endif @@ -431,8 +439,7 @@ for linking") strong_alias(real, name) #endif -#if defined HAVE_VISIBILITY_ATTRIBUTE \ - && (defined SHARED || defined LIBC_NONSHARED) +#if defined SHARED || defined LIBC_NONSHARED # define attribute_hidden __attribute__ ((visibility ("hidden"))) #else # define attribute_hidden @@ -444,11 +451,7 @@ for linking") # define attribute_tls_model_ie #endif -#ifdef HAVE_Z_RELRO -# define attribute_relro __attribute__ ((section (".data.rel.ro"))) -#else -# define attribute_relro -#endif +#define attribute_relro __attribute__ ((section (".data.rel.ro"))) /* Handling on non-exported internal names. We have to do this only for shared code. */ @@ -457,14 +460,9 @@ for linking") # define INTDEF(name) strong_alias (name, name##_internal) # define INTVARDEF(name) \ _INTVARDEF (name, name##_internal) -# if defined HAVE_VISIBILITY_ATTRIBUTE -# define _INTVARDEF(name, aliasname) \ +# define _INTVARDEF(name, aliasname) \ extern __typeof (name) aliasname __attribute__ ((alias (#name), \ visibility ("hidden"))); -# else -# define _INTVARDEF(name, aliasname) \ - extern __typeof (name) aliasname __attribute__ ((alias (#name))); -# endif # define INTDEF2(name, newname) strong_alias (name, newname##_internal) # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal) #else @@ -549,16 +547,10 @@ for linking") versioned_symbol (libc, __real_foo, foo, GLIBC_2_1); libc_hidden_ver (__real_foo, foo) */ -#if defined SHARED && defined DO_VERSIONING \ - && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE && !defined NO_HIDDEN +#if defined SHARED && defined DO_VERSIONING && !defined NO_HIDDEN # ifndef __ASSEMBLER__ -# if !defined HAVE_VISIBILITY_ATTRIBUTE \ - || defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE -# define __hidden_proto_hiddenattr(attrs...) -# else -# define __hidden_proto_hiddenattr(attrs...) \ +# define __hidden_proto_hiddenattr(attrs...) \ __attribute__ ((visibility ("hidden"), ##attrs)) -# endif # define hidden_proto(name, attrs...) \ __hidden_proto (name, __GI_##name, ##attrs) # define __hidden_proto(name, internal, attrs...) \ diff --git a/include/stdio.h b/include/stdio.h index e040380..b293b8f 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -131,7 +131,6 @@ libc_hidden_proto (__vsnprintf_chk) libc_hidden_proto (__vfprintf_chk) # if !defined NOT_IN_libc && defined SHARED && defined DO_VERSIONING \ - && defined HAVE_VISIBILITY_ATTRIBUTE && !defined HAVE_BROKEN_ALIAS_ATTRIBUTE\ && !defined NO_HIDDEN /* Special gcc builtins. */ extern size_t __builtin_fwrite (const void *, size_t, size_t, void *) |