From 7d7c187b4a12f1bb350e85cdb0115e19537cc704 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 5 Aug 2009 10:21:59 +0000 Subject: Declare RTS-private prototypes with __attribute__((visibility("hidden"))) This has no effect with static libraries, but when the RTS is in a shared library it does two things: - it prevents the function from being exposed by the shared library - internal calls to the function can use the faster non-PLT calls, because the function cannot be overriden at link time. --- rts/Threads.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rts/Threads.h') diff --git a/rts/Threads.h b/rts/Threads.h index d17235a2cb..e58b0db993 100644 --- a/rts/Threads.h +++ b/rts/Threads.h @@ -9,6 +9,8 @@ #ifndef THREADS_H #define THREADS_H +#pragma GCC visibility push(hidden) + StgTSO * unblockOne (Capability *cap, StgTSO *tso); StgTSO * unblockOne_ (Capability *cap, StgTSO *tso, rtsBool allow_migrate); @@ -27,4 +29,6 @@ void printAllThreads (void); void printThreadQueue (StgTSO *t); #endif +#pragma GCC visibility pop + #endif /* THREADS_H */ -- cgit v1.2.1