Use -Bsymbolic-functions instead of -Bsymbolic

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
macos/v1.5.9
Emmanuele Bassi 7 years ago committed by Adam Jackson
parent 791b28c186
commit c00c889e62
  1. 2
      src/Makefile.am
  2. 4
      src/meson.build

@ -116,7 +116,7 @@ libepoxy_la_SOURCES = \
libepoxy_la_LDFLAGS = \ libepoxy_la_LDFLAGS = \
-no-undefined \ -no-undefined \
-Bsymbolic \ -Bsymbolic-functions \
$() $()
libepoxy_la_LIBADD = \ libepoxy_la_LIBADD = \

@ -51,9 +51,9 @@ common_ldflags = []
if host_system == 'linux' and cc.get_id() == 'gcc' if host_system == 'linux' and cc.get_id() == 'gcc'
if meson.version().version_compare('>= 0.46.0') 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 else
common_ldflags += [ '-Wl,-Bsymbolic', '-Wl,-z,relro', ] common_ldflags += [ '-Wl,-Bsymbolic-functions', '-Wl,-z,relro', ]
endif endif
endif endif

Loading…
Cancel
Save