]> rtime.felk.cvut.cz Git - arc.git/blobdiff - include/MemMap.h
Linker problems for CW fixed
[arc.git] / include / MemMap.h
index aa0a1f90dc20f75225039fa62cca3af5614795ae..c72ae6262f09ae8ec11c75b18a3e374bba0d0f6e 100644 (file)
@@ -22,8 +22,6 @@
  *
  */\r
 \r
-\r
-\r
 #if defined(__GNUC__)\r
 \r
    #define SECTION_RAMLOG      __attribute__ ((section (".ramlog")))\r
 \r
 #elif defined(__CWCC__)\r
 \r
-   #pragma section RW ".ramlog" ".ramlog"\r
+/* The compiler manual states:\r
+ *   The section name specified in the\r
+ *   __declspec(section <section_name>) statement must be the\r
+ *   name of an initialized data section.  It is an error to use the uninitialized\r
+ *   data section name.\r
+ *\r
+ * NOTE!! The initialized data section name is __declspec() does not mean that\r
+ *        it will end up in that section, if its BSS data it will end-up in\r
+ *        ramlog_bss instead.\r
+ *\r
+ * NOTE!! Naming the initialized and uninitialized data section to the same\r
+ *        name will generate strange linker warnings (sometimes)\r
+ */\r
 \r
-   #define SECTION_RAMLOG      __declspec(section ".ramlog")\r
+   #pragma section RW ".ramlog_data" ".ramlog_bss"\r
+   #define SECTION_RAMLOG      __declspec(section ".ramlog_data")\r
 \r
 \r
 #endif\r