mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-04 19:37:55 +00:00
Add linker version script to explicitly expose symbols. Refs #683
* When statically linking libstdc++ by default the symbols are all default visibility. This causes a problem if you statically link an old libstdc++ then inject librenderdoc.so, and the application starts using the old libstdc++ instead of the system's. * Really we only want to use the static one for calls from librenderdoc.so. In theory -Wl,--exclude-libs,libstdc++ should do this for us, but it starts to cause bizarre crashes. * Instead, we have to resort to a manual linker script which whitelists which symbols should be visible. Normally we can do this just for our own symbols with -fvisibility=hidden and __attribute__((visibility)) but that doesn't work for linked symbols apparently.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{
|
||||
global:
|
||||
_init;
|
||||
_fini;
|
||||
gl[A-Z]*;
|
||||
dlopen;
|
||||
_exit;
|
||||
RENDERDOC_*;
|
||||
VK_LAYER_RENDERDOC_*;
|
||||
local:
|
||||
*;
|
||||
};
|
||||
Reference in New Issue
Block a user