-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

-

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

When ep_disp16 or ep_disp23 is specified for value, -Xep=fix is assumed for compilation. If -Omap or -Osmap is used together with this setting, an error will occur.