Set symbol visibility to hidden.

Not doing so may cause all sorts of random libraries to expose
libcompiler_rt's functions, which should of course not be done.

Discussed with:	kan, kib
This commit is contained in:
Ed Schouten 2010-11-11 16:53:25 +00:00
parent dffa73fb38
commit a189633748
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@
#ifdef VISIBILITY_HIDDEN
#define DEFINE_COMPILERRT_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
.private_extern SYMBOL_NAME(name) SEPARATOR \
.hidden SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#else
#define DEFINE_COMPILERRT_FUNCTION(name) \
@ -43,12 +43,12 @@
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \
.globl SYMBOL_NAME(name) SEPARATOR \
.private_extern SYMBOL_NAME(name) SEPARATOR \
.hidden SYMBOL_NAME(name) SEPARATOR \
SYMBOL_NAME(name):
#define DEFINE_COMPILERRT_PRIVATE_FUNCTION_UNMANGLED(name) \
.globl name SEPARATOR \
.private_extern name SEPARATOR \
.hidden name SEPARATOR \
name:
#endif /* COMPILERRT_ASSEMBLY_H */

View File

@ -6,7 +6,7 @@ LIB= compiler_rt
NO_PIC=
WARNS?= 2
CFLAGS+=${PICFLAG}
CFLAGS+=${PICFLAG} -fvisibility=hidden -DVISIBILITY_HIDDEN
.if ${MACHINE_CPUARCH} == "amd64"
CRTARCH=x86_64