1 /* Support macros for making weak and strong aliases for symbols,
2 and for using symbol sets and linker warnings with GNU ld.
3 Copyright (C) 1995-1998,2000-2003,2004,2005,2006
4 Free Software Foundation, Inc.
5 This file is part of the GNU C Library.
7 The GNU C Library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
12 The GNU C Library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public
18 License along with the GNU C Library; if not, write to the Free
19 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
22 #ifndef _LIBC_SYMBOLS_H
23 #define _LIBC_SYMBOLS_H 1
25 /* This file's macros are included implicitly in the compilation of every
26 file in the C library by -imacros.
28 We include uClibc_arch_features.h which is defined by arch devs.
29 It should define for us the following symbols:
31 * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
32 * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
33 * ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
34 or leave it undefined if there is no .type directive.
35 * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
36 * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
37 * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
41 #include <bits/uClibc_arch_features.h>
44 /* This is defined for the compilation of all C library code. features.h
45 tests this to avoid inclusion of stubs.h while compiling the library,
46 before stubs.h has been generated. Some library code that is shared
47 with other packages also tests this symbol to see if it is being
48 compiled as part of the C library. We must define this before including
49 config.h, because it makes some definitions conditional on whether libc
50 itself is being compiled, or just some generator program. */
53 /* Enable declarations of GNU extensions, since we are compiling them. */
56 /* Prepare for the case that `__builtin_expect' is not available. */
57 #if __GNUC__ == 2 && __GNUC_MINOR__ < 96
58 # define __builtin_expect(x, expected_value) (x)
61 # define likely(x) __builtin_expect((!!(x)),1)
64 # define unlikely(x) __builtin_expect((!!(x)),0)
66 #ifndef __LINUX_COMPILER_H
67 # define __LINUX_COMPILER_H
70 # define __cast__(_to)
73 #define attribute_unused __attribute__ ((unused))
76 # define attribute_noreturn __attribute__ ((__noreturn__))
78 # define attribute_noreturn
85 #ifdef __UCLIBC_NO_UNDERSCORES__
86 # define NO_UNDERSCORES
88 # undef NO_UNDERSCORES
91 #ifdef __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
92 # define HAVE_ASM_SET_DIRECTIVE
94 # undef HAVE_ASM_SET_DIRECTIVE
97 #ifdef __UCLIBC_ASM_GLOBAL_DIRECTIVE__
98 # define ASM_GLOBAL_DIRECTIVE __UCLIBC_ASM_GLOBAL_DIRECTIVE__
100 # define ASM_GLOBAL_DIRECTIVE .global
103 #ifdef __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
104 # define HAVE_ASM_WEAK_DIRECTIVE
106 # undef HAVE_ASM_WEAK_DIRECTIVE
109 #ifdef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
110 # define HAVE_ASM_WEAKEXT_DIRECTIVE
112 # undef HAVE_ASM_WEAKEXT_DIRECTIVE
115 #ifdef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__
116 # define HAVE_ASM_GLOBAL_DOT_NAME
118 # undef HAVE_ASM_GLOBAL_DOT_NAME
121 #if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
122 # define HAVE_WEAK_SYMBOLS
126 #ifndef C_SYMBOL_NAME
127 # ifdef NO_UNDERSCORES
128 # define C_SYMBOL_NAME(name) name
130 # define C_SYMBOL_NAME(name) _##name
135 # define ASM_LINE_SEP ;
138 #ifdef HAVE_ASM_GLOBAL_DOT_NAME
139 # ifndef C_SYMBOL_DOT_NAME
140 # if defined __GNUC__ && defined __GNUC_MINOR__ \
141 && (__GNUC__ << 16) + __GNUC_MINOR__ >= (3 << 16) + 1
142 # define C_SYMBOL_DOT_NAME(name) .name
144 # define C_SYMBOL_DOT_NAME(name) .##name
149 #ifndef __ASSEMBLER__
150 /* GCC understands weak symbols and aliases; use its interface where
151 possible, instead of embedded assembly language. */
153 /* Define ALIASNAME as a strong alias for NAME. */
154 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
155 # define _strong_alias(name, aliasname) \
156 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
158 /* This comes between the return type and function name in
159 a function definition to make that definition weak. */
160 # define weak_function __attribute__ ((weak))
161 # define weak_const_function __attribute__ ((weak, __const__))
163 # ifdef HAVE_WEAK_SYMBOLS
165 /* Define ALIASNAME as a weak alias for NAME.
166 If weak aliases are not available, this defines a strong alias. */
167 # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
168 # define _weak_alias(name, aliasname) \
169 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
171 /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
172 # define weak_extern(symbol) _weak_extern (weak symbol)
173 # define _weak_extern(expr) _Pragma (#expr)
177 # define weak_alias(name, aliasname) strong_alias(name, aliasname)
178 # define weak_extern(symbol) /* Nothing. */
182 #else /* __ASSEMBLER__ */
184 # ifdef HAVE_ASM_SET_DIRECTIVE
185 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
186 # define strong_alias(original, alias) \
187 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
188 .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP \
189 ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
190 .set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original)
191 # define strong_data_alias(original, alias) \
192 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
193 .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
195 # define strong_alias(original, alias) \
196 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
197 .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
198 # define strong_data_alias(original, alias) strong_alias(original, alias)
201 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
202 # define strong_alias(original, alias) \
203 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
204 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
205 ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
206 C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
207 # define strong_data_alias(original, alias) \
208 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
209 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
211 # define strong_alias(original, alias) \
212 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
213 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
214 # define strong_data_alias(original, alias) strong_alias(original, alias)
218 # ifdef HAVE_WEAK_SYMBOLS
219 # ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
220 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
221 # define weak_alias(original, alias) \
222 .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
223 .weakext C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
225 # define weak_alias(original, alias) \
226 .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
228 # define weak_extern(symbol) \
229 .weakext C_SYMBOL_NAME (symbol)
231 # else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
233 # ifdef HAVE_ASM_SET_DIRECTIVE
234 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
235 # define weak_alias(original, alias) \
236 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
237 .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original) ASM_LINE_SEP \
238 .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
239 .set C_SYMBOL_DOT_NAME (alias), C_SYMBOL_DOT_NAME (original)
241 # define weak_alias(original, alias) \
242 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
243 .set C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
245 # else /* ! HAVE_ASM_SET_DIRECTIVE */
246 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
247 # define weak_alias(original, alias) \
248 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
249 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
250 .weak C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
251 C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
253 # define weak_alias(original, alias) \
254 .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP \
255 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
258 # define weak_extern(symbol) \
259 .weak C_SYMBOL_NAME (symbol)
261 # endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
263 # else /* ! HAVE_WEAK_SYMBOLS */
265 # define weak_alias(original, alias) strong_alias(original, alias)
266 # define weak_extern(symbol) /* Nothing */
267 # endif /* ! HAVE_WEAK_SYMBOLS */
269 #endif /* __ASSEMBLER__ */
271 /* On some platforms we can make internal function calls (i.e., calls of
272 functions not exported) a bit faster by using a different calling
274 #ifndef internal_function
275 # define internal_function /* empty */
278 /* We want the .gnu.warning.SYMBOL section to be unallocated. */
279 #define __make_section_unallocated(section_string) \
280 __asm__ (".section " section_string "\n\t.previous");
282 /* Tacking on "\n\t#" to the section name makes gcc put it's bogus
283 section attributes on what looks like a comment to the assembler. */
284 #ifdef __sparc__ //HAVE_SECTION_QUOTES
285 # define __sec_comment "\"\n\t#\""
287 # define __sec_comment "\n\t#"
290 /* When a reference to SYMBOL is encountered, the linker will emit a
291 warning message MSG. */
292 #if defined(__cris__) || defined(__vax__)
293 # define link_warning(symbol, msg)
295 # define link_warning(symbol, msg) \
296 __make_section_unallocated (".gnu.warning." #symbol) \
297 static const char __evoke_link_warning_##symbol[] \
298 __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
302 /* Handling on non-exported internal names. We have to do this only
305 # define INTUSE(name) name##_internal
306 # define INTDEF(name) strong_alias (name, name##_internal)
307 # define INTVARDEF(name) \
308 _INTVARDEF (name, name##_internal)
309 # if defined HAVE_VISIBILITY_ATTRIBUTE
310 # define _INTVARDEF(name, aliasname) \
311 extern __typeof (name) aliasname __attribute__ ((alias (#name), \
312 visibility ("hidden")));
314 # define _INTVARDEF(name, aliasname) \
315 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
317 # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
318 # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
320 # define INTUSE(name) name
321 # define INTDEF(name)
322 # define INTVARDEF(name)
323 # define INTDEF2(name, newname)
324 # define INTVARDEF2(name, newname)
327 /* The following macros are used for PLT bypassing within libc.so
328 (and if needed other libraries similarly).
329 First of all, you need to have the function prototyped somewhere,
334 If calls to foo within libc.so should always go to foo defined in libc.so,
335 then in include/foo.h you add:
337 libc_hidden_proto (foo)
339 line and after the foo function definition:
345 libc_hidden_def (foo)
353 libc_hidden_weak (foo)
355 Similarly for global data. If references to foo within libc.so should
356 always go to foo defined in libc.so, then in include/foo.h you add:
358 libc_hidden_proto (foo)
360 line and after foo's definition:
362 int foo = INITIAL_FOO_VALUE;
363 libc_hidden_data_def (foo)
367 int foo = INITIAL_FOO_VALUE;
368 libc_hidden_data_weak (foo)
370 If foo is normally just an alias (strong or weak) to some other function,
371 you should use the normal strong_alias first, then add libc_hidden_def
378 strong_alias (baz, foo)
379 libc_hidden_weak (foo)
381 If the function should be internal to multiple objects, say ld.so and
382 libc.so, the best way is to use:
384 #if !defined NOT_IN_libc || defined IS_IN_rtld
388 in include/foo.h and the normal macros at all function definitions
389 depending on what DSO they belong to.
391 If versioned_symbol macro is used to define foo,
392 libc_hidden_ver macro should be used, as in:
394 int __real_foo (int __bar)
398 versioned_symbol (libc, __real_foo, foo, GLIBC_2_1);
399 libc_hidden_ver (__real_foo, foo) */
401 /* uClibc specific (the above comment was copied from glibc):
402 * a. when ppc64 will be supported, we need changes to support:
403 * strong_data_alias (used by asm hidden_data_def)
404 * b. libc_hidden_proto(foo) should be added after the header having foo's prototype
405 * or after extern foo... to all source files that should use the internal version
406 * of foo within libc, even to the file defining foo itself, libc_hidden_def does
407 * not hide __GI_foo itself, although the name suggests it (hiding is done exclusively
408 * by libc_hidden_proto). The reasoning to have it after the header w/ foo's prototype is
409 * to get first the __REDIRECT from original header and then create the __GI_foo alias
410 * c. no versioning support, hidden[_data]_ver are noop
411 * d. hidden_def() in asm is _hidden_strong_alias (not strong_alias) */
413 /* Arrange to hide uClibc internals */
414 #if defined __GNUC__ && defined __GNUC_MINOR__ && \
415 ( __GNUC__ >= 3 && __GNUC_MINOR__ >= 3 ) || __GNUC__ >= 4
416 # define attribute_hidden __attribute__ ((visibility ("hidden")))
417 # define __hidden_proto_hiddenattr(attrs...) __attribute__ ((visibility ("hidden"), ##attrs))
419 # define attribute_hidden
420 # define __hidden_proto_hiddenattr(attrs...)
423 #if /*!defined STATIC &&*/ !defined __BCC__
424 # ifndef __ASSEMBLER__
425 # define hidden_proto(name, attrs...) __hidden_proto (name, __GI_##name, ##attrs)
426 # define __hidden_proto(name, internal, attrs...) \
427 extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
428 __hidden_proto_hiddenattr (attrs);
429 # define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
430 # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
431 # define __hidden_asmname2(prefix, name) #prefix name
432 # define __hidden_ver1(local, internal, name) \
433 extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
434 extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local))))
435 # define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name);
436 # define hidden_data_ver(local, name) hidden_ver(local, name)
437 # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
438 # define hidden_data_def(name) hidden_def(name)
439 # define hidden_weak(name) \
440 __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
441 # define hidden_data_weak(name) hidden_weak(name)
443 # else /* __ASSEMBLER__ */
444 # ifdef HAVE_ASM_SET_DIRECTIVE
445 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
446 # define _hidden_strong_alias(original, alias) \
447 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
448 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
449 .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original) ASM_LINE_SEP \
450 ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
451 .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
452 .set C_SYMBOL_DOT_NAME (alias),C_SYMBOL_DOT_NAME (original)
454 # define _hidden_strong_alias(original, alias) \
455 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
456 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
457 .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
460 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
461 # define _hidden_strong_alias(original, alias) \
462 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
463 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
464 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP \
465 ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
466 .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
467 C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
469 # define _hidden_strong_alias(original, alias) \
470 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP \
471 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
472 C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
476 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
477 # define _hidden_weak_alias(original, alias) \
478 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
479 .hidden C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP \
480 weak_alias(original, alias)
482 # define _hidden_weak_alias(original, alias) \
483 .hidden C_SYMBOL_NAME (alias) ASM_LINE_SEP \
484 weak_alias(original, alias)
487 /* For assembly, we need to do the opposite of what we do in C:
488 in assembly gcc __REDIRECT stuff is not in place, so functions
489 are defined by its normal name and we need to create the
490 __GI_* alias to it, in C __REDIRECT causes the function definition
491 to use __GI_* name and we need to add alias to the real name.
492 There is no reason to use hidden_weak over hidden_def in assembly,
493 but we provide it for consistency with the C usage.
494 hidden_proto doesn't make sense for assembly but the equivalent
495 is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */
496 # define hidden_def(name) _hidden_strong_alias (name, __GI_##name)
497 # define hidden_weak(name) _hidden_weak_alias (name, __GI_##name)
498 # define hidden_ver(local, name) strong_alias (local, __GI_##name)
499 # define hidden_data_def(name) _hidden_strong_alias (name, __GI_##name)
500 # define hidden_data_weak(name) _hidden_weak_alias (name, __GI_##name)
501 # define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
502 # ifdef HAVE_ASM_GLOBAL_DOT_NAME
503 # define HIDDEN_JUMPTARGET(name) .__GI_##name
505 # define HIDDEN_JUMPTARGET(name) __GI_##name
507 # endif /* __ASSEMBLER__ */
509 # ifndef __ASSEMBLER__
510 # define hidden_proto(name, attrs...)
512 # define HIDDEN_JUMPTARGET(name) name
513 # endif /* Not __ASSEMBLER__ */
514 # define hidden_weak(name)
515 # define hidden_def(name)
516 # define hidden_ver(local, name)
517 # define hidden_data_weak(name)
518 # define hidden_data_def(name)
519 # define hidden_data_ver(local, name)
522 /* uClibc does not support versioning yet. */
523 #define versioned_symbol(lib, local, symbol, version) /* weak_alias(local, symbol) */
525 #define hidden_ver(local, name) /* strong_alias(local, __GI_##name) */
526 #undef hidden_data_ver
527 #define hidden_data_ver(local, name) /* strong_alias(local,__GI_##name) */
529 #if !defined NOT_IN_libc
530 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
531 # define libc_hidden_def(name) hidden_def (name)
532 # define libc_hidden_weak(name) hidden_weak (name)
533 # define libc_hidden_ver(local, name) hidden_ver (local, name)
534 # define libc_hidden_data_def(name) hidden_data_def (name)
535 # define libc_hidden_data_weak(name) hidden_data_weak (name)
536 # define libc_hidden_data_ver(local, name) hidden_data_ver (local, name)
538 # define libc_hidden_proto(name, attrs...)
539 # define libc_hidden_def(name)
540 # define libc_hidden_weak(name)
541 # define libc_hidden_ver(local, name)
542 # define libc_hidden_data_def(name)
543 # define libc_hidden_data_weak(name)
544 # define libc_hidden_data_ver(local, name)
547 #if defined NOT_IN_libc && defined IS_IN_rtld
548 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
549 # define rtld_hidden_def(name) hidden_def (name)
550 # define rtld_hidden_weak(name) hidden_weak (name)
551 # define rtld_hidden_ver(local, name) hidden_ver (local, name)
552 # define rtld_hidden_data_def(name) hidden_data_def (name)
553 # define rtld_hidden_data_weak(name) hidden_data_weak (name)
554 # define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
556 # define rtld_hidden_proto(name, attrs...)
557 # define rtld_hidden_def(name)
558 # define rtld_hidden_weak(name)
559 # define rtld_hidden_ver(local, name)
560 # define rtld_hidden_data_def(name)
561 # define rtld_hidden_data_weak(name)
562 # define rtld_hidden_data_ver(local, name)
565 #if defined NOT_IN_libc && defined IS_IN_libm
566 # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
567 # define libm_hidden_def(name) hidden_def (name)
568 # define libm_hidden_weak(name) hidden_weak (name)
569 # define libm_hidden_ver(local, name) hidden_ver (local, name)
570 # define libm_hidden_data_def(name) hidden_data_def (name)
571 # define libm_hidden_data_weak(name) hidden_data_weak (name)
572 # define libm_hidden_data_ver(local, name) hidden_data_ver (local, name)
574 # define libm_hidden_proto(name, attrs...)
575 # define libm_hidden_def(name)
576 # define libm_hidden_weak(name)
577 # define libm_hidden_ver(local, name)
578 # define libm_hidden_data_def(name)
579 # define libm_hidden_data_weak(name)
580 # define libm_hidden_data_ver(local, name)
583 #if defined NOT_IN_libc && defined IS_IN_libresolv
584 # define libresolv_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
585 # define libresolv_hidden_def(name) hidden_def (name)
586 # define libresolv_hidden_weak(name) hidden_weak (name)
587 # define libresolv_hidden_ver(local, name) hidden_ver (local, name)
588 # define libresolv_hidden_data_def(name) hidden_data_def (name)
589 # define libresolv_hidden_data_weak(name) hidden_data_weak (name)
590 # define libresolv_hidden_data_ver(local, name) hidden_data_ver (local, name)
592 # define libresolv_hidden_proto(name, attrs...)
593 # define libresolv_hidden_def(name)
594 # define libresolv_hidden_weak(name)
595 # define libresolv_hidden_ver(local, name)
596 # define libresolv_hidden_data_def(name)
597 # define libresolv_hidden_data_weak(name)
598 # define libresolv_hidden_data_ver(local, name)
601 #if defined NOT_IN_libc && defined IS_IN_librt
602 # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
603 # define librt_hidden_def(name) hidden_def (name)
604 # define librt_hidden_weak(name) hidden_weak (name)
605 # define librt_hidden_ver(local, name) hidden_ver (local, name)
606 # define librt_hidden_data_def(name) hidden_data_def (name)
607 # define librt_hidden_data_weak(name) hidden_data_weak (name)
608 # define librt_hidden_data_ver(local, name) hidden_data_ver (local, name)
610 # define librt_hidden_proto(name, attrs...)
611 # define librt_hidden_def(name)
612 # define librt_hidden_weak(name)
613 # define librt_hidden_ver(local, name)
614 # define librt_hidden_data_def(name)
615 # define librt_hidden_data_weak(name)
616 # define librt_hidden_data_ver(local, name)
619 #if defined NOT_IN_libc && defined IS_IN_libdl
620 # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
621 # define libdl_hidden_def(name) hidden_def (name)
622 # define libdl_hidden_weak(name) hidden_weak (name)
623 # define libdl_hidden_ver(local, name) hidden_ver (local, name)
624 # define libdl_hidden_data_def(name) hidden_data_def (name)
625 # define libdl_hidden_data_weak(name) hidden_data_weak (name)
626 # define libdl_hidden_data_ver(local, name) hidden_data_ver (local, name)
628 # define libdl_hidden_proto(name, attrs...)
629 # define libdl_hidden_def(name)
630 # define libdl_hidden_weak(name)
631 # define libdl_hidden_ver(local, name)
632 # define libdl_hidden_data_def(name)
633 # define libdl_hidden_data_weak(name)
634 # define libdl_hidden_data_ver(local, name)
637 #if defined NOT_IN_libc && defined IS_IN_libintl
638 # define libintl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
639 # define libintl_hidden_def(name) hidden_def (name)
640 # define libintl_hidden_weak(name) hidden_weak (name)
641 # define libintl_hidden_ver(local, name) hidden_ver (local, name)
642 # define libintl_hidden_data_def(name) hidden_data_def (name)
643 # define libintl_hidden_data_weak(name) hidden_data_weak (name)
644 # define libintl_hidden_data_ver(local, name) hidden_data_ver(local, name)
646 # define libintl_hidden_proto(name, attrs...)
647 # define libintl_hidden_def(name)
648 # define libintl_hidden_weak(name)
649 # define libintl_hidden_ver(local, name)
650 # define libintl_hidden_data_def(name)
651 # define libintl_hidden_data_weak(name)
652 # define libintl_hidden_data_ver(local, name)
655 #if defined NOT_IN_libc && defined IS_IN_libnsl
656 # define libnsl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
657 # define libnsl_hidden_def(name) hidden_def (name)
658 # define libnsl_hidden_weak(name) hidden_weak (name)
659 # define libnsl_hidden_ver(local, name) hidden_ver (local, name)
660 # define libnsl_hidden_data_def(name) hidden_data_def (name)
661 # define libnsl_hidden_data_weak(name) hidden_data_weak (name)
662 # define libnsl_hidden_data_ver(local, name) hidden_data_ver (local, name)
664 # define libnsl_hidden_proto(name, attrs...)
665 # define libnsl_hidden_def(name)
666 # define libnsl_hidden_weak(name)
667 # define libnsl_hidden_ver(local, name)
668 # define libnsl_hidden_data_def(name)
669 # define libnsl_hidden_data_weak(name)
670 # define libnsl_hidden_data_ver(local, name)
673 #if defined NOT_IN_libc && defined IS_IN_libutil
674 # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
675 # define libutil_hidden_def(name) hidden_def (name)
676 # define libutil_hidden_weak(name) hidden_weak (name)
677 # define libutil_hidden_ver(local, name) hidden_ver (local, name)
678 # define libutil_hidden_data_def(name) hidden_data_def (name)
679 # define libutil_hidden_data_weak(name) hidden_data_weak (name)
680 # define libutil_hidden_data_ver(local, name) hidden_data_ver (local, name)
682 # define libutil_hidden_proto(name, attrs...)
683 # define libutil_hidden_def(name)
684 # define libutil_hidden_weak(name)
685 # define libutil_hidden_ver(local, name)
686 # define libutil_hidden_data_def(name)
687 # define libutil_hidden_data_weak(name)
688 # define libutil_hidden_data_ver(local, name)
691 #if defined NOT_IN_libc && defined IS_IN_libcrypt
692 # define libcrypt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
693 # define libcrypt_hidden_def(name) hidden_def (name)
694 # define libcrypt_hidden_weak(name) hidden_weak (name)
695 # define libcrypt_hidden_ver(local, name) hidden_ver (local, name)
696 # define libcrypt_hidden_data_def(name) hidden_data_def (name)
697 # define libcrypt_hidden_data_weak(name) hidden_data_weak (name)
698 # define libcrypt_hidden_data_ver(local, name) hidden_data_ver (local, name)
700 # define libcrypt_hidden_proto(name, attrs...)
701 # define libcrypt_hidden_def(name)
702 # define libcrypt_hidden_weak(name)
703 # define libcrypt_hidden_ver(local, name)
704 # define libcrypt_hidden_data_def(name)
705 # define libcrypt_hidden_data_weak(name)
706 # define libcrypt_hidden_data_ver(local, name)
709 #if defined NOT_IN_libc && defined IS_IN_libpthread
710 # define libpthread_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
711 # define libpthread_hidden_def(name) hidden_def (name)
712 # define libpthread_hidden_weak(name) hidden_weak (name)
713 # define libpthread_hidden_ver(local, name) hidden_ver (local, name)
714 # define libpthread_hidden_data_def(name) hidden_data_def (name)
715 # define libpthread_hidden_data_weak(name) hidden_data_weak (name)
716 # define libpthread_hidden_data_ver(local, name) hidden_data_ver (local, name)
718 # define libpthread_hidden_proto(name, attrs...)
719 # define libpthread_hidden_def(name)
720 # define libpthread_hidden_weak(name)
721 # define libpthread_hidden_ver(local, name)
722 # define libpthread_hidden_data_def(name)
723 # define libpthread_hidden_data_weak(name)
724 # define libpthread_hidden_data_ver(local, name)
727 #endif /* libc-symbols.h */