Revert "nds32: sync with binutils 2.37, gcc 11.2 and linux 5.10.93 changes"
[uclibc-ng.git] / include / libc-symbols.h
blob2254375ad9576b5ee861bd1f6b8c265af8a714c9
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, see
19 <http://www.gnu.org/licenses/>. */
21 #ifndef _LIBC_SYMBOLS_H
22 #define _LIBC_SYMBOLS_H 1
24 /* This is defined for the compilation of all C library code. features.h
25 tests this to avoid inclusion of stubs.h while compiling the library,
26 before stubs.h has been generated. Some library code that is shared
27 with other packages also tests this symbol to see if it is being
28 compiled as part of the C library. We must define this before including
29 config.h, because it makes some definitions conditional on whether libc
30 itself is being compiled, or just some generator program. */
31 #define _LIBC 1
34 /* This file's macros are included implicitly in the compilation of every
35 file in the C library by -imacros.
37 We include uClibc_arch_features.h which is defined by arch devs.
38 It should define for us the following symbols:
40 * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
41 * ASM_TYPE_DIRECTIVE_PREFIX with `@' or `#' or whatever for .type,
42 or leave it undefined if there is no .type directive.
43 * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
44 * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
45 * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
49 #include <bits/uClibc_arch_features.h>
51 /* Enable declarations of GNU extensions, since we are compiling them. */
52 #define _GNU_SOURCE 1
54 /* Prepare for the case that `__builtin_expect' is not available. */
55 #if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ < 96
56 # define __builtin_expect(x, expected_value) (x)
57 #endif
58 #ifndef likely
59 # define likely(x) __builtin_expect((!!(x)),1)
60 #endif
61 #ifndef unlikely
62 # define unlikely(x) __builtin_expect((!!(x)),0)
63 #endif
64 #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
65 # ifndef __cold
66 # define __cold __attribute__ ((__cold__))
67 # endif
68 # ifndef __hot
69 # define __hot __attribute__ ((__hot__))
70 # endif
71 #else
72 # ifndef __cold
73 # define __cold
74 # endif
75 # ifndef __hot
76 # define __hot
77 # endif
78 #endif
79 #ifndef __LINUX_COMPILER_H
80 # define __LINUX_COMPILER_H
81 #endif
82 #ifndef __cast__
83 # define __cast__(_to)
84 #endif
86 #if defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
87 # define attribute_optimize(x) __attribute__ ((optimize(x)))
88 #else
89 # define attribute_optimize(x)
90 #endif
92 #define attribute_unused __attribute__ ((unused))
94 #if defined __GNUC__ || defined __ICC
95 # define attribute_noreturn __attribute__ ((__noreturn__))
96 #else
97 # define attribute_noreturn
98 #endif
100 #define libc_freeres_ptr(decl) \
101 __make_section_unallocated ("__libc_freeres_ptrs, \"aw\", %nobits") \
102 decl __attribute__ ((section ("__libc_freeres_ptrs" __sec_comment)))
103 #define __libc_freeres_fn_section \
104 __attribute__ ((section ("__libc_freeres_fn")))
106 #ifndef NOT_IN_libc
107 # define IS_IN_libc 1
108 #endif
110 /* Indirect stringification. Doing two levels allows
111 * the parameter to be a macro itself.
113 #define __stringify_1(x...) #x
114 #define __stringify(x) __stringify_1(x)
116 #ifdef __UCLIBC_HAVE_ASM_SET_DIRECTIVE__
117 # define HAVE_ASM_SET_DIRECTIVE
118 #else
119 # undef HAVE_ASM_SET_DIRECTIVE
120 #endif
122 #ifdef __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__
123 # define HAVE_ASM_WEAK_DIRECTIVE
124 #else
125 # undef HAVE_ASM_WEAK_DIRECTIVE
126 #endif
128 #ifdef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__
129 # define HAVE_ASM_WEAKEXT_DIRECTIVE
130 #else
131 # undef HAVE_ASM_WEAKEXT_DIRECTIVE
132 #endif
134 #ifdef __UCLIBC_HAVE_ASM_CFI_DIRECTIVES__
135 # define HAVE_ASM_CFI_DIRECTIVES
136 #else
137 # undef HAVE_ASM_CFI_DIRECTIVES
138 #endif
140 #if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
141 # define HAVE_WEAK_SYMBOLS
142 #endif
144 #undef C_SYMBOL_NAME
145 #ifndef C_SYMBOL_NAME
146 # ifndef __UCLIBC_UNDERSCORES__
147 # define C_SYMBOL_NAME(name) name
148 # else
149 # define C_SYMBOL_NAME(name) _##name
150 # endif
151 #endif
153 #ifdef __UCLIBC_ASM_LINE_SEP__
154 # define ASM_LINE_SEP __UCLIBC_ASM_LINE_SEP__
155 #else
156 # define ASM_LINE_SEP ;
157 #endif
159 #ifndef __attribute_copy__
160 /* Provide an empty definition when cdefs.h is not included. */
161 # define __attribute_copy__(arg)
162 #endif
164 #ifndef __ASSEMBLER__
165 /* GCC understands weak symbols and aliases; use its interface where
166 possible, instead of embedded assembly language. */
168 /* Define ALIASNAME as a strong alias for NAME. */
169 # define strong_alias(name, aliasname) _strong_alias(name, aliasname)
170 # define _strong_alias(name, aliasname) \
171 extern __typeof (name) aliasname __attribute__ ((alias (#name))) __attribute_copy__ (name);
172 /* Same, but does not check for type match. Use sparingly.
173 Example: strong_alias(stat,stat64) may fail, this one works: */
174 # define strong_alias_untyped(name, aliasname) \
175 _strong_alias_untyped(name, aliasname)
176 # define _strong_alias_untyped(name, aliasname) \
177 extern __typeof (aliasname) aliasname __attribute__ ((alias (#name))) __attribute_copy__ (name);
179 # ifdef HAVE_WEAK_SYMBOLS
181 /* This comes between the return type and function name in
182 a function definition to make that definition weak. */
183 # define weak_function __attribute__ ((weak))
184 # define weak_const_function __attribute__ ((weak, __const__))
186 /* Define ALIASNAME as a weak alias for NAME.
187 If weak aliases are not available, this defines a strong alias. */
188 # define weak_alias(name, aliasname) _weak_alias (name, aliasname)
189 # define _weak_alias(name, aliasname) \
190 extern __typeof (name) aliasname __attribute__ ((weak, alias (#name))) __attribute_copy__ (name);
192 /* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined). */
193 # define weak_extern(symbol) _weak_extern (weak symbol)
194 # define _weak_extern(expr) _Pragma (#expr)
196 # else
198 # define weak_function /* empty */
199 # define weak_const_function __attribute__ ((__const__))
201 # define weak_alias(name, aliasname) strong_alias(name, aliasname)
202 # define weak_extern(symbol) /* Nothing. */
204 # endif
206 #else /* __ASSEMBLER__ */
208 # ifdef HAVE_ASM_SET_DIRECTIVE
209 # define strong_alias(original, alias) \
210 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
211 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
212 # define strong_data_alias(original, alias) strong_alias(original, alias)
213 # else
214 # define strong_alias(original, alias) \
215 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
216 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
217 # define strong_data_alias(original, alias) strong_alias(original, alias)
218 # endif
220 # ifdef HAVE_WEAK_SYMBOLS
221 # ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
222 # define weak_alias(original, alias) \
223 .weakext C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
224 # define weak_extern(symbol) \
225 .weakext C_SYMBOL_NAME(symbol)
227 # else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
229 # ifdef HAVE_ASM_SET_DIRECTIVE
230 # define weak_alias(original, alias) \
231 .weak C_SYMBOL_NAME(alias) ASM_LINE_SEP \
232 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
233 # else /* ! HAVE_ASM_SET_DIRECTIVE */
234 # define weak_alias(original, alias) \
235 .weak C_SYMBOL_NAME(alias) ASM_LINE_SEP \
236 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
237 # endif
238 # define weak_extern(symbol) \
239 .weak C_SYMBOL_NAME(symbol)
241 # endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
243 # else /* ! HAVE_WEAK_SYMBOLS */
245 # define weak_alias(original, alias) strong_alias(original, alias)
246 # define weak_extern(symbol) /* Nothing */
247 # endif /* ! HAVE_WEAK_SYMBOLS */
249 #endif /* __ASSEMBLER__ */
252 /* On some platforms we can make internal function calls (i.e., calls of
253 functions not exported) a bit faster by using a different calling
254 convention. */
255 #ifndef internal_function
256 # define internal_function /* empty */
257 #endif
260 /* We want the .gnu.warning.SYMBOL section to be unallocated. */
261 #define __make_section_unallocated(section_string) \
262 __asm__ (".section " section_string "\n\t.previous");
265 /* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus
266 section attributes on what looks like a comment to the assembler. */
267 #ifdef __sparc__ /* HAVE_SECTION_QUOTES */
268 # define __sec_comment "\"\n#APP\n\t#\""
269 #else
270 # define __sec_comment "\n#APP\n\t#"
271 #endif
274 /* When a reference to SYMBOL is encountered, the linker will emit a
275 warning message MSG. */
276 #define link_warning(symbol, msg) \
277 __make_section_unallocated (".gnu.warning." #symbol) \
278 static const char __evoke_link_warning_##symbol[] \
279 __attribute__ ((used, section (".gnu.warning." #symbol __sec_comment))) \
280 = msg;
282 /* Handling on non-exported internal names. We have to do this only
283 for shared code. */
284 #ifdef SHARED
285 # define INTUSE(name) name##_internal
286 # define INTDEF(name) strong_alias (name, name##_internal)
287 # define INTVARDEF(name) _INTVARDEF (name, name##_internal)
288 # if defined HAVE_VISIBILITY_ATTRIBUTE
289 # define _INTVARDEF(name, aliasname) \
290 extern __typeof (name) aliasname __attribute__ ((alias (#name), \
291 visibility ("hidden")));
292 # else
293 # define _INTVARDEF(name, aliasname) \
294 extern __typeof (name) aliasname __attribute__ ((alias (#name)));
295 # endif
296 # define INTDEF2(name, newname) strong_alias (name, newname##_internal)
297 # define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
298 #else
299 # define INTUSE(name) name
300 # define INTDEF(name)
301 # define INTVARDEF(name)
302 # define INTDEF2(name, newname)
303 # define INTVARDEF2(name, newname)
304 #endif
307 /* The following macros are used for PLT bypassing within libc.so
308 (and if needed other libraries similarly).
310 If calls to foo within libc.so should always go to foo defined in libc.so,
311 then in include/foo.h you add:
313 int foo(int __bar);
314 libc_hidden_proto(foo)
316 line and after the foo function definition:
318 int foo(int __bar) {
319 return __bar;
321 libc_hidden_def(foo)
325 int foo(int __bar) {
326 return __bar;
328 libc_hidden_weak(foo)
330 Similarly for global data: if references to foo within libc.so
331 should always go to foo defined in libc.so, then in include/foo.h:
333 extern int foo;
334 libc_hidden_proto(foo)
336 and after foo's definition:
338 int foo = INITIAL_FOO_VALUE;
339 libc_hidden_data_def(foo)
343 int foo = INITIAL_FOO_VALUE;
344 libc_hidden_data_weak(foo)
346 If foo is normally just an alias (strong or weak) to some other function,
347 you should use the normal strong_alias first, then add libc_hidden_def
348 or libc_hidden_weak:
350 int baz(int __bar) {
351 return __bar;
353 strong_alias(baz, foo)
354 libc_hidden_weak(foo)
356 If the function should be internal to multiple objects, say ld.so and
357 libc.so, the best way is to use:
359 #if !defined NOT_IN_libc || defined IS_IN_rtld
360 hidden_proto(foo)
361 #endif
363 in include/foo.h and the normal macros at all function definitions
364 depending on what DSO they belong to.
366 If versioned_symbol macro is used to define foo,
367 libc_hidden_ver macro should be used, as in:
369 int __real_foo(int __bar) {
370 return __bar;
372 versioned_symbol(libc, __real_foo, foo, GLIBC_2_1);
373 libc_hidden_ver(__real_foo, foo)
376 /* uClibc specific (the above comment was copied from glibc):
378 * when ppc64 will be supported, we need changes to support
379 * strong_data_alias (used by asm hidden_data_def)
381 * no versioning support, hidden[_data]_ver are noop
383 * hidden_def() in asm is _hidden_strong_alias (not strong_alias)
385 * libc_hidden_proto(foo) should be added after declaration
386 * in the header, or after extern foo... in all source files
387 * (this is discouraged).
388 * libc_hidden_def does not hide __GI_foo itself, although the name
389 * suggests it (hiding is done exclusively by libc_hidden_proto).
391 FIXME! - ?
392 * The reasoning to have it after the header w/ foo's prototype is
393 * to get first the __REDIRECT from original header and then create
394 * the __GI_foo alias
396 * Hunt for references which still go through PLT (example for x86):
397 * build shared lib, then disassemble it and search for <xxx@plt>:
398 * $ objdump -drx libuClibc-*.so >disasm.txt
399 * $ grep -F '@plt>:' disasm.txt
401 * In uclibc, malloc/free and related functions should be called
402 * through PLT (making it possible to use alternative malloc),
403 * and possibly some __pthread_xxx functions can be called through PLT
404 * (why?). The rest should not use PLT.
407 #if (defined __GNUC__ && defined __GNUC_MINOR__ \
408 && (( __GNUC__ >= 3 && __GNUC_MINOR__ >= 3) || __GNUC__ >= 4) \
409 ) || defined __ICC
410 # define attribute_hidden __attribute__ ((visibility ("hidden")))
411 # define attribute_protected __attribute__ ((visibility ("protected")))
412 # define __hidden_proto_hiddenattr(attrs...) __attribute__ ((visibility ("hidden"), ##attrs))
413 #else
414 # define attribute_hidden
415 # define attribute_protected
416 # define __hidden_proto_hiddenattr(attrs...)
417 #endif
419 #if /*!defined STATIC &&*/ !defined __BCC__
421 # ifndef __ASSEMBLER__
422 # define hidden_proto(name, attrs...) __hidden_proto(name, __GI_##name, ##attrs)
423 # define __hidden_proto(name, internal, attrs...) \
424 extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
425 __hidden_proto_hiddenattr (attrs);
426 # define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
427 # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
428 # define __hidden_asmname2(prefix, name) #prefix name
429 # define __hidden_ver1(local, internal, name) \
430 extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
431 extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local)))) \
432 __attribute_copy__ (name)
433 # define hidden_ver(local, name) __hidden_ver1(local, __GI_##name, name);
434 # define hidden_data_ver(local, name) hidden_ver(local, name)
435 # define hidden_def(name) __hidden_ver1(__GI_##name, name, name);
436 # define hidden_data_def(name) hidden_def(name)
437 # define hidden_weak(name) \
438 __hidden_ver1(__GI_##name, name, name) __attribute__((weak));
439 # define hidden_data_weak(name) hidden_weak(name)
441 # else /* __ASSEMBLER__ */
443 # ifdef HAVE_ASM_SET_DIRECTIVE
444 # define _hidden_strong_alias(original, alias) \
445 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
446 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
447 .set C_SYMBOL_NAME(alias),C_SYMBOL_NAME(original)
448 # else /* dont have .set directive */
449 # define _hidden_strong_alias(original, alias) \
450 .globl C_SYMBOL_NAME(alias) ASM_LINE_SEP \
451 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
452 C_SYMBOL_NAME(alias) = C_SYMBOL_NAME(original)
453 # endif
455 # define _hidden_weak_alias(original, alias) \
456 .hidden C_SYMBOL_NAME(alias) ASM_LINE_SEP \
457 weak_alias(original, alias)
459 /* For assembly, we need to do the opposite of what we do in C:
460 in assembly gcc __REDIRECT stuff is not in place, so functions
461 are defined by its normal name and we need to create the
462 __GI_* alias to it, in C __REDIRECT causes the function definition
463 to use __GI_* name and we need to add alias to the real name.
464 There is no reason to use hidden_weak over hidden_def in assembly,
465 but we provide it for consistency with the C usage.
466 hidden_proto doesn't make sense for assembly but the equivalent
467 is to call via the HIDDEN_JUMPTARGET macro instead of JUMPTARGET. */
468 # define hidden_def(name) _hidden_strong_alias (name, __GI_##name)
469 # define hidden_weak(name) _hidden_weak_alias (name, __GI_##name)
470 # define hidden_ver(local, name) strong_alias (local, __GI_##name)
471 # define hidden_data_def(name) _hidden_strong_alias (name, __GI_##name)
472 # define hidden_data_weak(name) _hidden_weak_alias (name, __GI_##name)
473 # define hidden_data_ver(local, name) strong_data_alias (local, __GI_##name)
474 # define HIDDEN_JUMPTARGET(name) __GI_##name
475 # endif /* __ASSEMBLER__ */
477 #else /* not SHARED */
479 # ifndef __ASSEMBLER__
480 # define hidden_proto(name, attrs...)
481 # else
482 # define HIDDEN_JUMPTARGET(name) name
483 # endif /* not __ASSEMBLER__ */
484 # define hidden_weak(name)
485 # define hidden_def(name)
486 # define hidden_ver(local, name)
487 # define hidden_data_weak(name)
488 # define hidden_data_def(name)
489 # define hidden_data_ver(local, name)
491 #endif /* SHARED / not SHARED */
494 /* uClibc does not support versioning yet. */
495 #define versioned_symbol(lib, local, symbol, version) /* weak_alias(local, symbol) */
496 #undef hidden_ver
497 #define hidden_ver(local, name) /* strong_alias(local, __GI_##name) */
498 #undef hidden_data_ver
499 #define hidden_data_ver(local, name) /* strong_alias(local,__GI_##name) */
501 #if !defined NOT_IN_libc
502 # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
503 # define libc_hidden_def(name) hidden_def (name)
504 # define libc_hidden_weak(name) hidden_weak (name)
505 # define libc_hidden_ver(local, name) hidden_ver (local, name)
506 # define libc_hidden_data_def(name) hidden_data_def (name)
507 # define libc_hidden_data_weak(name) hidden_data_weak (name)
508 # define libc_hidden_data_ver(local, name) hidden_data_ver (local, name)
509 #else
510 # define libc_hidden_proto(name, attrs...)
511 # define libc_hidden_def(name)
512 # define libc_hidden_weak(name)
513 # define libc_hidden_ver(local, name)
514 # define libc_hidden_data_def(name)
515 # define libc_hidden_data_weak(name)
516 # define libc_hidden_data_ver(local, name)
517 #endif
519 #if defined NOT_IN_libc && defined IS_IN_rtld
520 # define rtld_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
521 # define rtld_hidden_def(name) hidden_def (name)
522 # define rtld_hidden_weak(name) hidden_weak (name)
523 # define rtld_hidden_ver(local, name) hidden_ver (local, name)
524 # define rtld_hidden_data_def(name) hidden_data_def (name)
525 # define rtld_hidden_data_weak(name) hidden_data_weak (name)
526 # define rtld_hidden_data_ver(local, name) hidden_data_ver (local, name)
527 #else
528 # define rtld_hidden_proto(name, attrs...)
529 # define rtld_hidden_def(name)
530 # define rtld_hidden_weak(name)
531 # define rtld_hidden_ver(local, name)
532 # define rtld_hidden_data_def(name)
533 # define rtld_hidden_data_weak(name)
534 # define rtld_hidden_data_ver(local, name)
535 #endif
537 #if defined NOT_IN_libc && defined IS_IN_libm
538 # define libm_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
539 # define libm_hidden_def(name) hidden_def (name)
540 # define libm_hidden_weak(name) hidden_weak (name)
541 # define libm_hidden_ver(local, name) hidden_ver (local, name)
542 # define libm_hidden_data_def(name) hidden_data_def (name)
543 # define libm_hidden_data_weak(name) hidden_data_weak (name)
544 # define libm_hidden_data_ver(local, name) hidden_data_ver (local, name)
545 #else
546 # define libm_hidden_proto(name, attrs...)
547 # define libm_hidden_def(name)
548 # define libm_hidden_weak(name)
549 # define libm_hidden_ver(local, name)
550 # define libm_hidden_data_def(name)
551 # define libm_hidden_data_weak(name)
552 # define libm_hidden_data_ver(local, name)
553 #endif
555 #if defined NOT_IN_libc && defined IS_IN_librt
556 # define librt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
557 # define librt_hidden_def(name) hidden_def (name)
558 # define librt_hidden_weak(name) hidden_weak (name)
559 # define librt_hidden_ver(local, name) hidden_ver (local, name)
560 # define librt_hidden_data_def(name) hidden_data_def (name)
561 # define librt_hidden_data_weak(name) hidden_data_weak (name)
562 # define librt_hidden_data_ver(local, name) hidden_data_ver (local, name)
563 #else
564 # define librt_hidden_proto(name, attrs...)
565 # define librt_hidden_def(name)
566 # define librt_hidden_weak(name)
567 # define librt_hidden_ver(local, name)
568 # define librt_hidden_data_def(name)
569 # define librt_hidden_data_weak(name)
570 # define librt_hidden_data_ver(local, name)
571 #endif
573 #if defined NOT_IN_libc && defined IS_IN_libdl
574 # define libdl_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
575 # define libdl_hidden_def(name) hidden_def (name)
576 # define libdl_hidden_weak(name) hidden_weak (name)
577 # define libdl_hidden_ver(local, name) hidden_ver (local, name)
578 # define libdl_hidden_data_def(name) hidden_data_def (name)
579 # define libdl_hidden_data_weak(name) hidden_data_weak (name)
580 # define libdl_hidden_data_ver(local, name) hidden_data_ver (local, name)
581 #else
582 # define libdl_hidden_proto(name, attrs...)
583 # define libdl_hidden_def(name)
584 # define libdl_hidden_weak(name)
585 # define libdl_hidden_ver(local, name)
586 # define libdl_hidden_data_def(name)
587 # define libdl_hidden_data_weak(name)
588 # define libdl_hidden_data_ver(local, name)
589 #endif
591 #if defined NOT_IN_libc && defined IS_IN_libutil
592 # define libutil_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
593 # define libutil_hidden_def(name) hidden_def (name)
594 # define libutil_hidden_weak(name) hidden_weak (name)
595 # define libutil_hidden_ver(local, name) hidden_ver (local, name)
596 # define libutil_hidden_data_def(name) hidden_data_def (name)
597 # define libutil_hidden_data_weak(name) hidden_data_weak (name)
598 # define libutil_hidden_data_ver(local, name) hidden_data_ver (local, name)
599 #else
600 # define libutil_hidden_proto(name, attrs...)
601 # define libutil_hidden_def(name)
602 # define libutil_hidden_weak(name)
603 # define libutil_hidden_ver(local, name)
604 # define libutil_hidden_data_def(name)
605 # define libutil_hidden_data_weak(name)
606 # define libutil_hidden_data_ver(local, name)
607 #endif
609 #if defined NOT_IN_libc && defined IS_IN_libcrypt
610 # define libcrypt_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
611 # define libcrypt_hidden_def(name) hidden_def (name)
612 # define libcrypt_hidden_weak(name) hidden_weak (name)
613 # define libcrypt_hidden_ver(local, name) hidden_ver (local, name)
614 # define libcrypt_hidden_data_def(name) hidden_data_def (name)
615 # define libcrypt_hidden_data_weak(name) hidden_data_weak (name)
616 # define libcrypt_hidden_data_ver(local, name) hidden_data_ver (local, name)
617 #else
618 # define libcrypt_hidden_proto(name, attrs...)
619 # define libcrypt_hidden_def(name)
620 # define libcrypt_hidden_weak(name)
621 # define libcrypt_hidden_ver(local, name)
622 # define libcrypt_hidden_data_def(name)
623 # define libcrypt_hidden_data_weak(name)
624 # define libcrypt_hidden_data_ver(local, name)
625 #endif
627 #if defined NOT_IN_libc && defined IS_IN_libpthread
628 # define libpthread_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
629 # define libpthread_hidden_def(name) hidden_def (name)
630 # define libpthread_hidden_weak(name) hidden_weak (name)
631 # define libpthread_hidden_ver(local, name) hidden_ver (local, name)
632 # define libpthread_hidden_data_def(name) hidden_data_def (name)
633 # define libpthread_hidden_data_weak(name) hidden_data_weak (name)
634 # define libpthread_hidden_data_ver(local, name) hidden_data_ver (local, name)
635 #else
636 # define libpthread_hidden_proto(name, attrs...)
637 # define libpthread_hidden_def(name)
638 # define libpthread_hidden_weak(name)
639 # define libpthread_hidden_ver(local, name)
640 # define libpthread_hidden_data_def(name)
641 # define libpthread_hidden_data_weak(name)
642 # define libpthread_hidden_data_ver(local, name)
643 #endif
645 #endif /* libc-symbols.h */