diff options
Diffstat (limited to 'include/features.h')
-rw-r--r-- | include/features.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/include/features.h b/include/features.h index 0af6bf43b..7d56c1a97 100644 --- a/include/features.h +++ b/include/features.h @@ -444,4 +444,75 @@ uClibc was built without large file support enabled. * that get pulled in by signal.h */ #define __user +/* + * MIPS NPTL - These definitions were taken from 'include/libc-symbols.h' + * in glibc. We are going to use the empty macros for now + * until we run into other compile errors that force us to + * do otherwise. + */ +#if 0 +# ifndef __ASSEMBLER__ +# if !defined HAVE_VISIBILITY_ATTRIBUTE \ + || defined HAVE_BROKEN_VISIBILITY_ATTRIBUTE +# define __hidden_proto_hiddenattr(attrs...) +# else +# 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...) \ + extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \ + __hidden_proto_hiddenattr (attrs); +# define __hidden_asmname(name) \ + __hidden_asmname1 (__USER_LABEL_PREFIX__, name) +# define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name) +# define __hidden_asmname2(prefix, name) #prefix name +# define __hidden_ver1(local, internal, name) \ + extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \ + extern __typeof (name) __EI_##name \ + __attribute__((alias (__hidden_asmname (#local)))) +# define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name); +# define hidden_data_ver(local, name) hidden_ver(local, name) +# define hidden_def(name) __hidden_ver1(__GI_##name, name, name); +# define hidden_data_def(name) hidden_def(name) +# define hidden_weak(name) \ + __hidden_ver1(__GI_##name, name, name) __attribute__((weak)); +# define hidden_data_weak(name) hidden_weak(name) +# else +/* For assembly, we need to do the opposite of what we do in C: + in assembly gcc __REDIRECT stuff is not in place, so functions + are defined by its normal name and we need to create the + __GI_* alias to it, in C __REDIRECT causes the function definition + to use __GI_* name and we need to add alias to the real name. + There is no reason to use hidden_weak over hidden_def in assembly, + but we provide it for consistency with the C usage. + hidden_proto doesn't make sense for assembly but the equivalent + is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */ +# define hidden_def(name) strong_alias (name, __GI_##name) +# define hidden_weak(name) hidden_def (name) +# define hidden_ver(local, name) strong_alias (local, __GI_##name) +# define hidden_data_def(name) strong_data_alias (name, __GI_##name) +# define hidden_data_weak(name) hidden_data_def (name) +# define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name) +# ifdef HAVE_ASM_GLOBAL_DOT_NAME +# define HIDDEN_JUMPTARGET(name) .__GI_##name +# else +# define HIDDEN_JUMPTARGET(name) __GI_##name +# endif +# endif +#else +# ifndef __ASSEMBLER__ +# define hidden_proto(name, attrs...) +# else +# define HIDDEN_JUMPTARGET(name) JUMPTARGET(name) +# endif /* Not __ASSEMBLER__ */ +# define hidden_weak(name) +# define hidden_def(name) +# define hidden_ver(local, name) +# define hidden_data_weak(name) +# define hidden_data_def(name) +# define hidden_data_ver(local, name) +#endif + #endif /* features.h */ |