S5U1C17001C ManUal
EPSOn
9-5
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
9 linkEr
The section map is shown in Figure 9.4.2.1.
Copy before
using.
Shared section
Virtual section
∗
– .bss
VMA
∗
–
.data
VMA
__START_bss=0x0
RAM
ROM
__END_bss=__START_data
__END_data=__START_text_foo1
/
foo2
/
foo3
∗
– .rodata
LMA=VMA
∗
– .text
LMA=VMA
∗
– .data
LMA
LMA
__START_rodata=0x8000
__END_rodata=__START_text
__END_text=__START_data_lma
__START_dSIZEOF(.data)=__START_text_foo1_lma
__START_text_fSIZEOF(.text_foo1)=__START_text_foo2_lma
__START_text_fSIZEOF(.text_foo2)=__START_text_foo3_lma
foo1/foo2/foo3 –
.text_foo1/foo2/foo3
foo1 – .text_foo1
LMA
foo2 – .text_foo2
LMA
foo3 – .text_foo3
VMA
__END_text_foo1
/
foo2
/
foo3
Figure 9.4.2.1 Memory map
The substance of the
.data
section is placed on the LMA in the ROM, and it must be copied to the VMA in
the RAM (immediately following the
.bss
section) before it can be used. The
.data
section (VMA) in the
RAM is a virtual section that does not exist when the program starts executing. This method should be used for
handling variables that have an initial value. In this example, the
.data
sections in all the files are combined
into one section.
.text_foo1
is the
.text
section in the
foo1.o
file. Its actual code is located at the LMA in the ROM and
is executed at the VMA in the RAM. Also the
.text_foo2
and
.text_foo3
sections are used similarly
and the same VMA is set for these three sections. The RAM area for
.text_foo1/2/3
is a shared section
used for executing multiple .text sections by replacing the codes. A program cache for high-speed program
execution is realized in this method. The
.text
sections in other files than these three files are located in
the
.text
section that follows the
.rodata
section (0x8000–) and are executed at the stored address in the
ROM.
9
Linker
Summary of Contents for S5U1C17001C
Page 6: ......
Page 17: ...1 General S5U1C17001C Manual 1 General ...
Page 18: ......
Page 21: ...1 2 Install S5U1C17001C Manual 2 Installation ...
Page 22: ......
Page 29: ...3 SoftDev S5U1C17001C Manual 3 Software Development Procedures ...
Page 30: ......
Page 103: ...4 SrcFiles S5U1C17001C Manual 4 Source files ...
Page 104: ......
Page 121: ...5 IDE S5U1C17001C Manual 5 gnU17 iDE ...
Page 122: ......
Page 365: ...6 Compiler S5U1C17001C Manual 6 C Compiler ...
Page 366: ......
Page 385: ...7 Library S5U1C17001C Manual 7 library ...
Page 386: ......
Page 405: ...8 Assemblr S5U1C17001C Manual 8 assembler ...
Page 406: ......
Page 439: ...9 Linker S5U1C17001C Manual 9 linker ...
Page 440: ......
Page 449: ...10 Debugger S5U1C17001C Manual 10 Debugger ...
Page 450: ......
Page 626: ...11 Tools S5U1C17001C Manual 11 Other Tools ...
Page 627: ......
Page 696: ...S1C17 Family C Compiler Package Quick Reference Reference ...