SPRUI04F july 2015 – april 2023
The --mem_model:const option allows const objects to be made far independently of the --mem_model:data option. This enables an application with a small amount of non-const data but a large amount of const data to move the const data out of .bss. Also, since consts can be shared, but .bss cannot, it saves memory by moving the const data into .const.
The --mem_model:const=type option has the following values:
--mem_model:const=data | Const objects are placed according to the --mem_model:data option. This is the default behavior. |
--mem_model:const=far | Const objects default to far independent of the --mem_model:data option. |
--mem_model:const=far_aggregates | Const aggregate objects default to far, scalar consts default to near. |
Consts that are declared far, either explicitly through the far keyword or implicitly using --mem_model:const are always placed in the .const section.