Chapter 3 Introduction to Operation

program locations after linking

program locations in the executable file after linking as above are shown below.

0X0000

 

 

 

 

 

~~

 

~~

 

Unused

 

 

~~

 

~~

 

 

 

 

 

 

0X080000

 

 

 

 

 

 

 

 

 

main

 

 

 

 

 

 

 

 

 

 

 

 

 

0X080016

 

 

 

 

 

 

 

 

 

time_filler

 

 

 

 

 

 

 

 

 

 

 

 

 

0X08001E

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

~~

 

 

 

 

 

 

Unused

 

~~

 

 

~~

 

 

 

 

 

 

 

~~

 

 

 

 

 

 

 

 

 

0X080200

 

 

data_set

 

 

 

 

 

 

 

 

 

 

 

 

 

0X08020E

 

 

 

 

 

 

 

 

 

data1

 

 

 

 

0X080211

 

 

 

 

 

 

 

 

 

 

~~

 

 

 

~~

 

Unused

 

 

 

 

~~

 

 

~~

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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."

Assembling and Linking Multiple Sections 37

Page 49
Image 49
Panasonic MN1030 user manual Program locations after linking, Program Location