Chapter 6 Using Linker

6.3.3Program Generation Options

g

Output debug information to the executable format file

Functional description

This option causes the linker to include in the executable file information for use in debugging at the source code level.

This information includes the following;

Names and addresses of variables

Detailed information on variables

Correspondences between line numbers and code addresses

With this information, debugging is much easier since the user can specify variables by name instead of by address.

NOTE:

The g option must also be specified when assembling. If the g option is not

 

 

specified for either the assembler or linker, debug information will not be output

 

 

to the executable format file (.EX). If files assembled with the g option and files

 

 

not assembled with the g option are linked with the g option, debug information

 

 

will be output only for the files assembled with the g option.

 

 

 

Rules of use

This option is specified with the hyphen (-) option specification character, followed by the lower-case letter 'g'.

ld103 -g main.rf sub.rf

Default specification

Debug information will not be output.

It is also possible to change the default with an entry in the linker’s start-up file. See Chapter 1 “Getting Started” section 1.5 “Setup”.

Command Options 97

Page 109
Image 109
Panasonic MN1030 user manual Output debug information to the executable format file, Ld103 -g main.rf sub.rf