Chapter 3 Introduction to Operation
Assembling and Linking Multiple Sections 37
program locations after linking
program locations in the executable file after linking as above are shown below.
Figure: 3-2 program Location
If the program contains multiple sections, it is laid out using the following rules.
Each section is assigned the starting address specified to the linker.
Sections with the same section name and section attributes are merged in the order specified to
the linker--that is, in the order in which they appear in the object file names following the linker
options.
Rules for joining sections
1. Join in the order in which the sections appear during linking.
2. Join sections for which both name and attribute match.
3. Join sections for which either name or attribute match.
For further details, see Chapter 6 "Using the Linker" Section 6.3 "Command Options" Section 6.3.3
"Program Generation Options."
main
Unused
Unused
data_set
Unused
time_filler
0X0000
0
X080000
0
X080016
0
X08001E
0
X080200
0
X08020E data1
0
X080211
~~
~~
~~
~~
~~
~~
~~
~~ ~~
~~
~~
~~