o: 编译的目标文件
a: 静态库,其实就是把若干o文件打了个包
so: 动态链接库(共享库)
lo: 使用libtool编译出的目标文件,其实就是在o文件中添加了一些信息
la: 使用libtool编译出的库文件,其实是个文本文件,记录同名动态库和静态库的相关信息
The ‘.lo’ file is a library object, which may be built into a shared library, and the ‘.o’ file is a standard object file
The .lo file is the libtool object, which Libtool uses to determine what object file may be built into a shared library
这里说明,.lo文件是libtool生成的文件,被libtool用来生成共享库的;而.o 文件是标准的目标文件。
Shared libraries, however, may only be built from position-independent code (PIC). So, special flags must be passed to the compiler to tell it to generate PIC rather than the standard position-dependent code.
Since this is a library implementation detail, libtool hides the complexity of PIC compiler flags by using separate library object files (which end in ‘.lo’ instead of ‘.o’). On systems without shared libraries (or without special PIC compiler flags), these library object files are identical to “standard” object files.
这里说明,原来的共享库是编自PIC(position-independent code,位置无关)的代码,这是一个实现的细节,libtool隐藏了PIC的flag的复杂性,而采用了分离的库对象文件,以“.lo”代替“.o”结尾。在不需要共享库的系统上,这些库文件等同于标准的目标文件(即.o文件)。