The element pointer is a pointer that is provided to realize faster access (loading and storing) by allocating data (variables) that are globally declared within an application to RAM area in RH850 device.
Data (variables) that is globally declared and allocated to internal RAM area is referenced with ep-relative.
Set the value of the element pointer symbol (ep symbol) as the address set in the global pointer (ep).
rlink creates the definition information and sets the address automatically.
The following error message is output for code that makes references relative to the ep.
The value of the ep symbol is determined from sections with relocation attributes of tdata, tdata4/5/7/8, tbss4/5/7/8, edata, ebss, edata23 and ebss23, in the following order of precedence.
Below is an example of how the value of the ep symbol is determined.
The ep symbol is set to the start address of the first section in this order: tdata -> tdata4, or tbss4 -> ... -> tdata8, or tbss8.
Sets the halfway point between the start address of the edata or ebss section with the smallest address, and the end address of the edata or ebss section with the greatest address (multiple of 2; if the midway point is an odd number, takes the first multiple of two) as the address value of the ep symbol.
If edata and ebss sections are placed in this order, from lowest to highest address, and there is a non-eligible section in between the edata and ebss sections |
Sets the halfway point between the start address of the edata23 or ebss23 section with the smallest address, and the end address of the edata23 or ebss23 section with the greatest address (multiple of 2; if the midway point is an odd number, takes the first multiple of two) as the address value of the ep symbol.
If edata23 and ebss23 sections are placed in this order, from lowest to highest address, and there is a non-eligible section in between the edata23 and ebss23 sections |
If there are no sections with tdata, tdata4/5/7/8, tbss4/5/7/8, edata, ebss, edata23, or ebss23 relocation attributes |
If there are no data, tdata4/5/7/8, tbss4/5/7/8, edata, ebss, edata23, or ebss23 sections, then the address value of the ep symbol is set to zero (0).