top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to link 3 static library with shared library

0 votes

My static library is present on path /root/xxx/lib and contains libabc.a libefg.a liblmn.a file and my shared library is present in /root/xxx named as

I want to link shared library with static library. Please share the gcc command for the same.

posted Aug 8, 2013 by Deepankar Dubey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
answer Aug 8, 2013 by Seema Siddique
Similar Questions
+2 votes

Please share a sample program with detail code.

0 votes

How a particular installation type affects DPDK uses within a host ?

0 votes

I'm working with a project that needs on air reprogramming on a cortexm3 architecture with gcc 4.8.1, target arm-none-eabi.

The final outcome of the project would have to be a user application that relies on a shared library that I can dynamically update.

For the purpose, I'd need
- the shared library code to be position independent (all addresses and jumps should have to be relative and not absolute[right?]),
- the user application to be able to fetch the required symbols addresses from a table that allow library symbols remapping without the app having to be aware of that.

By fulfilling these requisites, I would have the user application rely on a fixed place symbols table, with a fixed number of symbols, that would target arbitrary locations. when updating the library I would
rewrite the symbols table with the new positions of the library functions in the memory. Relative addressing (position independency) would allow me to place the library at arbitrary position in flash while
preserving jumping instructions coherence.

0 votes

I'm inspecting a static library with nm, and I see that the tool provides me with the unresolved symbols of a file foo.o even though those symbols are defined in file zoo.o and both are included in the static library (ar rcs libmy.a zoo.o foo.o).

How can I ask nm to resolve these symbols if they can be found within the files of the archive and just report me about the other not resolved?