5.7.1.8 Embedded-data Option
The -membedded-data
option allocates const
objects to the read-only data section (.rodata
) first if possible, then next in the small data section (.sdata
) if possible, otherwise in the data section (.data
). This gives slightly slower code than the default, but reduces the amount of RAM required when executing, and thus may be preferred for some embedded systems. This option does not affect the placement of string literals. This is the default action if no option is specified.
The -mno-embedded-data
form of this option will not allocate const
objects to the read-only data section.