Commit 8dc4dd6a authored by Lukáš Hrázký's avatar Lukáš Hrázký Committed by Frediano Ziglio

Export symbols in the binary to use by the plugins

This commits adds the -export-dynamic linker flag to export dynamic
symbols to be used by the streaming agent's plugins. It also adds the
-fvisibility=hidden compiler flag to hide all symbols by default (along
with -fvisibility-inline-hidden for C++ inline functions).

Then it adds the visibility("default") attribute to the namespace
containing the Error class, as that one needs to be exported and have
its typeinfo defined for exception catching to work.
Signed-off-by: Lukáš Hrázký's avatarLukáš Hrázký <lhrazky@redhat.com>
Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
parent a36fdfef
Pipeline #11141 passed with stage
in 2 minutes and 58 seconds
......@@ -11,7 +11,7 @@
#include <string>
namespace spice {
namespace spice __attribute__ ((visibility ("default"))) {
namespace streaming_agent {
class Error : public std::runtime_error
......
......@@ -22,10 +22,13 @@ AM_CPPFLAGS = \
$(NULL)
AM_CFLAGS = \
-fvisibility=hidden \
$(WARN_CFLAGS) \
$(NULL)
AM_CXXFLAGS = \
-fvisibility=hidden \
-fvisibility-inlines-hidden \
$(WARN_CXXFLAGS) \
$(NULL)
......@@ -38,6 +41,7 @@ libstreaming_utils_a_SOURCES = \
$(NULL)
spice_streaming_agent_LDFLAGS = \
-export-dynamic \
$(RELRO_LDFLAGS) \
$(NO_INDIRECT_LDFLAGS) \
$(NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment