[OpenIndiana-discuss] shared libraries

Richard L. Hamilton rlhamil at smart.net
Thu Nov 20 04:31:50 UTC 2014


Not really - a static library is an archive of the individual .o files, a dynamic library isn’t - the text, data, and other sections of each of the .o files are merged by the linker to form a shared object, and I doubt enough information readily* exists in the result to separate them.

* You can probably disassemble the whole thing, clean up the result, edit out what you don’t want, and reassemble the parts you’re looking for, but that's not much like extracting something, and it’s certainly not automatic - you’d have to have a fair understanding of what you were looking at to do that.  And error-prone enough that it would take additional work to verify that you got it right.

On Nov 19, 2014, at 2:44 PM, cpforum <cpforum at orange.fr> wrote:

> Is it possible to extract object files (.o files) from a shared library (.so file) and how ?
> 
> (same thing as ar -x does it on a static library).
> 
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
> 




More information about the openindiana-discuss mailing list