Hello,
I have created a shared library(*.so) using the *.o object code files(C source code) using RVDS compiler on windows Host.
I link this shared object with a application(using gcc for arm target on linux host) and obtain a executable, which on running generates segmentation fault.(I know i have to debug it!)
Instead of creating shared library, if I create a static library with same source files, and then link with the application, and then execute the application it works fine as expected.
So my questions are:-
1.) Do i need to export symbols(functions exported to application) or any other symbols, explicitly, in my source file using some constructs so that it works fine when linked with an application? What is needed and how do i do that?
2.) How does shared library work?, i.e. will the addresses where the functions will be loaded and run, will be given in the library be given when library is created. How does application( main() ) resolve the addresses where the library functions are to be executed?
3.)How does static library work, i.e. how does this address specification and resolving happen in case of static library?
Thank You. -AD