deep

a Cross Development Platform for Java

User Tools

Site Tools


dev:crosscompiler:backend: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
Next revisionBoth sides next revision
dev:crosscompiler:backend:linker32 [2018/10/16 16:20] – [Calculate Size and Offsets] ursgrafdev:crosscompiler:backend:linker32 [2021/07/29 11:31] – [Create System Table] ursgraf
Line 56: Line 56:
 ===== Calculate Size and Offsets ===== ===== Calculate Size and Offsets =====
 [{{  dev:crosscompiler:linker_code_methods.png?350px&direct|Machine Code: Size and Offsets}}] [{{  dev:crosscompiler:linker_code_methods.png?350px&direct|Machine Code: Size and Offsets}}]
-Before the memory map can be fixed, a couple sizes and offsets must be calculated for each class: +Before the memory map can be fixed, a couple of sizes and offsets must be calculated for each class: 
-  * ''void calculateCodeSizeAndOffsets(Class)'': This methods determines the size of the machine code of the whole class and sets the field //offset// of each method of this class. //offset// is the byte offset of the machine code of a method in the memory starting from the start address of the code of this class. If a method offset is given by the configuration (e.g. exception handlers), then this method is not included in the calculation of the code size. The offset given by the configuration is not relative to the base of a class but to the base of the appropriate segment.+  * ''void calculateCodeSizeAndOffsets(Class)'': This methods determines the size of the machine code of the whole class and sets the field //offset// of each method of this class. //offset// is the byte offset of the machine code of a method in the memory relative to the start address of the code of this class. If a method offset is given by the configuration (e.g. exception handlers), then this method is not included in the calculation of the code size. The offset given by the configuration is not relative to the base of a class but to the base of the appropriate segment.
   * ''void calculateGlobalConstantTableSize()'': This method calculates the size of the global constant table.   * ''void calculateGlobalConstantTableSize()'': This method calculates the size of the global constant table.
  
Line 64: Line 64:
   - The system runs from the flash   - The system runs from the flash
   - The system runs from the RAM.   - The system runs from the RAM.
-  - The base system is in the flash. Further classes are later loaded into the RAM. This case needs two system tables. The flash holds a system table which contains only classes which are present in the flash. The system table in the RAM must hold all classes. IMPORTANT This feature is not implemented yet IMPORTANT+  - The base system is in the flash. Further classes are later loaded into the RAM. This case needs two system tables. The flash holds a system table which contains only classes which are present in the flash. The system table in the RAM must hold all classes. <WRAP center round important 60%> 
 +This feature is not implemented yet 
 +</WRAP> 
  
 In the compiler the system table is modeled as list. as elements it uses the same blocks as for the constant block. Additionally ''SysTabEntry'' is used to reference the constant block of a class. In the compiler the system table is modeled as list. as elements it uses the same blocks as for the constant block. Additionally ''SysTabEntry'' is used to reference the constant block of a class.
dev/crosscompiler/backend/linker32.txt · Last modified: 2022/12/20 10:00 by ursgraf