Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public symbols stripped from plugins #22

Open
JeroMiya opened this issue May 31, 2016 · 0 comments
Open

Public symbols stripped from plugins #22

JeroMiya opened this issue May 31, 2016 · 0 comments

Comments

@JeroMiya
Copy link
Contributor

I'm not sure when this started happening, but in the current build all plugins are stripped of public symbols, including the plugin entry point. Thus, plugins are not working.

It doesn't appear to be related to any of the libfunctionality macros for the entry point itself. Even if you manually add a symbol to the plugin source, like so:

extern "C" __attribute__ ((visibility ("default"))) void checkForThisSymbol() {
    std::cout << "hello" << std::endl;
}

This symbol is still not visible from the output .so file:
image

Here is the link.txt of one of the plugins - it doesn't look out of the ordinary (unless I'm missing something):

C:\Users\Jeremy\Downloads\crystax-ndk-10.1.0\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64\bin\arm-linux-androideabi-g++.exe  -fPIC -fexceptions -frtti -Wno-psabi --sysroot=C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/platforms/android-16/arch-arm -funwind-tables -finline-limit=64 -fsigned-char -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fdata-sections -ffunction-sections -Wa,--noexecstack  -marm -fno-omit-frame-pointer -fno-strict-aliasing -O0 -g -DDEBUG -D_DEBUG  -Wl,--fix-cortex-a8 -Wl,--no-undefined -Wl,--gc-sections -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,muldefs  -shared -Wl,-soname, -o lib\osvr-plugins-0\libcom_osvr_android_sensorTracker.so CMakeFiles/com_osvr_android_sensorTracker.dir/com_osvr_android_sensorTracker.cpp.o  -LC:\Users\Jeremy\Downloads\crystax-ndk-10.1.0\sources\crystax\empty  -LC:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\libs\armeabi-v7a -landroid C:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\lib\libosvrPluginKit.so C:\Users\Jeremy\JeroMiya\OSVR-Android-Build-build\install\lib\libosvrUtil.so -Wl,-rpath-link,C:/Users/Jeremy/JeroMiya/OSVR-Android-Build-build/install/lib  "C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so" "C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libsupc++.a"  C:/Users/Jeremy/Downloads/crystax-ndk-10.1.0/sources/crystax/libs/armeabi-v7a/libcrystax.so -lc

Other built android .so files are not affected by this. Everything in libosvrClientKit.so for example is exported correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant