]> granicus.if.org Git - json-c/commit
Add a check for the -Bsymbolic-functions linker flag
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 17 Sep 2013 12:08:14 +0000 (13:08 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 17 Sep 2013 12:08:14 +0000 (13:08 +0100)
commit311686f63ed26e510c50808977c31883fe7bc23d
tree951723742c4aaaefc7dd73b784420e3de974fb80
parent06450206c4f3de4af8d81bb6d93e9db1d5fedec1
Add a check for the -Bsymbolic-functions linker flag

The -Bsymbolic-functions linker flag reduces the amount of PLT jumps in
a shared object, and has a side effect of preventing symbol collisions
in libraries and applications linking against two different shared
objects exposing the same symbol.

While the former is (generally) a performance win, the latter is less
rare than expected. For instance, PulseAudio started linking against
json-c a while ago; now, every project linking against PulseAudio is
leaking json-c symbols. In the GNOME platform, this means that projects
linking against PulseAudio cannot be safely linked against other
libraries depending on the GLib-based JSON parsing libraries JSON-GLib,
because of a symbol conflict. Nominally, this conflict would not be an
issue: libraries and applications do not need to depend on two different
JSON parsing libraries; the symbol leakage, though, ends up causing
either segmentation faults, or weird errors. For further reference,
please see: https://bugzilla.gnome.org/show_bug.cgi?id=703734

JSON-GLib already switched to using -Bsymbolic-functions, but it would
be safe if json-c did the same, wherever the linker flag is available.
Makefile.am
configure.in