needed to generate the linker. In other words, producing a linker qualified. A file requires two steps of AR and ranlib.Soon, the UNIX vendors found that ranlib do things can be integrated into AR, so the AR program upgrade version includes the function of Ranlib, But the makefile of many early projects have been generated in a two-step way. A, so in order to ensure the compatibility of these early files, Ranlib was preserved.Now, Gnu/linux system, R
command line option to control the specific behavior of AR. See the man manual of the GNU ar tool ).
In GNU, Ar is used to create the library file. A, but also provides a ranlib. From the manual, ranlib is equivalent to ar-S. Why?
This is because the earliest ar program on UNIX systems is simply used to Package Multiple. O to. A (something similar to tar) without processing the symbol table in. O. Linker program requiresThe. A file provides a compl
When there are frequently used modules in our program and such modules are also used in other programs, we should generate libraries based on the idea of software reuse, so that later programming can reduce the amount of development code. Here we will introduce the two commands AR and Nm for database operations.
1. Basic ar usage2. Basic usage commands of Nm
When there are frequently used modules in our pro
Use of AR and NM commands
When there are frequently used modules in our program and such modules are also used in other programs, we should generate libraries based on the idea of software reuse so that later programming can reduce R DCodeQuantity. Here we will introduce the two commands AR and Nm for database operations.
By wing, source: only_you
When there are frequently used modules in our program
Article For reprinted and reserved.
Link: http://dev.csdn.net/article/69/69405.shtm
When ourProgramThere are frequently used modules, and such modules are also used in other programs. In this case, according to the idea of software reuse, we should generate libraries for them so that later programming can reduce developmentCodeQuantity. Here we will introduce the two commands AR and Nm for database operations.
1. Basic ar usage2. Basic usage
When there are frequently used modules in our program and such modules are also used in other programs, we should generate libraries based on the idea of software reuse, so that later programming can reduce the amount of development code. Here we will introduce the two commands AR and Nm for database operations.
1. Basic ar usage2. Basic usage commands of Nm
When there are frequently used modules in our pro
When there are frequently used modules in our program and such modules are also used in other programs, we should generate libraries based on the idea of software reuse, so that later programming can reduce the amount of development code. Here we will introduce the two commands AR and Nm for database operations.
1. Basic ar usage
The ar command can be used to create and modify a database, or to propose a single module from the database. The library i
Linux program analysis tools: ldd and nm
Ldd and nm are two very practical program analysis tools in Linux. Among them, ldd is used to analyze the dynamic link library that the program depends on when running, and nm is used to view the symbol table information in the specified program.1 ldd
Format: ldd [options] file
Function: lists the shared libraries required
From: http://blog.csdn.net/longxin007/article/details/1880477
PrefaceIf common programming doesn't need to know these things, if you want to precisely control the format of your object file or you want to view the content in the object to make some judgment, just now you can look at the following tools in idea: objdump, nm, ar. Of course, this article cannot explain in detail their usage and functions. If you think this article is not clear enough, yo
NM command[In the content provided by the gnu c language library, an interface can be used to do this. Run the following command to View Details:Nm-D/lib/libc. so.6 | grep log]
The nm command is relatively simple and powerful. It is used to list various symbols in a target file. There are many types of symbols. The following are some common symbol types.
Use
Displays symbolic information about object files, executables, and object files libraries. Grammar
NM [-A] [-c] [-x {32|64|32_64|d64| any}] [-f] [-h] [-l] [-p] [-r] [-T] [-e] [-G |-u][-D |-o |-X |-tformat] File ... Description
The NM command displays information about the symbol in the specified file, which can be an object file, an executable file, or an object file library. If the file does not conta
The nm command can list the symbol tables in a function library file. It works for both static function libraries and shared function libraries. For a given function library, the NM command can list all the symbols defined in the function library, including the values and types of each symbol. You can also define the number of rows of the function (Symbol) in the original program. However, this requires tha
Excerpted from http://blog.csdn.net/solmyr_biti/article/details/6565479The NM command introduces many, but mostly does not describe the meaning of its function symbol flags.Most recently used in debugging a dynamic library, which uses the most:Nm-a * |grep "AAA" | C++filt//-A in order to display the file, C++filt converted to a readable style, as if there is a parameter to achieve similar functionsOther content is organized as follows (unknown to the
LDD and NM are two very useful program analysis tools under Linux. LDD is a tool used to analyze the dynamic-link library that the program runs on, and NM is the tool used to view the symbol table information in the specified program.
1 LDDFormat:ldd [options] FileFunction: Lists the shared libraries required for file runParameters:-D perform relocation and report all missing functions-R performs relo
a weak link symbol, and the other object file with the link has its definition, otherwise it is specified with a system-specific default value.
Note the points:
-C is always available for C + + compiled object files. Remember that there are overloads in C + +? To differentiate between overloaded functions, the C + + compiler appends information such as function return values/parameters to the function name to form a mangle symbol, which, when listed with this option, does an inver
specify a weak link symbol, and the other object file with the link has its definition, otherwise it is specified with a system-specific default value.
Note the points:
-C is always available for C + + compiled object files. Remember that there are overloads in C + +? To differentiate between overloaded functions, the C + + compiler appends information such as function return values/parameters to the function name to form a mangle symbol, which, when listed with this option, does
The LDD and NM described in this article are two useful tools for analyzing programs under Linux. LDD is a tool used to analyze the dynamic libraries that a program needs to rely on when it runs; nm is a tool for viewing the contents of a symbol table in a specified program. Here are some examples of these two tools:1. LDD, look at the following example, using LDD to see the dynamic library on which CS prog
through nm
To debug a function, you need to set a breakpoint. to ensure that the function does not repeat the symbols in the c library, add the unified prefix zif before the function is exported, to know that the breakpoint is to be debugged. which symbols are available for so? the nm command is no longer suitable. The nm command is used to list the symbols of t
Nm command problems-general Linux technology-Linux programming and kernel information, the following is a detailed description. Who can explain the meaning of the nm output items ??
Hello. c is the source file, and hello. o is the compiled file.
/* Hello. c */
# Include
Int main (int argc, char * argv [])
{
Printf ("Hello, World! \ N ");
Return 0;
}
The following content app
Tags: Head orm config OOP errors another SPL mat dial4.3. Metrology system DesignThe metrology loop should measure the position of the probe relative to the product within the measurement plane. The probe R and Z-positions should is measured with a maximum uncertainty of about NM, the product R and Z-position to About 5 nm and the tilt to about 0.1μrad.Figure 5.4 shows, the setup in which, the probe positio
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.