summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-05-17 14:19:36 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-05-17 14:19:36 +0100
commitb80d4bfb1aed95c7b9062e1c82ba4cd4ceb3a2fa (patch)
treeeb7cd19d08e3f8262ed0a7a435f31519a0c1aa52
parent6f40a0be430a7109825489e5bddafb03d157471b (diff)
downloadlibepoxy-use-symbolic-functions.tar.gz
Use -Bsymbolic-functions instead of -Bsymbolicuse-symbolic-functions
Epoxy updates the function pointers in order to avoid calling the resolver multiple times, but with -Bsymbolic we're going to update the copy inside libepoxy, instead of the relocated copy in the code using libepoxy. This leads to libepoxy constantly querying the function resolver code instead of just once. We still want to avoid intra-library relocations for our functions, but we need to live with them for our global function pointers. See issue #171
-rw-r--r--src/Makefile.am2
-rw-r--r--src/meson.build4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 419fbb4..73f7435 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -116,7 +116,7 @@ libepoxy_la_SOURCES = \
libepoxy_la_LDFLAGS = \
-no-undefined \
- -Bsymbolic \
+ -Bsymbolic-functions \
$()
libepoxy_la_LIBADD = \
diff --git a/src/meson.build b/src/meson.build
index 49907fa..466fc0d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -51,9 +51,9 @@ common_ldflags = []
if host_system == 'linux' and cc.get_id() == 'gcc'
if meson.version().version_compare('>= 0.46.0')
- common_ldflags += cc.get_supported_link_arguments([ '-Wl,-Bsymbolic', '-Wl,-z,relro' ])
+ common_ldflags += cc.get_supported_link_arguments([ '-Wl,-Bsymbolic-functions', '-Wl,-z,relro' ])
else
- common_ldflags += [ '-Wl,-Bsymbolic', '-Wl,-z,relro', ]
+ common_ldflags += [ '-Wl,-Bsymbolic-functions', '-Wl,-z,relro', ]
endif
endif