This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:crosscompiler:backend_ppc:linker32 [2015/04/18 08:37] – ursgraf | dev: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: | When the system ist starting up, the [[dev: | ||
- | In the compiler the constant block is modeled as linked list of '' | + | In the compiler the constant block is modeled as linked list of '' |
* **'' | * **'' | ||
* **'' | * **'' | ||
Line 54: | Line 55: | ||
===== Calculate Size and Offsets ===== | ===== Calculate 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 sizes and offsets must be calculated for each class: | ||
* '' | * '' | ||
Line 60: | Line 61: | ||
===== Create System Table ===== | ===== Create System Table ===== | ||
- | The linker assembles a system table for the whole system. This table must be loaded to a prefixed address in the target system and holds information for the [[..: | + | The linker assembles a system table for the whole system. This table must be loaded to a prefixed address in the target system and holds information for the [[dev: |
- The system runs from the flash | - The system runs from the flash | ||
- The system runs from the RAM. | - The system runs from the RAM. | ||
Line 68: | Line 69: | ||
The structure of the system table is: | The structure of the system table is: | ||
- | [{{ .: | + | [{{ dev: |
First, the class constructor of the class kernel must be found. For this, the class name of the kernel is fetched from the configuration and the method //< | First, the class constructor of the class kernel must be found. For this, the class name of the kernel is fetched from the configuration and the method //< | ||
- | The references to the constant blocks are assembled as follows. First come the classes with class constructors. These classes are already sorted in correct order as described in [[class_initialization|Initialization]]. Classes without initialization follow afterwards. Arrays and interfaces have no constant block and are not listed. The exception to this rule are interfaces with class constructor, | + | The references to the constant blocks are assembled as follows. First come the classes with class constructors. These classes are already sorted in correct order as described in [[dev: |
===== Fix Memory Map ===== | ===== Fix 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 ('' | 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 ('' | ||
Now, the base address of each used segment can be determined. \\ | Now, the base address of each used segment can be determined. \\ |