deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:crosscompiler:backend_ppc:linker32

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
dev:crosscompiler:backend_ppc:linker32 [2015/04/18 08:38] – [Create System Table] ursgrafdev:crosscompiler:backend_ppc:linker32 [2022/12/20 11:33] (current) ursgraf
Line 5: Line 5:
   * Create system table   * Create system table
   * Create target image   * Create target image
 +When creating the target image or calculating a crc the endianess of the target platform has to be taken into account.
  
 ===== Initialization ===== ===== Initialization =====
Line 24: Line 25:
 When the system ist starting up, the [[dev:rts:start|Runtime System]] reads the start addresses of the constant block for all classes from the //System Table// (see below). With the predefined offset //cblkClinitAddrOffset// the address of the class constructor can be fetched in order to load a class. With another offset the heap manager can read the global references of this class. This information is used by the garbage collection. //codeBase// holds the start address of code of a class whereas //codeSize// is the size of the code. Methods, which are defined in the configuration as system methods and which are assigned a fixed offset are excluded from //codeSize// (Exception Handlers). When the system ist starting up, the [[dev:rts:start|Runtime System]] reads the start addresses of the constant block for all classes from the //System Table// (see below). With the predefined offset //cblkClinitAddrOffset// the address of the class constructor can be fetched in order to load a class. With another offset the heap manager can read the global references of this class. This information is used by the garbage collection. //codeBase// holds the start address of code of a class whereas //codeSize// is the size of the code. Methods, which are defined in the configuration as system methods and which are assigned a fixed offset are excluded from //codeSize// (Exception Handlers).
  
-In the compiler the constant block is modeled as linked list of ''ch.ntb.inf.deep.linker.ConstBlkEntry''. Depending on the type of entry one of the following classes is used.+In the compiler the constant block is modeled as linked list of ''org.deepjava.linker.ConstBlkEntry''. Depending on the type of entry one of the following classes is used.
   * **''AddressEntry''**: For entries representing an address.   * **''AddressEntry''**: For entries representing an address.
   * **''ConstantEntry''**: For entries representing a constant (StdConstant).   * **''ConstantEntry''**: For entries representing a constant (StdConstant).
Line 75: Line 76:
  
 ===== Fix Memory Map ===== ===== Fix Memory Map =====
-[{{  .:linker_code.png?350px&direct|Fixing the memory map}}]+[{{  dev:crosscompiler:linker_code.png?350px&direct|Fixing the memory map}}]
 In this step the code is placed in the memory, as well as the class variables and the constants. First, each class is assigned a memory segment for the code (''Class.codeSegment''), class variables (''Class.varSegment'') and constants (''Class.constSegment''). Which segments to use can be read from the configuration. The linker traverses the possible segments and choses a suitable one. While doing this, the used space of each segment is stored (''Segment.usedSize'') and the appropriate offsets are set (''Class.codeOffset'', ''Class.varOffset'' and ''Class.constOffset''). Arrays and interfaces must be handled as well. Further, the size of the segment for the system table has to be set and also the size of the segment for the global constant table.  In this step the code is placed in the memory, as well as the class variables and the constants. First, each class is assigned a memory segment for the code (''Class.codeSegment''), class variables (''Class.varSegment'') and constants (''Class.constSegment''). Which segments to use can be read from the configuration. The linker traverses the possible segments and choses a suitable one. While doing this, the used space of each segment is stored (''Segment.usedSize'') and the appropriate offsets are set (''Class.codeOffset'', ''Class.varOffset'' and ''Class.constOffset''). Arrays and interfaces must be handled as well. Further, the size of the segment for the system table has to be set and also the size of the segment for the global constant table. 
 Now, the base address of each used segment can be determined. \\ Now, the base address of each used segment can be determined. \\
dev/crosscompiler/backend_ppc/linker32.1429339104.txt.gz · Last modified: 2016/02/25 13:33 (external edit)