【操作系统】ass process & GDT

Assembler------link------execute   cycle

1.Source file---assembler-àobject file----linker--àexecutable file----os loader--àoutput

                   -àlisting file       -àmap file

We can know it’ll create the listing file while generating the object file and map while executable file.

Listing filea copy of the program’s source codesuitable for printing,with line numbers,offset address,translated machine code and a symble table

Map file a text file(extension MAP) that contains information about segments contained in a program being linked , it contains the following information

1.The exe module name ,which is the base name of the file.

2.The timestamp from the problem file header(not from the file system).

3.A list of segment groups in the problem,with each group’s start address,length ,group name and class.

4.A list of public symbols,with each address,symbol name,flat address ,and module where the sysbol is defined.

5.The address of the program’s entry point.

 

2.The segment register point to segment descriptor tables that the os uses to define the locations of individual program segments.

3.a typical Protect mode program has three segments:code,data,and stacks.

4.cs references the descriptor table for the code segment;

ds references the descriptor table for the data segment;

ss references the descriptor table for the stack segment;

5.GDT

   1.flat segment model

   You have to create at least two segments ,one for program code one for data,each segment is defined by a segment descriptor ,a 64-bit value stored in a table lnown as the globle descriptor table(GDT )

  

 

 

 

你可能感兴趣的:(File,table,extension,Descriptor,printing)