Security-server symbols hidden by default
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 18 Sep 2013 10:12:13 +0000 (12:12 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:13:22 +0000 (17:13 +0100)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] Security-server unnecessarily exports its symbols
[Cause] N/A
[Solution] Symbols hidden by default

[Verification] Successful compilation. Tests should pass as before. Security-server binary size should be ~50KB smaller.

Change-Id: Ifc82fc7dcae75a7619be0a416296d3835652aeef

CMakeLists.txt
src/CMakeLists.txt

index 84defdd..36b2c59 100644 (file)
@@ -43,10 +43,6 @@ SET(CMAKE_CXX_FLAGS_CCOV       "-g -std=c++0x -O2 --coverage")
 # (BJ: our ARM too?)
 ADD_DEFINITIONS("-fPIC")
 
-# Set the default ELF image symbol visibility to hidden - all symbols will be
-# marked with this unless overridden within the code.
-#ADD_DEFINITIONS("-fvisibility=hidden")
-
 # Set compiler warning flags
 ADD_DEFINITIONS("-Werror")                      # Make all warnings into errors.
 ADD_DEFINITIONS("-Wall")                        # Generate all warnings
index d7f7eef..d8e0c28 100644 (file)
@@ -32,7 +32,7 @@ SET(SECURITY_SERVER_SOURCES
 SET_SOURCE_FILES_PROPERTIES(
     ${SECURITY_SERVER_SOURCES}
     PROPERTIES
-        COMPILE_FLAGS "-D_GNU_SOURCE")
+        COMPILE_FLAGS "-D_GNU_SOURCE -fvisibility=hidden")
 
 INCLUDE_DIRECTORIES(SYSTEM
     ${SECURITY_SERVER_DEP_INCLUDE_DIRS}