liboniondebug.so does not contain any symbols



  • I'm doing a build on an omega2, (using the USB for extra storage). When I tried linking my project with the /usr/lib/liboniondebug.so library that was installed using opkg install I got an error that the onionPrint symbol is unresolved.

    If I try to list the symbols in /usr/lib/liboniondebug.so the results are:

    root@Omega-B82F:/# nm -Ca /usr/lib/liboniondebug.so
    nm -Ca /usr/lib/liboniondebug.so
    nm: /usr/lib/liboniondebug.so: no symbols
    root@Omega-B82F:/# ls -l /usr/lib/liboniondebug.so
    -rwxr-xr-x 1 root root 2091 Feb 2 2017 /usr/lib/liboniondebug.so

    If I build the liboniondebug.so as part of the git repo for i2c-exp-driver the size is:
    root@Omega-B82F:/# ls -l /git/i2c-exp-driver/lib/liboniondebug.so
    -rwxr-xr-x 1 root root 7552 Oct 29 01:52 /git/i2c-exp-driver/lib/liboniondebug.so

    and if I list the symbols:
    root@Omega-B82F:/# nm -Ca /git/i2c-exp-driver/lib/liboniondebug.so
    00000000 a
    00000118 r .MIPS.abiflags
    000009c0 t .MIPS.stubs
    00010a90 b .bss
    00000000 n .comment
    00010a30 d .ctors
    00000000 N .debug_abbrev
    00000000 N .debug_aranges
    00000000 N .debug_frame
    00000000 N .debug_info
    00000000 N .debug_line
    00000000 N .debug_str
    00010a38 d .dtors
    00000148 r .dynamic
    00000420 r .dynstr
    000002d0 r .dynsym
    00000a2c r .eh_frame
    000009e0 t .fini
    00000000 n .gnu.attributes
    00000540 r .gnu.version
    0000056c r .gnu.version_r
    00010a40 d .got
    00000230 r .hash
    0000059c t .init
    00000000 n .mdebug.abi32
    00000000 n .pdr
    00000130 r .reginfo
    0000058c r .rel.dyn
    00010a88 s .sbss
    00010a84 g .sdata
    00000620 t .text
    00000000 a /usr/lib/gcc/mipsel-openwrt-linux-musl/5.4.0/crtbeginS.o
    00000000 a /usr/lib/gcc/mipsel-openwrt-linux-musl/5.4.0/crtendS.o
    00000148 a _DYNAMIC
    00010a40 a GLOBAL_OFFSET_TABLE
    w _ITM_deregisterTMCloneTable
    w _ITM_registerTMCloneTable
    000009c0 t MIPS_STUBS
    00010a34 d CTOR_END
    00010a30 d CTOR_LIST
    00010a3c d DTOR_END
    00010a38 d DTOR_LIST
    00000a2c r EH_FRAME_BEGIN
    00000a2c r FRAME_END
    00010a40 d TMC_END
    00010a88 S __bss_start
    w __cxa_finalize
    w __deregister_frame_info@@GLIBC_2.0
    00000960 t __do_global_ctors_aux
    000006c0 t __do_global_dtors_aux
    00010a84 g __dso_handle
    w __register_frame_info@@GLIBC_2.0
    00010a88 G _edata
    00010ab0 B _end
    00010a88 S _fbss
    00010a40 D _fdata
    000009e0 T _fini
    00000620 T _ftext
    00018a30 d _gp
    00018a30 A _gp_disp
    0000059c T _init
    00010a90 b completed.4816
    00000620 t deregister_tm_clones
    00010a94 b dtor_idx.4818
    000007e4 t frame_dummy
    00010a98 b object.4828
    00000884 T onionGetVerbosity
    000008bc T onionPrint
    00000840 T onionSetVerbosity
    00010a88 S onionVerbosityLevel
    0000066c t register_tm_clones
    00000000 a src/lib/onion-debug.c
    U vprintf
    root@Omega-B82F:/#



  • I had this exact problem and I'd also be very thankful for information on this! For the life of me I couldn't get any C programs to link against the .so files that are installable on the Omega2+. I always had to recompile or cross-compile every library myself (SPI, I2C, ALSA,..) to get the linker to work.

    Another interesting thing is that when you do file libonionspi.so it will say ELF 32-bit LSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, corrupted section header size.

    As a work-around, I've uploaded the recompiled binaries at https://github.com/gamer-cndg/omega2-libs. But it feels like I'm missing something here that would allow for a successful linking with the preinstalled .so files.. Maybe a missing linker flag?


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.