I come across a strange issue when trying to cross compile a application for openwrt system after cross-compiled all the required libraries for my application (openssl, mdns, event2, curl, libweave, chromium, crypto, expat, gtest gmock), I got follow error during final linking.
I was able to compile my application with many other libraries and this issue only happens when I enable these new set of features and libraries into the the application.
Here is the error log:
{path1}/mipsel-openwrt-linux-uclibc/bin/ld: appName: hidden symbol `atexit' in {path1}/lib/uclibc_nonshared.a(atexit.os) is referenced by DSO
{path1}/mipsel-openwrt-linux-uclibc/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: * [appName] Error 1
make[1]: * [CMakeFiles/appName.dir/all] Error 2
make: * [all] Error 2
platform: RT288x/ RT5350/ VoCore, release version r46174
other information:
I am using Cmake to compile my project. A modified version of openwrt toolchain is built and used to gain access to the beta version of libevent.
According to Google results, this usually happens when x DSO is trying to access y DSO hidden symbol. On the other hand, 'atexit' doesn't always is hidden depending on the system.
I also try to built with V=s -j1 enabled, no additional information is printed..
also running: `objdump -t uclibc_nonshared.a | grep atexit` does indicate atexit is a global hidden symbol.
00000000 g F .text.atexit 00000030 .hidden atexit
Could someone let me know am I looking into the right direction?