-Xsection


This option specifies the default sections for data.

[Specification format]

-Xsection=string=value[,string=value]

 

-

Interpretation when omitted

The default section is set to .bss for uninitialized data, .data for initialized data, or .const for constant data.

[Detailed description]

-

This option specifies the default section attributes for data.

-

The following shows the character strings that can be specified for string and value, and the default sections for each setting. An error will occur if any other item is specified for string and value.

string

value

Default Section

Uninitialized Data

Initialized Data

Constant Data

data

r0_disp16

.zbss

.zdata

-

r0_disp23

.zbss23

.zdata23

-

ep_disp16

.ebss

.edata

-

ep_disp23

.ebss23

.edata23

-

gp_disp16

.sbss

.sdata

-

gp_disp23

.sbss23

.sdata23

-

const

zconst

-

-

.zconst

zconst23

-

-

.zconst23

pcconst16 [V1.07.00 or later]

-

-

.pcconst16

pcconst23 [V1.07.00 or later]

-

-

.pconst23

-

When the attribute is changed by #pragma section, the attribute specified by #pragma section will be valid.

 

Combinations of this option and other options which will cause an error are shown below.

-Xsection=data=ep_disp16

-Xsection=data=ep_disp23

An error will occur when specified simultaneously with -Omap.

An error will occur when specified simultaneously with -Osmap.

-Xsection=data=gp_disp16

-Xsection=data=gp_disp23

An error will occur when specified simultaneously with -r4=none.

-Xsection=data=r0_disp16

-Xsection=data=r0_disp23

An error will occur when specified simultaneously with -pid.

-Xsection=const=zconst

-Xsection=const=zconst23

An error will occur when specified simultaneously with -pirod.

-Xsection=const=pcconst16

-Xsection=const=pcconst23

An error will occur when not specified simultaneously with -pirod.