]> rtime.felk.cvut.cz Git - arc.git/commitdiff
Added protection for undefined .calibration section in linkscript for ppc and cr4
authorpete <devnull@localhost>
Thu, 9 Dec 2010 10:02:22 +0000 (11:02 +0100)
committerpete <devnull@localhost>
Thu, 9 Dec 2010 10:02:22 +0000 (11:02 +0100)
arch/arm/arm_cr4/scripts/linkscript_gcc.ldf
arch/ppc/mpc55xx/scripts/linkscript_gcc.ldf

index 219fe37fb03e168a0709c73d5635ea2d103c4eb3..800860fe96dd6a984c5abf348a63e25217085da8 100644 (file)
@@ -42,6 +42,12 @@ SECTIONS
 __CALIB_RAM_START = ADDR(.calibration);\r
 __CALIB_RAM_END = ADDR(.calibration) + SIZEOF(.calibration);\r
 __CALIB_ROM_START      = LOADADDR(.calibration);\r
+#else\r
+       /* failsafe to avoid trouble with defined calib variables if CALIBRATION_ENABLED is not set */\r
+       .calibration : {\r
+                       *(.calibration)\r
+       } > flash\r
+       ASSERT(SIZEOF(.calibration) == 0, ".calibration section used but CALIBRATION_ENABLED is undefined")\r
 #endif /* CALIBRATION_ENABLED */\r
 \r
     .int_vecs :\r
index 6e67bf4ea3e711d974e5abe5b16e0bb9724e54d2..0420f72a204cfbc6082dcf88b84b9e63771c93ef 100644 (file)
@@ -38,8 +38,15 @@ SECTIONS
 __CALIB_RAM_START = ADDR(.calibration);\r
 __CALIB_RAM_END = ADDR(.calibration) + SIZEOF(.calibration);\r
 __CALIB_ROM_START      = LOADADDR(.calibration);\r
+#else\r
+       /* failsafe to avoid trouble with defined calib variables if CALIBRATION_ENABLED is not set */\r
+       .calibration : {\r
+                       *(.calibration)\r
+       } > flash\r
+       ASSERT(SIZEOF(.calibration) == 0, ".calibration section used but CALIBRATION_ENABLED is undefined")\r
 #endif /* CALIBRATION_ENABLED */\r
 \r
+\r
 #if defined(USE_FEE)\r
 #include "Fee_Memory_Cfg.h"\r
 \r