PB command line -- View DLL export Function

Source: Internet
Author: User

Author: wogoyixikexie @ gliet

To run dumpbin, use the following syntax:

DUMPBIN [options] files...

Specify one or more binary files, along with options required to control the information.

Dumpbin displays the information to standard output. You can redirect it to a file or use the/out option to specify a file name for the output.

When you run dumpbin on a file without specifying an option, dumpbin displays the/summary output.

When you type the commanddumpbinWithout other command-line input, dumpbin displays a usage statement that summarizes its options.

-- It seems that dumpbin can view a lot of file information, not just DLL.

 

Open the CMD window of build OS --> open release directory in the Pb menu and use dumpbin/exports XXX. dll

 

------------------------------------------------------

Now let's take a look at the meaning of some things in this image.

Text segments are mapped to read-only in memory, but. Data and. BSS are writable.
BSSIt is short for block started by symbol. It is usually a memory area used to store uninitialized global variables in the program. When the program is loaded, the kernel clears 0. BSS segment belongsStatic Memory Allocation. The initial value is determined by the user-defined connection location file.Defined in the read/write Ram ZoneThe memory allocated by malloc in the source program is this one, which is not determined based on the data size, mainly determined by the maximum memory allocated in the program at the same time, but if the range is exceeded, that is, the allocation fails. You can allocate the space after it is released.
TextSegment is the program code segment. In the at91 library, it indicates the size of the program segment, which is automatically calculated by the compiler during compilation and connection, when you place the symbol in the code segment in the Link location file, the value indicated by the symbol is the code segment size. when compiling the connection, the value represented by this symbol is automatically substituted into the source program.
DataContains static initialization data, soGlobal variables and static variables with initial values are in the Data zone.. The starting position of the segment is determined by the connection location file. The size is automatically allocated when the connection is compiled. It has nothing to do with the size of your program, but it is a global variable used by the program, constant quantity.
Stack/heap:
Stack)Save the local variables and parameters of the function. It is a data structure of "last in first out (LIFO)", which means that the data that is last put on the stack will be the first data that is removed from the stack. Lifo is an ideal data structure for temporary storage information and information that does not need to be stored for a long time. After a function or process is called, The system usually clears the local variables, function call information, and other information stored on the stack. Another important feature of stack is that its address space is "reduced down", that is, the more data stored on the stack, the lower the stack address. The top of the stack is at the end of the read/write Ram zone.
Heap)The storage function dynamically allocates memory, which is another data structure used to save program information. More accurately, it stores dynamic variables of the program. Heap is the first in first out (FIFO) data structure. It only allows data insertion at one end of the heap and Data removal at the other end. The heap address space is "Increased up", that is, the more data is stored on the heap, the higher the heap address.

----------- Found a master in the blog GardenRVAIn short, it is related to the PE file format and cannot be further analyzed.

Reference Translation

Frequently used terminology in PE formatRVA(Relative virtual address, relative virtual address ). RVA is the address after an item is loaded into the memory, minus the base address of the image file (that is, the offset starting from the base address after the file is loaded into the memory ). The RVA of an item is usually different from its location in the disk file. To calculate the position of an item whose RVA is R in the file, first search all sections in the PE file and find a section whose RVA is s and its length is L, if the file location of this section is P, the file location of the item can be given by P + (R-S.

 

Reprinted please indicate: The author wogoyixikexie @ gliet. Guilin University of Electronic Science and Technology Department 1 Association of Science and Technology, original address: Workshop.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.