This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM GNU GCC doesn't support section pragmas

for ARMClang toolchain in ARM DS, it support section pragmas in the following format.

#pragma clang section bss = ".uncached_bss" data = ".uncached_data"
int test= 0;

int test2= 0;
#pragma clang section bss="" data="" text=""

however, it seems that ARM GNU toolchain doesn' support this similar feature, in deed, gcc support through attribute , for example,
int __attribute__((__section__(".uncached_bss"))) test= 0 ;

int __attribute__((__section__(".uncached_bss"))) test2= 0 ;

without section pragma,  programmer must add attributes for the variables one by one.

so I advise ARM GNU toolchain to add simlilar support.

Best Regards,
Zhang Shiping.

Parents
  • Hmm, I think the __at thing is only feature of the Arm Compiler linker `armlink` and scatter files. That's AC-specific documentation that you're linking there :)

    I don't think it's supported in GCC? IIUC in GCC you have to do things manually with the linker script

    EDIT: And the same applies for open-source Clang which also uses linker scripts

Reply
  • Hmm, I think the __at thing is only feature of the Arm Compiler linker `armlink` and scatter files. That's AC-specific documentation that you're linking there :)

    I don't think it's supported in GCC? IIUC in GCC you have to do things manually with the linker script

    EDIT: And the same applies for open-source Clang which also uses linker scripts

Children