c - What are #pragma equivalencies in gcc? -
my compiler ignoring:
#pragma data_section(..., "iram_init");
and
#pragma code_section(..., ".icode");
where ... function.
this causing segmentation errors when run program. suppose because incorrect syntax gcc compiler ? equivalent ?
thanks
(context: on raspberry pi in raspian)
the equivalent are:
__attribute__((section(".icode"))) void fct1(int toto) { ... } __attribute__((section("iram_init"))) int fct2(void) { ... } __attribute__((section(".var"))) int myvar;
but take care linker script (commonly ".ld" gnu tools): thoses sections have defined , mapped correct memory
Comments
Post a Comment