I have a bunch of static libraries and they are interdependent. I faced problems while linking those libraries for my target because of dependencies. As a workaround I created one single archive file from all the libraries.
One of the static library has constructor and destructor functions so does the combined archive (examined the archive using nm and objdump) But when I used the combined archive for my target the final binary does not contain the constructor and destructor functions.
I also tried with --whole-archive but this option doesn't seem to work for me (the binary size didn't increase).
Any ideas what might have gone wrong. Thank you