In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what the la file in linux refers to". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what the la file in linux refers to".
In linux, la is a library file compiled using libtool, a text file that records information about dynamic and static libraries of the same name; it is the only file saved between platforms through libtool. Libtool is a common library support script that only works with libtool files with suffixes of lo and la.
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What is the la file in linux
La: the library file compiled using libtool is actually a text file that records information about dynamic and static libraries of the same name.
How libtool works
Libtool is a common library support script that hides the complexity of using dynamic libraries in a unified, portable interface; using libtool's standard approach, dynamic libraries can be created and invoked on different platforms. You can think of libtool as an abstraction of gcc, which wraps gcc (or other compilers). Users don't need to know the details, just tell libtool which libraries need to be compiled, and libtool will handle library dependencies and other details. Libtool only deals with libtool files with suffixes of lo and la.
Expand knowledge:
What is the difference between so, o, lo, a, and la files under linux?
O: compiled object file
A: a static library is actually a package of several o files
So: dynamic link libraries (shared libraries)
Lo: the object file compiled using libtool is actually adding some information to the o file.
One of the main functions of libtool is to solve the problem of library dependency in the process of compiling large-scale software, and to undertake the heavy maintenance of library dependency, thus releasing the human resources of programmers. Libtool provides a unified interface, hides the differences in the names of libraries between different platforms, generates an abstract suffix named la high-level library libxx.la (actually a text file), and writes the dependencies of the library on other libraries in the la file. The dependency_libs in this file records all libraries that the library depends on (some of which are added as .la files); libdir indicates where the library is installed; library_names records the name of the shared library; and old_library records the name of the static library.
When the compilation process reaches the link phase, if you have the following command:
$libtool-- mode=link gcc-o myprog-rpath / usr/lib-L/usr/lib-la
Libtool looks for liba.la under the / usr/lib path, then reads the name of the actual shared library (such as liba.so in library_names) and the path (recorded in lib_dir, such as libdir='/usr/lib'), and returns parameters such as / usr/lib/liba.so to the fired gcc command line.
If liba.so depends on the library / usr/lib/libb.so, there will be lines of dependency_libs='-L/usr/lib-lb' or dependency_libs='/usr/lib/libb.la' in liba.la, and in the case of the former, it will directly pass "- L/usr/lib-lb" as an argument to the gcc command line If it is the latter, libtool will read the library name and path of the actual libb.so from / usr/lib/libb.la, and then pass it to the gcc command line as a parameter "/ usr/lib/libb.so".
Thank you for your reading, these are the contents of "what does the la file in linux refer to?" after the study of this article, I believe you have a deeper understanding of what the la file in linux refers to, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.