Epson S5U1C62000A Manual page 113

Epson cmos 4-bit single chip microcomputer manual
Table of Contents

Advertisement

test1.o
CODE1
(relocatable)
BSS1
(relocatable)
CODE2
(absolute 0x000–)
BSS2
(absolute 0xe00–)
test2.o
CODE3
(relocatable)
BSS3
(absolute 0xf00–)
CODE4
(relocatable)
BSS4
(relocatable)
The absolute sections CODE2, BSS2 and BSS3 are mapped to the location specified in the source files.
The start addresses of the relocatable sections in "test2.o" is specified by the -rcode and -rbss options,
so CODE3 is mapped from address 0x110 and CODE 4 follows CODE3. BSS4 is mapped from address
0x600.
Since the start addresses of the relocatable CODE and BSS sections in "test1.o" have not been specified,
they are mapped from the relocatable section start addresses specified by the -code and -bss options.
First the linker will try to map CODE1 from address 0x0100 to address 0x010f. If CODE2 is smaller
than 0x100 words and CODE 1 is smaller than 0x10 words, CODE1 can be mapped from address
0x0100. In this example, CODE1 is mapped behind CODE4 because CODE1 is larger than 0x10 words.
When the -or option is specified, the linker will try to map CODE1 in the same page as one of the
already mapped sections that has many branching relationships.
BSS1 is mapped from address 0x500, however it may be mapped behind BSS4 if BSS1 is larger than
0x100 words.
A section cannot be overlapped to other sections, therefore an error will occur if there is no free area
larger than the section size. For example, an error will occur if CODE2 is larger than 0x110 words.
S5U1C62000A MANUAL
(S1C60/62 FAMILY ASSEMBLER PACKAGE)
0x0000
0x0110
0x000
0x500
0x600
0xe00
0xf00
Fig. 6.10.2 Example of linking
EPSON
CHAPTER 6: LINKER
test.abs
CODE2
0x010f
CODE3
CODE4
CODE1
ROM area
0x1fff
0x4ff
BSS1
0x5ff
BSS4
RAM area
0xdff
BSS2
0xeff
BSS3
0xfff
101

Advertisement

Table of Contents
loading

Table of Contents