/[baselayout]/trunk/src/hidden-visibility.h
Gentoo

Contents of /trunk/src/hidden-visibility.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2598 - (show annotations) (download) (as text)
Fri Apr 13 14:18:38 2007 UTC (7 years, 7 months ago) by vapier
File MIME type: text/x-chdr
File size: 1045 byte(s)
add hidden visibility support to libeinfo as well
1 /*
2 * hidden-visibility.h
3 * Create hidden internal aliases so we dont have wasteful relocs.
4 * Copyright 2007 Gentoo Foundation
5 * Released under the GPLv2
6 */
7
8 #ifndef _HIDDEN_VISIBILITY_H_
9 #define _HIDDEN_VISIBILITY_H_
10
11 #if defined(__ELF__) && defined(__GNUC__)
12 # define __hidden_asmname(name) __hidden_asmname1 (__USER_LABEL_PREFIX__, name)
13 # define __hidden_asmname1(prefix, name) __hidden_asmname2(prefix, name)
14 # define __hidden_asmname2(prefix, name) #prefix name
15 # define __hidden_proto(name, internal) \
16 extern __typeof (name) name __asm__ (__hidden_asmname (#internal)) \
17 __attribute__ ((visibility ("hidden")));
18 # define __hidden_ver(local, internal, name) \
19 extern __typeof (name) __EI_##name __asm__(__hidden_asmname (#internal)); \
20 extern __typeof (name) __EI_##name __attribute__((alias (__hidden_asmname1 (,#local))))
21 # define hidden_proto(name) __hidden_proto(name, __RC_##name)
22 # define hidden_def(name) __hidden_ver(__RC_##name, name, name);
23 #else
24 # define hidden_proto(name)
25 # define hidden_def(name)
26 #endif
27
28 #endif

  ViewVC Help
Powered by ViewVC 1.1.20