diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-17 00:54:27 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-17 00:54:27 +0000 |
commit | 57ca05f4b3ea926292ee43c40ee59bda6d1afbaf (patch) | |
tree | e34878e148324cd397b57a1463a242ea3ffc8c04 /include/libc-internal.h | |
parent | 0d2b685bb7fb38badd924dcc7d8f21028672b885 (diff) |
sync some stuff from glibc and fix __hidden_ver1() for targets that define a USER_PREFIX (like bfin)
Diffstat (limited to 'include/libc-internal.h')
-rw-r--r-- | include/libc-internal.h | 41 |
1 files changed, 34 insertions, 7 deletions
diff --git a/include/libc-internal.h b/include/libc-internal.h index feb329323..53fc0ae62 100644 --- a/include/libc-internal.h +++ b/include/libc-internal.h @@ -21,6 +21,39 @@ #include <features.h> +#undef __SYMBOL_PREFIX +#ifndef __SYMBOL_PREFIX +# ifdef NO_UNDERSCORES +# define __SYMBOL_PREFIX +# else +# define __SYMBOL_PREFIX "_" +# endif +#endif + +#undef C_SYMBOL_NAME +#ifndef C_SYMBOL_NAME +# ifdef NO_UNDERSCORES +# define C_SYMBOL_NAME(name) name +# else +# define C_SYMBOL_NAME(name) _##name +# endif +#endif + +#ifndef ASM_LINE_SEP +# define ASM_LINE_SEP ; +#endif + +#ifdef HAVE_ASM_GLOBAL_DOT_NAME +# ifndef C_SYMBOL_DOT_NAME +# if defined __GNUC__ && defined __GNUC_MINOR__ \ + && (__GNUC__ << 16) + __GNUC_MINOR__ >= (3 << 16) + 1 +# define C_SYMBOL_DOT_NAME(name) .name +# else +# define C_SYMBOL_DOT_NAME(name) .##name +# endif +# endif +#endif + #ifndef __ASSEMBLER__ /* GCC understands weak symbols and aliases; use its interface where possible, instead of embedded assembly language. */ @@ -47,12 +80,6 @@ #else /* __ASSEMBLER__ */ -#ifdef __SYMBOL_PREFIX -# define C_SYMBOL_NAME(name) _##name -#else -# define C_SYMBOL_NAME(name) name -#endif - # define strong_alias(name, aliasname) \ .global C_SYMBOL_NAME (aliasname) ; \ .set C_SYMBOL_NAME(aliasname),C_SYMBOL_NAME(name) @@ -257,7 +284,7 @@ # 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)))) + extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local)))) # 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)); |