We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have installed MDK v5.33 (with arm c compiler v6.15). I found it can't compile the code which is compiled OK with MDK v5.31 (with arm c compiler v6.14).
with the cc v6.15, the pragma definition:
#pragma clang section text="the_region"
#pragma clang section rodata="the_region"
or merge the two pragma as:
#pragma clang section text="the_region" rodata="the_region"
cc v6.15 will generate error: this causes a section type conflict with a prior #pragma section.
but if I locate text and rodata to different region:
#pragma clang section text="the_region1" rodata="the_region2", or remove one of them, then no error happened.
By comparison, the cc v6.14 (MDK 5.31) has no this problem.
My question is whether cc v6.15 doesn't allow to locate text and rodata to the same region? or is this a bug?
you can check the release note of armclang v6.15
https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/version-6
The item staring with [SDCOMP-55172]...
Thank you for your reply.
I have checked the Release Note for Download Arm Compiler 6.15:
[SDCOMP-55172] The compiler incorrectly failed to report an error for certain section type conflicts, when the same section name is specified for more than one section type. This has been fixed. The compiler now reports one of the following errors:
It seems that arm cc v6.15 intends to forbid locating text and rodata to same section name.
but it's really unreasonable. not only arm cc v6 lower then v6.15 but also arm cc v5 allows to allocate text and rodata to the same section.