Skip to content

Commit

Permalink
Use -Bsymbolic-functions instead of -Bsymbolic
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ebassi authored and nwnk committed May 17, 2018
1 parent 791b28c commit c00c889
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ libepoxy_la_SOURCES = \

libepoxy_la_LDFLAGS = \
-no-undefined \
-Bsymbolic \
-Bsymbolic-functions \
$()

libepoxy_la_LIBADD = \
Expand Down
4 changes: 2 additions & 2 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c00c889

Please sign in to comment.