Merging multiple shared libraries into one is indeed practically impossible on all UNIXen, except AIX: the linker considers the .so a “final” product.
But merging archives into .so should not be a problem:
gcc -shared -o c.so -Wl,--whole-archive a.a b.a -Wl,--no-whole-archive
More Related Contents:
- Linking two shared libraries with some of the same symbols
- Build .so file from .c file using gcc command line
- Detecting 64bit compile in C
- Why do I have to define LD_LIBRARY_PATH with an export every time I run my application?
- How can a shared library (.so) call a function that is implemented in its loader code?
- Where is the header file on Linux? Why can’t I find ? [duplicate]
- In C how do you redirect stdin/stdout/stderr to files when making an execvp() or similar call?
- Working of fork() in linux gcc [duplicate]
- Where is PATH_MAX defined in Linux?
- What does the brk() system call do?
- What is the advantage of GCC’s __builtin_expect in if else statements?
- When / How does Linux load shared libraries into address space?
- Compilation fails with “relocation R_X86_64_32 against `.rodata.str1.8′ can not be used when making a shared object”
- Re-opening stdout and stdin file descriptors after closing them
- “undefined reference to `pow'” even with math.h and the library link -lm [duplicate]
- How Can I debug a C program on Linux?
- What are .a and .so files?
- Are there any platforms where using structure copy on an fd_set (for select() or pselect()) causes problems?
- How can I convert a file pointer ( FILE* fp ) to a file descriptor (int fd)?
- After forking, are global variables shared?
- Disable variable-length automatic arrays in gcc
- fd leak, custom Shell
- How can I include a needed C library using GCC?
- Implementation of sizeof operator
- calling assembly function from c
- How to set up a cron job to run an executable every hour?
- Building a shared library using gcc on Linux and MinGW on Windows
- Executing a shared library on Unix
- getrandom syscall in C not found
- argv: Sanitizing wildcards