Part Number: C29-CGT
Hi all,
The compiler create constants like for the following scenarios:
- jump table => located in the section ".rodata.<function name>"
- switch table => located in the section ".rodata..Lswitch.table.<function name>"
- string => located in the section ".rodata.str1.<an id>.1"
Customer thinks that there are some limitations related to these constants.
First, when using "#pragma clang section rodata=".rodata.<something>"" for functions, the ".rodata" created by the compiler do not use the section ".rodata.<something>". This is a huge limitation because it does not allow one to map these input sections to the proper output sections in the linker command file the same way one may do for the ".text" section.
Here is an example of a "#pragma section" for the code:
#pragma clang section text=".text.PROJ_SEC_CODE_LOCAL_CPU1" rodata=".rodata.PROJ_SEC_CODE_LOCAL_CPU1" bss=".bss.PROJ_SEC_CODE_LOCAL_CPU1" data=".data.PROJ_SEC_CODE_LOCAL_CPU1"
Second issue if the above one cannot be solved: for a table of jumps, the name of the section does not contain a keyword like ".Lswitch.table" for the switch tables or "str1" for the strings which makes the mapping of these input sections at the file level or independently of the files impossible because one has to take into account each function independently
Could you suggest workarounds to the above? Also, are there other scenarios that would exhibit the same issue on top of the 3 ones listed (jump tables, switch tables, strings)?
Best regards,
François.