Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, We are trying to migrate our Solaris Soft OSE application to Linux. We use the dynamically linked options of the soft ose in our application. We are facing plenty ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    5

    Problem in Loading a shared object in Linux


    Hi,

    We are trying to migrate our Solaris Soft OSE application to Linux.
    We use the dynamically linked options of the soft ose in our
    application.
    We are facing plenty of unresolved symbol problems while
    trying to load the ".so".
    These symbols are present in the libsoftose.a. for e.g
    'receie_w_tmo', 'alloc' etc".
    My guess, It so seems that the symbols present in
    libsoftose.a are not exported to the Dynamic libraries.


    we have a binary ( bulit on soft ose) which loads a shared object (built on softose).
    implies i use SEPARATELY_LINKED( YES ) in the osemain.con of the shared object.
    We include the library libsoftose.a in the binary.

    Now, with linux, when i load the shared object ( i use dlopen()) the linker on linux
    complains that the symbols like recieve_w_tmo, alloc etc present in shared object as unresolved.
    This does not happen on solaris.

    After a bit of study, in linux, i found that the symbols present in binary
    are not exported to dynamic link tables unless we give -Wl,-E option to gcc.
    Even after doing this, i am not able to overcome the problem.

    I suspect that symbols present in libsoftose.a library are not exported to
    dynmaic link tables which are used when we dlopen the shared object.

    Hope iam clear with the problem.

    Any pointers would be really helpful.

    Regards
    Phani Kumar Reddy.A
    phanikumar.ankireddy@tcs.com

  2. #2
    Linux Newbie
    Join Date
    May 2005
    Location
    Chennai,TamilNadu, India
    Posts
    141
    Could you give the gcc command you are using....
    since i think i am also doing the same thing in linux without any problem


    For me it was like this

    # Output File
    TARGET = ../macubex/libURMArecaHwRaid.mod.so

    # Libraries to be linked
    LIBS = -lpthread -lc -lm -L ../../CoreBin/Arclib32



    where u can see my TARGET is the .so file which contains references to the Arclib32.a

    give the correct path of the Arclib32.a in the makefile ( in ur case libsoftose.a)

    U can use the $(TARGET) and $(LIBS) in the your gcc command.

    I guess it should work alright for ur unresolved symbols problem

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •